/* ============================================================
   Mueblería Danur - Main CSS
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
    --color-black: #0a0a0a;
    --color-white: #ffffff;
    --color-gold: #62151A;
    --color-gold-light: #f5d0d2;
    --color-gold-dark: #4a1013;
    --color-gray-light: #f5f5f5;
    --color-gray: #e0e0e0;
    --color-gray-mid: #999999;
    --color-gray-dark: #555555;
    --color-text: #1a1a1a;
    --color-text-muted: #777777;
    --color-success: #2d7d46;
    --color-danger: #c0392b;
    --color-warning: #d68910;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', 'Segoe UI', sans-serif;

    --navbar-height: 104px;
    /* Área táctil mínima recomendada (WCAG 2.5.5 / Apple HIG). */
    --touch-target: 44px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.18);
    --border-radius: 4px;
    --max-width: 1400px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Páginas interiores: empujan contenido debajo del navbar */
body:not(.page-index) {
    padding-top: var(--navbar-height);
}

/* Homepage: hero empieza desde el top (detrás del navbar transparente) */
body.page-index {
    padding-top: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul { list-style: none; }

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

input, textarea, select {
    font-family: var(--font-body);
    font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-black);
}

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- NAVBAR ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-gray);
    box-shadow: var(--shadow-md);
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Navbar siempre blanco — logo siempre visible */
.navbar.navbar-transparent {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray);
}
.navbar.navbar-transparent .navbar-logo .logo-texto { filter: none; }
.navbar.navbar-transparent .navbar-cart { color: var(--color-black); }
.navbar.navbar-transparent .navbar-cart svg { stroke: var(--color-black); }

/* Navbar sólido al hacer scroll o en páginas interiores */
.navbar.scrolled,
.navbar.navbar-solid {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray);
    box-shadow: var(--shadow-md);
}
.navbar.scrolled .navbar-logo .logo-texto,
.navbar.navbar-solid .navbar-logo .logo-texto {
    filter: none;
}
.navbar.scrolled .navbar-toggler span,
.navbar.navbar-solid .navbar-toggler span {
    background: var(--color-black);
}
.navbar.scrolled .navbar-cart,
.navbar.navbar-solid .navbar-cart {
    color: var(--color-black);
}

.navbar-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

.navbar-logo:hover {
    opacity: 0.75;
}

.logo-img {
    display: block;
}

.logo-texto {
    /* Ancho explícito (la imagen es 2000x876, ratio 2.2831) para que el
       navegador reserve la caja antes de descargarla. Con width:auto el
       logo provocaba desplazamiento de layout en todas las páginas. */
    height: 76px;
    width: 173.5px;
}

.logo-full {
    height: 60px;
    width: auto;
    mix-blend-mode: screen; /* fondo blanco desaparece sobre footer oscuro */
    filter: invert(1);       /* texto negro → blanco sobre fondo oscuro */
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--color-black);
    text-decoration: none;
    padding: 0.5rem 0.65rem;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.navbar-cart {
    position: relative;
    display: flex;
    align-items: center;
    /* El icono mide 22px; el enlace se agranda a 44px para cumplir el mínimo
       táctil. El margen negativo compensa el ensanchado para que el icono no
       se despegue del borde derecho del navbar. */
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    margin-right: -11px;
    color: var(--color-black);
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.3s;
}

.navbar-cart:hover {
    color: var(--color-gold);
}

