/* ===================================================================
   FIA — Design tokens
   =================================================================== */
:root {
  --ink:        #16140F;   /* negro cálido, casi puro */
  --carbon:     #3A3A3A;   /* carbón */
  --stone:      #A8A39C;   /* gris piedra cálido */
  --sand:       #E3DDD0;   /* arena */
  --paper:      #FAF8F5;   /* blanco roto, fondo base */
  --white:      #FFFFFF;

  --chocolate:  #4A3327;
  --negro:      #16140F;
  --vison:      #C9B79C;

  --accent: var(--ink);

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;

  --sidebar-w: 240px;
  --ease: cubic-bezier(.65,0,.35,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; background: none; border: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--ink); color: var(--paper); }

/* focus visibility */
button:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===================================================================
   LOADER
   =================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  width: 160px;
  opacity: 0;
  animation: logoFade 1.1s var(--ease) forwards .15s;
}
@keyframes logoFade {
  from { opacity: 0; transform: scale(.92); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* ===================================================================
   SIDEBAR
   =================================================================== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--paper);
  border-right: 1px solid var(--sand);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 0 32px;
  z-index: 100;
}

.sidebar-top { padding: 0 36px; margin-bottom: 32px; }
.sidebar-logo { width: 84px; }

/* ---------- Buscador ---------- */
.search-box {
  position: relative;
  padding: 0 36px;
  margin-bottom: 36px;
}
.search-icon {
  position: absolute;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--stone);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 34px;
  border: 1px solid var(--sand);
  border-radius: 20px;
  background: var(--white);
  font-size: 13px;
  color: var(--ink);
  transition: border-color .25s var(--ease);
}
.search-input::placeholder { color: var(--stone); }
.search-input:focus {
  outline: none;
  border-color: var(--stone);
}

.search-results {
  position: absolute;
  top: calc(100% - 4px);
  left: 36px;
  right: 36px;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(22,20,15,.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
  z-index: 50;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}
.search-results.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--sand);
  transition: background .15s var(--ease);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--paper); }
.search-empty {
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--stone);
}

.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.nav-link {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 36px;
  text-align: left;
  position: relative;
  color: var(--stone);
  transition: color .35s var(--ease);
}
.nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .35s var(--ease);
}
.nav-link:hover { color: var(--carbon); }
.nav-link.active { color: var(--ink); }
.nav-link.active::before { transform: scaleY(1); }

.nav-index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  opacity: .6;
}
.nav-label {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.25;
}

.sidebar-bottom { padding: 0 36px; }

/* ---------- Selector de idioma ---------- */
.lang-select {
  position: relative;
  margin-bottom: 18px;
}
.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--sand);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--carbon);
  transition: border-color .25s var(--ease);
}
.lang-current:hover { border-color: var(--stone); }
.lang-icon { width: 14px; height: 14px; color: var(--stone); flex-shrink: 0; }
.lang-current span:last-child {
  flex: 1;
  text-align: left;
}
.lang-current::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.3px solid var(--stone);
  border-bottom: 1.3px solid var(--stone);
  transform: rotate(45deg);
  transition: transform .25s var(--ease);
  flex-shrink: 0;
}
.lang-select.open .lang-current::after { transform: rotate(225deg); }

.lang-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 8px;
  box-shadow: 0 -8px 24px rgba(22,20,15,.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
  z-index: 60;
}
.lang-select.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--carbon);
  transition: background .15s var(--ease);
}
.lang-menu button:hover { background: var(--paper); }
.lang-menu button.active { color: var(--ink); font-weight: 600; }
.sidebar-credit {
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 1.6;
}

/* mobile bar */
.mobile-bar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--sand);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 110;
}
.mobile-logo { width: 56px; }
.mobile-toggle {
  width: 32px; height: 32px;
  display: flex; flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}
.mobile-toggle span {
  display: block; height: 2px; background: var(--ink);
  width: 26px;
  transition: all .3s var(--ease);
}
.mobile-toggle span:nth-child(2) { width: 18px; }
.mobile-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); width: 26px; }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); width: 26px; }

