:root {
  --bg: #f6f1e8;
  --bg-card: #fffdf8;
  --ink: #2b1e15;
  --muted: #6a5748;
  --line: #e4d5c3;
  --brand: #8d5a37;
  --brand-dark: #6e4326;
  --accent: #1f7a6f;
  --ok: #1d8f5a;
  --danger: #b13a2e;
  --radius: 18px;
  --shadow: 0 12px 35px rgba(52, 31, 19, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.45;
  background:
    radial-gradient(1200px 500px at 10% -20%, #f0ddc9 0%, transparent 60%),
    radial-gradient(900px 460px at 90% 0%, #e8efe1 0%, transparent 55%),
    var(--bg);
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 2rem 0 1.45rem;
}

.hero--compact {
  padding-bottom: 0.8rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
  min-height: 126px;
}

.hero-brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
  flex: 0 0 auto;
}

.hero-brand__logo {
  display: block;
  height: 100%;
  width: auto;
  max-width: min(560px, 62vw);
  max-height: none;
  object-fit: contain;
}

.hero-brand:hover .hero-brand__logo,
.hero-brand:focus-visible .hero-brand__logo {
  filter: saturate(1.05);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.topnav a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.44rem 0.78rem;
  font-weight: 700;
  font-size: 0.94rem;
}

.cart-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.cart-toggle__icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.cart-toggle__icon svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.72rem;
}

.cart-toggle .cart-count {
  position: absolute;
  right: -2px;
  bottom: 2px;
  margin-left: 0;
}

.hero__shell {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  background:
    linear-gradient(140deg, rgba(141, 90, 55, 0.11) 0%, rgba(255, 253, 248, 0.95) 50%),
    var(--bg-card);
  padding: 1.5rem 1.6rem;
}

.hero__kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.hero__title {
  margin: 0.5rem 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
}

.hero__instagram {
  margin-top: 1.1rem;
  display: inline-flex;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
}

.app-shell {
  padding-bottom: 2rem;
}

.view-panel {
  display: grid;
  gap: 1rem;
}

.view-panel[hidden] {
  display: none !important;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(56, 31, 15, 0.08);
  padding: 1rem;
}

.block-title {
  margin: 0;
}

.hero__instagram--ghost {
  margin-left: 0.4rem;
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

body.has-cart-drawer {
  overflow: hidden;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 18, 0.18);
  z-index: 40;
}

.cart-overlay[hidden],
.cart-drawer[hidden] {
  display: none !important;
}

.filtros-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.filtros-row .filtro-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.filtros-row .filtro-control > span {
  color: var(--muted);
}

.filtros-row .filtro-control select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid #c8aa8d;
  border-radius: 0;
  min-height: 34px;
  padding: 0.35rem 1.8rem 0.35rem 0.55rem;
  min-width: 106px;
  font: inherit;
  line-height: 1;
  font-size: 0.84rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236e4326' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M1 1.25 6 6.25 11 1.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.6rem;
}

.filtros-row .filtro-control select:focus {
  outline: 1px solid var(--brand);
  outline-offset: 1px;
}

.chip-row {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #d8c7b1;
  background: #f8f0e5;
  color: #69462e;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
}

.btn-link {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.producto-detalle {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.6rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 2.4rem;
}

.producto-galeria {
  display: grid;
  gap: 1rem;
}

.producto-galeria__main {
  min-height: 620px;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 248, 0.52);
}

.producto-galeria__main img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  max-height: 720px;
  object-fit: contain;
}

.producto-galeria__thumbs {
  display: flex;
  gap: 0.7rem;
}

.producto-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  background: #fff;
  border: 1px solid rgba(43, 30, 21, 0.2);
  cursor: pointer;
}

.producto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto-thumb.is-active {
  border-color: var(--ink);
}

.producto-detalle__body {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding-top: 2.4rem;
}

.producto-detalle__body h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.producto-detalle__body p {
  margin: 0;
  color: var(--muted);
}

.detalle-etiqueta {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}

.detalle-headline {
  display: grid;
  gap: 0.35rem;
}

