/*
 * TEMA: SABANATEX — Blanquería hotelera
 * Estilo tienda textil limpia (fondo claro, logo centrado, menú por rubro).
 * Paleta cálida neutra: carbón + bronce sobre crudo. Títulos Cormorant Garamond, texto Jost.
 * El header propio vive en templates/header_sabanatex.php.
 */
:root {
    --primary:      #34312d;
    --secondary:    #4a4540;
    --accent:       #34312d;
    --accent-dark:  #1f1d1a;
    --accent-rgb:   52,49,45;
    --gold:         #9a7b55;
    --gold-soft:    #f3ede4;
    --light-bg:     #ffffff;
    --cream:        #faf7f2;
    --dark:         #34312d;
    --border:       #e8e2d9;
    --muted:        #7c756c;
    --radius:       4px;
    --shadow:       none;
    --shadow-h:     0 10px 30px rgba(52,49,45,.10);
    --font:         'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
}

body { font-family: var(--font); color: #3b3834; background: #fff; font-weight: 400; }
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -.01em; }
a { color: var(--primary); }

/* ═══════════ BARRA SUPERIOR ═══════════ */
.sbx-topbar {
    background: var(--primary); color: #f1ece4;
    font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
    text-align: center; padding: .5rem 0; font-weight: 500;
}
.sbx-topbar-text { display: inline-block; }
@media (max-width: 575px) { .sbx-topbar { font-size: .64rem; letter-spacing: .06em; } }
.sbx-topbar-text.is-in { animation: sbxFade .5s ease; }
@keyframes sbxFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ═══════════ HEADER ═══════════ */
.sbx-header {
    background: #fff; position: sticky; top: 0; z-index: 1030;
    border-bottom: 1px solid var(--border);
    transition: box-shadow .25s;
}
.sbx-header.is-scrolled { box-shadow: 0 6px 24px rgba(52,49,45,.08); }
.sbx-header-main {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 1rem; padding-top: .9rem; padding-bottom: .9rem;
}
.sbx-logo { justify-self: center; display: block; line-height: 0; }
.sbx-logo img { height: 64px; width: auto; transition: height .25s; }
.sbx-header.is-scrolled .sbx-logo img { height: 50px; }
.sbx-logo span { font-family: var(--font-heading); font-size: 2rem; color: var(--primary); line-height: 1; }

.sbx-search { display: flex; align-items: stretch; max-width: 290px; width: 100%; }
.sbx-search input {
    flex: 1; min-width: 0; border: 1px solid var(--border); border-right: 0;
    padding: .55rem .85rem; font-size: .88rem; font-family: var(--font); color: var(--primary);
    background: #fff; outline: none; border-radius: var(--radius) 0 0 var(--radius);
}
.sbx-search input:focus { border-color: var(--gold); }
.sbx-search button {
    border: 1px solid var(--border); background: var(--cream); color: var(--primary);
    padding: 0 .9rem; border-radius: 0 var(--radius) var(--radius) 0; transition: background .2s;
}
.sbx-search button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.sbx-search-mobile { max-width: none; padding-bottom: .8rem; }

.sbx-actions { justify-self: end; display: flex; align-items: center; gap: .35rem; }
.sbx-icon-btn {
    position: relative; display: inline-flex; align-items: center; gap: .4rem;
    background: none; border: 0; color: var(--primary); text-decoration: none;
    font-size: 1.35rem; padding: .35rem .5rem; border-radius: var(--radius);
    transition: color .2s;
}
.sbx-icon-btn:hover { color: var(--gold); }
.sbx-icon-label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.sbx-badge {
    position: absolute; top: 0; left: 1.3rem; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--gold); color: #fff; font-size: .65rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
@media (max-width: 991px) {
    .sbx-header-main { grid-template-columns: auto 1fr auto; padding-top: .6rem; padding-bottom: .6rem; }
    .sbx-header-main > .sbx-icon-btn:first-child { justify-self: start; }
    .sbx-logo img { height: 48px; }
    .sbx-header.is-scrolled .sbx-logo img { height: 42px; }
}

