/* Spring Fantasía — Shop CSS
   Used by: /tienda/, /fragancias-capilares/, /cuidado-corporal/,
            /inspiraciones-lush/, /inspiraciones-perfumeria/, /ofertas/
   ------------------------------------------------------------------ */

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ───────────────────────────────────────────────── */
:root {
  --bg:         #F6F3EF;
  --surface:    #EDE8E2;
  --pink:       #C8A2A2;
  --pink-pale:  #EDDCDC;
  --pink-deep:  #9E6E6E;
  --ink:        #1A1715;
  --ink-mid:    #6B6460;
  --ink-faint:  #A8A29C;
  --border:     #DDD6CE;
  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
  --ease-out:   cubic-bezier(.16, 1, .3, 1);
}

/* ── Base ────────────────────────────────────────────────────────── */
html {
  background:              var(--bg);
  color:                   var(--ink);
  font-family:             var(--sans);
  font-size:               15px;
  line-height:             1.6;
  -webkit-font-smoothing:  antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position:        sticky;
  top:             0;
  z-index:         100;
  background:      var(--bg);
  border-bottom:   1px solid var(--border);
  height:          60px;
  display:         grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:     center;
  padding:         0 40px;
  transition:      box-shadow .2s;
}
.nav.scrolled { box-shadow: 0 1px 12px rgba(26,23,21,.06); }

.nav-left  { display: flex; align-items: center; gap: 28px; }
.nav-right { display: flex; align-items: center; gap: 20px; justify-content: flex-end; }

.nav-logo a {
  font-family:    var(--serif);
  font-size:      22px;
  font-style:     italic;
  font-weight:    300;
  color:          var(--ink);
  text-decoration: none;
}

.nav-link {
  font-family:    var(--sans);
  font-size:      10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color:          var(--ink-mid);
  text-decoration: none;
  transition:     color .15s;
  white-space:    nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--ink); }

.nav-btn {
  background:     none;
  border:         none;
  cursor:         pointer;
  font-family:    var(--sans);
  font-size:      10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color:          var(--ink-mid);
  display:        flex;
  align-items:    center;
  gap:            5px;
  padding:        0;
  text-decoration: none;
  transition:     color .15s;
  white-space:    nowrap;
}
.nav-btn:hover { color: var(--ink); }
.nav-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display:    none;
  position:   absolute;
  top:        calc(100% + 12px);
  left:       -20px;
  background: var(--bg);
  border:     1px solid var(--border);
  min-width:  280px;
  padding:    8px 0;
  z-index:    200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: grid; grid-template-columns: 1fr 1fr; }
.nav-dropdown-item {
  display:      block;
  font-family:  var(--sans);
  font-size:    12px;
  color:        var(--ink-mid);
  text-decoration: none;
  padding:      9px 20px;
  transition:   color .12s, background .12s;
}
.nav-dropdown-item:hover { color: var(--ink); background: var(--pink-pale); }
.nav-dropdown-toggle { cursor: default; }
.nav-dropdown-toggle::after { content: ' ↓'; font-size: 9px; }

/* ── Page header ─────────────────────────────────────────────────── */
.page-header {
  padding:        48px 48px 32px;
  border-bottom:  1px solid var(--border);
  display:        flex;
  align-items:    flex-end;
  justify-content: space-between;
  gap:            24px;
  flex-wrap:      wrap;
}
.page-title { font-family: var(--serif); font-size: 48px; font-weight: 300; font-style: italic; color: var(--ink); }
.breadcrumb { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.breadcrumb a { color: var(--ink-faint); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--ink); }
.product-count-label { font-family: var(--sans); font-size: 12px; color: var(--ink-mid); }