.cart-badge {
    position: absolute;
    /* Reposicionado tras ensanchar .navbar-cart a 44px: el icono de 22px
       queda centrado, así que su esquina superior derecha cae a 11px del
       borde. 11 - 8 = 3 conserva el solape original. */
    top: 3px;
    right: 3px;
    background: var(--color-gold);
    color: var(--color-white);
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-badge:empty {
    display: none;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    /* NO tocar gap ni el height de los span: la X de .active usa
       translateY(7px) = gap 5 + alto 2. Solo el padding crece, que no
       interviene en esa transformación. 24+20 = 44 de ancho, 6+10+28 = 44
       de alto. */
    gap: 5px;
    padding: 14px 10px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* ---- HERO SECTION (Full Width Slider) ---- */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slides {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
    opacity: 1;
    animation: heroSlideZoom 9s ease-out forwards;
}

@keyframes heroSlideZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0,0,0,0.22);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 2rem;
    max-width: 760px;
    padding-top: calc(var(--navbar-height) + 2rem); /* empuja el texto bajo el navbar */
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 4vw, 4.8rem);
    font-weight: 500;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0,0,0,0.25);
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeInUp 0.9s ease 0.4s forwards;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-style: normal;
    font-size: clamp(0.9rem, 1.2vw, 1.15rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.82);
    text-shadow: none;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.9s ease 0.6s forwards;
}

.hero-text {
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 300;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    max-width: 460px;
    margin: 0 auto 2.25rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.9s ease 0.8s forwards;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 0.9s ease 1s forwards;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta .btn {
    letter-spacing: 0.04em;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- HERO SLIDER CONTROLS ---- */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.55;
    backdrop-filter: blur(2px);
    transition: opacity 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}

.hero-arrow:hover {
    opacity: 1;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.65);
}

.hero-arrow-prev { left: 2rem; }
.hero-arrow-next { right: 2rem; }

.hero-dots {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    /* Sin separación: cada botón ya aporta su propia área táctil de 44px. */
    gap: 0;
}

/* El botón es el área táctil (44x44); el punto visible es ::before.
   Separarlos permite cumplir el mínimo sin tocar la animación de .active,
   que sigue dependiendo del ancho del punto, no del botón. */
.hero-dot {
    width: var(--touch-target);
    height: var(--touch-target);
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.hero-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-dot.active::before {
    width: 22px;
    border-radius: 3px;
    background: var(--color-gold-light);
}

/* ---- SECTION STYLES ---- */
.section {
    padding: 6rem 0;
}

.section-sm {
    padding: 4rem 0;
}

.section-dark {
    background: var(--color-black);
    color: var(--color-white);
}

.section-dark h2,
.section-dark h3 {
    color: var(--color-white);
}

.section-gray {
    background: var(--color-gray-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.section-dark .section-subtitle {
    color: rgba(255,255,255,0.7);
}

/* ---- CATEGORY GRID ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.category-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.75) 0%, rgba(10,10,10,0.1) 60%);
    z-index: 1;
    transition: opacity 0.3s;
}

.category-grid-preview .category-card::before {
    background: linear-gradient(to top, rgba(10,10,10,0.86) 0%, rgba(10,10,10,0.34) 62%, rgba(10,10,10,0.22) 100%);
}

.category-card:hover .category-card-img {
    transform: scale(1.06);
}

.category-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 2rem;
    color: var(--color-white);
}

.category-card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-white);
    transition: color 0.3s;
}

.category-card:hover .category-card-title {
    color: var(--color-gold);
}

.category-card-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1rem;
    display: block;
    transform: translateY(8px);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.category-card:hover .category-card-desc {
    opacity: 1;
    transform: translateY(0);
}

.category-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    transform: translateY(8px);
    opacity: 0;
    transition: all 0.3s ease 0.15s;
}

.category-card:hover .category-card-link {
    opacity: 1;
    transform: translateY(0);
}

/* ---- PRODUCT CARD ---- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.products-grid-category {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.products-grid-category .product-card-image {
    aspect-ratio: 4 / 5;
}

.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: transparent;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    transition: opacity 0.22s ease, transform 0.5s ease;
}

.product-card:hover .product-card-image img {
    transform: none;
}

.product-card-image img.is-gallery-switching {
    opacity: 0;
    transform: scale(0.99);
}

.product-badge-oferta {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-gold);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
}

.product-badge-nuevo {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-black);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-card-body {
    padding: 1.25rem;
}

.product-card-category {
    /* 12px mínimo legible en móvil; antes 0.65rem = 10.4px. */
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
    display: block;
    margin-bottom: 0.5rem;
}

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-black);
    line-height: 1.4;
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-card-availability {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.product-card-availability.is-available { color: var(--color-success); }
.product-card-availability.is-sold-out { color: var(--color-danger); }

.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(45,125,70,0.12);
    flex: 0 0 auto;
}

.price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-black);
}