/* ===================================================================
   MAIN / PANELS
   =================================================================== */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.panel {
  display: none;
  padding: 96px 80px 120px;
  max-width: 1280px;
}
.panel.active {
  display: block;
  animation: panelIn .55s var(--ease);
}
.panel#route-home.active { padding: 0; max-width: none; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero--compact { margin-bottom: 48px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 28px;
  transition: color .25s var(--ease);
}
.back-link svg { width: 13px; height: 13px; }
.back-link:hover { color: var(--ink); }

.empty-state {
  font-size: 14px;
  color: var(--stone);
  max-width: 420px;
  display: none;
}
#wishlistEmpty.empty-state:only-of-type { display: block; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 18px;
}

.hero { max-width: 720px; margin-bottom: 72px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--carbon);
  max-width: 540px;
}

/* ===================================================================
   SECTION 01 — PRODUCT
   =================================================================== */
.product-stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.product-stage .product-info { order: 1; }
.product-stage .product-visual { order: 2; }

.product-visual { position: sticky; top: 96px; }

.product-frame {
  position: relative;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.product-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 32px;
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.product-photo.active { opacity: 1; }
/* ===================================================================
   PRODUCT GRID (listado de carteras y bolsos / wishlist)
   =================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.product-card {
  position: relative;
}
.product-card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--carbon);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(22,20,15,.08);
  transition: color .25s var(--ease), transform .15s var(--ease);
}
.product-card-fav svg { width: 14px; height: 17px; }
.product-card-fav:hover { transform: scale(1.08); }
.product-card-fav.active { color: var(--ink); }
.product-card-fav.active svg { fill: var(--ink); }

.product-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.card-stock-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 16px;
  color: var(--paper);
}
.card-stock-badge.out { background: var(--ink); }
.card-stock-badge.low { background: #9a6b1a; }

/* ---------- Banner de promociones ---------- */
.promo-banner {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 10px 16px;
  z-index: 120;
}
.promo-banner.visible { display: block; }
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: transform .4s var(--ease);
}
.product-card-image:hover img { transform: scale(1.04); }

.product-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}

.product-card-price {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: .02em;
}

/* ===================================================================
   HOME
   =================================================================== */
.home-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}
.home-hero-image { position: absolute; inset: 0; }
.home-hero-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--sand), var(--paper));
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-hero-placeholder span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stone);
}
.home-hero-overlay {
  position: absolute;
  left: 0; bottom: 0;
  padding: 64px 80px 80px var(--sidebar-w);
  max-width: 720px;
}
.home-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.1;
  margin: 16px 0 28px;
}
.home-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 28px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .03em;
  border-radius: 4px;
  transition: background .25s var(--ease);
}
.home-cta:hover { background: var(--carbon); }

.frame-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  z-index: 5;
  opacity: .85;
  transition: opacity .25s var(--ease), background .25s var(--ease);
}
.frame-arrow:hover { opacity: 1; background: var(--sand); }
.frame-arrow svg { width: 14px; height: 14px; }
.frame-arrow--left { left: 14px; }
.frame-arrow--right { right: 14px; }

.stock-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.product-frame.out-of-stock .stock-badge { opacity: 1; }
.product-frame.out-of-stock .product-photo { opacity: .35 !important; filter: grayscale(.3); }

.btn-add-cart, .btn-notify, .btn-wishlist-toggle {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 4px;
  transition: all .25s var(--ease);
  margin-bottom: 10px;
}
.btn-add-cart {
  background: var(--ink);
  color: var(--paper);
}
.btn-add-cart:hover { background: var(--carbon); }
.btn-add-cart.hidden { display: none; }

.btn-notify {
  background: var(--sand);
  color: var(--ink);
  display: none;
}
.btn-notify:not(.hidden) { display: block; }

.btn-wishlist-toggle {
  background: transparent;
  border: 1px solid var(--sand);
  color: var(--carbon);
  margin-bottom: 28px;
}
.btn-wishlist-toggle:hover { border-color: var(--stone); }
.btn-wishlist-toggle.active { border-color: var(--ink); color: var(--ink); }