/* ── Shop layout ─────────────────────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 70vh; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  border-right:   1px solid var(--border);
  padding:        32px 28px;
  position:       sticky;
  top:            60px;
  height:         calc(100vh - 60px);
  overflow-y:     auto;
  overscroll-behavior: contain;
}
.sidebar-section { margin-bottom: 36px; }
.sidebar-label { font-family: var(--sans); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; display: block; }

.search-input {
  width:        100%;
  border:       1px solid var(--border);
  background:   transparent;
  padding:      10px 14px;
  font-family:  var(--sans);
  font-size:    13px;
  color:        var(--ink);
  outline:      none;
  transition:   border-color .15s;
}
.search-input::placeholder { color: var(--ink-faint); }
.search-input:focus { border-color: var(--pink); }

.cat-filter-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cat-filter-btn {
  background:     none;
  border:         none;
  cursor:         pointer;
  font-family:    var(--sans);
  font-size:      12px;
  color:          var(--ink-mid);
  text-align:     left;
  padding:        7px 10px;
  width:          100%;
  display:        flex;
  justify-content: space-between;
  align-items:    center;
  transition:     color .12s, background .12s;
}
.cat-filter-btn:hover  { color: var(--ink); background: var(--surface); }
.cat-filter-btn.active { color: var(--ink); background: var(--pink-pale); }
.cat-filter-count { font-size: 10px; color: var(--ink-faint); }

.sort-select {
  width:       100%;
  border:      1px solid var(--border);
  background:  var(--bg);
  padding:     10px 14px;
  font-family: var(--sans);
  font-size:   12px;
  color:       var(--ink);
  outline:     none;
  cursor:      pointer;
}

/* ── Product area ────────────────────────────────────────────────── */
.product-area { padding: 32px 40px; }
.toolbar { display: flex; align-items: center; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.toolbar-count { font-family: var(--sans); font-size: 12px; color: var(--ink-mid); }

/* ── Product grid ────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.product-card { text-decoration: none; display: block; cursor: pointer; }

.product-image {
  aspect-ratio: 3 / 4;
  position:     relative;
  overflow:     hidden;
  margin-bottom: 14px;
  background:   var(--surface);
}
.product-image img {
  width:       100%;
  height:      100%;
  object-fit:  cover;
  display:     block;
  transition:  transform .5s var(--ease-out);
  will-change: transform;
}
.product-card:hover .product-image img { transform: scale(1.04); }

.product-img-placeholder {
  width:       100%;
  height:      100%;
  display:     flex;
  align-items: center;
  justify-content: center;
  transition:  transform .5s var(--ease-out);
  will-change: transform;
}
.product-card:hover .product-img-placeholder { transform: scale(1.03); }
.placeholder-initial { font-family: var(--serif); font-size: 56px; font-style: italic; font-weight: 300; opacity: .12; user-select: none; }

.product-badge { position: absolute; top: 12px; left: 0; font-family: var(--sans); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; }
.badge-new { background: var(--pink);     color: white; }
.badge-sale { background: var(--ink);     color: white; }
.badge-out  { background: var(--ink-faint); color: white; }

.quick-add {
  position:    absolute;
  inset-inline: 0;
  bottom:      0;
  background:  var(--ink);
  color:       white;
  border:      none;
  cursor:      pointer;
  font-family: var(--sans);
  font-size:   10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding:     11px;
  opacity:     0;
  transform:   translateY(100%);
  transition:  opacity .2s, transform .25s var(--ease-out);
  will-change: opacity, transform;
}
.product-card:hover .quick-add { opacity: 1; transform: translateY(0); }
.quick-add:hover { background: var(--pink-deep); }

.product-cat   { font-family: var(--sans); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.product-name  { font-family: var(--sans); font-size: 12.5px; color: var(--ink); line-height: 1.45; margin-bottom: 9px; }
.price-row     { display: flex; align-items: baseline; gap: 7px; }
.price         { font-family: var(--serif); font-size: 18px; font-weight: 300; color: var(--ink); }
.price.sale    { color: var(--pink-deep); }
.price-orig    { font-family: var(--serif); font-size: 13px; color: var(--ink-faint); text-decoration: line-through; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display:         flex;
  align-items:     center;
  gap:             8px;
  margin-top:      48px;
  padding-top:     32px;
  border-top:      1px solid var(--border);
  justify-content: center;
  flex-wrap:       wrap;
}
.page-btn {
  background:     none;
  border:         1px solid var(--border);
  font-family:    var(--sans);
  font-size:      11px;
  letter-spacing: .1em;
  color:          var(--ink-mid);
  padding:        8px 14px;
  cursor:         pointer;
  transition:     background .15s, color .15s, border-color .15s;
}
.page-btn:hover,
.page-btn.active  { background: var(--ink); color: white; border-color: var(--ink); }
.page-btn:disabled { opacity: .35; cursor: default; }
.page-btn:disabled:hover { background: none; color: var(--ink-mid); border-color: var(--border); }
.page-info { font-family: var(--sans); font-size: 11px; color: var(--ink-faint); }

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state { padding: 80px 24px; text-align: center; grid-column: 1 / -1; }
.empty-state h3 { font-family: var(--serif); font-size: 28px; font-style: italic; font-weight: 300; color: var(--ink); margin-bottom: 10px; }
.empty-state p  { font-family: var(--sans); font-size: 13px; color: var(--ink-mid); }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); padding: 64px 0 0; margin-top: 80px; }
.footer-inner {
  display:    grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap:        56px;
  max-width:  1280px;
  margin:     0 auto;
  padding:    0 48px 56px;
}
.footer-logo-link { font-family: var(--serif); font-size: 24px; font-style: italic; font-weight: 300; color: white; text-decoration: none; display: block; margin-bottom: 12px; }
.footer-tagline   { font-family: var(--sans); font-size: 12px; font-weight: 300; color: rgba(255,255,255,.35); line-height: 1.8; margin-bottom: 24px; }
.footer-socials   { display: flex; gap: 18px; }
.footer-social    { font-family: var(--sans); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.15); padding-bottom: 2px; transition: color .15s; }
.footer-social:hover { color: white; }
.footer-col h4    { font-family: var(--sans); font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.28); margin-bottom: 20px; }
.footer-col ul    { list-style: none; }
.footer-col li    { margin-bottom: 12px; }
.footer-col a     { font-family: var(--sans); font-size: 12.5px; font-weight: 300; color: rgba(255,255,255,.55); text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: white; }
.footer-bottom-bar {
  border-top:      1px solid rgba(255,255,255,.07);
  padding:         20px 48px;
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  max-width:       1280px;
  margin:          0 auto;
}
.footer-copy { font-family: var(--sans); font-size: 11px; color: rgba(255,255,255,.2); }
.footer-payments { display: flex; gap: 8px; }
.pay-pill { font-family: var(--sans); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.12); padding: 4px 10px; }

/* ── WhatsApp float ──────────────────────────────────────────────── */
.wa-btn {
  position:      fixed;
  bottom:        24px;
  right:         24px;
  z-index:       200;
  width:         50px;
  height:        50px;
  background:    #25D366;
  border-radius: 50%;
  display:       flex;
  align-items:   center;
  justify-content: center;
  text-decoration: none;
  box-shadow:    0 4px 14px rgba(37,211,102,.35);
  transition:    transform .2s;
  will-change:   transform;
}
.wa-btn:hover { transform: scale(1.08); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .nav  { padding: 0 24px; }
}

@media (max-width: 768px) {
  .nav-left .nav-link:not(:first-child) { display: none; }

  .shop-layout { grid-template-columns: 1fr; }

  .sidebar {
    position:     static;
    height:       auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding:      20px;
  }
  .cat-filter-list    { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .cat-filter-btn     { width: auto; padding: 5px 12px; border: 1px solid var(--border); }

  .page-header  { padding: 32px 20px 24px; }
  .product-area { padding: 20px; }
  .grid         { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .footer-inner     { grid-template-columns: 1fr 1fr; gap: 36px; padding: 0 20px 40px; }
  .footer-bottom-bar { padding: 20px; flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .grid { gap: 12px; }
}