.price-original {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.price-saving {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(45,125,70,0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
}

.product-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ---- CATEGORY PAGE HERO ---- */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.55);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    padding: 2rem;
}

.page-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-white);
    margin-bottom: 1rem;
}

.page-hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Sofás: carrusel a pantalla completa debajo del navbar */
.page-hero-slider {
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    height: calc(100svh - var(--navbar-height));
    min-height: 520px;
}

.page-hero-slider .hero-slide {
    transform: scale(1.025);
}

.page-hero-slider .hero-slide.active {
    animation-duration: 8s;
}

.page-hero-slider .page-hero-overlay {
    z-index: 1;
    background: linear-gradient(180deg, rgba(10,10,10,0.22), rgba(10,10,10,0.42));
}

.page-hero-slider .page-hero-content {
    max-width: 960px;
}

.page-hero-slider .page-hero-title {
    font-size: clamp(2.75rem, 5.4vw, 5rem);
    line-height: 1.05;
    text-shadow: 0 2px 14px rgba(0,0,0,0.28);
}

.page-hero-slider .page-hero-subtitle {
    font-size: clamp(0.9rem, 1.25vw, 1.15rem);
}

.page-hero-slider .hero-dot.active::before {
    background: var(--color-gold);
}

/* ---- BREADCRUMB ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 1rem 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-text-muted);
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--color-gold);
}

.breadcrumb-sep {
    color: var(--color-gray);
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 500;
}

/* ---- CATEGORY LAYOUT (sidebar + products) ---- */
.category-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

.filter-sidebar {
    background: var(--color-gray-light);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.filter-range {
    width: 100%;
    accent-color: var(--color-gold);
    margin: 0.5rem 0;
}

.filter-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    /* La etiqueta entera es el objetivo táctil; el checkbox sigue a 14px
       por estética, pero el área pulsable cumple el mínimo. */
    min-height: var(--touch-target);
}

.filter-check input {
    accent-color: var(--color-gold);
    width: 14px;
    height: 14px;
}

.filter-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-black);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: var(--color-gold);
}

/* ---- PRODUCT DETAIL PAGE ---- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    padding: 3rem 0;
}

.product-gallery {
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);
}

.product-gallery-main {
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--color-gray-light);
    position: relative;
    touch-action: pan-y;
}

.product-gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transform: scale(1);
    transform-origin: 50% 50%;
    transition: transform 0.18s ease-out;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.product-gallery-main img.is-zoomed {
    cursor: zoom-out;
    transform: scale(1.85);
}

.product-gallery-main:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 3px;
}

.product-gallery-zoom-hint {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    color: var(--color-white);
    background: rgba(10, 10, 10, 0.72);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.product-gallery-main.is-zoom-active .product-gallery-zoom-hint {
    opacity: 0;
    transform: scale(0.8);
}

@media (prefers-reduced-motion: reduce) {
    .product-gallery-main img {
        transition: none;
    }
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
}

.product-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.product-thumb.active,
.product-thumb:hover {
    opacity: 1;
    border-color: var(--color-gold);
}

.product-info-section {
    padding: 1rem 0;
}

.product-finishes {
    display: grid;
    gap: 1.35rem;
    margin-top: 1.5rem;
}

.product-finish-group {
    display: grid;
    gap: 0.75rem;
}

.product-finish-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-finish-heading strong {
    color: var(--color-gold);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.product-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.product-color-swatch {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border: 2px solid var(--color-white);
    border-radius: 50%;
    background: var(--swatch-color);
    box-shadow: 0 0 0 1px rgba(0,0,0,.22);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.product-color-swatch:hover,
.product-color-swatch:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px var(--color-gold), 0 5px 12px rgba(0,0,0,.12);
    outline: none;
}

.product-color-swatch.active {
    box-shadow: 0 0 0 3px var(--color-gold);
}

.product-finish-note {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.product-fabric-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.product-fabric-chip {
    border: 1px solid var(--color-gray);
    background: var(--color-gray-light);
    padding: 0.48rem 0.72rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.product-category-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
    display: block;
}

.product-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.product-price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-black);
    font-family: var(--font-heading);
}

.product-price-original {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.product-discount-badge {
    background: var(--color-gold);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
}

.product-divider {
    border: none;
    border-top: 1px solid var(--color-gray);
    margin: 1.5rem 0;
}

.product-description {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--color-gray-dark);
    margin-bottom: 2rem;
}

.product-meta {
    margin-bottom: 2rem;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-meta-label {
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 80px;
}

.product-qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-gray);
}

.qty-btn {
    width: 40px;
    height: 44px;
    font-size: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--color-gray-light);
}

.qty-input {
    width: 50px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-gray);
    border-right: 1px solid var(--color-gray);
    font-weight: 600;
    font-size: 1rem;
    outline: none;
}

.product-actions-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* ---- BANNER SECTION ---- */
.banner-section {
    padding: 8rem 2rem;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    text-align: center;
}

.banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.7);
}

.banner-section .container {
    position: relative;
    z-index: 1;
}

.banner-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-white);
    margin-bottom: 1rem;
}

.banner-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

/* ---- FOOTER ---- */
.footer {
    background: #111111;
    color: rgba(255,255,255,0.75);
}

.footer-top {
    padding: 5rem 0 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-tagline {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--color-gold);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.85rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    transition: all 0.3s;
}

.social-link:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(98,21,26,0.1);
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-gold);
}

.footer-contact a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--color-gold);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 2px;
    margin-top: 1rem;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: #fff;
}

.btn-whatsapp.btn-lg {
    padding: 1.1rem 2.75rem;
    font-size: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* ---- CART PAGE ---- */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 1rem;
    border-bottom: 2px solid var(--color-gray);
    text-align: left;
}

.cart-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--color-gray);
    vertical-align: middle;
}

.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-product-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.cart-summary {
    background: var(--color-gray-light);
    padding: 2rem;
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);
}

.cart-summary-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-gold);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 2px solid var(--color-gray);
    margin-top: 1rem;
    font-family: var(--font-heading);
}

.cart-empty {
    text-align: center;
    padding: 5rem 2rem;
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-empty h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.cart-empty p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* ---- CHECKOUT ---- */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.checkout-form-section {
    background: var(--color-white);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-gray);
    background: var(--color-white);
    /* 16px mínimo: por debajo, iOS Safari hace zoom automático al enfocar
       y no revierte. Aplica a todos los anchos a propósito. */
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(98,21,26,0.15);
}

.form-control.error {
    border-color: var(--color-danger);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

/* ---- PERSONALIZA PAGE ---- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin: 0 auto 1.5rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.step-description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ---- ABOUT PAGE ---- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.value-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-gray-light);
    transition: transform 0.3s, box-shadow 0.3s;
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.value-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.value-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ---- PAGINATION ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-gray);
    font-size: 0.85rem;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--color-text);
}

.page-btn:hover,
.page-btn.active {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.page-btn.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

/* ---- ABOUT STORY SECTION ---- */
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.story-image {
    position: relative;
}

.story-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.story-image::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: -1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    border: 2px solid var(--color-gold);
    z-index: -1;
}

.story-text p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--color-gray-dark);
    margin-bottom: 1.25rem;
}

.lifestyle-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.5rem;
}

.lifestyle-gallery img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
}

.lifestyle-gallery img:nth-child(2),
.lifestyle-gallery img:nth-child(3) {
    object-position: center 52%;
}