.detalle-precio {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.detalle-precio--agotado {
  color: var(--danger);
}

.detalle-stock {
  font-size: 0.88rem;
  color: var(--muted);
}

.detalle-actions {
  display: grid;
  gap: 0.8rem;
  max-width: 320px;
}

.detalle-actions__row {
  display: grid;
  gap: 0.35rem;
}

.detalle-actions input {
  width: 132px;
  border: 1px solid rgba(43, 30, 21, 0.24);
  border-radius: 0;
  min-height: 46px;
  padding: 0.4rem 0.8rem;
  font: inherit;
}

.btn-primary--outline {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 2px solid rgba(43, 30, 21, 0.28);
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detalle-copy {
  margin-top: 1rem;
  max-width: 38ch;
  display: grid;
  gap: 0.7rem;
}

.detalle-copy__line {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #57493e;
}

.detalle-relacionados {
  display: grid;
  gap: 0.6rem;
  margin-top: 2rem;
}

.detalle-relacionados h3 {
  margin: 0;
  font-size: 1.05rem;
}

.section-head h2,
.checkout h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-head p {
  margin: 0.35rem 0 0.9rem;
  color: var(--muted);
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.3rem;
}

.producto-card,
.checkout__panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(56, 31, 15, 0.08);
}

.producto-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: #e4e7eb;
  border: 1px solid #dde1e6;
  box-shadow: none;
  border-radius: 26px;
  padding: 1rem;
}

.producto-media {
  background: transparent;
  min-height: 300px;
  display: grid;
  place-items: center;
}

.producto-media img {
  width: 100%;
  height: 285px;
  object-fit: contain;
  transition: transform 180ms ease;
}

.placeholder-media {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
}

.producto-body {
  padding: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.producto-body h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: 500;
  text-transform: none;
}

.producto-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
}

.producto-meta {
  display: grid;
  gap: 0.25rem;
}

.producto-precio {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1a1d21;
}

.precio-agotado {
  color: var(--danger);
  letter-spacing: 0.03em;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 700;
}

.producto-mini-cart {
  width: 30px;
  height: 30px;
  color: #252a2e;
  opacity: 0.92;
  pointer-events: none;
}

.producto-mini-cart svg {
  width: 100%;
  height: 100%;
}

.btn-add,
.btn-primary {
  border: 0;
  border-radius: 12px;
  min-height: 42px;
  font-weight: 700;
  cursor: pointer;
}

.producto-card:hover .producto-media img {
  transform: scale(1.02);
}

.btn-add {
  background: #efe5da;
  color: var(--brand-dark);
}

.btn-add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  position: sticky;
  top: 0.7rem;
}

.cart-page {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 0;
}

.cart-page__backdrop {
  background: rgba(43, 30, 21, 0.08);
  border-right: 1px solid rgba(43, 30, 21, 0.08);
}

.cart-drawer {
  background: #fffdf9;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
}

.cart-drawer--overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100vh;
  z-index: 50;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
}

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem 0.9rem;
}

.cart-drawer__head h2 {
  margin: 0;
  text-transform: uppercase;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.cart-drawer__close {
  text-decoration: none;
  color: #7b7480;
  font-size: 2rem;
  line-height: 1;
}

.checkout__panel {
  padding: 1rem;
}

.checkout__panel--form {
  margin: 1rem 1.4rem 1.4rem;
  padding: 1rem 0 0;
  border-top: 1px solid #e7dfd5;
}

.checkout-page {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 1.2rem;
  align-items: start;
}

.checkout-page__form .checkout__panel--form {
  margin: 0.4rem 0 0;
  padding: 1rem 1rem 1rem;
  border-top: 0;
}

.checkout-page__summary {
  position: sticky;
  top: 1rem;
}

.carrito-items--checkout {
  padding: 0;
}

.carrito-items {
  display: grid;
  gap: 0;
  padding: 0 1.4rem;
}

.carrito-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid #e7dfd5;
}

.carrito-item__media {
  width: 64px;
  height: 64px;
  border: 1px solid #ddd2c4;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.carrito-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carrito-item__body {
  display: grid;
  gap: 0.7rem;
}

.carrito-item__top,
.carrito-item__bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.carrito-item h4 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
}

