/*
 * SanJose Florería — Pereira · CATÁLOGO
 * REDISEÑO "LUXURY FLORAL" · solo estilo (estructura intacta)
 * Color de marca conservado: #BF9460 · variante profunda #8F6F48
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #BF9460;
    --secondary: #F2CEA2;
    --accent: #8C5F37;
    --highlight: #F2C9C9;
    --background: #F2F2F2;
    --primary-deep: #8F6F48;

    --ink: #14101B;
    --ink-2: #221B2E;
    --warm-white: #FDFCFB;
    --cream: #F8F5F0;
    --brand-tint: #F6EFE2;
    --gold: #C9A86A;
    --gold-dark: #A8853F;
    --text: #2B2433;
    --text-soft: #6B6375;
    --hairline: rgba(22, 18, 28, 0.09);
    --wa: #1EBE5D;
    --wa-dark: #169549;

    --font-title: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.9;
    color: var(--text);
    background: var(--warm-white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─────────────────────────────────────────────────────────────
   HERO NOCTURNO — marca de agua + línea dorada con glow
   ───────────────────────────────────────────────────────────── */
.header {
    background: radial-gradient(70% 120% at 50% 0%, var(--ink-2), var(--ink));
    padding: 4.5rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: 'SanJose';
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
    font-family: var(--font-title);
    font-style: italic;
    font-size: clamp(6rem, 22vw, 20rem);
    color: rgba(255, 255, 255, 0.035);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

.logo img {
    height: 64px;
    width: auto;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--gold);
}

.header h1 {
    font-family: var(--font-title);
    color: var(--warm-white);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 1;
}