.story-signature {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--color-gold);
    margin-top: 2rem;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 280px;
        background: var(--color-white);
        flex-direction: column;
        justify-content: center;
        gap: 0;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        padding: 2rem;
    }

    .navbar-menu.active {
        left: 0;
    }

    .navbar-menu li {
        width: 100%;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 1rem 0;
        display: block;
        border-bottom: 1px solid var(--color-gray);
    }

    .hamburger {
        display: flex;
    }

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

    .filter-sidebar {
        position: static;
    }

    .cart-layout {
        /* minmax(0,1fr) y no 1fr: "1fr" equivale a minmax(auto,1fr), y esa
           pista no encoge por debajo de su contenido, así que la tabla del
           carrito estiraba la página en vez de scrollear dentro de su caja. */
        grid-template-columns: minmax(0, 1fr);
    }

    .cart-summary {
        position: static;
    }

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

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

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

    .story-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .story-image {
        order: -1;
    }

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

    .lifestyle-gallery img:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .products-grid-category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    :root { --navbar-height: 70px; }

    .container { padding: 0 1.25rem; }

    .section { padding: 4rem 0; }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Se redeclara aquí a propósito: .products-grid y .products-grid-category
       tienen la misma especificidad, así que sin esto la regla de arriba
       ganaría por orden de fuente y la rejilla de categoría perdería la
       protección minmax(0,…) contra desbordes entre 500px y 768px. */
    .products-grid-category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Antes se ocultaban las columnas 2, 3 y 4, y la 3 es Cantidad: en móvil
       el usuario no podía cambiar cantidades. Precio y Subtotal (2 y 4) sí se
       ocultan porque su contenido es literalmente "A consultar". */
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2),
    .cart-table th:nth-child(4),
    .cart-table td:nth-child(4) {
        display: none;
    }

    /* Recuperar la columna Cantidad hace que las 3 columnas visibles no
       quepan en 375px con el padding de escritorio. Se compacta la celda y
       la imagen; si aun así no cabe (nombres largos), desborda la tabla y
       no la página. */
    .cart-table th,
    .cart-table td {
        padding: 0.75rem 0.5rem;
    }

    .cart-product-img {
        width: 56px;
        height: 42px;
    }

    .cart-product-cell {
        gap: 0.6rem;
    }

    .cart-table-scroll {
        overflow-x: auto;
        /* Es hijo de .cart-layout (grid). Sin min-width:0 el item usa
           min-width:auto, no encoge por debajo de su contenido y estira la
           página en vez de dejar que scrollee la tabla. */
        min-width: 0;
    }

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

    /* El tamaño (44px) se hereda de la regla base a propósito: reducirlo en
       móvil dejaba las flechas por debajo del mínimo táctil justo donde más
       importa. Aquí solo se acercan a los bordes. */
    .hero-arrow-prev { left: 1rem; }
    .hero-arrow-next { right: 1rem; }

    .hero-dots {
        bottom: 1.75rem;
    }

    .page-hero-slider {
        min-height: 0;
    }

    .page-hero-slider .hero-slide {
        background-position: center 60% !important;
    }

    .page-hero-slider .page-hero-content {
        width: min(92%, 620px);
        padding: 1.25rem 3.25rem;
    }

    .page-hero-slider .page-hero-title {
        font-size: clamp(2.1rem, 9vw, 3.25rem);
    }

    .page-hero-slider .page-hero-subtitle {
        margin-bottom: 1.25rem;
    }

    .banner-section {
        background-attachment: scroll;
        padding: 5rem 1.5rem;
    }

    /* .btn lleva white-space:nowrap, así que los CTA largos del banner
       ("Solicitar diseño personalizado") no cabían y desbordaban la página
       32px en horizontal. En móvil se les permite partir en dos líneas. */
    .banner-section .btn {
        white-space: normal;
        max-width: 100%;
    }
}


