:root {
  color: #292524;
  background: #fffaf5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

body.cart-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid #ffe4e6;
  background: rgb(255 255 255 / 92%);
  padding-block: 2rem;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.75rem;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff;
  padding: .65rem .85rem;
  color: #9f1239;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.cart-badge {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: .7rem;
}

.cart-badge[hidden] {
  display: none;
}

.eyebrow {
  margin: 0;
  color: #f43f5e;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
}

h1 {
  margin: .45rem 0 0;
  color: #1c1917;
  font-size: clamp(2.25rem, 7vw, 3rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.subtitle {
  margin: .7rem 0 0;
  color: #78716c;
  font-size: .9rem;
}

.catalog-shell {
  padding-block: 1.5rem 3rem;
}

.mobile-cart-bar {
  display: none;
}

.controls {
  position: sticky;
  z-index: 10;
  top: 0;
  margin-inline: -1rem;
  padding: .5rem 1rem 1rem;
  background: rgb(255 250 245 / 95%);
  backdrop-filter: blur(10px);
}

.search {
  position: relative;
  display: block;
  max-width: 36rem;
}

.control-row {
  display: grid;
  gap: .65rem;
}

.search span {
  position: absolute;
  top: 50%;
  left: .9rem;
  color: #a8a29e;
  font-size: 1.35rem;
  transform: translateY(-53%);
}

.search input {
  width: 100%;
  border: 1px solid #ffe4e6;
  border-radius: 1rem;
  outline: none;
  background: #fff;
  padding: .8rem 1rem .8rem 2.55rem;
  color: #292524;
  font-size: .9rem;
}

.search input:focus {
  border-color: #fda4af;
  box-shadow: 0 0 0 4px #ffe4e6;
}

.price-sort {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  color: #57534e;
  font-size: .85rem;
  font-weight: 750;
}

.price-sort select {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid #ffe4e6;
  border-radius: .9rem;
  outline: none;
  background: #fff;
  padding: .55rem .75rem;
  color: #292524;
  font-size: .9rem;
}

.price-sort select:focus {
  border-color: #fda4af;
  box-shadow: 0 0 0 4px #ffe4e6;
}

.category {
  border: 1px solid #ffe4e6;
  background: #fff;
  color: #57534e;
  font-size: .85rem;
  font-weight: 750;
  cursor: pointer;
}

.category.active {
  border-color: #f43f5e;
  background: #f43f5e;
  color: #fff;
}

.category-count {
  display: inline-grid;
  min-width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 999px;
  background: #fff1f2;
  color: #9f1239;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.category.active .category-count {
  background: rgb(255 255 255 / 22%);
  color: #fff;
}

.mobile-category-menu {
  margin-top: .75rem;
}

.mobile-category-menu summary {
  display: flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ffe4e6;
  border-radius: .9rem;
  background: #fff;
  padding: .55rem .8rem;
  color: #57534e;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}

.mobile-category-menu summary::after {
  content: '⌄';
  color: #9f1239;
  font-size: 1.1rem;
}

.mobile-category-menu[open] summary {
  border-color: #fda4af;
}

.mobile-category-menu[open] summary::after {
  transform: rotate(180deg);
}

.mobile-categories {
  display: grid;
  max-height: min(50dvh, 22rem);
  gap: .45rem;
  overflow-y: auto;
  margin-top: .5rem;
  border: 1px solid #ffe4e6;
  border-radius: 1rem;
  background: #fff;
  padding: .5rem;
}

.mobile-category {
  display: flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-radius: .7rem;
  padding: .45rem .65rem;
  text-align: left;
}

.category-sidebar {
  display: none;
}

.catalog-layout {
  min-width: 0;
}

.notice {
  margin: 2rem 0;
  color: #78716c;
  text-align: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.25rem;
}

.product-card {
  overflow: hidden;
  border: 1px solid #ffe4e6;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
}

.image-frame {
  overflow: hidden;
  aspect-ratio: 1;
  background: #fff1f2;
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail {
  padding: .9rem;
}

.product-detail h2 {
  display: -webkit-box;
  min-height: 2.5rem;
  margin: 0;
  overflow: hidden;
  font-size: .9rem;
  line-height: 1.25rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price {
  margin: .55rem 0 0;
  color: #e11d48;
  font-size: 1.15rem;
  font-weight: 850;
}

.add-cart {
  width: 100%;
  min-height: 2.65rem;
  margin-top: .8rem;
  border: 0;
  border-radius: .85rem;
  background: #f43f5e;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.add-cart:active {
  transform: translateY(1px);
}

.cart-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgb(28 25 23 / 45%);
  backdrop-filter: blur(2px);
}

.cart-drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  display: grid;
  width: min(100%, 28rem);
  height: 100dvh;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fffaf5;
  box-shadow: -12px 0 40px rgb(28 25 23 / 18%);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #ffe4e6;
  background: #fff;
  padding: 1.15rem;
}

.cart-header h2 {
  margin: .25rem 0 .2rem;
  font-size: 1.45rem;
}

.cart-header span {
  color: #78716c;
  font-size: .8rem;
}

.icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid #ffe4e6;
  border-radius: 999px;
  background: #fff;
  color: #57534e;
  font-size: 1.6rem;
  cursor: pointer;
}

.cart-notice {
  margin: .75rem .9rem 0;
  border-radius: .8rem;
  background: #fff;
  padding: .75rem;
  color: #57534e;
  font-size: .8rem;
  line-height: 1.4;
}

.cart-notice[data-type="warning"] {
  background: #fffbeb;
  color: #92400e;
}

.cart-notice[data-type="error"] {
  background: #fff1f2;
  color: #be123c;
}

.cart-items {
  overflow-y: auto;
  padding: .9rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: .75rem;
  border-bottom: 1px solid #ffe4e6;
  padding-block: .85rem;
}

.cart-item > img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: .8rem;
  background: #fff1f2;
  object-fit: cover;
}

.cart-item-detail {
  min-width: 0;
}

.cart-item-detail h3 {
  margin: 0;
  font-size: .88rem;
  line-height: 1.3;
}

.cart-item-detail p {
  margin: .35rem 0;
  color: #e11d48;
  font-size: .8rem;
  font-weight: 750;
}

.cart-item.unavailable {
  opacity: .78;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .55rem;
}

.quantity {
  display: grid;
  grid-template-columns: 2.5rem 2.2rem 2.5rem;
  align-items: center;
  border: 1px solid #fecdd3;
  border-radius: .75rem;
  overflow: hidden;
  background: #fff;
  text-align: center;
}

.quantity-button {
  width: 2.5rem;
  min-height: 2.5rem;
  border: 0;
  background: #fff1f2;
  color: #9f1239;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
}

.quantity-button:disabled {
  color: #d6d3d1;
  cursor: not-allowed;
}

.remove-item,
.clear-cart {
  border: 0;
  background: transparent;
  color: #be123c;
  font-size: .77rem;
  font-weight: 750;
  cursor: pointer;
}

.unavailable-label {
  color: #be123c;
  font-size: .72rem;
  font-weight: 750;
}

.cart-empty {
  align-self: start;
  margin: 2.5rem 1rem;
  color: #57534e;
  text-align: center;
}

.cart-empty span {
  display: block;
  margin-top: .4rem;
  color: #a8a29e;
  font-size: .82rem;
}

.cart-footer {
  border-top: 1px solid #ffe4e6;
  background: #fff;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cart-total-row strong {
  color: #e11d48;
  font-size: 1.35rem;
}

.cart-footer p {
  margin: .6rem 0 .85rem;
  color: #78716c;
  font-size: .75rem;
  line-height: 1.4;
}

.whatsapp-button {
  width: 100%;
  min-height: 3.1rem;
  border: 0;
  border-radius: .95rem;
  background: #16a34a;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.whatsapp-button:disabled {
  background: #d6d3d1;
  cursor: not-allowed;
}

.clear-cart {
  display: block;
  margin: .7rem auto 0;
}

.clear-cart:disabled {
  color: #d6d3d1;
  cursor: not-allowed;
}

.empty {
  margin-top: 2rem;
  border: 1px dashed #fecdd3;
  border-radius: 1.5rem;
  background: #fff;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.empty span {
  display: block;
  margin-top: .5rem;
  color: #78716c;
  font-size: .9rem;
}

@media (min-width: 640px) {
  .site-header {
    padding-inline: 1rem;
  }

  .catalog-shell {
    padding-inline: 1rem;
    padding-block-start: 2rem;
  }

  .controls {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .control-row {
    grid-template-columns: minmax(0, 1fr) 13rem;
    align-items: end;
    max-width: 49.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
  }

  .product-detail {
    padding: 1rem;
  }

  .product-detail h2 {
    font-size: 1rem;
  }
}

@media (max-width: 639px) {
  .catalog-shell {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  .mobile-cart-bar {
    position: fixed;
    z-index: 35;
    right: .75rem;
    bottom: max(.5rem, env(safe-area-inset-bottom));
    left: .75rem;
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid #be123c;
    border-radius: 1rem;
    background: #e11d48;
    padding: .55rem .8rem;
    color: #fff;
    box-shadow: 0 .6rem 1.6rem rgb(136 19 55 / 28%);
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
  }

  .mobile-cart-bar[hidden] {
    display: none;
  }

  .mobile-cart-summary,
  .mobile-cart-total {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
  }

  .mobile-cart-total {
    font-variant-numeric: tabular-nums;
  }

  .mobile-cart-total strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (min-width: 900px) {
  .mobile-category-menu {
    display: none;
  }

  .catalog-layout {
    display: grid;
    grid-template-columns: minmax(11.25rem, 13.75rem) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
  }

  .category-sidebar {
    position: sticky;
    top: 1.25rem;
    display: block;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
    border: 1px solid #ffe4e6;
    border-radius: 1.25rem;
    background: #fff;
    padding: .85rem;
  }

  .category-sidebar h2 {
    margin: .15rem .25rem .75rem;
    color: #292524;
    font-size: .9rem;
  }

  .desktop-categories {
    display: grid;
    gap: .35rem;
  }

  .desktop-category {
    display: flex;
    min-height: 2.55rem;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    border-radius: .75rem;
    padding: .4rem .55rem;
    text-align: left;
  }

  .desktop-category > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .catalog-results .product-grid {
    margin-top: 0;
  }

  .catalog-results .empty {
    margin-top: 0;
  }

  .catalog-results .notice {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  .cart-button > span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-drawer {
    transition: none;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
