/* Estilos del home y de las fichas p/<slug>.html (las genera src/update_p.py desde index.html).
   Después de editar este archivo corre src/update_p.py: actualiza el ?v= con que se pide. */

:root {
    --c-primary: #764ba8;
    /* Morado intermedio premium */
    --c-primary-dark: #5e3a89;
    --c-gold: #c5a059;
    /* Dorado del logo */
    --c-gold-light: #fdfbf7;
    --c-dark: #1a1a1a;
    --c-gray: #4a4a4a;
    --c-white: #ffffff;
    --c-wa: #14532d;
    /* Verde oscuro bosque */
    --f-serif: "Playfair Display", serif;
    --f-sans: "Lato", sans-serif;
    --header-h: 70px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: var(--f-sans);
    background-color: #fff;
    color: var(--c-dark);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.font-serif {
    font-family: var(--f-serif);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.text-center {
    text-align: center;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    transition: 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* WhatsApp en el header: botón secundario de ayuda (contorno verde), no la vía principal de compra */
.btn-header {
    background: #fff;
    color: var(--c-wa);
    border: 1.5px solid var(--c-wa);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-header:hover {
    background: var(--c-wa);
    color: #fff;
}

@media (max-width: 768px) {
    .btn-header {
        padding: 0.45rem 0.85rem;
    }

    .btn-header-extra {
        display: none;
    }
}

/* HERO */
.hero {
    padding-top: calc(var(--header-h));
    background: linear-gradient(to bottom, var(--c-gold-light), #fff);
    text-align: center;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--c-primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--c-gray);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
    text-align: justify;
}

.text-purple {
    color: var(--c-primary);
    font-weight: 600;
}

/* HEADER VALUES */
.header-values {
    display: none;
}

.header-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--c-gray);
    font-weight: 700;
    white-space: nowrap;
}

.header-value svg {
    color: var(--c-gold);
    width: 18px;
    height: 18px;
}

/* CARRUSELES */
.section-padding {
    padding: 2rem 0;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.8rem;
    color: var(--c-primary);
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-wrapper {
    position: relative;
}

.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 1.5rem;
    right: 0;
    width: 45px;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.08), transparent);
    pointer-events: none;
    z-index: 10;
}

.btn-up-fav {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--c-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.btn-up-fav.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.btn-up-fav:hover {
    background: var(--c-gold);
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.product-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
    transition: 0.3s;
    border: 1px solid #ebebeb;
    display: flex;
    flex-direction: column;
    user-select: none;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    background: #fafafa;
    cursor: pointer;
}

.product-media {
    position: relative;
}

.product-info {
    padding: 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--c-dark);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 1rem;
    margin-top: auto;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-action {
    border: 0;
    width: 100%;
    padding: 0.7rem;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-wa {
    border: 2px solid var(--c-wa);
    color: var(--c-wa);
}

.btn-wa:hover {
    background: var(--c-wa);
    color: #fff;
}

.btn-cart {
    background: var(--c-primary);
    color: #fff;
    /* border: 1px solid var(--c-primary); */
}

.btn-cart:hover {
    background: var(--c-primary-dark);
}

.product-info .btn-cart {
    font-size: 0.78rem;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(118, 75, 168, 0.25);
}

.btn-cart svg {
    flex-shrink: 0;
    pointer-events: none;
}

.btn-cart.added {
    background: var(--c-gold);
}

/* WhatsApp: verde, un poco más chico que el carrito */
.btn-wa-solid {
    background: var(--c-wa);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.55rem;
}

.btn-wa-solid:hover {
    opacity: 0.9;
}

.btn-wa-small {
    padding: 0.6rem !important;
    font-size: 0.8rem !important;
}

/* VALUE BANNERS */
.value-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    margin: -10px auto 1.5rem;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    text-align: left;
}

@media (max-width: 600px) {
    .value-banner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 15px;
    }
}

