/* Consolidated refactor: replace legacy style.css with a token-first stylesheet.
   This file contains variables, component styles, and dark-mode via body.dark.

   Sections:
   - Tokens
   - Reset & Typography
   - Utilities
   - Header
   - Hero
   - Catalog & Product Cards
   - Buttons, Filters, Responsive
*/

:root{
  --color-primary: #8cc63f;
  --color-primary-700: #68a51f;
  --color-text: #0b1720;
  --color-text-muted: #374151;
  --color-surface: #ffffff;
  --color-bg: #eef2f5;
  --color-border: rgba(15,23,42,0.08);
  --green: var(--color-primary);
  --green-dark: var(--color-primary-700);
  --product-card-bg: #dfe3e8;
  --product-card-content-bg: #dfe3e8;
  --product-card-heading-color: #1b2430;
  --product-card-text-color: #2b3743;
  --product-card-muted-color: #4b5563;
  --shadow-sm: 0 8px 24px rgba(24,35,51,0.06);
  --shadow-md: 0 18px 40px rgba(15,23,42,0.08);
  --radius-sm: 6px;
  --radius-md: 18px;
  --space-sm: 12px;
  --space-md: 18px;
  --transition: 200ms ease;
}

html.dark,
html.dark body {
    --color-bg: #111c2f;
    --color-surface: #121c2d;
    --color-text: #eef3f6;
    --color-text-muted: #c0c9cf;
    --color-border: rgba(255,255,255,0.06);
    --product-card-bg: #000000;
    --product-card-content-bg: #000000;
    --product-card-heading-color: #ffffff;
    --product-card-text-color: #f5f5f5;
    --product-card-muted-color: #d1d5db;
    --shadow-sm: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-md: 0 24px 48px rgba(0,0,0,0.6);
    color-scheme: dark;
}

html.dark {
    background-color: #111c2f;
}

html.dark body {
    background-color: var(--color-bg);
    background-image: linear-gradient(rgba(7, 14, 24, 0.72), rgba(7, 14, 24, 0.72)), url("../img/fondo/fondo.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-blend-mode: multiply;
    color: var(--color-text);
}

/* Dark variables */
body.dark{
    --color-bg: #111c2f;
    --color-surface: #121c2d;
    --color-text: #eef3f6;
    --color-text-muted: #c0c9cf;
    --color-border: rgba(255,255,255,0.06);
    --product-card-bg: #000000;
    --product-card-content-bg: #000000;
    --product-card-heading-color: #ffffff;
    --product-card-text-color: #f5f5f5;
    --product-card-muted-color: #d1d5db;
    --shadow-sm: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-md: 0 24px 48px rgba(0,0,0,0.6);
    background-image: linear-gradient(rgba(7, 14, 24, 0.72), rgba(7, 14, 24, 0.72)), url("../img/fondo/fondo.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-blend-mode: multiply;
}

/* Reset & base */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Inter,system-ui,-apple-system,'Segoe UI',Roboto,Arial;background-color:var(--color-bg);background-image: linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.14)), url("../img/fondo/fondo.png");background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;background-blend-mode:soft-light;color:var(--color-text);min-height:100vh;padding-top:74px;transition:background-color 180ms ease,color 180ms ease}
body.menu-open{overflow:hidden}
img,svg{max-width:100%;height:auto}
.theme-transition,.theme-transition *{transition-duration:180ms;transition-timing-function:ease;transition-property:background-color,color,border-color,box-shadow,transform,filter;will-change:background-color,color,border-color,box-shadow}

/* Header */
.site-header{height:74px;background:var(--color-surface);border-bottom:1px solid var(--color-border);position:fixed;top:0;left:0;right:0;width:100%;z-index:100}
.header-container{display:flex;align-items:center;justify-content:space-between;height:100%;gap:32px;padding:0 20px}
.brand{display:inline-flex;align-items:center;gap:12px;text-decoration:none;min-width:0;flex:1}
.brand img{max-height:62px;width:auto;object-fit:contain}
.brand-name{color:#111827;font-family:'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,Arial;font-weight:400;letter-spacing:.12em;text-transform:uppercase;text-decoration:none;white-space:normal;line-height:1.2}
.main-navigation{display:flex;flex:1;justify-content:center;gap:28px;align-items:center;flex-wrap:wrap}
.main-navigation a{color:var(--color-text-muted);font-weight:600;padding:22px 0;text-decoration:none}
.main-navigation a.active{color:var(--color-primary)}
.main-navigation a:hover{text-decoration:none}
.mobile-nav-toggle{display:none;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--color-border);border-radius:999px;background:var(--color-surface);color:var(--color-text);font-size:1.1rem;cursor:pointer;flex-shrink:0}
.mobile-nav-toggle:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}
.mobile-nav-panel{display:none}
.mobile-navigation{display:flex;flex-direction:column;gap:10px}
.mobile-navigation a{padding:12px 0;color:var(--color-text);font-weight:600;text-decoration:none;border-bottom:1px solid var(--color-border)}
.mobile-navigation a:last-child{border-bottom:0}
.mobile-nav-panel .whatsapp-button{display:inline-flex;justify-content:center;margin-top:8px;width:100%}

