/* ========================================
   TEMPLATE EDITORIAL - Estilo revista / magazine
   Titulares enormes, línea de acento, tarjetas tipo portada, ritmo editorial muy marcado.
======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Libre+Franklin:wght@400;500;600;700&display=swap');

/* Variables de tema. --primary y --secondary los define la configuración de la tienda (panel). */
:root {
    --primary-dark: #000;
    --primary-light: #404040;
    --bg: #fafaf8;
    --bg-card: #ffffff;
    --text: #1a1a1a;
    --text-muted: #5c5c5c;
    --border: #e8e6e1;
    --font: 'Libre Franklin', sans-serif;
    --font-heading-editorial: 'Cormorant Garamond', serif;
    --font-display: 'Cormorant Garamond', serif;
    --container-width: 1400px;
    --transition: all 0.3s ease;
}

/* ========== Identidad Editorial: revista, titulares grandes, línea de acento ========== */
body.theme-editorial {
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
    letter-spacing: 0.01em !important;
}
body.theme-editorial .site-header.store-header {
    background: #fff !important;
    border-bottom: 4px solid var(--primary) !important;
    padding: 1.5rem 0 !important;
    box-shadow: 0 1px 0 var(--secondary) !important;
}
body.theme-editorial .site-header.store-header .logo a {
    font-family: var(--font-heading-editorial) !important;
    font-size: 1.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    color: var(--text) !important;
}
body.theme-editorial .site-header.store-header .desktop-nav a,
body.theme-editorial .site-header.store-header .icon-link {
    color: var(--text) !important;
    font-family: var(--font) !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-size: 0.8rem !important;
}
body.theme-editorial .site-header.store-header .desktop-nav a:hover,
body.theme-editorial .site-header.store-header .logo a:hover {
    color: var(--primary) !important;
}
body.theme-editorial .btn,
body.theme-editorial .product-card .btn,
body.theme-editorial button[type="submit"] {
    background: var(--primary) !important;
    color: #fff !important;
    border: 2px solid var(--primary) !important;
    font-family: var(--font) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    border-radius: 0 !important;
    padding: 14px 32px !important;
    font-size: 0.85rem !important;
}
body.theme-editorial .btn:hover,
body.theme-editorial button[type="submit"]:hover {
    background: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: #fff !important;
}

/* Títulos revista: muy grandes + línea de acento en color primario */
body.theme-editorial .section-title,
body.theme-editorial .hero-title,
body.theme-editorial h1,
body.theme-editorial h2,
body.theme-editorial .categories-header h1 {
    font-family: var(--font-heading-editorial) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: -0.02em !important;
    color: var(--text);
}
body.theme-editorial .section-title {
    font-size: 3.25rem !important;
    line-height: 1.15 !important;
    text-align: left !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 4px solid var(--primary) !important;
    display: inline-block !important;
}
body.theme-editorial .hero-title {
    font-size: 4rem !important;
    line-height: 1.1 !important;
    max-width: 14ch !important;
}
body.theme-editorial .section-subtitle {
    text-align: left !important;
    color: var(--text-muted) !important;
    font-size: 1.1rem !important;
    margin-top: 0.5rem !important;
}
body.theme-editorial .section-tag {
    font-family: var(--font) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    color: var(--primary) !important;
    margin-bottom: 0.75rem !important;
    display: block !important;
}