.value-banner svg {
    flex-shrink: 0;
    color: var(--c-gold);
    width: 28px;
    height: 28px;
}

.value-banner p {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;
}

.value-banner strong {
    color: var(--c-primary);
}

/* FICHA DE PRODUCTO (p/<slug>.html, la genera src/update_p.py) */
.pdp {
    padding: calc(var(--header-h) + 1.25rem) 0 2rem;
    background: linear-gradient(to bottom, var(--c-gold-light), #fff);
}

.pdp-crumbs {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdp-crumbs a {
    color: var(--c-primary);
    text-decoration: none;
}

.pdp-crumbs a:hover {
    text-decoration: underline;
}

.pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .pdp-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 3rem;
        align-items: start;
    }

    .pdp-media {
        position: sticky;
        top: calc(var(--header-h) + 1rem);
    }
}

.pdp-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 14px;
    background: #f5f5f5;
    box-shadow: var(--shadow);
    display: block;
}

.pdp-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.pdp-thumb {
    width: 64px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
}

.pdp-thumb.active {
    border-color: var(--c-primary);
    opacity: 1;
}

.pdp-title {
    font-size: 1.9rem;
    line-height: 1.15;
    color: var(--c-dark);
}

.pdp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
}

.pdp-cats a {
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    border: 1px solid #e3d9ef;
    color: var(--c-primary);
    text-decoration: none;
}

.pdp-cats a:hover {
    background: rgba(118, 75, 168, 0.06);
}

.pdp-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0 0.75rem;
}

.pdp-price {
    font-family: var(--f-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-primary);
}

.pdp-desc {
    color: var(--c-gray);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.pdp-highlights {
    margin: 0 0 1.25rem 1.25rem;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
}

.pdp-actions {
    margin-bottom: 1.25rem;
}

.pdp-trust {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1rem;
    padding: 1rem;
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 10px;
    background: #fff;
    font-size: 0.82rem;
    color: var(--c-gray);
}

.pdp-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdp-trust svg {
    flex-shrink: 0;
    color: var(--c-gold);
}

.pdp-related {
    padding: 1rem 0 2.5rem;
}

.rel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

@media (min-width: 768px) {
    .rel-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.rel-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--c-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.11);
}

.rel-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}

.rel-name {
    font-family: var(--f-serif);
    font-size: 0.95rem;
    padding: 0.7rem 0.75rem 0.2rem;
    text-align: center;
}

.rel-price {
    color: var(--c-primary);
    font-weight: 700;
    padding: 0 0.75rem 0.8rem;
    text-align: center;
}

/* ¿LLEGA HOY? (ficha, modal): lo llena actualizarEta() con src/addons.json */
.eta-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--c-gray);
}

.eta-note.is-hoy {
    color: var(--c-wa);
}

.eta-note svg {
    flex-shrink: 0;
}

.eta-note[hidden] {
    display: none;
}

/* HERO: botón al catálogo y accesos por ocasión */
.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1.6rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    background: var(--c-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 6px 18px rgba(118, 75, 168, 0.35);
    transition: transform 0.2s, background 0.2s;
}

.btn-hero:hover {
    background: var(--c-primary-dark);
    transform: translateY(-2px);
}

.hero-occasions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.hero-occasions-label {
    width: 100%;
    font-size: 0.85rem;
    color: var(--c-gray);
}

