/* =====================================================
   CATÁLOGO — FLORES DEL ENCANTO
   Paleta: crema #FEFAF8 · carbón #404040 · nude #D3A89D · salvia #8C9180
   Este archivo lo usan catalogo.html y las landing pages.
   ===================================================== */

:root {
    --catalog-primary: #D3A89D;      /* rosa nude del logo */
    --catalog-primary-deep: #B07F71; /* nude oscuro, legible sobre crema */
    --catalog-sage: #8C9180;         /* verde salvia del logo */
    --catalog-sage-deep: #6E7365;
    --catalog-cream: #FEFAF8;
    --catalog-cream-2: #F9F1ED;
    --catalog-ink: #404040;          /* gris carbón */
    --catalog-gray: #736862;
    --catalog-light: #ffffff;
    --catalog-hairline: rgba(64, 64, 64, 0.10);
    --catalog-nude-line: rgba(211, 168, 157, 0.45);
}

/* ===================================
   HERO DEL CATÁLOGO
   =================================== */
.catalog-hero {
    background:
        radial-gradient(720px 320px at 50% -120px, rgba(211, 168, 157, 0.35), transparent 70%),
        linear-gradient(180deg, #FEFAF8 0%, #F9F1ED 100%);
    color: var(--catalog-ink);
    padding: 150px 0 70px;
    text-align: center;
    border-bottom: 1px solid var(--catalog-nude-line);
}

.catalog-hero .eyebrow {
    display: inline-block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.34em;
    color: #9C6B5D;
    margin-bottom: 1.1rem;
}

.catalog-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 1.1rem;
    font-weight: 600;
    color: var(--catalog-ink);
}

.catalog-hero h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 1px;
    margin: 1.2rem auto 0;
    background: var(--catalog-primary);
}

.catalog-hero p {
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--catalog-gray);
    max-width: 680px;
    margin: 1.3rem auto 0;
}

/* ===================================
   INTRO (usada por las landings)
   =================================== */
.catalog-intro {
    background: var(--catalog-cream);
    padding: 70px 0 0;
    text-align: center;
}

.catalog-intro .section-title,
.catalog-intro .section-subtitle { color: var(--catalog-ink); }
.catalog-intro .section-subtitle {
    color: var(--catalog-gray);
    max-width: 720px;
    margin: 0 auto;
}

/* ===================================
   BUSCADOR Y FILTROS
   =================================== */
.catalog-filters {
    background: rgba(254, 250, 248, 0.96);
    backdrop-filter: blur(10px);
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--catalog-nude-line);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.catalog-search {
    max-width: 520px;
    margin: 0 auto 1.4rem;
}

.catalog-search input {
    width: 100%;
    padding: 0.9rem 1.4rem;
    border: 1px solid var(--catalog-nude-line);
    border-radius: 999px;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--catalog-ink);
    transition: border-color .3s ease, box-shadow .3s ease;
}

.catalog-search input::placeholder { color: #A9A09B; }

.catalog-search input:focus {
    outline: none;
    border-color: var(--catalog-primary);
    box-shadow: 0 0 0 4px rgba(211, 168, 157, 0.18);
}

.filters-container {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--catalog-gray);
    margin-right: 0.4rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--catalog-nude-line);
    background: #fff;
    color: var(--catalog-ink);
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all .28s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--catalog-primary);
    color: var(--catalog-primary-deep);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--catalog-primary);
    border-color: var(--catalog-primary);
    color: var(--catalog-ink);
    font-weight: 500;
}

/* ===================================
   CONTADOR DE RESULTADOS
   =================================== */
.results-counter {
    text-align: center;
    padding: 2rem 0 0;
    color: var(--catalog-gray);
    font-size: 0.82rem;
    font-weight: 300;
    letter-spacing: 0.06em;
}

.results-counter strong {
    color: var(--catalog-primary-deep);
    font-weight: 600;
}

/* ===================================
   GRID DE PRODUCTOS
   =================================== */
.catalog-section {
    background: var(--catalog-cream);
    padding: 1rem 0 90px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.4rem;
}

.product-card {
    background: #fff;
    border-radius: 999px 999px 22px 22px;
    padding: 12px 12px 0;
    border: 1px solid var(--catalog-hairline);
    box-shadow: 0 1px 2px rgba(64, 64, 64, 0.04), 0 14px 34px rgba(64, 64, 64, 0.06);
    transition: transform .4s cubic-bezier(.25,.6,.3,1), box-shadow .4s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-9px);
    box-shadow: 0 30px 62px rgba(176, 127, 113, 0.20);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.12;
    overflow: hidden;
    border-radius: 999px 999px 14px 14px;
    box-shadow: 0 0 0 1px var(--catalog-nude-line);
    cursor: zoom-in;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s cubic-bezier(.25,.6,.3,1);
}