/* ========== Grid y tarjetas: flex centrado, estilo portada de revista (no relacionados) ========== */
body.theme-editorial .products-grid:not(.related-products-grid):not(.home-products-grid) {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 3.5rem 3rem !important;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
body.theme-editorial .products-grid:not(.related-products-grid):not(.home-products-grid) > .product-card {
    flex: 0 1 calc(50% - 1.5rem) !important;
    max-width: calc(50% - 1.5rem) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
@media (min-width: 1200px) {
    body.theme-editorial .category-products-main .products-grid:not(.related-products-grid):not(.home-products-grid) {
        max-width: none;
    }
}
@media (max-width: 991px) {
    body.theme-editorial .products-grid:not(.related-products-grid):not(.home-products-grid) {
        gap: 3rem !important;
    }
    body.theme-editorial .products-grid:not(.related-products-grid):not(.home-products-grid) > .product-card {
        flex: 0 1 100% !important;
        max-width: 100% !important;
    }
}
@media (max-width: 576px) {
    body.theme-editorial .products-grid:not(.related-products-grid):not(.home-products-grid) {
        gap: 2.5rem !important;
    }
}

body.theme-editorial .product-card {
    background: var(--bg-card) !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--border) !important;
    border-top: 3px solid var(--primary) !important;
    transition: var(--transition) !important;
    text-align: left !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}
body.theme-editorial .product-card:hover {
    transform: none !important;
    box-shadow: 0 24px 56px rgba(0,0,0,0.14) !important;
    border-color: var(--primary) !important;
    border-top-width: 4px !important;
}
body.theme-editorial .product-image {
    aspect-ratio: var(--product-image-aspect, 1 / 1) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    background: #f0eeea !important;
    position: relative !important;
    flex: 0 0 auto !important;
}
body.theme-editorial .product-image img {
    object-fit: cover !important;
    object-position: center !important;
}
body.theme-editorial .product-card:hover .product-image.no-hover img {
    transform: scale(1.04) !important;
    transition: transform 0.6s ease !important;
}
body.theme-editorial .product-card:hover .product-image.has-hover .hover-img {
    transform: scale(1.04) !important;
    transition: transform 0.6s ease, opacity 0.45s ease !important;
}
body.theme-editorial .product-info {
    padding: 2rem 1.75rem !important;
    text-align: left !important;
}
body.theme-editorial .product-category {
    font-size: 0.68rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    margin-bottom: 0.6rem !important;
}
body.theme-editorial .product-title {
    font-family: var(--font-heading-editorial) !important;
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.6rem !important;
    color: var(--text) !important;
}
body.theme-editorial .product-price {
    font-family: var(--font-heading-editorial) !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    margin-bottom: 1rem !important;
}

body.theme-editorial .product-price-dual-card,
body.theme-editorial .product-price-dual {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Badges editorial: etiqueta tipo "Novedad" / "Oferta" */
body.theme-editorial .product-badge {
    border-radius: 0 !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.18em !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
}
body.theme-editorial .badge-sale {
    background: var(--primary-color, var(--primary)) !important;
    color: #fff !important;
}

body.theme-editorial .badge-promo {
    background: var(--secondary) !important;
    color: var(--text) !important;
}

/* Secciones: más aire, bloques muy diferenciados */
body.theme-editorial .section {
    padding: 1.35rem 0 !important;
}
body.theme-editorial .product-detail-wrapper.section,
body.theme-editorial .product-detail-wrapper { padding-top: 0 !important; margin-top: 0 !important; }
body.theme-editorial .category-page-content.section,
body.theme-editorial .category-page-content { padding-top: 0 !important; margin-top: 0 !important; }
body.theme-editorial .section:nth-of-type(even) {
    background: rgba(0,0,0,0.02) !important;
}
body.theme-editorial .feature-card {
    border: 1px solid var(--border) !important;
    border-left: 4px solid var(--primary) !important;
    border-radius: 0 !important;
    padding: 2rem !important;
    background: #fff !important;
}
body.theme-editorial .feature-card .icon-box {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 0 !important;
}
body.theme-editorial .feature-card h4 {
    font-family: var(--font-heading-editorial) !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    font-size: 1.35rem !important;
}
body.theme-editorial .categories-header {
    padding: 4px 0 2px !important;
    margin-bottom: 0 !important;
}
body.theme-editorial .categories-header h1 {
    font-size: 1.1rem !important;
    padding-bottom: 0.2rem !important;
    border-bottom: 2px solid var(--primary) !important;
}
body.theme-editorial .categories-header p {
    display: none !important;
}

/* Filtros sidebar: coherentes con editorial */
body.theme-editorial .store-filters {
    --sf-bg: #f5f3f0 !important;
    --sf-border: #e8e6e1 !important;
    --sf-accent: var(--primary) !important;
}
body.theme-editorial .store-filters__summary {
    font-family: 'Cormorant Garamond', serif !important;
    font-weight: 600 !important;
}

/* Hero, announcement, categorías: identidad editorial (colores de acento = configuración tienda) */
/* La config del cliente (colores barra) sobrescribe: sin !important en background/color */
body.theme-editorial .announcement-bar {
    background: var(--primary);
    color: #fff;
    font-family: 'Libre Franklin', sans-serif !important;
}
body.theme-editorial .hero-title {
    font-family: 'Cormorant Garamond', serif !important;
    color: var(--text);
}
body.theme-editorial .cat-card-item,
body.theme-editorial .cat-card-img {
    border-radius: 0 !important;
    border: 1px solid var(--border) !important;
    border-top: 3px solid var(--primary) !important;
}
body.theme-editorial .cat-card-item:hover .cat-card-img {
    border-color: var(--primary) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
}
body.theme-editorial .features-section {
    background: #f5f3f0 !important;
    padding: 4.5rem 0 !important;
}
body.theme-editorial .product-detail-title,
body.theme-editorial .page-title {
    font-family: 'Cormorant Garamond', serif !important;
    font-weight: 700 !important;
    font-size: 2.5rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 3px solid var(--primary) !important;
    display: inline-block !important;
}
body.theme-editorial .product-detail-price {
    color: var(--primary) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

/* Sobre Nosotros: en móvil foto arriba, texto abajo (no apretado) */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .about-image {
        order: 1;
        max-height: 40vh;
    }
    .about-image img,
    .about-image .about-image-placeholder {
        max-height: 40vh;
        object-fit: cover;
    }
    .about-content {
        order: 2;
        padding: 0;
    }
}

/* Newsletter: tipografía editorial */
body.theme-editorial .newsletter-section .newsletter-content h2 {
    font-family: var(--font-display, var(--font-heading-editorial)) !important;
    font-weight: 700 !important;
}