.product-actions { margin-bottom: 4px; }

.product-desc-detail {
  font-size: 15px;
  line-height: 1.7;
  color: var(--carbon);
  margin-bottom: 16px;
  max-width: 440px;
}

.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.thumb {
  width: 44px; height: 44px;
  border-radius: 3px;
  background: var(--sand);
  opacity: .5;
  transition: opacity .3s var(--ease);
  position: relative;
}
.thumb::after {
  content: '';
  position: absolute; inset: 0;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.thumb.active { opacity: 1; }
.thumb.active::after { opacity: 1; }

.product-info { padding-top: 8px; }

.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  margin-bottom: 18px;
  transition: opacity .25s var(--ease);
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: -6px 0 20px;
  letter-spacing: .02em;
}

.product-desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--carbon);
  margin-bottom: 32px;
  max-width: 440px;
}

.color-select { margin-bottom: 36px; }
.color-select-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 14px;
}
.swatches { display: flex; gap: 12px; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--swatch-color);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.swatch::after {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  transform: scale(.85);
}
.swatch.active::after { opacity: 1; transform: scale(1); }
.swatch:hover::after { opacity: .5; }

.product-meta {
  list-style: none;
  border-top: 1px solid var(--sand);
  margin-bottom: 28px;
}
.product-meta li {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--sand);
  font-size: 13.5px;
}
.product-meta li span:first-child {
  color: var(--stone);
  letter-spacing: .03em;
}
.product-meta li span:last-child {
  font-weight: 500;
  text-align: right;
}

.product-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--stone);
  max-width: 420px;
}

/* ===================================================================
   SECTION 02 — MATERIALES
   =================================================================== */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--sand);
  border: 1px solid var(--sand);
}

.material-hero-image {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 48px;
  border: 1px solid var(--sand);
}
.material-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.material-card {
  background: var(--paper);
  padding: 44px 40px;
}
.material-card--large {
  grid-column: span 2;
  background: var(--ink);
  color: var(--paper);
  padding: 56px 48px;
}
.material-card--large .material-index { color: var(--stone); }
.material-card--large p { color: var(--sand); }

.material-index {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 16px;
}

.material-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  margin-bottom: 14px;
  max-width: 420px;
}
.material-card--large h3 { font-size: 30px; }

.material-card p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--carbon);
  max-width: 460px;
}

/* ===================================================================
   SECTION 03 — LA MARCA
   =================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 56px;
  margin-bottom: 80px;
}

.about-block h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sand);
}

.about-block p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--carbon);
  max-width: 480px;
}

/* ===================================================================
   TOPBAR ACTIONS (carrito / wishlist) — desktop
   =================================================================== */
.topbar-actions {
  position: fixed;
  top: 28px;
  right: 36px;
  display: flex;
  gap: 10px;
  z-index: 90;
}
.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.icon-btn:hover { border-color: var(--stone); background: var(--white); }
.icon-btn svg { width: 16px; height: 18px; }
.icon-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.icon-badge.visible { display: flex; }

.mobile-bar-actions { display: flex; align-items: center; gap: 8px; }
.mobile-bar-actions .icon-btn { width: 36px; height: 36px; }

/* ===================================================================
   DRAWER — CARRITO
   =================================================================== */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(22,20,15,.4);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.drawer-overlay.visible { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--paper);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  padding: 28px 28px 0;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.drawer-header h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.drawer-close {
  font-size: 26px;
  line-height: 1;
  color: var(--stone);
  width: 32px; height: 32px;
}
.drawer-close:hover { color: var(--ink); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
}
.cart-item img {
  width: 64px; height: 64px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 4px;
  padding: 6px;
}
.cart-item-name { font-size: 13.5px; font-weight: 500; }
.cart-item-qty { font-size: 12px; color: var(--stone); margin-top: 3px; }
.cart-item-remove { font-size: 20px; color: var(--stone); width: 24px; height: 24px; }
.cart-item-remove:hover { color: var(--ink); }