.header p {
    font-family: var(--font-body);
    color: var(--text-soft);
    color: rgba(253, 252, 251, 0.7);
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

/* Línea dorada con glow */
.decorative-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    box-shadow: 0 0 14px rgba(201, 168, 106, 0.7);
    margin: 1.8rem auto 0;
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   CATÁLOGO — divisor dorado al pie
   ───────────────────────────────────────────────────────────── */
.catalog {
    padding: 60px 0 90px 0;
    position: relative;
}

.catalog::after {
    content: '';
    display: block;
    width: 180px;
    height: 1px;
    margin: 70px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

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

/* ── Vitrina de arco ──────────────────────────────────────── */
.product-card {
    background: var(--warm-white);
    border: 1px solid var(--hairline);
    border-radius: 220px 220px 18px 18px;
    overflow: hidden;
    padding: 12px 12px 16px;
    box-shadow: 0 20px 50px rgba(20, 16, 27, 0.07);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 10px;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 32px 64px rgba(20, 16, 27, 0.13);
}

.product-card.hidden {
    display: none;
}

.product-image {
    order: 1;
    width: 100%;
    aspect-ratio: 1 / 1.12;
    height: auto;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    border-radius: 210px 210px 14px 14px;
    box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.55);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

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

/* Indicador de zoom sobrio */
.product-image::after {
    content: 'AMPLIAR';
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(20, 16, 27, 0.7);
    color: var(--gold);
    padding: 5px 12px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    border: 1px solid rgba(201, 168, 106, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-image:hover::after {
    opacity: 1;
}

.product-content {
    order: 2;
    width: 100%;
    padding: 1.8rem 1.4rem 0.4rem;
    text-align: center;
}

.product-title {
    font-family: var(--font-title);
    font-size: 1.55rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* Separador dorado bajo el nombre */
.product-title::after {
    content: '\00B7 \2766 \00B7';
    display: block;
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    margin-top: 0.5rem;
}

.product-description {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.7;
    text-align: center;
    margin-bottom: 1.5rem;
    min-height: 80px;
}

/* Precio en Playfair, variante profunda del color de marca */
.product-price {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-deep);
    text-align: center;
    margin-bottom: 1.5rem;
}

.product-price::before {
    content: 'Desde';
    display: block;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 0.2rem;
}

/* Botón de pedido — WhatsApp pill */
.product-button {
    width: 100%;
    background: var(--wa);
    color: white;
    border: none;
    padding: 15px 0;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.product-button:hover {
    background: var(--wa-dark);
    transform: translateY(-2px);
}

/* Category Badge — pastilla centrada al pie del card (orden 4) */
.category-badge {
    order: 4;
    align-self: center;
    background: rgba(20, 16, 27, 0.9);
    color: var(--gold);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 1px solid rgba(201, 168, 106, 0.5);
}

/* ── Tarjeta Especial ─────────────────────────────────────── */
.special-card {
    background: var(--brand-tint);
    border: 1px solid var(--gold);
}

.special-card .product-content {
    padding: 3rem 2rem;
}

.special-title {
    font-family: var(--font-title);
    color: var(--text);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.special-description {
    font-size: 1.1rem;
    color: var(--text-soft);
    min-height: auto;
    margin-bottom: 2rem;
}

.special-button {
    background: var(--wa);
    box-shadow: 0 8px 22px rgba(30, 190, 93, 0.32);
}

.special-button:hover {
    background: var(--wa-dark);
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────
   MODAL / LIGHTBOX — oscuro con blur y marco dorado
   ───────────────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(20, 16, 27, 0.92);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--gold), 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: zoom 0.3s ease-out;
    cursor: default;
}

@keyframes zoom {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--warm-white);
    font-size: 44px;
    font-weight: 300;
    transition: color 0.3s ease;
    cursor: pointer;
    z-index: 10000;
}

.close:hover,
.close:focus {
    color: var(--gold);
}

/* ─────────────────────────────────────────────────────────────
   WHATSAPP FLOTANTE
   ───────────────────────────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 1000;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--wa);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 26px rgba(30, 190, 93, 0.38);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.whatsapp-float a:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--wa-dark);
    box-shadow: 0 10px 30px rgba(30, 190, 93, 0.5);
}

/* ─────────────────────────────────────────────────────────────
   FILTROS — mostrador de joyería (sticky con blur)
   ───────────────────────────────────────────────────────────── */
.filter-section {
    padding: 1.4rem 0;
    background: rgba(253, 252, 251, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    z-index: 900;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 0;
}

.filter-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--hairline);
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 400;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.filter-btn:hover {
    background: var(--brand-tint);
    border-color: var(--gold);
    color: var(--primary-deep);
}

.filter-btn.active {
    background: var(--ink);
    color: var(--gold);
    border-color: transparent;
    box-shadow: 0 0 0 1px var(--gold), 0 6px 18px rgba(20, 16, 27, 0.22);
}

/* ── Código de producto — pastilla centrada al pie (orden 3) ── */
.product-code {
    order: 3;
    align-self: center;
    background: transparent;
    color: var(--primary-deep);
    border: 1px solid var(--gold);
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    font-family: var(--font-body);
    pointer-events: none;
}

/* ── Búsqueda ─────────────────────────────────────────────── */
.catalog-search-wrap input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 4px 16px rgba(201, 168, 106, 0.25);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }

    .product-card {
        margin: 0 6px;
    }

    .product-content {
        padding: 1.5rem 1.2rem 1.7rem;
    }

    .product-title {
        font-size: 1.4rem;
    }

    .product-description {
        font-size: 0.96rem;
        min-height: 70px;
    }

    .product-price {
        font-size: 1.8rem;
    }

    .whatsapp-float {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float a {
        width: 52px;
        height: 52px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 38px;
    }

    .special-title {
        font-size: 1.6rem;
    }

    .special-description {
        font-size: 1rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {
    .catalog {
        padding: 40px 0 64px 0;
    }

    .container {
        padding: 0 15px;
    }
}

/* ─────────────────────────────────────────────────────────────
   APARICIÓN SUAVE
   ───────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeInUp 0.6s ease-out both;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }

/* ─────────────────────────────────────────────────────────────
   ACCESIBILIDAD — anula animaciones si se solicita
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