.hero-occ {
    padding: 0.45rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(197, 160, 89, 0.55);
    background: #fff;
    color: var(--c-dark);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.hero-occ:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

/* BARRA DE CARRITO (solo móvil, con algo en el carrito) */
.cart-bar {
    display: none;
}

@media (max-width: 767px) {
    .cart-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 1450;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0.65rem 0.75rem 0.65rem 1rem;
        background: var(--c-primary);
        color: #fff;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(118, 75, 168, 0.45);
        text-decoration: none;
        animation: cartBarIn 0.35s ease-out;
    }

    .cart-bar[hidden] {
        display: none;
    }

    .cart-bar.bump {
        animation: cartBarBump 0.45s ease;
    }

    /* Con la barra, sobra el botón flotante del carrito y el de WhatsApp sube */
    body.has-cart-bar .float-cart {
        display: none;
    }

    body.has-cart-bar .floating-container {
        bottom: 88px;
    }

    body.has-cart-bar .btn-up-fav {
        bottom: 88px;
    }

    body.has-cart-bar .footer {
        padding-bottom: 6.5rem;
    }
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.cart-bar-info strong {
    font-size: 0.95rem;
}

.cart-bar-ship {
    font-size: 0.72rem;
    color: #f3e3bf;
}

.cart-bar-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: #fff;
    color: var(--c-primary);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

@keyframes cartBarIn {
    from {
        transform: translateY(120%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cartBarBump {
    30% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .cart-bar,
    .cart-bar.bump {
        animation: none;
    }
}

/* CATÁLOGO: cuadrícula única con filtros combinables */
.catalog {
    padding: 2.5rem 0 3rem;
    background: var(--c-gold-light);
    scroll-margin-top: var(--header-h);
}

.catalog-head {
    margin-bottom: 1rem;
}

.catalog-sub {
    color: var(--c-gray);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* Sin backdrop-filter: crearía un bloque contenedor y rompería el panel fijo */
.catalog-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 900;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.catalog-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.chip-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    flex: 1 1 100%;
    padding: 2px;
    scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
    display: none;
}

.catalog-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 1 1 100%;
}

@media (min-width: 900px) {
    .catalog-bar-inner {
        flex-wrap: nowrap;
    }

    .chip-row {
        flex: 1 1 auto;
    }

    .catalog-tools {
        flex: 0 0 auto;
    }
}

/* Móvil: una sola fila (Filtros + ocasiones deslizables); el orden pasa al panel */
@media (max-width: 899px) {
    .catalog-bar-inner {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        padding-right: 0;
    }

    .catalog-tools {
        order: -1;
        flex: 0 0 auto;
    }

    .catalog-sort {
        display: none;
    }

    /* El desvanecido a la derecha indica que hay más ocasiones al deslizar */
    .chip-row {
        flex: 1 1 auto;
        min-width: 0;
        padding-right: 2rem;
        -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
        mask-image: linear-gradient(to right, #000 82%, transparent);
    }

    .catalog-bar .chip,
    .btn-filters {
        padding: 0.45rem 0.85rem;
        font-size: 0.85rem;
    }
}

.filter-group-sort {
    display: none;
}

@media (max-width: 899px) {
    .filter-group-sort {
        display: block;
    }
}

/* En escritorio el orden ya se ve en el selector de la barra */
@media (min-width: 900px) {
    .pill-orden {
        display: none !important;
    }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: var(--c-dark);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover:not(:disabled) {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.chip.active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(118, 75, 168, 0.3);
}

.chip:disabled {
    opacity: 0.4;
    cursor: default;
}

.chip-n {
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
}

.chip.active .chip-n {
    color: rgba(255, 255, 255, 0.85);
}

.btn-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--c-primary);
    background: #fff;
    color: var(--c-primary);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-filters:hover {
    background: rgba(118, 75, 168, 0.06);
}

.filter-badge {
    background: var(--c-primary);
    color: #fff;
    border-radius: 50px;
    font-size: 0.7rem;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-badge[hidden] {
    display: none;
}

.catalog-sort {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: var(--c-dark);
    cursor: pointer;
    max-width: 60vw;
}

.catalog-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1.25rem 0 1rem;
}

.catalog-count {
    font-weight: 700;
    color: var(--c-gray);
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    background: rgba(118, 75, 168, 0.1);
    color: var(--c-primary);
    border: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.filter-pill:hover {
    background: rgba(118, 75, 168, 0.18);
}

.btn-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 0.85rem;
    color: var(--c-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

@media (min-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1100px) {
    .catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.catalog-grid .product-card {
    flex: initial;
    min-width: 0;
}

.catalog-grid .product-img {
    height: auto;
    aspect-ratio: 4 / 5;
    display: block;
}

.catalog-grid .value-banner {
    grid-column: 1 / -1;
    margin: 0.5rem 0;
    max-width: none;
}

@media (max-width: 600px) {
    .catalog-grid .product-info {
        padding: 0.75rem 0.6rem;
    }

    .catalog-grid .product-name {
        font-size: 0.92rem;
    }

    .catalog-grid .product-price {
        font-size: 1rem;
    }

    .catalog-grid .btn-action {
        font-size: 0.66rem;
        padding: 0.6rem 0.3rem;
        gap: 4px;
    }

    .catalog-grid .btn-cart svg {
        display: none;
    }

    .catalog-grid .btn-wa-solid {
        font-size: 0.6rem;
        padding: 0.45rem 0.3rem;
    }
}

.catalog-more {
    text-align: center;
    margin-top: 2rem;
}

.btn-more {
    padding: 0.85rem 2rem;
    border-radius: 50px;
    border: 2px solid var(--c-primary);
    background: #fff;
    color: var(--c-primary);
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-more:hover {
    background: var(--c-primary);
    color: #fff;
}

.btn-more[hidden],
.catalog-empty[hidden] {
    display: none;
}

.catalog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--c-gray);
    line-height: 1.6;
}

.catalog-empty a {
    color: var(--c-wa);
    font-weight: 700;
}

/* Panel de filtros: hoja inferior en móvil, cajón lateral en escritorio */
.filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1900;
}

.filter-panel {
    position: fixed;
    z-index: 1950;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .filter-panel {
        left: auto;
        top: 0;
        width: 400px;
        max-height: none;
        border-radius: 0;
    }
}

.filter-panel[hidden],
.filter-backdrop[hidden] {
    display: none;
}

.filter-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.filter-panel-head h3 {
    font-size: 1.2rem;
    color: var(--c-primary);
}

.filter-close {
    background: none;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--c-gray);
    cursor: pointer;
}

.filter-panel-body {
    overflow-y: auto;
    padding: 0.25rem 1.25rem 1rem;
    flex: 1;
}

.filter-group {
    padding: 0.9rem 0;
    border-bottom: 1px solid #f3f3f3;
}

.filter-group:last-child {
    border-bottom: 0;
}

.filter-group h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-gray);
    margin-bottom: 0.6rem;
}

.chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-panel-foot {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid #eee;
}

.btn-apply {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 0;
    background: var(--c-primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
}

body.filters-open {
    overflow: hidden;
}

/* FLOATING ACTIONS */
.floating-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
    cursor: pointer;
    position: relative;
}

.float-wa {
    background: var(--c-wa);
    color: #fff;
}

.float-wa svg {
    width: 34px;
    height: 34px;
}

.float-cart {
    background: var(--c-primary);
    color: #fff;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.float-cart.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.float-cart.bump {
    animation: cartBump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cartBump {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.25) rotate(-8deg);
    }

    60% {
        transform: scale(0.95) rotate(4deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .float-cart.bump {
        animation: none !important;
    }
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--c-gold);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--c-primary);
}

/* MODALES */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 1100px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalIn 0.3s ease-out;
    max-height: 95vh;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-img-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    align-items: center;
    justify-content: center;
}