.cart-shipping {
  padding: 20px 0;
  border-top: 1px solid var(--sand);
  margin-top: 16px;
}
.cart-shipping-label { font-size: 12px; font-weight: 600; color: var(--carbon); margin-bottom: 10px; }
.cart-shipping-row { display: flex; gap: 8px; }
.cart-shipping-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  font-size: 13px;
}
.cart-shipping-row button {
  padding: 10px 16px;
  background: var(--sand);
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.cart-shipping-row button:hover { background: var(--stone); color: var(--paper); }
.cart-shipping-result { font-size: 12.5px; color: var(--carbon); margin-top: 10px; min-height: 16px; }

.drawer-footer {
  padding: 20px 0 28px;
  border-top: 1px solid var(--sand);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.btn-checkout {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 4px;
  transition: background .25s var(--ease);
}
.btn-checkout:hover { background: var(--carbon); }

/* ===================================================================
   MODALES (idioma inicial, suscripción, checkout)
   =================================================================== */
.lang-modal-overlay, .modal-overlay {
  position: fixed; inset: 0;
  background: rgba(22,20,15,.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.lang-modal-overlay.visible, .modal-overlay.visible { opacity: 1; visibility: visible; }

.lang-modal, .modal-box {
  background: var(--paper);
  border-radius: 6px;
  padding: 44px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
}
.modal-box--wide { max-width: 480px; text-align: left; }

.lang-modal-logo { width: 64px; margin: 0 auto 24px; }
.lang-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.5;
}
.lang-modal-title span { color: var(--stone); font-weight: 400; font-size: 14px; }
.lang-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lang-modal-grid button {
  padding: 12px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.lang-modal-grid button:hover { border-color: var(--ink); background: var(--white); }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 24px;
  line-height: 1;
  color: var(--stone);
  width: 30px; height: 30px;
}
.modal-close:hover { color: var(--ink); }

.modal-box h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  margin-bottom: 10px;
}
.modal-box p { font-size: 14px; color: var(--carbon); line-height: 1.6; margin-bottom: 22px; }

#subscribeForm, #checkoutForm { display: flex; flex-direction: column; gap: 12px; }
#subscribeForm { flex-direction: row; gap: 8px; }
#subscribeForm input, #checkoutForm input {
  padding: 12px 14px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  font-size: 13.5px;
  width: 100%;
}
#subscribeForm input { flex: 1; }
#subscribeForm button, #checkoutForm button {
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
#subscribeForm button:hover, #checkoutForm button:hover { background: var(--carbon); }

.modal-success {
  display: none;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  margin-top: 16px;
}
.modal-success.visible { display: block; }

.checkout-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  padding: 4px;
}
.checkout-toggle-btn {
  flex: 1;
  padding: 9px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 3px;
  color: var(--stone);
  transition: all .2s var(--ease);
}
.checkout-toggle-btn.active { background: var(--ink); color: var(--paper); }

.checkout-account-fields { display: none; }
.checkout-account-fields.visible { display: block; }

/* ===================================================================
   ADMIN — panel de stock
   =================================================================== */