.product-card:hover .product-image { transform: scale(1.06); }

.zoom-icon {
    position: absolute;
    bottom: 0.9rem;
    right: 0.9rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(254, 250, 248, 0.92);
    border: 1px solid var(--catalog-nude-line);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
}

.zoom-icon svg { width: 18px; height: 18px; color: var(--catalog-primary-deep); }

.product-card:hover .zoom-icon { opacity: 1; transform: translateY(-2px); }

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

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.34rem;
    color: var(--catalog-ink);
    margin-bottom: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.product-name::after {
    content: '·❦·';
    display: block;
    margin-top: 0.55rem;
    color: var(--catalog-primary);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
}

.product-description {
    color: var(--catalog-gray);
    line-height: 1.8;
    margin-bottom: 1.4rem;
    font-size: 0.88rem;
    font-weight: 300;
    flex: 1;
}

.pd-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.1rem;
    border-top: 1px solid var(--catalog-hairline);
    text-align: left;
    gap: 1rem;
}

.price-label {
    font-size: 0.58rem;
    color: #7A6F6A;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    display: block;
    margin-bottom: 0.25rem;
}

.product-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.62rem;
    color: var(--catalog-ink);
    font-weight: 500;
    white-space: nowrap;
}

.btn-order {
    padding: 0.85rem 1.6rem;
    background: #1EBE5D;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(30, 190, 93, 0.26);
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(30, 190, 93, 0.34);
    background: #169549;
    color: #fff;
}

.btn-order svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===================================
   ETIQUETAS
   =================================== */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 1.1rem;
}

.product-tag {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-weight: 500;
}

.product-tag-code {
    background: rgba(64, 64, 64, 0.06);
    color: var(--catalog-gray);
}

.product-tag-cat {
    background: rgba(140, 145, 128, 0.16);
    color: var(--catalog-sage-deep);
}

/* ===================================
   ESTADO VACÍO
   =================================== */
.empty-state {
    display: none;
    text-align: center;
    padding: 5rem 1rem;
    color: var(--catalog-gray);
}

.empty-state.active { display: block; }

.empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--catalog-ink);
    margin-bottom: 0.6rem;
}

.empty-state p { font-weight: 300; }

/* ===================================
   LIGHTBOX
   =================================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(64, 64, 64, 0.88);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.lightbox.active { display: flex; }

.lightbox-content {
    max-width: 640px;
    width: 100%;
    background: var(--catalog-cream);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.lightbox-image {
    width: 100%;
    max-height: 68vh;
    object-fit: contain;
    background: #fff;
    display: block;
}

.lightbox-info {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--catalog-nude-line);
}

.lightbox-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--catalog-ink);
    margin-bottom: 0.4rem;
}

.lightbox-info p {
    color: var(--catalog-primary-deep);
    font-size: 1.15rem;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.8rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(254, 250, 248, 0.15);
    border: 1px solid rgba(254, 250, 248, 0.35);
    color: #FEFAF8;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: background .3s ease;
}

.lightbox-close:hover { background: rgba(254, 250, 248, 0.3); }

/* ===================================
   BOTÓN SUBIR
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 110px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--catalog-primary);
    border: none;
    color: var(--catalog-ink);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .3s ease;
    z-index: 900;
    box-shadow: 0 8px 20px rgba(176, 127, 113, 0.3);
}

.scroll-top svg { width: 20px; height: 20px; margin: 0 auto; }

.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .catalog-hero { padding: 120px 0 50px; }
    .catalog-hero h1 { font-size: 2.15rem; }
    .catalog-filters { top: 70px; padding: 1rem 0; }
    .filter-label { display: none; }
    .catalog-search { margin-bottom: 0.9rem; }

    /* En móvil los filtros van en una sola fila deslizable
       para no empujar los productos fuera de la pantalla */
    .catalog-filters .container { padding-right: 0; }
    .filters-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0.2rem 20px 0.5rem 0;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filters-container::-webkit-scrollbar { display: none; }
    .filter-btn { flex: 0 0 auto; scroll-snap-align: start; }
    .products-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .product-footer { flex-direction: column; gap: 1rem; align-items: stretch; }
    .product-price { text-align: center; }
    .price-label { text-align: center; }
    .btn-order { width: 100%; justify-content: center; }
    .scroll-top { bottom: 96px; right: 20px; }
}

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