/* Menú por rubro */
.sbx-nav { border-top: 1px solid var(--border); }
.sbx-nav > ul { list-style: none; margin: 0 auto; display: flex; justify-content: center; gap: .25rem; padding-top: 0; padding-bottom: 0; }
.sbx-nav > ul > li { position: relative; }
.sbx-nav > ul > li > a {
    display: block; padding: .85rem 1.05rem; color: var(--primary); text-decoration: none;
    font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
    border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.sbx-nav > ul > li > a .bi { font-size: .6rem; margin-left: .15rem; vertical-align: 1px; }
.sbx-nav > ul > li > a:hover, .sbx-nav > ul > li > a.active { color: var(--gold); border-bottom-color: var(--gold); }
.sbx-menu {
    list-style: none; position: absolute; top: 100%; left: 50%; min-width: 240px; margin: 0; padding: .6rem 0;
    background: #fff; border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(52,49,45,.12);
    opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: all .2s; z-index: 20;
}
.sbx-has-menu:hover .sbx-menu, .sbx-has-menu:focus-within .sbx-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sbx-menu a { display: block; padding: .5rem 1.3rem; color: #4a4540; text-decoration: none; font-size: .9rem; }
.sbx-menu a:hover { background: var(--cream); color: var(--gold); }

/* Offcanvas mobile */
.sbx-offcanvas { max-width: 86vw; }
.sbx-offcanvas .offcanvas-title { font-family: var(--font-heading); font-size: 1.5rem; }
.sbx-m-group { margin: 1.1rem 0 .35rem; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.sbx-m-link { display: block; padding: .55rem 0; color: var(--primary); text-decoration: none; border-bottom: 1px solid #f1ede7; font-size: .98rem; }
.sbx-m-sub { padding-left: .75rem; font-size: .93rem; color: #57524b; }

/* ═══════════ BOTONES ═══════════ */
.btn-accent {
    background: var(--primary); color: #fff; border: 1px solid var(--primary);
    border-radius: var(--radius); font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
    font-size: .8rem; padding: .8rem 1.6rem;
}
.btn-accent:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: none; }
.btn-outline-dark { border-color: var(--primary); color: var(--primary); border-radius: var(--radius); }
.btn-outline-dark:hover { background: var(--primary); border-color: var(--primary); }

/* ═══════════ TÍTULOS DE SECCIÓN ═══════════ */
.section-divider { display: none; }
.section-title { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.9rem, 3.2vw, 2.6rem); color: var(--primary); }
.section-subtitle { color: var(--muted); }

/* ═══════════ TARJETAS DE PRODUCTO ═══════════ */
.products-grid, .products-grid[data-card-layout="vertical"] { gap: 1.75rem 1.25rem; }
@media (min-width: 576px) {
    .products-grid[data-card-layout="vertical"] { --card-min: 220px; }
}
.product-card { background: transparent; border-radius: 0; box-shadow: none; border: 0; }
.product-card:hover { transform: none; box-shadow: none; }
.product-img-wrap { background: #fff; border-radius: 0; border: 1px solid #f0ebe4; }
.product-img-wrap img { object-fit: contain; padding: 4%; }
.product-card:hover .product-img-wrap img { transform: scale(1.035); }
.product-body { padding: .9rem .15rem .2rem; }
.product-category-tag {
    background: none; color: var(--gold); padding: 0; border-radius: 0;
    font-size: .68rem; letter-spacing: .14em; font-weight: 600;
}
.product-name { font-family: var(--font); font-size: .95rem; font-weight: 400; color: #3b3834; line-height: 1.4; }
.price-current { color: var(--primary); font-weight: 600; font-size: 1.12rem; }
.price-old { color: #b5aea4; }
.price-range-sep { color: var(--muted); }
.badge-oferta { background: var(--gold); border-radius: 0; letter-spacing: .1em; }
.product-actions .btn { border-radius: var(--radius); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: .72rem; padding: .55rem .8rem; }
.product-actions .btn-cart { background: var(--primary); }
.product-actions .btn-cart:hover { background: var(--gold); }

/* ═══════════ CATÁLOGO / FICHA ═══════════ */
.filter-sidebar { box-shadow: none; border: 1px solid var(--border); border-radius: var(--radius); }
.filter-cat-btn:hover, .filter-cat-btn.active { background: var(--primary); color: #fff; }
.breadcrumb-pills a { background: var(--cream); color: #57524b; border-radius: var(--radius); }
.breadcrumb-pills a:hover { background: var(--primary); color: #fff; }
.breadcrumb-pills .active span { background: var(--primary); border-radius: var(--radius); }
.product-detail-price { color: var(--primary); }
.category-card { border-radius: var(--radius); box-shadow: none; border: 1px solid var(--border); }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154,123,85,.15); }
.text-accent { color: var(--gold) !important; }
.bg-accent { background: var(--primary) !important; }

/* ═══════════ CTA Y FOOTER ═══════════ */
.cta-banner { background: var(--primary); border-radius: 0; }
.site-footer { background: #2b2926; margin-top: 0; padding-top: 3.5rem; }
.site-footer img { filter: brightness(0) invert(1) !important; opacity: .92; height: 60px !important; }   /* logo oscuro → blanco (le gana al inline del template) */
.footer-title { color: #d8c7ae; letter-spacing: .16em; font-weight: 500; }
.footer-link:hover, .footer-social a:hover { color: #d8c7ae; }
.footer-social a:hover { background: rgba(255,255,255,.14); }
.footer-social a i { color: #fff !important; }