.whatsapp-button{display:inline-flex;align-items:center;gap:10px;background:linear-gradient(90deg,#8cc63f 0%,#76b533 100%);color:#07110a;padding:12px 18px;border-radius:999px;font-weight:700;text-decoration:none;transition:transform .22s ease,box-shadow .22s ease,filter .22s ease}
.whatsapp-button:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(60,104,23,0.18);filter:brightness(1.03);}
.whatsapp-icon{display:inline-flex;width:18px;height:18px;align-items:center;justify-content:center;flex-shrink:0;}
.whatsapp-icon svg{width:100%;height:100%;}

/* Hero */
.home-hero{position:relative;min-height:520px;background-image:linear-gradient(rgba(255,255,255,0.14),rgba(255,255,255,0.14)),url("../img/fondo/inicio-bg.png");background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;background-blend-mode:soft-light}
.home-hero::before{content:"";position:absolute;inset:0;background:rgba(255,255,255,0.08);pointer-events:none}
.hero-content{display:grid;grid-template-columns:1fr;gap:40px;align-items:start;padding:60px 32px 80px;max-width:900px;margin:0 auto;position:relative;padding-left:460px}
.hero-visual{position:relative;width:0;height:0}
.hero-pretitle{text-transform:uppercase;letter-spacing:.24em;color:var(--color-primary);font-size:.9rem;margin-bottom:18px}
.hero-copy h1{font-size:clamp(3.2rem,4vw,5.4rem);line-height:.96;margin-bottom:32px;color:var(--color-text)}
.text-highlight{color:var(--color-primary)}
.hero-text{color:#1f2937;max-width:650px;line-height:1.8}
html:not(.dark) .hero-pretitle,
html:not(.dark) .hero-copy h1,
html:not(.dark) .hero-text {
    color: #ffffff;
}
html:not(.dark) .text-highlight {
    color: var(--color-primary);
}
.hero-actions{display:flex;gap:16px;margin-bottom:56px}
.hero-promo{max-width:360px;padding:24px;border-radius:26px;background:var(--color-surface);border:1px solid var(--color-border);box-shadow:var(--shadow-md)}

/* Position the promo box to the far left of the hero (desktop) */
.home-hero .hero-promo{
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    width:360px;
    margin:0;
    border:1px solid rgba(255,255,255,0.14);
    box-shadow:0 22px 60px rgba(0,0,0,0.18);
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.82);
}
.hero-promo p{font-size:.82rem;color:var(--color-primary);text-transform:uppercase;margin-bottom:12px}

/* Catalog / Product grid */
.catalog-page{padding:28px 20px 70px}
.products-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;align-items:start;width:100%}

