/* Ultraespecífico: forzar visibilidad del drawer */
body > #cart-drawer.abierto,
html > body > #cart-drawer.abierto {
    right: 0 !important;
    left: auto !important;
    top: 0 !important;
    bottom: 0 !important;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    transform: none !important;
}
.cart-drawer.abierto {
    right: 0 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
    display: block !important;
}
/* Forzar que el drawer nunca sea recortado por overflow de padres */
body, .container, .page-content, main, .catalog-layout {
    overflow: visible !important;
}
/* Drawer carrito: oculto por defecto, visible al abrir */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 95vw;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 16px rgba(0,0,0,.13);
    z-index: 9999;
    transition: right 0.28s cubic-bezier(.4,0,.2,1);
    display: block;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
}
.cart-drawer.abierto {
    right: 0 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.18);
    z-index: 2099;
}
.cart-overlay.visible {
    display: block;
}
/* ═══════════════════════════════════════════════════════════════════════
   WhatsApp Commerce — main.css
   Variables compartidas con admin.css + componentes frontend
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --primary:    #075e54;
    --secondary:  #128c7e;
    --accent:     #25d366;
    --dark:       #0a3d35;
    --text:       #1a1a1a;
    --text-muted: #6b7280;
    --bg:         #f5f7f6;
    --card-bg:    #ffffff;
    --border:     #e2e8e6;
    --radius:     12px;
    --shadow:     0 2px 12px rgba(0,0,0,.07);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
    --transition: .22s ease;
    --header-h:   64px;
}

/* ── Reset mínimo ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}
a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; }

/* ── Header / Topbar ──────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--primary);
    color: #fff;
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    flex-shrink: 0;
}
.header-logo i { font-size: 1.6rem; color: var(--accent); }
.header-search {
    flex: 1;
    max-width: 520px;
    display: flex;
    background: rgba(255,255,255,.15);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.2);
    transition: background var(--transition);
}
.header-search:focus-within { background: rgba(255,255,255,.22); }
.header-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 8px 18px;
    font-size: 14px;
}
.header-search input::placeholder { color: rgba(255,255,255,.65); }
.header-search button {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 16px;
    font-size: 15px;
    transition: opacity var(--transition);
}
.header-search button:hover { opacity: .75; }
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
/* Botón carrito con badge */
.cart-btn {
    position: relative;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 18px 8px 14px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity var(--transition);
}
.cart-btn:hover { opacity: .9; }
.cart-count {
    background: #fff;
    color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* ── Contenedor principal ─────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}
.page-content {
    padding: 28px 0;
}

/* ── Hero / Banner ────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 56px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; margin-bottom: 10px; }
.hero p { font-size: clamp(.95rem, 2vw, 1.15rem); opacity: .85; max-width: 540px; margin: 0 auto 28px; }
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition);
    border: none;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,.4); color: #fff; }

/* ── Sección título ───────────────────────────────────────────── */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--accent), transparent);
    border-radius: 2px;
}

/* ── Grid de categorías ───────────────────────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}
.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.category-card:hover, .category-card.active {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    color: var(--primary);
}
.category-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: block;
}
.category-card-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}
.category-card span { font-size: 13px; font-weight: 600; }

/* ── Carrusel de categorías (solo inicio / index) ─────────────── */
.categories-carousel-shell {
    position: relative;
    margin-bottom: 36px;
}
.categories-carousel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 6px 44px 14px;
    margin: 0;
}
.categories-carousel::-webkit-scrollbar {
    height: 6px;
}
.categories-carousel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 6px;
}
.categories-carousel .category-card--carousel {
    flex: 0 0 auto;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    scroll-snap-align: start;
    box-sizing: border-box;
}
.categories-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s, box-shadow 0.2s;
    font-size: 0.95rem;
}
.categories-carousel-arrow:hover:not(:disabled) {
    background: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
}
.categories-carousel-arrow:disabled {
    opacity: 0.22;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}