@media (max-width: 480px) {
    .lifestyle-gallery {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .lifestyle-gallery img:first-child {
        grid-column: auto;
    }

    .lifestyle-gallery img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

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

    .product-detail {
        padding: 1.5rem 0;
    }

    .product-actions-row {
        flex-direction: column;
    }

    .navbar-container {
        padding: 0 1rem;
    }
}

/* ==============================
   Aviso de Cashea (pago en cuotas)
   Aparece a los pocos segundos y se retira solo. Se ancla abajo a la
   IZQUIERDA porque la esquina derecha ya la ocupan el botón flotante de
   WhatsApp y los toasts del carrito.
============================== */
.cashea-aviso {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 997;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    /* max-content para que la pastilla se ajuste al texto en vez de estirarse.
       El tope usa 100% y no 100vw: en fixed, 100% resuelve contra el viewport
       de layout, mientras 100vw incluye la barra de scroll y desalinea el
       cálculo respecto a elementos anclados por la derecha. */
    width: max-content;
    max-width: min(340px, calc(100% - 3rem));
    padding: 0.5rem 0.5rem 0.5rem 0.65rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    /* Pastilla en vez de tarjeta: mismo mensaje con bastante menos peso
       visual. Sombra suave por el mismo motivo. */
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    animation: casheaIn 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* El atributo hidden es la única fuente de verdad de la visibilidad: así el
   aviso no existe para lectores de pantalla mientras está oculto. */
.cashea-aviso[hidden] { display: none; }

.cashea-aviso.is-saliendo {
    animation: casheaOut 0.3s ease forwards;
}

@keyframes casheaIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes casheaOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(18px); }
}

/* Distintivo amarillo de la marca. */
.cashea-aviso-marca {
    display: inline-flex;
    align-items: center;
    background: #FFE600;
    border-radius: 999px;
    padding: 0.32rem 0.6rem;
    flex-shrink: 0;
}

.cashea-aviso-logo {
    height: 14px;
    width: auto;
    display: block;
}

/* Respaldo tipográfico cuando no está el archivo del logo. */
.cashea-aviso-wordmark {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
    line-height: 1;
}

.cashea-aviso-texto {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: #4a4a4a;
    margin: 0;
    line-height: 1.35;
}

