:root {
  color-scheme: light;
  --ink: #171512;
  --soft-ink: #2c2822;
  --muted: #676054;
  --paper: #f4f0e7;
  --white: #fffdf8;
  --line: #d8cec0;
  --field: #fbf8f1;
  --moss: #435438;
  --forest: #1f3a2e;
  --teal: #0d6f73;
  --clay: #a34f32;
  --gold: #d9a441;
  --sand: #ead8ac;
  --shadow: 0 22px 60px rgba(23, 21, 18, .14);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(244, 240, 231, .95), rgba(244, 240, 231, 1)),
    radial-gradient(circle at 25% 0, rgba(217, 164, 65, .24), transparent 38%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

p {
  color: inherit;
  font-size: 16px;
  line-height: 1.55;
}

h1 {
  max-width: 840px;
  font-size: clamp(36px, 6.5vw, 78px);
  line-height: .95;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(23px, 3.2vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(244, 240, 231, .9);
  border-bottom: 1px solid rgba(216, 206, 192, .85);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--ink);
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.brand span {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand small,
.eyebrow,
.panel-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar a,
.topbar button,
.hero-actions a,
.hero-actions button,
.detail button,
.checkout button,
.cart-route-promo a,
.cart-page-intro a,
.cart-total-card button,
.drawer footer button,
.drawer footer a,
.product button,
.cart-panel button,
.cart-panel a,
.quick-kits button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 900;
  line-height: 1;
}

.topbar nav a {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.cart-trigger strong {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 68px;
}

.storefront {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 20px;
  min-height: 520px;
  padding: clamp(24px, 5vw, 52px);
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(23, 21, 18, .94), rgba(31, 58, 46, .72)),
    url("https://dcdn-us.mitiendanube.com/stores/005/244/652/products/whatsapp-image-2025-10-08-at-19-40-46-3729dcdafe38f3439017599749026840-640-0.webp") center/cover;
  border: 1px solid rgba(255, 253, 248, .2);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  align-content: end;
  gap: 18px;
  max-width: 620px;
}

.hero-copy h1 {
  max-width: 620px;
  font-size: clamp(36px, 5.2vw, 64px);
}

.hero-copy .eyebrow,
.hero-product .panel-label {
  color: #f4d98a;
}

.hero-copy p {
  max-width: 690px;
  color: rgba(255, 253, 248, .88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-actions button {
  background: transparent;
  border-color: rgba(255, 253, 248, .72);
}

.hero-product {
  align-self: end;
  display: grid;
  gap: 12px;
  padding: 18px;
  min-height: 250px;
  background: rgba(23, 21, 18, .58);
  border: 1px solid rgba(255, 253, 248, .22);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.hero-product img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
}

.hero-product strong {
  font-size: 24px;
  line-height: 1.05;
}

.hero-product p {
  color: rgba(255, 253, 248, .82);
  font-size: 14px;
}

.hero-product .price {
  color: var(--sand);
}

.cart-panel,
.filters,
.detail,
.checkout,
.drawer-box,
.product {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.cart-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 24px;
  min-height: 520px;
  padding: 24px;
}

.cart-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 36px;
}

.cart-panel p {
  color: var(--muted);
  font-size: 14px;
}

.cart-panel button {
  border-color: var(--teal);
  background: var(--teal);
}

.cart-panel a {
  display: grid;
  place-items: center;
  border-color: var(--teal);
  background: var(--teal);
}

.cart-mini {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 238px;
  overflow: auto;
  padding-right: 4px;
}

.cart-mini-empty {
  color: var(--muted);
  font-size: 13px;
}

.cart-mini-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf5eb;
}

.cart-mini-item img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--paper);
}