.categories-carousel-arrow--prev {
    left: 0;
}
.categories-carousel-arrow--next {
    right: 0;
}
.categories-carousel-shell--no-overflow .categories-carousel-arrow {
    display: none;
}
.categories-carousel-shell--no-overflow .categories-carousel {
    padding-left: 6px;
    padding-right: 6px;
}
@media (max-width: 768px) {
    .categories-carousel {
        padding-left: 40px;
        padding-right: 40px;
    }
    .categories-carousel .category-card--carousel {
        width: 124px;
        min-width: 124px;
        max-width: 124px;
    }
    .categories-carousel-arrow {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
}

/* ── Grid de productos ────────────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
}
.product-badge.badge-new { background: var(--secondary); }

.product-img {
    aspect-ratio: 4/3;
    width: 100%;
    object-fit: cover;
    background: #f0f4f3;
    display: block;
}
.product-img-placeholder {
    aspect-ratio: 4/3;
    width: 100%;
    background: #f0f4f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #d0d9d7;
}
.product-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-category {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}
.product-price-original {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}
.product-discount {
    font-size: 11px;
    background: #ffeaea;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.product-actions {
    padding: 0 14px 14px;
    display: flex;
    gap: 8px;
}
.btn-cart {
    flex: 1;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background var(--transition);
}
.btn-cart:hover { background: var(--dark); }
.btn-cart.in-cart { background: var(--accent); }
.btn-wa {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    text-decoration: none;
}
.btn-wa:hover { background: #1db85a; color: #fff; }

/* ── Página de detalle de producto ───────────────────────────── */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f4f3;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: opacity .15s; }
.gallery-main img:hover { opacity: .92; }
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); }

.product-detail-info h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.product-detail-price { font-size: 2rem; font-weight: 800; color: var(--primary); }
.product-detail-original { font-size: 1rem; color: #aaa; text-decoration: line-through; }
.product-description { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin: 16px 0; }
.stock-badge { display: inline-block; background: #e8f9ee; color: #27ae60; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.stock-badge.out { background: #ffeaea; color: #e74c3c; }

.btn-add-cart {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    transition: background var(--transition), transform var(--transition);
}
.btn-add-cart:hover { background: var(--dark); transform: translateY(-1px); }
.btn-add-cart.in-cart { background: var(--accent); }
.btn-buy-wa {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}
.btn-buy-wa:hover { background: #1db85a; color: #fff; transform: translateY(-1px); }

/* ── Carrito lateral (drawer) ────────────────────────────────── */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease-in-out;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: #fff;
    z-index: 500;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 32px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .35s ease-in-out, box-shadow .35s ease-in-out;
}
.cart-drawer.open { transform: translateX(0); box-shadow: -6px 0 40px rgba(0,0,0,.18); }
.cart-drawer-header {
    background: var(--primary);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-drawer-header h3 { font-size: 16px; font-weight: 700; }
.cart-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.cart-close:hover { background: rgba(255,255,255,.3); }
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.cart-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.cart-empty i { font-size: 3rem; margin-bottom: 12px; color: var(--border); display: block; }
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f0f4f3;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 2px; }
.cart-item-vendor { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}
.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.qty-btn:hover { background: var(--bg); }
.qty-value { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.cart-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 14px;
    padding: 4px;
    opacity: .6;
    transition: opacity var(--transition);
}
.cart-remove:hover { opacity: 1; }
.cart-footer {
    padding: 16px;
    border-top: 2px solid var(--border);
    background: #fff;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}
.btn-checkout {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background var(--transition), transform var(--transition);
    margin-bottom: 8px;
}
.btn-checkout:hover { background: #1db85a; transform: translateY(-1px); }
.btn-clear-cart {
    width: 100%;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    transition: background var(--transition);
}
.btn-clear-cart:hover { background: #ffeaea; color: #e74c3c; border-color: #e74c3c; }

/* ── Breadcrumb ───────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ── Paginación ───────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
    user-select: none;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}
.page-btn:hover {
    background: var(--light, #f3f6f5);
    border-color: var(--primary);
    color: var(--primary);
}
.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    cursor: default;
    pointer-events: none;
}
.page-btn.page-nav { padding: 0 12px; font-size: 12px; }
.page-btn.page-nav i { line-height: 1; }
.page-btn.disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 40px;
    color: var(--muted, #94a4a2);
    font-weight: 600;
    letter-spacing: 1px;
}
@media (max-width: 600px) {
    .pagination { gap: 4px; }
    .page-btn { min-width: 34px; height: 34px; padding: 0 10px; font-size: 12px; }
    .page-ellipsis { height: 34px; min-width: 22px; }
}

/* ── Filtros lateral ──────────────────────────────────────────── */
.filters-sidebar {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    position: sticky;
    top: calc(var(--header-h) + 16px);
}
.filter-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    transition: color var(--transition);
}
.filter-option:hover { color: var(--primary); }

/* ── Alertas / Toast ──────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 900;
    opacity: 0;
    transition: all .3s ease;
    white-space: nowrap;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success { background: var(--accent); }

/* ── Noticias Grid (homepage) ─────────────────────────────────── */
.news-section {
    margin: 40px auto;
    width: 90%;
    max-width: 1280px;
}
/* ── News Slider ──────────────────────────────────────────────── */
.news-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-top: 16px;
}
.news-track {
    display: flex;
    transition: transform .8s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.news-slide {
    flex: 0 0 100%;
    padding: 0 4px;
    box-sizing: border-box;
}
.news-card {
    background: #111;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    aspect-ratio: 16 / 6;
}
.news-card:hover { box-shadow: var(--shadow-lg); color: inherit; }
/* Imagen a pantalla completa de la tarjeta (evita huecos/franjas donde se veía #111 por % sin altura clara del padre en móvil) */
.news-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.news-card-img-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--border);
}
.news-card-body {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.42) 52%,
        rgba(0, 0, 0, 0.14) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 32px 44px;
    gap: 8px;
}
.news-card-title {
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    max-width: min(560px, 92vw);
    margin-left: auto;
    margin-right: auto;
}
.news-card-summary {
    font-size: clamp(.78rem, 1.6vw, .95rem);
    color: rgba(255,255,255,.88);
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: min(520px, 92vw);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--accent);
    font-weight: 700;
    text-shadow: none;
}
@media (max-width: 768px) {
    .news-section { width: 97%; }
    /* Misma lectura visual que desktop: foto completa + overlay; solo proporición un poco más alta en móvil */
    .news-card { aspect-ratio: 16 / 9; }
    .news-card-body {
        padding: 18px 20px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}
.news-prev, .news-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.22);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    backdrop-filter: blur(4px);
    z-index: 10;
}
.news-prev:hover, .news-next:hover { background: rgba(0,0,0,.5); }
.news-prev { left: 10px; }
.news-next { right: 10px; }
/* Dots */
.news-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
}
.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.news-dot.active { background: var(--accent); transform: scale(1.35); }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.65);
    padding: 40px 24px 20px;
    margin-top: 60px;
    text-align: center;
    font-size: 13px;
}
.site-footer a { color: var(--accent); }
.site-footer strong { color: #fff; }

/* ── Catálogo layout ─────────────────────────────────────────── */
.catalog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

/* Botón abrir filtros (solo móvil) */
.btn-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 14px;
}