/* Product card */
.product-card{background:#000000;border:none;border-radius:8px;overflow:hidden;box-shadow:0 10px 24px rgba(0,0,0,0.35);transition:transform var(--transition),box-shadow var(--transition);min-width:0}
html:not(.dark) .product-card {
    background: #dfe3e8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.product-image{background:#111111;overflow:hidden;display:block}
html:not(.dark) .product-image { background: #c9ced4; }
.product-image img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;object-position:center;transition:opacity .28s ease,transform .4s ease}
.product-content{padding:13px;background:#000000}
html:not(.dark) .product-content {
    background: #dfe3e8;
}
.product-name{font-weight:700;margin-bottom:6px;color:#ffffff}
html:not(.dark) .product-name { color: #1b2430; }
.product-description{color:#d1d5db;font-size:.95rem}
html:not(.dark) .product-description { color: #2b3743; }
.product-button{background:var(--color-primary);color:#07110a;padding:8px 12px;border-radius:8px;border:none;font-weight:700;cursor:pointer}

/* Utilities and responsive */
.filters{background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;padding:12px}
@media (max-width:1024px){.hero-content{grid-template-columns:1fr;padding:40px 24px}.products-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:720px){.products-grid{grid-template-columns:1fr}.header-container{padding:0 12px}}

/* Responsive: return promo to normal flow on smaller screens */
@media (max-width:1024px){
    .home-hero .hero-promo{position:static;transform:none;right:auto;top:auto;margin:0}
}
@media (max-width:720px){
    .home-hero .hero-promo{position:static;transform:none;right:auto;top:auto;margin:0}
}

/* Final catalog layout overrides */
.catalog-page { width: min(100%, 1080px); margin: 0 auto; }
.catalog-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.catalog-title { min-width: 0; }
.catalog-title h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.15; white-space: nowrap; }
.catalog-title p { max-width: 590px; color: var(--color-text-muted); font-size: .82rem; line-height: 1.6; }
.catalog-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.catalog-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 18px; }
.filters { position: sticky; top: 92px; padding: 0; }
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; width: 100%; }
.product-card { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.product-content { display: flex; flex: 1; flex-direction: column; }
.product-button { margin-top: auto; }

@media (min-width: 1700px) {
    .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
    .catalog-header { align-items: flex-start; flex-direction: column; gap: 18px; }
    .catalog-tools { width: 100%; }
}

@media (max-width: 560px) {
    .products-grid { grid-template-columns: 1fr; }
}

@media (max-width: 750px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
}

@media (max-width: 767px) {
    .catalog-page { padding: 20px 14px 56px; }
    .catalog-header { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; }
    .catalog-title h1 { white-space: normal; font-size: clamp(1.65rem, 6vw, 2.1rem); }
    .catalog-title p { font-size: 0.92rem; }
    .catalog-tools { flex-direction: column; align-items: stretch; width: 100%; }
    .search-box, .catalog-tools select { width: 100%; }
    .search-box input { width: 100%; }
    .filters { padding: 14px; border-radius: 16px; }
    .filters-title { margin-bottom: 10px; }
    .filter-section { margin-top: 12px; }
    .filter-select, .filter-button, .filter-chip, .category-option { width: 100%; }
    .category-option { justify-content: space-between; }
    .product-card { border-radius: 14px; }
    .product-content { padding: 12px; }
    .product-name { font-size: 1rem; }
    .product-description { font-size: 0.92rem; }
    .product-button { padding: 10px 12px; width: 100%; }
}

@media (max-width: 480px) {
    .catalog-page { padding: 16px 12px 48px; }
    .catalog-tools select, .search-box input { font-size: 0.95rem; }
    .products-grid { gap: 14px; }
}

/* Catalog background and card finish */
body {
    background-color: var(--color-bg);
    background-image: linear-gradient(rgba(255,255,255,0.12), rgba(255,255,255,0.12));
}

body.dark {
    background-color: #111c2f;
    background-image: linear-gradient(rgba(7, 14, 24, 0.72), rgba(7, 14, 24, 0.72)), url("../img/fondo/fondo.png");
}

body.dark .catalog-page {
    background-color: transparent;
}

.product-card {
    border: none;
}

/* Migrated light-mode specifics */
.site-header{background:rgba(255,255,255,0.98);border-bottom:1px solid rgba(15,23,42,0.08);position:fixed;top:0;left:0;right:0;width:100%;z-index:1000}
html.dark .site-header{background:rgba(3,8,14,0.94);border-bottom-color:rgba(255,255,255,0.08)}
html:not(.dark) .site-header{background:#000000;border-bottom-color:rgba(255,255,255,0.12)}
html:not(.dark) .site-header .main-navigation a,
html:not(.dark) .site-header .brand-name,
html:not(.dark) .site-header .dark-toggle{color:#ffffff}
html:not(.dark) .site-header .dark-toggle{border-color:rgba(255,255,255,0.12);background:rgba(255,255,255,0.08)}
.header-container{gap:18px;padding:18px 32px}
.dark-toggle{border:1px solid rgba(15,23,42,0.12);background:rgba(255,255,255,0.94);color:#1f2a36;padding:10px 14px;border-radius:999px;font-size:1rem;display:inline-flex;align-items:center;justify-content:center;transition:background .18s ease,transform .15s ease,color .18s ease}
html.dark .dark-toggle{background:rgba(255,255,255,0.08);color:#eef3f6}
html.dark .dark-toggle:hover{background:rgba(255,255,255,0.14)}
.dark-toggle:hover{background:rgba(245,248,250,1)}
.dark-toggle[aria-pressed="true"]{background:rgba(237,242,247,1)}
.main-navigation a{color:#1f2a36;font-weight:600}
html.dark .main-navigation a{color:#eef3f6}
.main-navigation a.active,.main-navigation a:hover{color:#3b7d20}
html.dark .main-navigation a.active,html.dark .main-navigation a:hover{color:#9fdc5f}
html.dark .brand-name{color:#ffffff}
.whatsapp-button{display:inline-flex;align-items:center;gap:10px;background:linear-gradient(90deg,#8cc63f 0%,#76b533 100%);color:#07110a;padding:12px 18px;border-radius:999px;font-weight:700;text-decoration:none;transition:transform .22s ease,box-shadow .22s ease,filter .22s ease}
html.dark .whatsapp-button{background:linear-gradient(90deg,#6ea632 0%,#548b24 100%);color:#eef3f6}
.whatsapp-button:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(60,104,23,0.18);filter:brightness(1.03);}
.whatsapp-icon{display:inline-flex;width:18px;height:18px;align-items:center;justify-content:center;flex-shrink:0;}
.whatsapp-icon svg{width:100%;height:100%;}
.hero-content{max-width:1240px;margin:0 auto;padding:60px 32px 80px;display:grid;grid-template-columns:1.2fr 1fr;gap:40px;align-items:center}
.hero-copy{max-width:620px}
.hero-pretitle{text-transform:uppercase;letter-spacing:.24em;color:#9fb39b;font-size:.9rem;margin-bottom:18px}
h1{font-size:clamp(3.2rem,4vw,5.4rem);line-height:.96;letter-spacing:-0.03em;margin-bottom:24px;max-width:10ch}
.hero-text{max-width:650px;font-size:1.05rem;line-height:1.8;color:#1f2937;margin-bottom:32px}
.hero-actions{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:40px}
.hero-button{min-width:180px;text-align:center;padding:14px 20px;border-radius:999px;font-weight:700;transition:transform .22s ease,box-shadow .22s ease;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.hero-primary{background:#8cc63f;color:#07110a}
.hero-secondary{background:#ffffff;color:#111827;border:1px solid rgba(15,23,42,0.12)}
.hero-button:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(0,0,0,0.16)}
.hero-highlights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.highlight-item{display:flex;align-items:center;gap:12px;padding:18px 20px;background:#e7e9ed;border:1px solid #c9cfd6;border-radius:18px;color:#101828;box-shadow:0 8px 20px rgba(15,23,42,0.06);user-select:none;-webkit-user-select:none;cursor:default;transition:transform .2s ease,box-shadow .25s ease,background-color .25s ease,border-color .25s ease}
.highlight-item:hover{transform:translateY(-2px);box-shadow:0 14px 28px rgba(15,23,42,0.14);background:#dfe3e8;border-color:#b7bec7}
.highlight-item span{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:rgba(141,198,63,0.17);color:#8cc63f;font-weight:800}
.hero-visual{position:relative;display:grid;gap:24px;align-items:end}
.hero-image{width:100%;min-height:520px;background:radial-gradient(circle at top left,rgba(140,198,63,0.18) 0%,transparent 40%),linear-gradient(180deg,#f2f4f7 0%,#e8edf3 100%);border-radius:30px;box-shadow:0 28px 50px rgba(20,30,45,0.08)}
.hero-promo{max-width:360px;padding:24px;border-radius:26px;background:#ffffff;border:1px solid rgba(15,23,42,0.08);box-shadow:0 18px 45px rgba(15,23,42,0.08)}
.hero-promo p{text-transform:uppercase;letter-spacing:.16em;color:#83b156;font-size:.82rem;margin-bottom:16px}
.hero-promo h2{font-size:2.25rem;line-height:1.05;margin-bottom:14px}
.promo-emphasis{color:#1f2a36}
.hero-promo strong{color:#8cc63f}
.promo-link{display:inline-flex;align-items:center;justify-content:center;margin-top:18px;padding:12px 18px;border-radius:999px;background:#8cc63f;color:#07110a;font-weight:700}
.home-footer{padding:24px 32px;text-align:center;color:#8fa7ad;border-top:1px solid rgba(255,255,255,0.08)}

@media (max-width:1024px){
  .hero-content{grid-template-columns:1fr;padding:40px 24px 60px}
  .hero-image{min-height:420px}
}

@media (max-width:767px){
  body{padding-top:64px;background-attachment:scroll;background-size:cover;background-position:center;background-repeat:no-repeat}
  body, body.dark, .home-hero, .home-footer, body.dark .home-hero, body.dark .home-footer{background-image:linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.14)), url("../img/fondo/fondo.png");background-position:center;background-size:cover;background-repeat:no-repeat}
  body.dark, body.dark .home-hero, body.dark .home-footer{background-image:linear-gradient(rgba(7, 14, 24, 0.72), rgba(7, 14, 24, 0.72)), url("../img/fondo/fondo.png")}
  main.home-hero{display:block;min-height:auto;padding-bottom:0;background:transparent}
  .site-header{height:64px}
  .header-container{padding:0 14px;gap:10px}
  .brand{flex:1;gap:8px}
  .brand img{max-height:44px}
  .brand-name{font-size:0.72rem;letter-spacing:.08em;max-width:120px}
  .main-navigation,.whatsapp-button{display:none}
  .mobile-nav-toggle{display:inline-flex}
  .mobile-nav-panel{display:none;position:absolute;top:calc(100% + 8px);left:12px;right:12px;z-index:1001;padding:16px;border-radius:20px;border:1px solid var(--color-border);background:var(--color-surface);box-shadow:var(--shadow-md)}
  .mobile-nav-panel.is-open{display:flex;flex-direction:column}
  .mobile-navigation a{font-size:0.98rem}
  .home-hero{min-height:auto;padding-bottom:0}
  .hero-content{padding:24px 16px 40px;gap:24px}
  .hero-copy h1{font-size:clamp(2.2rem, 8vw, 3rem);max-width:none}
  .hero-actions{flex-direction:column;align-items:stretch}
  .hero-button{width:100%}
  .hero-highlights{grid-template-columns:1fr}
  .home-hero .hero-promo{position:static !important;transform:none !important;left:auto !important;top:auto !important;right:auto !important;bottom:auto !important;width:100%;max-width:none;margin:0 0 16px 0;padding:20px;border-radius:20px;z-index:1}
  .home-footer{flex-direction:column;align-items:flex-start;padding:24px 16px calc(24px + env(safe-area-inset-bottom));gap:8px;text-align:left;margin-top:0;position:relative;z-index:1;min-height:auto;height:auto}
  .home-footer .footer-copy,.home-footer .footer-links{width:100%}
  .home-footer .footer-links{display:flex;flex-wrap:wrap;gap:10px}
}

@media (max-width:480px){
  .header-container{gap:8px}
  .brand-name{display:none}
  .hero-copy h1{font-size:clamp(1.9rem, 8vw, 2.6rem)}
  .hero-text{font-size:0.98rem}
  .hero-promo h2{font-size:1.8rem}
  .home-footer{gap:8px}
}

/* Botón flotante para volver al inicio */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 1200;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(140, 198, 63, 0.96), rgba(104, 165, 31, 0.96));
  color: #07110a;
  box-shadow: 0 12px 28px rgba(21, 42, 18, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 36px rgba(21, 42, 18, 0.24);
  filter: brightness(1.02);
}

.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(140, 198, 63, 0.75);
  outline-offset: 3px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

html.dark .back-to-top {
  background: linear-gradient(180deg, rgba(140, 198, 63, 0.99), rgba(81, 128, 27, 0.99));
  color: #f3f7ef;
  border-color: rgba(255, 255, 255, 0.09);
}

@media (max-width: 720px) {
  .back-to-top {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 900;
  }

  .back-to-top.is-visible {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .back-to-top.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

html {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .hero-visual{gap:18px}
  .hero-image{min-height:320px}
}

/* Dark-mode component overrides migrated from inicio.css */
body.dark .site-header{background:rgba(3,8,14,0.94);border-bottom-color:rgba(255,255,255,0.08)}
body.dark .brand-name{color:#ffffff}
body.dark .main-navigation a{color:#eef3f6}
body.dark .main-navigation a.active,body.dark .main-navigation a:hover{color:#9fdc5f}
body.dark .whatsapp-button{background:linear-gradient(90deg,#6ea632 0%,#548b24 100%);color:#eef3f6}
body.dark .hero-text,body.dark .hero-pretitle,body.dark .hero-button,body.dark .hero-promo,body.dark .highlight-item{color:#eef3f6}
body.dark .promo-emphasis{color:#ffffff}
body.dark .text-highlight{color:var(--color-primary)}
body.dark .hero-promo{background:rgba(10,18,28,0.92);border-color:rgba(255,255,255,0.08)}
body.dark .hero-image{background:radial-gradient(circle at top left,rgba(140,198,63,0.12) 0%,transparent 35%),linear-gradient(180deg,rgba(10,15,23,0.98) 0%,rgba(7,10,15,1) 100%)}
body.dark .hero-button.hero-primary{background:#8cc63f;color:#07110a}
body.dark .hero-button.hero-secondary{background:rgba(255,255,255,0.12);color:#eef3f6;border-color:rgba(255,255,255,0.16)}
body.dark .promo-link{background:#7fae2b;color:#07110a}
body.dark .hero-promo p{color:#8abf67}
body.dark .highlight-item{background:#1f252c;border:1px solid #39434d;color:#f5f7fa;box-shadow:0 10px 24px rgba(0,0,0,0.28)}
body.dark .highlight-item:hover{background:#27313b;box-shadow:0 14px 30px rgba(0,0,0,0.35);border-color:#4b5764}
body.dark .highlight-item span{background:rgba(140,198,63,0.2);color:#9fdc5f}
body.dark .extra-panel{background:linear-gradient(135deg,#27322c 0%,#2f3a33 100%);border-color:rgba(140,198,63,0.28);color:#f2f6ee;box-shadow:inset 0 1px 0 rgba(255,255,255,0.04)}
body.dark .extra-panel h3{color:#9fdc5f}
body.dark .extra-panel li{color:#e7efe2}
body.dark .home-footer{color:#9aa7b3;border-top-color:rgba(255,255,255,0.08)}
body.dark .dark-toggle{background:rgba(255,255,255,0.08);color:#eef3f6}
body.dark .dark-toggle:hover{background:rgba(255,255,255,0.14)}

/* Hero background image for light mode */
.home-hero{background:url("../img/fondo/fondo.png") center/cover no-repeat;background-blend-mode:soft-light}

/* Ensure highlight boxes have clear border in light mode */
.highlight-item{border:1px solid #000;background:#ffffff;color:#101828}

/* End of consolidated style.css */

/* =====================================================
   ORGANIZACIÓN DEL CATÁLOGO
   La imagen de cada producto permanece independiente de
   esta estructura visual.
===================================================== */

.product-color.almendra { background: #c8a97d; }
.product-color.beige { background: #d9c29a; }
.product-color.camel { background: #b8874b; }
.product-color.marfil { background: #f1e8d5; }
.product-color.taupe { background: #b8a58d; }
.product-color.azul { background: #4f6f8f; }
.product-color.chocolate { background: #5a2f1d; }
.product-color.miel { background: #c99a48; }
.product-color.nuez { background: #6a3f24; }
.product-color.plomo { background: #6b7280; }
.product-color.rojo { background: #b33a3a; }
.product-color.rosa { background: #d9a8b7; }
.product-color.turquesa { background: #4a9ea0; }
.product-color.crema { background: #e9ddc3; }
.product-color.gris\ claro { background: #cfcfcf; }
.product-color.marron { background: #6b3e1a; }
.product-color.terra { background: #b05c3b; }
.product-color.terracota { background: #b85c3b; }
.product-color.vinotinto { background: #7b1e3a; }
.product-color.bronce { background: #a86c2a; }
.product-color.capuchino { background: #8b6a4b; }
.product-color.caramelo { background: #b8742d; }
.product-color.gris\ medio { background: #8a8a8a; }
.product-color.gris\ oscuro { background: #5a5a5a; }
.product-color.gris\ stone { background: #b0b0b0; }
.product-color.monjave { background: #8b6b3f; }
.product-color.red { background: #b33a3a; }
.product-color.tabaco { background: #6b3e1a; }
.product-color.tundra { background: #5d6a53; }
.product-color.verde { background: #6b8f5d; }
.product-color.ivory { background: #f5efe2; }
.product-color.gris { background: #8f8f8f; }
.product-color.arena { background: #d7c8a6; }
.product-color.avellana { background: #8b5a2b; }
.product-color.hielo { background: #dfe8ee; }
.product-color.lino { background: #d9d0b8; }
.product-color.navy { background: #223a5e; }
.product-color.celeste { background: #b9d7e8; }
.product-color.menta { background: #8ec8ab; }
.product-color.plomo { background: #71777d; }
.product-color.ceniza { background: #7a7f84; }
.product-color.mostaza { background: #d0a954; }
.product-color.nude { background: #d7c6ae; }
.product-color.nuez { background: #65462d; }
.product-color.oliva { background: #73815a; }
.product-color.indigo { background: #3b4c6b; }
.product-color.aluminio { background: #8b8f96; }
.product-color.carbon { background: #2f2f2f; }
.product-color.plata { background: #c5cbd3; }
.product-color.verde { background: #5d7b4f; }
.product-color.violeta { background: #7c4d9f; }
.product-color.nube { background: #e4e0dc; }
.product-color.oatmeal { background: #d3c5b3; }
.product-color.peltre { background: #737878; }
.product-color.ash { background: #b6b1aa; }
.product-color.linen { background: #d8d1c5; }
.product-color.silver { background: #c9cdd2; }
.product-color.avellana { background: #8d5d39; }
.product-color.indigo { background: #3d4b6b; }
.product-color.acero { background: #8f9aa3; }
.product-color.aluminio { background: #b6b8bc; }
.product-color.blanco { background: #f4f1eb; }
.product-color.chocolate { background: #5d3526; }
.product-color.esmeralda { background: #4c8a5c; }
.product-color.frambuesa { background: #9e3b4f; }
.product-color.khaki { background: #8c7d46; }
.product-color.oceano { background: #2e5e7b; }
.product-color.palo\ rosa { background: #b96f86; }
.product-color.turquesa { background: #3b8a8e; }
.product-color.uva { background: #6f4b82; }
.product-color.camel { background: #b98b4d; }
.product-color.plomo { background: #6f757e; }
.product-color.trigo { background: #b89b4b; }

.catalog-page {
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 28px 20px 70px;
}

.catalog-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.catalog-title {
    min-width: 0;
}

.catalog-title h1 {
    margin-bottom: 8px;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.15;
    white-space: nowrap;
}

.catalog-title p {
    max-width: 590px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.catalog-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.catalog-layout {
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 18px;
}

.filters {
    position: sticky;
    top: 92px;
    padding: 0;
}

.products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.product-button {
    margin-top: auto;
}

@media (max-width: 1050px) {
    .catalog-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .catalog-tools {
        width: 100%;
    }
}

@media (max-width: 750px) {
    .catalog-page {
        padding: 22px 15px 50px;
    }

    .catalog-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
    }
}

/* Search box (normalized to tokens) */
.search-box {
    width: 258px;
    height: 40px;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-surface);
}

.search-box input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 13px;
    color: var(--color-text);
    font-size: 12px;
}

.search-box input::placeholder {
    color: #8d96a2;
}

.search-box span {
    padding: 0 13px;
    font-size: 20px;
    color: var(--color-text-muted);
}

body.dark .search-box {
    background: #1b232b;
    border-color: #384653;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

body.dark .search-box input {
    color: #f4f7fa;
    background: transparent;
}

body.dark .search-box input::placeholder {
    color: #9caab6;
}

body.dark .search-box span {
    color: #f4f7fa;
}


/* =====================================================
   SELECT
===================================================== */

#sortSelect {
    width: 220px;
    height: 40px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 6px;

    background: var(--white);
    color: var(--text);

    font-size: 12px;
    outline: none;
    cursor: pointer;
}


/* =====================================================
   ESTRUCTURA PRINCIPAL
===================================================== */

.catalog-layout {
    display: grid;
    grid-template-columns: 205px 1fr;
    gap: 34px;
    align-items: start;
}


/* =====================================================
   FILTROS
===================================================== */

.filters {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    overflow: hidden;
}

.filters-title {
    height: 41px;
    padding: 0 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--green-dark);
    color: var(--white);
}

.filters-title h2 {
    font-size: 15px;
    font-weight: 600;
}

.filters-title span {
    font-size: 18px;
}


/* =====================================================
   SECCIONES DE FILTRO
===================================================== */

.filter-section {
    padding: 18px 15px;
    border-bottom: 1px solid var(--border);
}

.filter-section h3 {
    margin-bottom: 17px;
    font-size: 13px;
    font-weight: 700;
}


/* =====================================================
   CATEGORÍAS
===================================================== */

.category-option {
    display: block;
    margin-bottom: 15px;
    cursor: pointer;
}

.category-option:last-child {
    margin-bottom: 0;
}

.category-option input {
    display: none;
}

.category-option span {
    font-size: 12px;
    color: var(--text);
    transition: color 0.2s ease;
}

.category-option:hover span {
    color: var(--green-dark);
}

.category-option.active span {
    color: var(--green-dark);
    font-weight: 700;
}


/* =====================================================
   COLORES DEL FILTRO
===================================================== */

.color-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px 12px;
}

.color {
    width: 22px;
    height: 22px;

    border-radius: 50%;
    border: 1px solid transparent;

    appearance: none;
    padding: 0;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.color:hover {
    transform: scale(1.12);
}

.color.selected {
    box-shadow:
        0 0 0 3px var(--white),
        0 0 0 5px var(--green);
}

.color.black {
    background-color: #000000;
}

.color.grey {
    background-color: #bdbdbd;
}

.color.beige {
    background-color: #bca88b;
}

.color.brown {
    background-color: #604128;
}

.color.red {
    background-color: #b82b2b;
}

.color.blue {
    background-color: #244d87;
}

.color.green {
    background-color: #72ae3b;
}

.color.white {
    background-color: #ffffff;
    border-color: #cfd5dc;
}

/* Colores específicos para "Cuero Sintético Premium" */
.product-color.amarillo {
    background-color: #f5c542;
}

.product-color.arcilla {
    background-color: #ccb98c;
}

.product-color.tundra {
    background-color: #a24a00;
}

.product-color.blanco {
    background-color: #ffffff;
    border-color: #cfd5dc;
}

.product-color.mojave {
    background-color: #a17f57;
}

.product-color.negro {
    background-color: #000000;
}

.product-color.marron {
    background-color: #6b3e1a;
}


/* =====================================================
   PROPIEDADES
===================================================== */

.property-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    cursor: pointer;
}

.property-option:last-child {
    margin-bottom: 0;
}

.property-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--green);
    cursor: pointer;
}

.property-option span {
    font-size: 12px;
    color: var(--text-light);
}


/* =====================================================
   LIMPIAR FILTROS
===================================================== */

.clear-filters {
    width: calc(100% - 30px);
    height: 36px;

    margin: 18px 15px;

    border: 1px solid var(--green);
    border-radius: 5px;

    background: var(--white);
    color: var(--green-dark);

    font-size: 12px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.clear-filters:hover {
    background: var(--green);
    color: var(--white);
}


/* =====================================================
   GRID DE PRODUCTOS
===================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    transition: opacity 0.25s ease;
}

.products-grid.expanded .product-card:not(.expanded) {
    opacity: 0.72;
    transform: scale(0.985);
}

.products-grid.expanded .product-card:not(.expanded):hover {
    transform: translateY(-3px) scale(1);
}


/* =====================================================
   TARJETA DE PRODUCTO
===================================================== */

.product-card {
    min-width: 0;

    background: var(--product-card-bg);
    border: none;
    border-radius: 7px;

    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 180ms ease,
        color 180ms ease,
        border-color 180ms ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(24, 35, 51, 0.11);
}

.product-card.expanded {
    grid-column: 1 / -1;
    transform: none;
    box-shadow: 0 28px 48px rgba(24, 35, 51, 0.16);
    position: relative;
    z-index: 2;
    opacity: 1;
}

.product-card.expanded .product-image {
    height: 420px;
}

.product-card.sole-card .product-image img {
    /* For closed (non-expanded) sole cards, fill the card area so
       the gray background is not visible. When expanded, rules
       below switch to `object-fit: contain` to show the full image. */
    object-fit: cover;
    object-position: center;
    transform: none;
    width: 100%;
    height: 100%;
}

.product-card.sole-card.expanded .product-image {
    height: auto;
    min-height: 320px;
    max-height: none;
    /* center the full suela image inside the expanded container */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card.sole-card.expanded .product-image img {
    object-position: center;
    object-fit: contain;
    transform: none;
    /* Show the full image without cropping when expanded.
       Allow it to scale down to fit viewport but keep natural aspect. */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 260px);
}

.product-card.expanded .product-content {
    padding: 20px 22px 22px;
}

.product-card.expanded .product-name {
    font-size: 18px;
}

.product-card.expanded .product-description {
    min-height: auto;
}

.product-extra-panels {
    display: none;
    gap: 18px;
    margin: 18px 0 0;
}

.extra-panel {
    padding: 18px;
    background: #f7fdf2;
    border: 1px solid #d8eed0;
    border-radius: 8px;
    color: #182333;
    font-size: 13px;
    line-height: 1.6;
}

.extra-panel h3 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}

.extra-panel ul {
    padding-left: 18px;
    margin: 0;
}

.extra-panel li {
    margin-bottom: 8px;
}

.product-card.expanded .product-extra-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.product-card.expanded .extra-panel {
    min-height: 160px;
}

.product-card.expanded .product-colors {
    margin-top: 10px;
    margin-bottom: 16px;
}

@media (max-width: 767px) {
    .product-card.expanded {
        grid-column: 1;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .product-card.expanded .product-extra-panels {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        margin: 16px 0 0;
    }

    .product-card.expanded .extra-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 16px;
        font-size: 14px;
        line-height: 1.7;
    }

    .product-card.expanded .extra-panel ul {
        padding-left: 16px;
        margin: 0;
    }

    .product-card.expanded .extra-panel li {
        margin-bottom: 8px;
        overflow-wrap: anywhere;
    }

    .product-card.expanded .product-image {
        height: auto;
        min-height: 220px;
        max-height: none;
    }

    .product-card.expanded .product-content {
        padding: 16px;
    }
}

/* =====================================================
   IMAGEN
===================================================== */

.product-image {
    width: 100%;
    height: 147px;

    overflow: hidden;
    background: #111111;
}

.product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;

    transition: transform 0.4s ease, opacity 0.28s ease;
    opacity: 1;
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}


/* =====================================================
   INFORMACIÓN
===================================================== */

.product-content {
    padding: 13px 14px 14px;
    background: var(--product-card-content-bg);
    color: var(--product-card-text-color);
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.product-name {
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--product-card-heading-color);
    transition: color 180ms ease;
}

.product-description,
.product-category,
.product-details,
.product-colors-label,
.product-availability {
    color: var(--product-card-text-color);
    transition: color 180ms ease;
}

.product-category {
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--product-card-muted-color);
}


/* =====================================================
   DISPONIBILIDAD
===================================================== */

.product-availability {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-top: -7px;
    margin-bottom: 10px;

    color: var(--green-dark);
    font-size: 11px;
    font-weight: 600;
}

.availability-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
}


/* =====================================================
   DESCRIPCIÓN
===================================================== */

.product-description {
    min-height: 38px;
    margin-bottom: 13px;

    color: var(--product-card-text-color);
    font-size: 11px;
    line-height: 1.55;
}


/* =====================================================
   DETALLES
===================================================== */

.product-details {
    margin-bottom: 10px;
    font-size: 10px;
    line-height: 1.7;
    color: var(--product-card-text-color);
}

.product-details strong {
    font-weight: 700;
}


/* =====================================================
   COLORES DEL PRODUCTO
===================================================== */

.product-colors {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    margin-top: 6px;
}

.product-colors-label {
    margin-right: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--product-card-muted-color);
}


/*
   Estos botones son interactivos.
   El background-color será aplicado por JavaScript
   según el color seleccionado.
*/

.product-color {
    width: 16px;
    height: 16px;

    flex-shrink: 0;

    padding: 0;

    border-radius: 50%;
    border: 1px solid #cfd5dc;

    appearance: none;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.product-color:hover {
    transform: scale(1.18);
}

.product-color.active,
.product-color.selected {
    box-shadow:
        0 0 0 2px var(--white),
        0 0 0 4px #8cc63f;
    border-color: #68a51f;
    transform: scale(1.08);
}

.product-color:focus {
    outline: 2px solid rgba(24,35,51,0.12);
    outline-offset: 2px;
}

.product-color-name {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    align-self: center;
}

/* Colores individuales para los botones de variante */
.product-color.blanco { background: #f4f1eb; }
.product-color.chocolate { background: #5a2f1d; }
.product-color.marron { background: #6b3e1a; }
.product-color.rosado { background: #d9a8b7; }
.product-color.vino { background: #7b1e3a; }
.product-color.dorado { background: #cfae4b; }
.product-color.oro-rosa { background: #d4a59e; }
.product-color.plateado { background: #c9cdd2; }
.product-color.plata { background: #c9cdd2; }
.product-color.oro-cepillado { background: #c9a86a; }
.product-color.negro { background: #111111; }
.product-color.coral { background: #c96b5f; }
.product-color.arcoiris { background: linear-gradient(90deg, #ff6b6b 0%, #ffd166 50%, #4ecdc4 100%); }
.product-color.tornasol { background: linear-gradient(90deg, #f4a261 0%, #8ecae6 50%, #c77dff 100%); }
.product-color.beige { background: #d9c29a; }
.product-color.gris { background: #8f8f8f; }
.product-color.taupe { background: #b8a58d; }
.product-color.artico { background: #dfe8ec; }
.product-color.sand { background: #d8c7a2; }
.product-color.grafito { background: #4f4f4f; }
.product-color.mineral { background: #b8b7b5; }
.product-color.almendra { background: #d7b98d; }
.product-color.carbon { background: #2f2f2f; }
.product-color.crema { background: #f2e9d8; }
.product-color.plata { background: #c9cdd2; }
.product-color.esmeralda { background: #2e8b57; }
.product-color.plata { background: #c7ccd2; }
.product-color.aluminio { background: #8b8f96; }
.product-color.cobalta { background: #3e5a9b; }
.product-color.plata { background: #c7ccd2; }
.product-color.azul { background: #4f6f8f; }
.product-color.blanco { background: #f4f1eb; }
.product-color.rojo { background: #b33a3a; }
.product-color.avellana { background: #8b5a2b; }
.product-color.azul { background: #4f6f8f; }
.product-color.beige { background: #d9c29a; }
.product-color.carbon { background: #333333; }
.product-color.menta { background: #8fd0b1; }
.product-color.oceano { background: #2f5d7a; }
.product-color.orquidea { background: #8c5aa8; }
.product-color.orquídea { background: #8c5aa8; }
.product-color.plata { background: #c7ccd2; }
.product-color.rosa { background: #d9a8b7; }
.product-color.grafito { background: #4b4b4b; }
.product-color.avellana { background: #8b5a2b; }
.product-color.beige { background: #d9c29a; }
.product-color.crema { background: #e9ddc3; }
.product-color.esmeralda { background: #2e8b57; }
.product-color.menta { background: #8fd0b1; }
.product-color.moca { background: #8a6346; }
.product-color.negro { background: #111111; }
.product-color.nuez { background: #6a3f24; }
.product-color.plata { background: #c7ccd2; }
.product-color.plomo { background: #6b7280; }
.product-color.terra { background: #b05c3b; }
.product-color.zafiro { background: #305b9b; }
.product-color.crudo { background: #c7a46d; }
.product-color.mocca { background: #7a4d2b; }
.product-color.natural { background: #d8c6a4; }
.product-color.ostra { background: #b8b0a1; }
.product-color.silver { background: #c9cdd2; }
.product-color.camel { background: #b8874b; }
.product-color.grisclaro { background: #cfcfcf; }
.product-color.arena { background: #d8c7a7; }
.product-color.azul { background: #4f6f8f; }
.product-color.carbon { background: #333333; }
.product-color.lino { background: #d9d0b8; }
.product-color.moka { background: #7b4f2e; }
.product-color.oliva { background: #7d8754; }
.product-color.rosa { background: #d9a8b7; }
.product-color.almendra { background: #c8a97d; }
.product-color.aluminio { background: #b7b8bc; }
.product-color.marfil { background: #f1e8d5; }
.product-color.verde { background: #6b8f5d; }
.product-color.acero { background: #6f7b84; }
.product-color.cocoa { background: #6f4b2d; }
.product-color.hielo { background: #dfe8ee; }
.product-color.navy { background: #243b5a; }
.product-color.mostaza { background: #d6a93c; }
.product-color.ocre { background: #b8872f; }
.product-color.grafito { background: #4f4f4f; }
.product-color.marron { background: #6b3e1a; }
.product-color.camel { background: #b8874b; }
.product-color.coral { background: #c96b5f; }
.product-color.indigo { background: #4a5d8a; }
.product-color.plata { background: #c9cdd2; }
.product-color.aluminio { background: #b7b8bc; }
.product-color.azul { background: #4f6f8f; }
.product-color.marron { background: #6b3e1a; }
.product-color.plomo { background: #6b7280; }
.product-color.rojo { background: #b33a3a; }
.product-color.rosa { background: #d9a8b7; }
.product-color.verde { background: #6b8f5d; }
.product-color.violeta { background: #7c4d9f; }
.product-color.fucsia { background: #d84a82; }
.product-color.stone { background: #bfb7a8; }
.product-color.gris { background: #8f8f8f; }
.product-color.gris-claro { background: #cfcfcf; }
.product-color.gris-medio { background: #8a8a8a; }
.product-color.gris-stone { background: #b0b0b0; }
.product-color.marfil { background: #f1e8d5; }
.product-color.taupe { background: #b8a58d; }
.product-color.camel { background: #b8874b; }
.product-color.carbon { background: #333333; }
.product-color.crema { background: #e9ddc3; }
.product-color.menta { background: #8fd0b1; }
.product-color.rosa { background: #d9a8b7; }
.product-color.esmeralda { background: #2e8b57; }
.product-color.indigo { background: #4a5d8a; }
.product-color.oceano { background: #2f5d7a; }
.product-color.palo\ rosa { background: #c76f8a; }
.product-color.rojo { background: #b33a3a; }
.product-color.violeta { background: #7c4d9f; }
.product-color.chocolate { background: #5a2f1d; }
.product-color.grafito { background: #4f4f4f; }
.product-color.new\ sand { background: #d7c7a7; }
.product-color.avellana { background: #8b5a2b; }
.product-color.niebla { background: #bfcfd4; }
.product-color.oliva { background: #7d8754; }
.product-color.trigo { background: #caa55a; }
.product-color.artico { background: #dde8ee; }
.product-color.mocca { background: #7a4d2b; }
.product-color.sand { background: #d8c7a2; }
.product-color.ivory { background: #f2ead8; }
.product-color.acero { background: #6f7b84; }
.product-color.almendra { background: #c8a97d; }
.product-color.aluminio { background: #b7b8bc; }
.product-color.azul { background: #4f6f8f; }
.product-color.camel { background: #b8874b; }
.product-color.indigo { background: #4a5d8a; }
.product-color.marfil { background: #f1e8d5; }
.product-color.palo\ rosa { background: #c76f8a; }
.product-color.plata { background: #c9cdd2; }
.product-color.turquesa { background: #4a9ea0; }
.product-color.almendra { background: #c8a97d; }
.product-color.camel { background: #b8874b; }
.product-color.indigo { background: #4a5d8a; }
.product-color.marfil { background: #f1e8d5; }
.product-color.musgo { background: #6b7d4f; }
.product-color.taupe { background: #b8a58d; }
.product-color.cafe { background: #69513d; }
.product-color.gris\ oscuro { background: #4d4d4d; }
.product-color.crema { background: #e8dcc2; }
.product-color.plata { background: #c7ccd2; }
.product-color.ivory { background: #f2ead8; }
.product-color.sand { background: #d0b18a; }
.product-color.grafito { background: #4f4f4f; }
.product-color.mineral { background: #b8b7b5; }
.product-color.navy { background: #2d4468; }
.product-color.violeta { background: #6e4d8d; }
.product-color.camel { background: #b8874b; }
.product-color.carbon { background: #2d2d2d; }
.product-color.marfil { background: #f0e7d8; }
.product-color.azul { background: #425d7a; }
.product-color.verde { background: #5d7f52; }


/* =====================================================
   BOTÓN DE CONSULTA
===================================================== */

.product-button {
    width: 100%;
    height: 34px;

    border: none;
    border-radius: 8px;

    background: linear-gradient(135deg, #8cc63f 0%, #6fa82f 100%);
    color: #07110a;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(108, 158, 47, 0.22);
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, background 0.22s ease;
}

.product-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(108, 158, 47, 0.3);
    filter: brightness(1.04);
    background: linear-gradient(135deg, #97d04b 0%, #7cb730 100%);
}

.product-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(108, 158, 47, 0.24);
}


/* =====================================================
   PRODUCTOS AGOTADOS
===================================================== */

.product-card.out-of-stock {
    opacity: 0.78;
}

.product-card.out-of-stock .product-availability {
    color: #a33b3b;
}

.product-card.out-of-stock .availability-dot {
    background: #c94b4b;
}

.product-card.out-of-stock .product-button {
    background: #9ba1a8;
}

.product-card.out-of-stock .product-button:hover {
    background: #7e858d;
}


/* =====================================================
   SIN RESULTADOS
===================================================== */

.no-products {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-light);
}

.no-products h2 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 20px;
}

.no-products p {
    font-size: 13px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1050px) {

    .main-navigation {
        gap: 22px;
    }

    .catalog-layout {
        grid-template-columns: 190px 1fr;
        gap: 22px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .catalog-tools {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }
}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 750px) {

    .site-header {
        position: sticky;
        top: 0;
        height: auto;
    }

    body {
        padding-top: 0;
        overflow-x: hidden;
    }

    .header-container {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: stretch;
        gap: 10px 16px;
        padding: 12px 16px;
        width: 100%;
        max-width: 100%;
        min-height: auto;
    }

    .brand {
        grid-column: 1 / 2;
        grid-row: 1;
        min-width: 0;
        width: min(100%, calc(100vw - 140px));
    }

    .brand img {
        max-width: 100px;
        max-height: 55px;
    }

    .whatsapp-button {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        margin: 0;
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
        max-width: 100%;
    }

    .dark-toggle {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        margin: 0;
    }

    .main-navigation {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        padding: 0;
        margin: 0;
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation a {
        white-space: nowrap;
        padding: 10px 0;
        font-size: 12px;
        min-width: 0;
    }

    .main-navigation a.active::after {
        bottom: 0;
    }

    .catalog-page {
        padding: 22px 15px 50px;
    }

    .catalog-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box,
    #sortSelect {
        width: 100%;
    }

    .catalog-layout {
        display: block;
    }

    .filters {
        margin-bottom: 25px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 200px;
    }
}


/* =====================================================
   ANIMACIÓN
===================================================== */

.product-card {
    animation: productAppear 0.35s ease both;
}

@keyframes productAppear {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Final catalog layout overrides */
.catalog-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px clamp(24px, 4vw, 72px) 70px;
    background: transparent;
}
.catalog-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.catalog-title { min-width: 0; }
.catalog-title h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.15; white-space: nowrap; }
.catalog-title p { max-width: 590px; color: var(--color-text-muted); font-size: .82rem; line-height: 1.6; }
.catalog-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.catalog-layout { display: grid; grid-template-columns: minmax(230px, 250px) minmax(0, 1fr); gap: 24px; align-items: start; width: 100%; }
.filters { position: sticky; top: 92px; padding: 0; width: 100%; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; width: 100%; align-items: start; }
.product-card { display: flex; flex-direction: column; height: auto; min-width: 0; }
.product-content { display: flex; flex: 1; flex-direction: column; }
.product-button { margin-top: auto; }

@media (min-width: 1700px) {
    .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
    .catalog-header { align-items: flex-start; flex-direction: column; gap: 18px; }
    .catalog-tools { width: 100%; }
}

@media (max-width: 560px) {
    .products-grid { grid-template-columns: 1fr; }
}

@media (max-width: 750px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
}

/* Dark-mode overrides for select and color chips */
html.dark #sortSelect,
body.dark #sortSelect {
    background: var(--product-card-content-bg);
    color: var(--color-text);
    border: 1px solid rgba(255,255,255,0.06);
}

html.dark #sortSelect option,
body.dark #sortSelect option {
    background: var(--product-card-content-bg);
    color: var(--color-text);
}

/* Improve selected ring for color chips in dark mode */
html.dark .color.selected,
body.dark .color.selected {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06), 0 0 0 5px var(--green-dark);
}