.cart-mini-item strong {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-mini-item span {
  color: var(--clay);
  font-size: 12px;
  font-weight: 900;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metrics div {
  display: grid;
  gap: 5px;
  min-height: 92px;
  align-content: center;
  padding: 18px;
  background: var(--white);
}

.metrics span {
  color: var(--clay);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.metrics strong {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.quick-kits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.quick-kits button {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}

.quick-kits button.is-active {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

input,
select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 0 12px;
}

.switch-row {
  grid-template-columns: 20px 1fr;
  align-items: center;
}

.switch-row input {
  min-height: 18px;
  width: 18px;
  accent-color: var(--teal);
}

.catalog-area {
  display: grid;
  gap: 14px;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 8px;
}

.catalog-head p:last-child {
  max-width: 370px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 100%;
  box-shadow: 0 12px 28px rgba(23, 21, 18, .06);
}

.product.is-highlight::before {
  content: "Destaque";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.product img,
.fallback-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--moss), var(--teal));
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product h3 {
  min-height: 48px;
  margin: 0;
  font-size: 18px;
  line-height: 1.24;
  letter-spacing: 0;
}

.product p {
  color: var(--muted);
  font-size: 14px;
}

.product-meta,
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-meta span,
.product-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #faf5eb;
}

.price {
  color: var(--clay);
  font-size: 25px;
  font-weight: 900;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.product-actions button:first-child {
  background: transparent;
  color: var(--ink);
}

.detail,
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
}

.detail button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.checkout {
  grid-template-columns: minmax(240px, .8fr) minmax(260px, 1.2fr);
  align-items: start;
}

.cart-route-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.cart-route-promo p {
  color: var(--muted);
}

.cart-route-promo a {
  display: grid;
  place-items: center;
  border-color: var(--forest);
  background: var(--forest);
}

.cart-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: stretch;
}

.cart-page-intro,
.cart-total-card,
.cart-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.cart-page-intro {
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 400px;
  padding: clamp(24px, 5vw, 52px);
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(23, 21, 18, .92), rgba(13, 111, 115, .78)),
    url("https://dcdn-us.mitiendanube.com/stores/005/244/652/products/whatsapp-image-2025-10-08-at-19-40-46-3729dcdafe38f3439017599749026840-640-0.webp") center/cover;
  box-shadow: var(--shadow);
}

.cart-page-intro .eyebrow {
  color: #f4d98a;
}

.cart-page-intro p {
  max-width: 680px;
  color: rgba(255, 253, 248, .88);
}

.cart-page-intro a {
  width: fit-content;
  border-color: var(--gold);
  background: var(--gold);
  color: var(--ink);
}

.cart-total-card {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 24px;
}

.cart-total-card strong {
  color: var(--clay);
  font-size: clamp(34px, 4vw, 54px);
  line-height: .95;
}

.cart-total-card p {
  color: var(--muted);
}

.cart-total-card button {
  margin-top: 10px;
  background: transparent;
  color: var(--ink);
}

.cart-review {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 24px;
}

.cart-items-page {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.cart-items-page .cart-item {
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f1;
}

.cart-items-page .cart-item img {
  width: 96px;
  height: 96px;
}

.cart-line-total {
  color: var(--clay);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.checkout p,
.detail p {
  color: var(--muted);
}

.checkout form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout form button,
.checkout output {
  grid-column: 1 / -1;
}

.checkout output {
  min-height: 28px;
  color: var(--teal);
  font-weight: 900;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  justify-content: end;
  background: rgba(23, 21, 18, .5);
}

.drawer.is-open {
  display: flex;
}

.drawer-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(450px, 100%);
  height: 100%;
  border-radius: 0;
  border-right: 0;
}

.drawer header,
.drawer footer {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.drawer header button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.cart-item img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.25;
}

.quantity-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quantity-row button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.quantity-row button:last-child {
  width: auto;
  padding: 0 10px;
}

.drawer footer {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}

.drawer footer button {
  background: transparent;
  color: var(--ink);
}

.drawer footer a {
  text-align: center;
}

@media (max-width: 1040px) {
  .storefront,
  .hero-panel,
  .catalog-layout,
  .cart-page,
  .cart-route-promo {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters > div,
  .switch-row {
    grid-column: 1 / -1;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar,
  .topbar nav {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .cart-trigger {
    grid-column: 1 / -1;
  }

  main {
    width: min(100% - 24px, 1240px);
    padding-top: 16px;
  }

  .hero-panel {
    min-height: 0;
    padding: 22px;
  }

  .hero-product {
    min-height: auto;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .filters,
  .checkout,
  .checkout form,
  .detail,
  .cart-route-promo {
    grid-template-columns: 1fr;
  }

  .catalog-head {
    display: grid;
  }

  .catalog-head p:last-child {
    text-align: left;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .cart-items-page .cart-item {
    grid-template-columns: 76px 1fr;
  }

  .cart-items-page .cart-item img {
    width: 76px;
    height: 76px;
  }

  .cart-line-total {
    grid-column: 2;
  }
}