/* Overlay oscuro detrás del drawer */
.filters-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
}
.filters-overlay.open { display: block; }

/* ── Banner Slider ────────────────────────────────────────────── */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111;
    width: 80%;
    margin: 28px auto;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 5;
    max-height: 320px;
}
.banner-track {
    display: flex;
    height: 100%;
    transition: transform .8s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.banner-slide {
    flex: 0 0 100%;
    position: relative;
    overflow: hidden;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.banner-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.45) 48%,
        rgba(0, 0, 0, 0.12) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 32px 44px;
    color: #fff;
}
.banner-slide-title {
    font-size: clamp(1.1rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 7px;
    text-shadow: 0 2px 10px rgba(0,0,0,.45);
    max-width: min(560px, 92vw);
    margin-left: auto;
    margin-right: auto;
}
.banner-slide-sub {
    font-size: clamp(.78rem, 1.8vw, 1rem);
    opacity: .9;
    margin-bottom: 16px;
    text-shadow: 0 1px 5px rgba(0,0,0,.4);
    max-width: min(560px, 92vw);
    margin-left: auto;
    margin-right: auto;
}
.banner-slide-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 9px 22px;
    border-radius: 40px;
    font-weight: 700;
    font-size: .88rem;
    transition: var(--transition);
    width: fit-content;
    box-shadow: 0 4px 14px rgba(37,211,102,.38);
    margin-left: auto;
    margin-right: auto;
}
.banner-slide-btn:hover { background: var(--secondary); color: #fff; transform: translateY(-2px); }
.banner-prev, .banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.28);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    backdrop-filter: blur(6px);
    z-index: 10;
}
.banner-prev:hover, .banner-next:hover { background: rgba(0,0,0,.52); }
.banner-prev { left: 14px; }
.banner-next { right: 14px; }
.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10;
}
.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.banner-dot.active { background: #fff; transform: scale(1.35); }
.banner-slider[data-count="1"] .banner-prev,
.banner-slider[data-count="1"] .banner-next,
.banner-slider[data-count="1"] .banner-dots { display: none; }
@media (max-width: 768px) {
    .banner-slider { aspect-ratio: 16 / 7; max-height: 200px; width: 97%; }
    .banner-slide-overlay {
        padding: 16px 22px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .banner-slider { aspect-ratio: 4 / 3; max-height: 180px; }
    .banner-prev, .banner-next { width: 32px; height: 32px; font-size: .8rem; }
    .banner-slide-overlay {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}

/* Mi sitio (tienda.php): hero a ancho ventana bajo el header; carrusel dentro de .container */
.page-content--mini-sitio {
    padding-top: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.page-content--mini-sitio .banner-slider {
    margin-top: 0;
}
.mini-sitio-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(18px, 3vw, 28px) 0;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    box-sizing: border-box;
}
/* Franja estática edge-to-edge (fondo 100% del viewport; contenido alineado con .container) */
.mini-sitio-hero--fullbleed {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    padding-top: clamp(20px, 3.5vw, 32px);
    padding-bottom: clamp(20px, 3.5vw, 32px);
}
.mini-sitio-hero--fullbleed .container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.page-content--mini-sitio > .container {
    padding-top: 28px;
}
.mini-sitio-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    background: rgba(255,255,255,.05);
    border-radius: 50%;
    pointer-events: none;
}
.mini-sitio-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(18px, 2.8vw, 28px);
    min-width: 0;
}
.mini-sitio-hero-inner--single .mini-sitio-hero-brand {
    max-width: min(480px, 100%);
}
.mini-sitio-hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: min(640px, 100%);
}
.mini-sitio-hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.35);
    display: block;
    margin: 0 auto 10px;
}
.mini-sitio-hero-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.75rem;
    color: rgba(255,255,255,.9);
}
.mini-sitio-hero-title {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.mini-sitio-hero-count {
    margin: 0;
    font-size: 13px;
    opacity: .88;
}
.mini-sitio-hero-brand .mini-sitio-hero-slogan--brand {
    margin: 0 0 8px;
    max-width: min(520px, 100%);
    margin-left: auto;
    margin-right: auto;
}
.mini-sitio-hero-center {
    text-align: center;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.mini-sitio-hero-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 0;
}
.mini-sitio-hero-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff !important;
    font-size: 1.15rem;
    transition: transform var(--transition), background .2s;
    border: 1px solid rgba(255,255,255,.22);
}
.mini-sitio-hero-social-link:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.24);
    color: #fff !important;
}
.mini-sitio-hero-slogan {
    margin: 0;
    font-size: clamp(.95rem, 2vw, 1.1rem);
    font-style: italic;
    opacity: .92;
    line-height: 1.45;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 8px rgba(0,0,0,.2);
}
/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .hero { padding: 36px 16px; }
    .container { padding: 0 14px; }
    .site-header {
        padding: 0 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .header-logo {
        flex-shrink: 1;
        min-width: 0;
        font-size: clamp(0.92rem, 3.2vw, 1.1rem);
    }
    .header-logo:not(:has(img)) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: min(9rem, 32vw);
    }
    .header-logo img {
        max-height: 32px !important;
        flex-shrink: 0;
    }
    .header-search {
        display: flex;
        flex: 1;
        min-width: 0;
        max-width: none;
    }
    .header-search input {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 0;
    }
    .header-search input::placeholder {
        font-size: 12px;
    }
    .header-search button {
        padding: 0 11px;
        flex-shrink: 0;
    }
    .cart-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    /* Catálogo: columna única */
    .catalog-layout { grid-template-columns: 1fr; }
    .btn-filter-toggle { display: flex; }
    /* Sidebar → drawer offcanvas */
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        border-radius: 0;
        overflow-y: auto;
        transition: left .3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.25);
    }
    .filters-sidebar.open { left: 0; }
    .filters-sidebar .filter-close { display: flex !important; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-info { padding: 10px; }
    .product-actions { padding: 0 10px 10px; }
    .product-name { font-size: 12px; }
    .product-price { font-size: 1rem; }
}

/* ── Cookie Consent Banner ─────────────────────────────────────── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--dark);
    color: rgba(255,255,255,.9);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0,0,0,.35);
    font-size: 13px;
    transform: translateY(100%);
    transition: transform .35s ease;
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner p { margin: 0; flex: 1 1 280px; line-height: 1.5; }
#cookie-banner a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn-accept {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: opacity .2s;
}
.cookie-btn-accept:hover { opacity: .85; }
.cookie-btn-reject {
    background: transparent;
    color: rgba(255,255,255,.65);
    border: 1px solid rgba(255,255,255,.25);
    padding: 9px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.cookie-btn-reject:hover { border-color: rgba(255,255,255,.6); color: #fff; }
@media (max-width: 600px) {
    #cookie-banner { padding: 14px 16px; gap: 12px; }
    .cookie-actions { width: 100%; justify-content: stretch; }
    .cookie-btn-accept, .cookie-btn-reject { flex: 1; text-align: center; }
}