.carrito-item p {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.carrito-item__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-remove {
  border: 0;
  background: transparent;
  color: #7da1ff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.btn-qty {
  border: 1px solid #83a9ff;
  color: #4d84ff;
  background: #fff;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
}

.cart-sugeridos-section {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid #e7dfd5;
}

.cart-sugeridos-section h3 {
  margin: 0 0 1rem;
  text-transform: uppercase;
  font-size: 1.4rem;
  text-align: center;
}

.cart-sugeridos {
  display: grid;
  gap: 1rem;
}

.cart-sugerido {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.cart-sugerido__media {
  width: 64px;
  height: 64px;
  border: 1px solid #ddd2c4;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.cart-sugerido__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-sugerido__body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.cart-sugerido__body h4,
.cart-sugerido__body p {
  margin: 0;
}

.cart-sugerido__body h4 {
  text-transform: uppercase;
  font-size: 0.98rem;
}

.cart-sugerido__body p {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-sugerido {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: #4d84ff;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-sugerido:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cart-summary {
  margin-top: auto;
  padding: 1.1rem 1.4rem 1.3rem;
  border-top: 1px solid #e7dfd5;
}

.resumen {
  display: grid;
  gap: 0.4rem;
}

.resumen__fila {
  display: flex;
  justify-content: space-between;
}

.resumen__fila--total {
  font-size: 1.06rem;
}

.cart-summary__secure {
  margin: 0.8rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 700;
}

.cart-summary__cta {
  display: block;
  text-decoration: none;
  text-align: center;
  line-height: 42px;
}

.form-row {
  display: grid;
  gap: 0.28rem;
  margin-bottom: 0.65rem;
}

.form-row label {
  font-size: 0.86rem;
  color: var(--muted);
}

.form-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 40px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.form-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 40px;
  padding: 0.6rem 0.7rem;
  font: inherit;
  background: #fff;
}

.shipping-fields {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  margin-bottom: 0.65rem;
}

.pickup-contact-box {
  border: 1px solid #d9cebf;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  margin: 0 0 0.65rem;
  background: #fffaf2;
}

.pickup-contact-box__title {
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: var(--ink);
}

.pickup-contact-box p {
  margin: 0.18rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pickup-contact-box a {
  color: var(--brand-dark);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}

.btn-primary--dark {
  background: #171515;
  color: #fff;
  text-transform: uppercase;
  border-radius: 10px;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.checkout-note {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.error-box {
  margin: 0 0 0.7rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid #efc2bc;
  color: var(--danger);
  background: #fff2ef;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.9rem;
}

.footer-links a {
  color: var(--brand-dark);
  text-decoration: none;
  font-size: 0.9rem;
}

.resultado-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.resultado-card {
  width: min(700px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.resultado-titulo {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.resultado-subtitulo,
.resultado-nota {
  color: var(--muted);
}

.voucher {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #fff;
}

.voucher__titulo {
  margin: 0 0 0.6rem;
}

.voucher__fila {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.38rem 0;
  border-bottom: 1px dashed #e8ded1;
}

.voucher__fila:last-child {
  border-bottom: 0;
}

.voucher__label {
  color: var(--muted);
}

.voucher__fila--total .voucher__valor {
  font-weight: 800;
}

.lista-items {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .cart-page {
    grid-template-columns: 1fr;
  }

  .checkout-page {
    grid-template-columns: 1fr;
  }

  .cart-page__backdrop {
    display: none;
  }

  .checkout {
    position: static;
  }

  .filtros-row {
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
  }

  .producto-detalle {
    grid-template-columns: 1fr;
  }

  .producto-galeria__main {
    min-height: 320px;
  }

  .producto-galeria__main img {
    min-height: 280px;
    max-height: 420px;
  }

  .producto-detalle__body {
    padding-top: 0;
  }
}

@media (max-width: 680px) {
  .hero__shell {
    padding: 0.95rem 1rem;
  }

  .topbar {
    gap: 0.5rem;
    min-height: 86px;
  }

  .hero-brand__logo {
    height: 100%;
    width: auto;
    max-width: min(320px, 82vw);
  }

  .topnav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .topnav a {
    padding: 0.38rem 0.66rem;
    font-size: 0.9rem;
  }

  .productos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .carrito-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .carrito-item__top,
  .carrito-item__bottom,
  .cart-sugerido__body {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cart-drawer__head,
  .carrito-items,
  .cart-sugeridos-section,
  .cart-summary,
  .checkout__panel--form {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cart-drawer--overlay {
    width: 100vw;
  }

  .productos-grid {
    grid-template-columns: 1fr;
  }

  .producto-body h3 {
    font-size: 1.15rem;
  }

  .producto-precio {
    font-size: 1rem;
  }
}