.modal-img-side {
    width: 100%;
    height: 350px;
    object-fit: contain;
    margin: 0 auto;
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}

.modal-others {
    display: flex;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
}

.modal-others img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}

.modal-others img.active {
    border-color: var(--c-primary);
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.carousel-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-nav-btn.left {
    left: 10px;
}

.carousel-nav-btn.right {
    right: 10px;
}

.modal-img-side-wrap {
    position: relative;
    width: 100%;
    user-select: none;
    touch-action: pan-y;
}

.modal-info-side {
    padding: 0.5em;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.modal-text-content {
    padding: 2rem;
    padding-bottom: 1rem;
}

.modal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 1rem;
}

.cat-link {
    background: #fdfbf7;
    border: 1px solid var(--c-gold);
    color: var(--c-primary);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: 0.3s;
    cursor: pointer;
}

.cat-link:hover {
    background: var(--c-gold);
    color: #fff;
}

.modal-dock-right {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 0 2rem 1.5rem 2rem;
    border-top: 1px solid #eee;
    z-index: 10;
    margin-top: auto;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    z-index: 50;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--c-gray);
    transition: all 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.1);
    color: var(--c-primary);
}

.modal-price-big {
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-primary);
    margin: 1rem 0;
    font-family: var(--f-serif);
}

