/* --- Google Fonts & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-heading: 'Bodoni Moda', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --primary: #111111;
    --accent: #c5a059;
    --accent-hover: #b08c46;
    --bg-light: #fafafa;
    --card-bg: #ffffff;
    --text: #222222;
    --text-muted: #777777;
    --border: #eeeeee;
    --whatsapp: #25d366;
    --instagram: #e1306c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 80px;
}

/* --- Layout Base --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

/* --- Top Social Bar --- */
.top-social-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    max-width: 220px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s, opacity 0.2s;
}

.top-btn:active {
    transform: scale(0.98);
}

.top-btn.btn-ws {
    background-color: var(--whatsapp);
}

.top-btn.btn-ig {
    background-color: #111111;
}

.top-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* --- Header & Marca --- */
.site-header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 0.9;
    color: var(--primary);
    text-transform: uppercase;
}

.brand-title .roma {
    letter-spacing: -6px;
    display: inline-block;
}

.brand-title .sub-title {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 6px;
    margin-top: 6px;
    color: #333;
}

.brand-tagline {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 10px;
}

/* --- Barra de Anuncios (Marquee) --- */
.announcement-bar {
    background: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.announcement-track {
    display: inline-flex;
    gap: 3rem;
    animation: marquee-scroll 22s linear infinite;
}

.announcement-track span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Navegación de Categorías y Buscador --- */
.categories-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 1.2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.categories-nav-scroll {
        width: 100%;
        display: flex;
        flex-wrap: wrap; /* Permite que los botones bajen a la siguiente línea */
        justify-content: center; /* Los centra en la pantalla */
        gap: 8px 6px; /* Espaciado vertical y horizontal entre botones */
    }

.cat-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Input Buscador */
.nav-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-search-wrapper input {
    padding: 8px 14px 8px 34px;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.82rem;
    font-family: var(--font-body);
    background: #ffffff;
    color: var(--text);
    outline: none;
    width: 210px;
    transition: all 0.25s ease;
}

.nav-search-wrapper input:focus {
    border-color: var(--accent);
    width: 230px;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.15);
}

.nav-search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    pointer-events: none;
}

/* --- Toolbar & Ordenamiento --- */
.products-toolbar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-wrapper label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sort-wrapper select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background-color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.sort-wrapper select:focus,
.sort-wrapper select:hover {
    border-color: var(--accent);
}

/* --- Grid & Tarjetas --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Tarjeta Narrativa */
.grid-story-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fdfbf7 0%, #f4eee7 100%);
    border: 1px solid #e8dfd5;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    text-align: center;
    margin-bottom: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.grid-story-card .story-badge {
    display: inline-block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8b6b5d;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.grid-story-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #111111;
    margin: 0 0 0.35rem 0;
    font-weight: 600;
}

.grid-story-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555555;
    max-width: 650px;
    margin: 0 auto;
}

/* Tarjetas de Producto */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fdfdfd;
    overflow: hidden;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Ajuste sutil al subtítulo para que no ocupe espacio de más */
.product-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 6px;
    min-height: auto; /* Quitamos el min-height fijo anterior */
}

/* Bloque de Notas Olfativas */
.product-notes {
    margin-top: 4px;
    margin-bottom: 12px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.notes-title {
    display: block;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 2px;
}

.notes-text {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #555;
    max-height: 3.8em; /* Limita a ~3 líneas */
    overflow-y: auto;
    padding-right: 2px;
}

.notes-text::-webkit-scrollbar {
    width: 3px;
}

.notes-text::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.badge-destacado {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
}

.product-card.out-of-stock .product-img-wrapper img {
    filter: grayscale(80%) blur(1.5px);
    opacity: 0.6;
}

.badge-agotado {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #222;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
}

.product-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 4px;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
    min-height: 2.2em;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-add-cart {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-cart:hover {
    background: var(--accent);
}

.btn-add-cart:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    border-color: #ccc !important;
}

/* --- Carrito Flotante --- */
.floating-cart-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 480px;
    background: #111111;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    transition: all 0.3s ease;
}

.floating-cart-bar.hidden {
    transform: translate(-50%, 120%);
    opacity: 0;
}

.cart-count {
    font-size: 0.9rem;
}

.cart-count span {
    color: var(--accent);
    font-weight: bold;
}

.btn-send-ws {
    background: var(--whatsapp);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* --- Footer --- */
.site-footer {
    background-color: #111111;
    color: #ffffff;
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid #222222;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-heart {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.footer-contact {
    font-size: 0.88rem;
    color: #bbbbbb;
    line-height: 1.5;
}

.footer-copy {
    font-size: 0.75rem;
    color: #666666;
    margin-top: 1rem;
    letter-spacing: 0.5px;
}

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 768px) {
    /* Layout apilado de navegación */
    .categories-nav {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
        padding: 0 1rem 1.2rem;
    }

    .nav-search-wrapper {
        width: 100%;
    }

    .nav-search-wrapper input,
    .nav-search-wrapper input:focus {
        width: 100%;
        font-size: 0.88rem;
        padding: 10px 14px 10px 36px;
    }

    .categories-nav-scroll {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .categories-nav-scroll::-webkit-scrollbar {
        display: none;
    }

    .cat-btn {
        font-size: 0.8rem;
        padding: 7px 15px;
    }

    /* Grilla más ajustada en pantallas medianas/chicas */
    .products-grid {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .grid-story-card {
        padding: 0.9rem 0.85rem;
        margin-bottom: 0.5rem;
    }

    .grid-story-card h3 {
        font-size: 1.1rem;
    }

    .grid-story-card p {
        font-size: 0.82rem;
    }

    .products-toolbar {
        margin-bottom: 0.25rem;
    }

    .sort-wrapper label {
        font-size: 0.75rem;
    }

    .sort-wrapper select {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    .site-footer {
        padding: 2.2rem 1rem 1.5rem;
        margin-top: 2.5rem;
    }

    .footer-heart {
        font-size: 1rem;
    }

    .footer-contact {
        font-size: 0.82rem;
    }
}
/* Contenedor del enlace del logo */
.brand-logo-link {
    display: inline-block;
    text-decoration: none;
}

/* Imagen del logo */
.brand-logo {
    max-width: 220px; /* Tamaño máximo en pantallas grandes */
    height: auto;     /* Mantiene la proporción original sin deformar */
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.02); /* Efecto sutil al pasar el mouse */
}

/* Ajuste responsive para celulares */
@media (max-width: 768px) {
    .brand-logo {
        max-width: 170px; /* Tamaño reducido para no ocupar tanto alto en celular */
    }
}



/* =========================================================
   SEO - Títulos semánticos
   Mantiene exactamente el estilo visual original
========================================================= */
/* =========================================================
   SEO - H1 semántico sin alterar el diseño visual
========================================================= */

/* H1 SEO de la portada */
.home-intro {
    margin-bottom: 1.5rem;
}

.home-intro h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    color: #111111;
    margin: 0 0 0.35rem 0;
    font-weight: 600;
}

/* Texto descriptivo de la portada */
.home-intro p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555555;
    max-width: 650px;
    margin: 0 auto;
}

/* H2 de la tarjeta narrativa
   Visualmente reemplaza al antiguo h3 */
.grid-story-card h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    color: #111111;
    margin: 0 0 0.35rem 0;
    font-weight: 600;
}

/* Mobile: exactamente la lógica que ya tenías para h3 */
@media (max-width: 600px) {
    .grid-story-card h2 {
        font-size: 1.1rem;
    }
}

.home-intro {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}