.cashea-aviso-cerrar {
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #9a9a9a;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

/* El dibujo se mantiene pequeño para no cargar el aviso, pero el área
   pulsable llega a 44px mediante el pseudo-elemento. */
.cashea-aviso-cerrar::after {
    content: '';
    position: absolute;
    inset: -9px;
}

.cashea-aviso-cerrar:hover { background: rgba(0, 0, 0, 0.06); color: #333; }
.cashea-aviso-cerrar:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 1px; }

@media (max-width: 560px) {
    .cashea-aviso {
        left: 1rem;
        /* Se acota para que nunca alcance la columna del botón flotante de
           WhatsApp: 1rem de margen izquierdo + 1.5rem de anclaje del botón +
           56px de botón + 0.75rem de separación. Con 100%, no 100vw. */
        max-width: calc(100% - 1rem - 1.5rem - 56px - 0.75rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cashea-aviso,
    .cashea-aviso.is-saliendo { animation: none; }
}

/* ==============================
   Botón flotante de WhatsApp
============================== */
.wa-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    /* Por debajo de .mobile-overlay (999) a propósito: con el menú móvil
       abierto el botón queda detrás del velo, como el resto del contenido. */
    z-index: 998;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.wa-fab:hover {
    background: #1eb457;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.wa-fab:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 3px;
}

.wa-fab svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .wa-fab { transition: none; }
    .wa-fab:hover { transform: none; }
}

/* ==============================
   WhatsApp Asesoras Modal
============================== */
/* Overlay. overflow-y:auto + margin:auto en la caja permite centrar
   verticalmente pero seguir pudiendo scrollear si el contenido no cabe
   (pantallas bajas o en horizontal). */
.wa-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.wa-modal[hidden] { display: none; }

.wa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 5, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.wa-modal-box {
    position: relative;
    margin: auto;
    background: #fff;
    border-radius: 14px;
    /* Más padding arriba para que el título no compita con el botón de cerrar. */
    padding: 3rem 2.25rem 2.25rem;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    animation: waModalIn 0.28s ease;
    text-align: center;
}

@keyframes waModalIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 44x44 de área táctil con el icono centrado; antes era ~24px. */
.wa-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: var(--touch-target);
    height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #b0b0b0;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.wa-modal-close:hover { color: #333; background: rgba(0, 0, 0, 0.05); }
.wa-modal-close:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

.wa-modal-eyebrow {
    font-family: var(--font-body, sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-gold, #62151A);
    margin: 0 0 0.6rem;
}

.wa-modal-title {
    font-family: var(--font-heading, serif);
    font-size: clamp(1.35rem, 4.5vw, 1.6rem);
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 0.6rem;
    line-height: 1.25;
}

.wa-modal-title span { color: var(--color-gold, #62151A); }

/* Ancho acotado + balance para evitar que caiga una palabra suelta. */
.wa-modal-subtitle {
    font-family: var(--font-body, sans-serif);
    font-size: 0.85rem;
    font-weight: 300;
    color: #8a8a8a;
    max-width: 34ch;
    margin: 0 auto 2rem;
    line-height: 1.65;
    text-wrap: balance;
}

/* auto-fit: pasa de 3 a 2 o 1 columna por sí solo, sin breakpoint fijo. */
.wa-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 0.85rem;
}

.wa-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    /* min-width:0 evita que el contenido impida encoger la columna. */
    min-width: 0;
    padding: 1.5rem 0.9rem 1.25rem;
    border: 1px solid rgba(98, 21, 26, 0.2);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 250ms ease, background 250ms ease, transform 250ms ease, box-shadow 250ms ease;
}

.wa-card:hover {
    border-color: rgba(98, 21, 26, 0.55);
    background: #fdf2f2;
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09), 0 2px 8px rgba(98, 21, 26, 0.18);
}

.wa-card:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; }

/* .wa-card ya trae display:flex propio, que le gana en cascada al [hidden]
   del user-agent (CSS de autor siempre gana sobre el del navegador, sin
   importar especificidad). Sin esto, ocultar una tarjeta por JS (filtro de
   sede) no la quitaba visualmente. */
.wa-card[hidden] { display: none; }

.wa-card-initial {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-gold, #62151A);
    color: #fff;
    font-family: var(--font-heading, serif);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
    flex-shrink: 0;
}

.wa-card-name {
    font-family: var(--font-heading, serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.wa-card-city {
    font-family: var(--font-body, sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* A ancho completo: antes el texto casi tocaba los bordes de la tarjeta y
   parecía un desbordamiento en vez de una decisión de diseño. */
.wa-card-btn {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.4rem;
    background: #1a1a1a;
    color: #fff;
    border-radius: 4px;
    font-family: var(--font-body, sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.wa-card-btn svg { flex-shrink: 0; }

.wa-card:hover .wa-card-btn { background: #8a2229; }

@media (prefers-reduced-motion: reduce) {
    .wa-modal-box { animation: none; }
    .wa-card { transition: none; }
    .wa-card:hover { transform: none; }
}

@media (max-width: 520px) {
    .wa-modal { padding: 0.75rem; }

    .wa-modal-box {
        padding: 2.75rem 1.15rem 1.5rem;
        border-radius: 12px;
    }

    .wa-modal-subtitle { margin-bottom: 1.5rem; }

    .wa-modal-grid { grid-template-columns: 1fr; }

    /* En móvil las tarjetas pasan a fila horizontal: tres tarjetas altas
       apiladas hacían el modal el doble de largo que la pantalla. Se usa
       grid-template-areas para reordenar sin tocar el HTML. */
    .wa-card {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "avatar nombre boton"
            "avatar ciudad boton";
        align-items: center;
        column-gap: 0.9rem;
        row-gap: 0.05rem;
        text-align: left;
        padding: 0.85rem 1rem;
    }

    .wa-card-initial { grid-area: avatar; margin-bottom: 0; }
    .wa-card-name    { grid-area: nombre; }
    .wa-card-city    { grid-area: ciudad; }

    .wa-card-btn {
        grid-area: boton;
        width: auto;
        margin-top: 0;
        padding: 0.6rem 0.9rem;
    }

    /* Sin desplazamiento vertical: en una lista apilada el salto es molesto. */
    .wa-card:hover { transform: none; }
}