.btn-share {
    background-color: #fff;
    border: 1px solid #ddd;
    color: var(--c-gray);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-share:hover {
    background-color: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
}

.text-gradient {
    background: linear-gradient(to bottom, #666 30%, rgba(102, 102, 102, 0.1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.btn-wa-full {
    background: var(--c-wa);
    color: #fff;
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    border: 0;
}

/* Botón directo "Pagar en Línea" debajo del CTA de WhatsApp: solo Desktop */
.btn-pay-online-desktop {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .btn-pay-online-desktop {
        display: flex;
        background: var(--c-gold-light);
        color: var(--c-primary);
        border: 1.5px solid var(--c-primary);
        padding: 0.65rem 1rem;
        font-size: 0.82rem;
        transition: background 0.2s, color 0.2s;
    }

    .btn-pay-online-desktop:hover {
        background: var(--c-primary);
        color: #fff;
    }
}

/* FOOTER */
.footer {
    background: var(--c-dark);
    color: #e0e0e0;
    padding: 4rem 0 2rem;
}

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

.footer-title {
    color: var(--c-gold);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

.footer-text {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.footer-wa-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.footer-wa-link:hover {
    color: var(--c-gold);
}

.wa-desktop-hint {
    display: none;
    font-size: 0.78rem;
    color: var(--c-gold);
    opacity: 0.92;
}

@media (hover: hover) and (pointer: fine) {
    .wa-desktop-hint {
        display: inline;
    }
}

.copyright {
    border-top: 1px solid #333;
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -20px);
    opacity: 0;
    visibility: hidden;
    /* max-content: con left: 50% el ancho automático se encogería a la mitad de la pantalla */
    width: max-content;
    max-width: min(90vw, 420px);
    background: var(--c-primary);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0.3s;
    font-weight: 700;
    text-align: center;
}

/* AVISOS ENVÍO GRATIS (compra en la página) */
.ship-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.25rem;
    padding: 6px 14px;
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--c-gray);
    font-size: 0.85rem;
    line-height: 1.3;
}

.ship-pill svg,
.ship-note svg {
    flex-shrink: 0;
    color: var(--c-gold);
}

.ship-pill strong,
.ship-note strong {
    color: var(--c-primary);
}

.ship-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--c-gray);
    text-align: center;
    line-height: 1.3;
}

.ship-note small {
    color: #888;
    font-size: 0.72rem;
}

.toast-sub {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.92;
}

.header-value-ship {
    display: none;
}

@media (min-width: 1100px) {
    .header-value-ship {
        display: flex;
    }
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0s;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }

    .modal-content {
        max-height: 90vh;
    }

    .modal-body {
        flex-direction: row;
        height: 100%;
        max-height: none;
        overflow: hidden;
    }

    .modal-img-wrapper {
        width: 50%;
        overflow-y: auto;
    }

    .modal-img-side {
        width: 100%;
        height: 550px;
    }

    .modal-info-side {
        width: 50%;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .carousel-track {
        gap: 2rem;
    }

    .product-card {
        flex: 0 0 320px;
    }

    .header-values {
        display: flex;
        gap: 1rem;
        margin-left: 2rem;
    }
}

/* SKELETON LOADER */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.modal-img-side.loading {
    opacity: 0;
}