.admin-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--sand);
  border: 1px solid var(--sand);
  max-width: 640px;
}
.admin-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 32px;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  padding: 14px 18px;
}
.admin-row img {
  width: 56px; height: 56px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 4px;
  padding: 6px;
}
.admin-row-name { font-size: 13.5px; font-weight: 500; }
.admin-stock-control { display: flex; align-items: center; gap: 6px; }
.admin-stock-control button {
  width: 26px; height: 26px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  font-size: 14px;
}
.admin-stock-control button:hover { background: var(--sand); }
.admin-stock-control input {
  width: 52px;
  text-align: center;
  padding: 5px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  font-size: 13px;
}
.admin-stock-status { text-align: center; font-weight: 700; }
.admin-stock-status.in { color: #3a7d3a; }
.admin-stock-status.out { color: #b04444; }

/* ===================================================================
   WHATSAPP FLOTANTE
   =================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
  z-index: 150;
  transition: transform .25s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ---------- Suscripción link (sidebar) ---------- */
.subscribe-link {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--carbon);
  padding: 9px 0;
  margin-bottom: 6px;
  transition: color .25s var(--ease);
}
.subscribe-link:hover { color: var(--ink); }


@media (max-width: 980px) {
  .product-stage { grid-template-columns: 1fr; gap: 40px; }
  .product-visual { position: static; max-width: 420px; }
  .about-grid { grid-template-columns: 1fr; }
  .material-card--large { grid-column: span 1; }
  .materials-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-actions { top: 18px; right: 70px; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }
  .mobile-bar { display: flex; }
  .main { margin-left: 0; }
  .panel { padding: 96px 24px 80px; }
  .panel#route-home.active { padding: 0; }

  .sidebar.mobile-open {
    display: flex;
    width: 78vw;
    max-width: 300px;
    box-shadow: 8px 0 30px rgba(0,0,0,.08);
  }

  .hero-title { font-size: clamp(28px, 8vw, 40px); }

  .topbar-actions { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .home-hero-overlay { padding: 40px 24px 56px; }
  .drawer { width: 100vw; max-width: 100vw; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

/* overlay behind mobile drawer */
.scrim {
  position: fixed; inset: 0;
  background: rgba(22,20,15,.35);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.scrim.visible { opacity: 1; visibility: visible; }

/* ===================================================================
   FIA — Menú desplegable definitivo
   El menú ya no ocupa espacio fijo: queda oculto y se abre con ☰.
   =================================================================== */
.main { margin-left: 0 !important; }
.sidebar {
  display: flex !important;
  transform: translateX(-100%);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
  box-shadow: none;
  z-index: 130;
}
.sidebar.drawer-open,
.sidebar.mobile-open {
  transform: translateX(0);
  box-shadow: 18px 0 50px rgba(22,20,15,.10);
}
.home-hero-overlay { padding-left: 80px !important; }

.desktop-menu-toggle {
  position: fixed;
  top: 34px;
  left: 34px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--sand);
  background: rgba(255,255,255,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 140;
  box-shadow: 0 8px 24px rgba(22,20,15,.08);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.desktop-menu-toggle:hover { transform: scale(1.04); background: var(--white); }
.desktop-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .28s var(--ease), opacity .28s var(--ease);
}
.desktop-menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.desktop-menu-toggle.open span:nth-child(2) { opacity: 0; }
.desktop-menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
  .desktop-menu-toggle { display: none; }
  .home-hero-overlay { padding-left: 24px !important; }
  .sidebar { width: 78vw; max-width: 300px; }
}


.checkout-payment-status {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.checkout-payment-status.error {
  color: #B04444;
}
.btn-checkout:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ===== Datos de transferencia ===== */
.checkout-transfer { margin-top: 8px; }
.transfer-details {
  background: var(--sand, #f5f1ea);
  border: 1px solid var(--line, #e3ddd2);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0;
}
.transfer-details p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-all;
}
.transfer-details strong { font-weight: 600; }
.transfer-order { color: var(--muted); font-size: 13px; }
.copy-btn {
  margin-left: 6px;
  padding: 2px 10px;
  font-size: 12px;
  border: 1px solid var(--line, #ccc);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.copy-btn:hover { background: var(--sand, #efe9df); }

/* ===== Cuenta del cliente ===== */
.btn-checkout--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line, #ccc);
  margin-top: 14px;
}
.btn-checkout--ghost:hover { background: var(--sand, #efe9df); }
#accountLogged h4 { margin: 18px 0 10px; font-size: 14px; }
.account-orders { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; }
.account-order {
  border: 1px solid var(--line, #e3ddd2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.account-order-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}
.account-order-status { color: var(--muted, #888); font-weight: 500; }
.account-order-items { color: var(--muted, #777); line-height: 1.4; }
.account-order-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted, #888);
}
.account-empty { color: var(--muted, #888); font-size: 13px; }
