:root {
    --primary: #0f172a;      
    --secondary: #0056ff;    
    --accent: #f59e0b;       
    --success: #10b981;      
    --danger: #ef4444;
    --purple: #8b5cf6;
    --bg-body: #f8fafc;      
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --brand-blue: #0056ff;
    --brand-blue-hover: #0046cc;
    --whatsapp-green: #25D366;
    --whatsapp-hover: #1EBE57;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Nunito', sans-serif; background-color: var(--bg-body); color: var(--text-main); margin: 0; padding: 0; overflow-x: hidden; scroll-behavior: smooth; width: 100%;}
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* HEADER */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);}
.nav { display: flex; justify-content: space-between; align-items: center; height: 75px; flex-wrap: wrap; }
.logo a { text-decoration: none; color: #111; font-size: 4.0rem; font-weight: 800; font-family: 'Montserrat', sans-serif; letter-spacing: -1px;}
.menu { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-left: auto; margin-right: 20px;}

.menu a { margin-left: 20px; text-decoration: none; color: #222; font-weight: 700; transition: 0.3s; font-size: 1.1rem; font-family: 'Montserrat', sans-serif; }
.menu a:hover, .menu a.active { color: var(--secondary); }

/* BANNER */
.banner-tienda { 
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 
    color: white; padding: 70px 20px; text-align: center; 
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    position: relative; overflow: hidden;
}
.banner-tienda::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(59,130,246,0.1) 0%, transparent 60%);
}
.banner-tienda h1 { font-family: 'Montserrat', sans-serif; font-size: 2.6rem; font-weight: 800; margin-bottom: 15px; position: relative; z-index: 2;}
.banner-tienda p { font-size: 1.1rem; max-width: 800px; margin: 0 auto; color: #cbd5e1; line-height: 1.6; position: relative; z-index: 2;}
.btn-politicas-banner {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 30px; padding: 12px 28px;
    background: rgba(255, 255, 255, 0.08); color: #ffffff; text-decoration: none;
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px; transition: all 0.3s ease;
    backdrop-filter: blur(10px); position: relative; z-index: 2;
}
.btn-politicas-banner i { color: var(--accent); font-size: 16px; }
.btn-politicas-banner:hover { background: #ffffff; color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

     /* --- COMPONENTES DEL MENÚ MÓVIL --- */
            .hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; z-index: 1001; border-radius: 8px; transition: background 0.2s; }
            .hamburger-btn:hover { background: #f1f5f9; }
            .hamburger-btn span { display: block; width: 25px; height: 3px; background: #0f172a; border-radius: 2px; }
            
            .mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 2000; opacity: 0; transition: 0.3s; backdrop-filter: blur(3px);}
            .mobile-menu-overlay.active { display: block; opacity: 1; }
            
            .mobile-menu-drawer { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: #fff; z-index: 2001; box-shadow: -5px 0 30px rgba(0,0,0,0.15); transition: right 0.3s; display: flex; flex-direction: column; overflow-y: auto; padding-top: 20px;}
            .mobile-menu-drawer.active { right: 0; }
            .mobile-menu-drawer .close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; }
            .mobile-menu-drawer a { display: block; padding: 15px 25px; font-family: 'Montserrat', sans-serif; font-weight: 700; color: #1e293b; text-decoration: none; border-bottom: 1px solid #f1f5f9; }
            
            /* Para iluminar la pestaña activa */
            .menu a.active, .mobile-menu-drawer a.active { color: #0056ff; }

/* ESTRUCTURA TIENDA CATALOGO */
.store-grid { display: grid; grid-template-columns: 260px 1fr; gap: 30px; margin-top: 40px; margin-bottom: 80px; transition: 0.3s;}
.filters { background: var(--card-bg); border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border); overflow: hidden; height: fit-content; position: sticky; top: 100px;}
.filter-header { display: flex; align-items: center; gap: 10px; padding: 20px; border-bottom: 1px solid var(--border); }
.filter-header i { color: var(--secondary); font-size: 18px; }
.filter-header h3 { font-family: 'Montserrat'; margin: 0; font-size: 16px; font-weight: 800; color: var(--primary); }
.filter-list { list-style: none; padding: 10px 0; margin: 0; max-height: 60vh; overflow-y: auto;}
.filter-list::-webkit-scrollbar { width: 4px; }
.filter-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.filter-list li { border-bottom: 1px solid #f1f5f9; }
.filter-list li:last-child { border-bottom: none; }
.filter-list a { text-decoration: none; color: var(--text-muted); font-size: 13px; font-weight: 700; display: block; padding: 12px 20px; transition: 0.2s; text-transform: uppercase;}
.filter-list a:hover, .filter-list a.active { background: #f8fafc; color: var(--secondary); border-left: 4px solid var(--secondary); padding-left: 16px;}

/* GRID PRODUCTOS */
.main-products-container { display: flex; flex-direction: column; gap: 40px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; align-items: start;}
.product-card { background: var(--card-bg); border-radius: 14px; border: 1px solid var(--border); transition: 0.3s; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.01);}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.07); border-color: var(--secondary); }
.product-img-box { position: relative; height: 200px; padding: 15px; border-bottom: 1px solid var(--border); display: flex; justify-content: center; align-items: center; background: white;}
.product-img-box img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.3s;}
.product-card:hover .product-img-box img.main-img { transform: scale(1.05); }
.product-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.product-brand { font-size: 11px; font-weight: 800; color: var(--secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;}
.product-title { font-size: 14px; font-weight: 700; color: var(--primary); margin: 0 0 15px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 38px; word-break: break-word; overflow-wrap: break-word;}
.price-box { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border); padding-top: 15px; flex-wrap: wrap; gap: 5px;}
.price-value { font-size: 20px; font-weight: 800; color: var(--primary); font-family: 'Montserrat'; word-break: break-word;}
.stock-badge { font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 20px; background: #e6fcf5; color: #0c8558; text-transform: uppercase;}
.stock-badge.out { background: #fff5f5; color: #c92a2a; }

/* Marcas de agua en tarjetas de catálogo */
.watermark-logo-top { position: absolute; top: 10px; left: 10px; width: 55px; height: auto; opacity: 0.5; z-index: 5; pointer-events: none; transition: opacity 0.3s; }
.watermark-logo-bottom { position: absolute; bottom: 10px; right: 10px; width: 40px; height: auto; opacity: 0.6; z-index: 5; pointer-events: none; transition: opacity 0.3s; }
.product-card:hover .watermark-logo-top, .product-card:hover .watermark-logo-bottom { opacity: 1; }

.pagination-container { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.page-link { padding: 10px 16px; background: #ffffff; border: 1px solid var(--border); border-radius: 8px; color: var(--text-main); font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.02);}
.page-link:hover { background: #f1f5f9; border-color: #cbd5e1; }
.page-link.active { background: var(--secondary); color: white; border-color: var(--secondary); box-shadow: 0 4px 12px rgba(0, 86, 255, 0.25); }

.btn-politicas-bottom { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin: 20px auto 0 auto; padding: 15px 35px; background: #ffffff; color: var(--primary); text-decoration: none; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 15px; border: 2px solid var(--border); border-radius: 50px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.04);}
.btn-politicas-bottom i { color: var(--secondary); font-size: 18px; }
.btn-politicas-bottom:hover { border-color: var(--secondary); color: var(--secondary); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,86,255,0.1);}


/* =========================================
   VISTA DETALLE (CSS GRID AREAS AVANZADO)
   ========================================= */
.product-view-container { display: none; margin-top: 40px; margin-bottom: 80px; animation: fadeIn 0.4s ease-out; width: 100%; box-sizing: border-box;}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.btn-volver-catalogo1 { display: flex; width: fit-content; margin: 0 auto 30px auto; align-items: center; gap: 10px; background: var(--secondary); border: none; padding: 12px 30px; border-radius: 50px; color: #ffffff; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 86, 255, 0.3); }
.btn-volver-catalogo1:hover { background: #0046d1; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0, 86, 255, 0.4);}

/* Layout Principal Grid Desktop */
.product-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 350px;
    grid-template-areas:
        "gallery info cart"
        "gallery badges cart"
        "gallery tabs cart";
    gap: 30px;
    background: white; border-radius: 16px; border: 1px solid var(--border); padding: 40px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); align-items: start; max-width: 100%; box-sizing: border-box;
}

/* Asignación de Áreas Base */
.item-gallery { grid-area: gallery; position: sticky; top: 100px; width: 100%; overflow: hidden;}
.item-info { grid-area: info; padding: 0 10px; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.item-cart { grid-area: cart; position: sticky; top: 100px; width: 100%;}
.item-badges { grid-area: badges; margin-top: 15px;}
.item-tabs { grid-area: tabs; width: 100%; overflow: hidden;}

/* Galería Interna (Corrección Posición Marcas) */
.gallery-container { display: flex; flex-direction: column; gap: 15px; width: 100%; position: relative;}
.main-image-wrapper { position: relative; width: 100%; height: 420px; display: flex; justify-content: center; align-items: center; border-radius: 12px; overflow: hidden; cursor: crosshair; background: #fff;}
.main-image-wrapper img#pv_img_main { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.1s ease-out; z-index: 2;}

/* Aseguramos que los contenedores de las marcas de agua estén bien fijados en detalle */
.pv-watermark-top { position: absolute !important; top: 20px !important; left: 20px !important; width: 70px !important; height: auto !important; z-index: 10 !important; pointer-events: none; }
.pv-watermark-bottom { position: absolute !important; bottom: 20px !important; right: 20px !important; width: 60px !important; height: auto !important; z-index: 10 !important; pointer-events: none; }

.zoom-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.3s; display: flex; justify-content: center; align-items: center; background: rgba(255,255,255,0.2); pointer-events: none; z-index: 10;}
.zoom-overlay i { background: white; padding: 15px; border-radius: 50%; box-shadow: 0 4px 15px rgba(0,0,0,0.1); color: var(--primary); font-size: 20px;}
.main-image-wrapper:hover .zoom-overlay { opacity: 0; } 

.gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: white; border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 11; box-shadow: 0 4px 10px rgba(0,0,0,0.05); color: var(--text-main); font-size: 16px; opacity: 0; transition: 0.3s;}
.main-image-wrapper:hover .gallery-nav-btn { opacity: 1; }
.gallery-nav-btn:hover { background: var(--secondary); color: white; border-color: var(--secondary); }
.gallery-nav-btn.prev { left: 10px; }
.gallery-nav-btn.next { right: 10px; }

.thumbnail-list { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 5px; justify-content: center; width: 100%;}
.thumbnail-list::-webkit-scrollbar { display: none; }
.thumb-item { width: 70px; height: 70px; flex-shrink: 0; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; transition: 0.2s; padding: 5px; }
.thumb-item img { width: 100%; height: 100%; object-fit: contain; }
.thumb-item.active { border-color: var(--secondary); box-shadow: 0 2px 8px rgba(0,86,255,0.2);}

/* Detalles y Etiquetas Centrales */
.pv-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pv-tag { font-size: 10.5px; background: #e2e8f0; color: var(--text-muted); padding: 4px 10px; border-radius: 50px; font-weight: 800; cursor: pointer; transition: 0.3s; text-transform: uppercase;}
.pv-tag:hover { background: var(--secondary); color: white; }

.pv-brand { font-size: 13px; font-weight: 800; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; display: block;}
.pv-title { font-family: 'Montserrat'; font-size: 26px; font-weight: 800; color: var(--primary); margin: 0 0 12px 0; line-height: 1.3; word-break: break-word; overflow-wrap: break-word; hyphens: auto;}
.pv-sku { font-size: 12px; color: var(--text-muted); font-family: monospace; background: #f1f5f9; padding: 6px 12px; border-radius: 6px; display: inline-block; font-weight: bold;}

/* Corrección Precio (Evitar Desborde) */
.pv-price-box { border: 2px solid #34d399; border-radius: 12px; padding: 15px; text-align: center; margin-bottom: 25px; background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.05); display: flex; flex-direction: column; align-items: center;}
.pv-price-label { font-size: 12px; color: #065f46; font-weight: 800; display: block; margin-bottom: 5px; text-transform: uppercase;}
.pv-price-value { font-family: 'Montserrat'; font-size: clamp(24px, 4vw, 36px); font-weight: 800; color: #064e3b; margin: 0; word-break: break-all; line-height: 1;}

/* Botones de Acción (Blanco y Azul) */
.pv-action-grid { display: flex; gap: 10px; margin-bottom: 25px; align-items: center; flex-wrap: wrap;}
.action-icon-btn { display: flex; justify-content: center; align-items: center; width: 45px; height: 45px; flex-shrink: 0; background: #ffffff; color: var(--brand-blue); border: 2px solid var(--brand-blue); border-radius: 8px; font-size: 18px; cursor: pointer; transition: 0.2s; position: relative;}
.action-icon-btn:hover { background: var(--brand-blue); color: white; transform: translateY(-2px); }
.action-icon-btn.wishlist.active i { color: var(--danger); font-weight: 900; }

.btn-whatsapp-advisor { flex-grow: 1; height: 45px; min-width: 200px; background: var(--whatsapp-green); color: white; border: none; border-radius: 8px; display: flex; justify-content: center; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: 0.2s;}
.btn-whatsapp-advisor:hover { background: var(--whatsapp-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);}

.action-tooltip { visibility: hidden; opacity: 0; position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; transition: 0.2s; z-index: 100; pointer-events: none; font-family: 'Nunito', sans-serif;}
.action-icon-btn:hover .action-tooltip { visibility: visible; opacity: 1; bottom: 125%; }

.share-popover { display: none; position: absolute; top: 110%; left: 0; background: white; border: 1px solid var(--border); box-shadow: 0 10px 25px rgba(0,0,0,0.15); border-radius: 8px; padding: 10px; z-index: 100; min-width: 180px; flex-direction: column; text-align: left;}
.share-popover.show { display: flex; animation: slideUp 0.2s ease;}
.share-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px; color: var(--text-main);}
.share-header button { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 14px;}
.share-option { display: flex; align-items: center; gap: 12px; padding: 10px; color: var(--text-main); text-decoration: none; font-size: 13px; font-weight: 600; border-radius: 6px; transition: 0.2s;}
.share-option:hover { background: #f1f5f9; }

/* Trust Badges */
.trust-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 20px; width: 100%;}
.trust-badge { display: flex; flex-direction: row; align-items: center; text-align: left; background: white; border: 1px solid #f1f5f9; padding: 15px; border-radius: 12px; gap: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.01);}
.trust-icon { width: 40px; height: 40px; flex-shrink: 0; background: #eff6ff; color: var(--brand-blue); display: flex; justify-content: center; align-items: center; border-radius: 8px; font-size: 16px; }
.trust-text h5 { font-family: 'Montserrat'; font-weight: 700; font-size: 12px; color: var(--primary); margin: 0 0 3px 0;}
.trust-text p { font-size: 10px; color: var(--text-muted); margin: 0; line-height: 1.2;}

/* Tabs (Pestañas) */
.tabs-container { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 20px; width: 100%; overflow: hidden;}
.tabs-header { display: flex; gap: 20px; border-bottom: 2px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs-header::-webkit-scrollbar { display: none; }
.tab-btn { background: none; border: none; font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 800; color: var(--text-muted); padding: 10px 0; cursor: pointer; position: relative; transition: 0.3s; white-space: nowrap;}
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 3px; background: var(--secondary); border-radius: 3px 3px 0 0;}
.tab-content { display: none; padding: 25px 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.8; white-space: pre-line; word-break: break-word; overflow-wrap: break-word;}
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }
.tab-content strong { color: var(--primary); font-family: 'Montserrat'; font-size: 15px; display: block; margin-bottom: 10px;}

/* Controles Tienda Laterales (Carrito) */
.pv-action-box { background: #f8fafc; border-radius: 12px; padding: 25px; border: 1px solid var(--border); display: flex; flex-direction: column; height: fit-content; box-sizing: border-box; width: 100%;}
.stock-header { background: white; border: 1px solid var(--border); padding: 15px; border-radius: 12px; text-align: center; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.02);}
.stock-header h4 { margin: 0 0 5px 0; color: var(--secondary); font-family: 'Montserrat'; font-size: 14px; font-weight: 800;}
.stock-title { font-family: 'Montserrat'; font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 12px;}
.stock-list { list-style: none; padding: 0; margin: 0; margin-bottom: 25px;}
.stock-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; margin-bottom: 8px; background: #ffffff; border-radius: 10px; border: 2px solid var(--border); font-size: 13px; box-shadow: 0 2px 5px rgba(0,0,0,0.01); transition: 0.2s; cursor: pointer; user-select: none;}
.stock-list li:hover { border-color: #93c5fd; transform: translateY(-2px); }
.stock-list li.selected { border-color: var(--secondary); background: #eff6ff; }
.s-name { font-weight: 700; color: var(--text-main); pointer-events: none;}
.s-qty { font-weight: 800; font-family: 'Montserrat'; color: #047857; background: #d1fae5; padding: 4px 8px; border-radius: 6px; pointer-events: none;}
.s-qty.zero { color: #b91c1c; background: #fee2e2; }

.logistics-info-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 20px;}
.logistic-item { display: flex; justify-content: space-between; align-items: center; background: white; padding: 12px 15px; border-radius: 10px; border: 2px solid var(--border); box-shadow: 0 2px 5px rgba(0,0,0,0.02); cursor: pointer; transition: 0.2s; user-select: none;}
.logistic-item:hover { border-color: #93c5fd; transform: translateY(-2px); }
.logistic-item.active { border-color: var(--secondary); background: #eff6ff; }
.logistic-item span { font-weight: 600; font-size: 13px; pointer-events: none;}
.info-icon { font-size: 11px; color: #94a3b8; margin-left: 4px; transition: 0.3s;}
.logistic-item:hover .info-icon { color: var(--secondary); }
.stock-list li:hover .info-icon { color: var(--secondary); }
.badge-status { color: var(--text-muted); background: #e2e8f0; padding: 4px 8px; border-radius: 6px; font-size: 10px; text-transform: uppercase; font-weight: 800; transition: 0.3s; pointer-events: none;}
.badge-status.active { color: white; background: var(--secondary); }
.pickup-notification { font-size: 11.5px; color: #b45309; margin-bottom: 20px; text-align: left; font-weight: 700; background: #fef3c7; padding: 12px; border-radius: 8px; border: 1px dashed #f59e0b; transition: 0.3s; line-height: 1.4;}

#action-buttons-container { display: flex; flex-direction: column; gap: 12px; width: 100%;}
.btn-add-cart { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; background: var(--secondary); color: white; border: none; padding: 16px; border-radius: 12px; font-family: 'Montserrat'; font-weight: 800; font-size: 15px; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 15px rgba(0, 86, 255, 0.3);}
.btn-add-cart:hover { background: #0046d1; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 86, 255, 0.4);}
.btn-add-cart:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-whatsapp { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; background: var(--success); color: white; border: none; padding: 16px; border-radius: 12px; font-family: 'Montserrat'; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; transition: 0.3s; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); box-sizing: border-box;}
.btn-whatsapp:hover { background: #059669; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);}

/* PRODUCTOS RECOMENDADOS CARRUSEL */
        .related-products-section { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border); }
        .related-products-section h3 { font-family: 'Montserrat'; font-size: 20px; font-weight: 900; color: var(--primary); margin-bottom: 25px; text-transform: uppercase;}

        .related-wrapper { position: relative; display: flex; align-items: center; margin: 0 -15px; } 
        .related-grid { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; padding: 15px; scrollbar-width: none; -ms-overflow-style: none; width: 100%;}
        .related-grid::-webkit-scrollbar { display: none; }
        
        .related-card { flex: 0 0 calc(25% - 15px); scroll-snap-align: start; border: 1px solid var(--border); border-radius: 12px; padding: 15px; display: flex; flex-direction: column; transition: 0.3s; background: white; min-width: 0; position: relative;}
        .related-card:hover { border-color: var(--brand-blue); box-shadow: 0 8px 20px rgba(0,86,255,0.08);}
        
        .btn-wishlist-float { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 18px; color: #cbd5e1; cursor: pointer; z-index: 10; transition: 0.3s;}
        .btn-wishlist-float:hover, .btn-wishlist-float.active { color: var(--brand-blue); }
        .related-tag { position: absolute; top: 15px; left: 15px; background: var(--brand-blue); color: white; font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; z-index: 10; font-family: 'Montserrat';}
        
        .r-img { height: 130px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; padding: 10px; cursor: pointer;}
        .r-img img { max-height: 100%; max-width: 100%; object-fit: contain;}
        .r-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; line-height: 1.4; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; cursor: pointer;}
        .r-price { font-family: 'Montserrat', sans-serif; font-weight: 900; color: var(--primary); font-size: 18px; margin-bottom: 15px;}
        
        .btn-add-rel { background: white; color: var(--brand-blue); border: 2px solid var(--brand-blue); padding: 10px; border-radius: 8px; font-weight: 800; cursor: pointer; width: 100%; font-family: 'Montserrat', sans-serif; transition: 0.3s; font-size: 13px; text-transform: uppercase;}
        .btn-add-rel:hover { background: var(--brand-blue); color: white; }

        .carousel-btn { position: absolute; z-index: 10; width: 40px; height: 40px; border-radius: 50%; background: white; border: 1px solid var(--border); color: var(--brand-blue); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: 0.2s; font-size: 16px;}
        .carousel-btn:hover { background: var(--brand-blue); color: white; border-color: var(--brand-blue); box-shadow: 0 4px 12px rgba(0, 86, 255, 0.2);}
        .carousel-btn.left { left: -10px; }
        .carousel-btn.right { right: -10px; }

/* CARRITO Y POPOVER */
.cart-floating-container { position: fixed; bottom: 20px; left: 20px; z-index: 1000; }
.cart-popover { display: none; position: absolute; bottom: 80px; left: 0; background: white; border-radius: 12px; padding: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); border: 1px solid var(--border); width: 220px; flex-direction: column; gap: 10px; }
.cart-popover.show { display: flex; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.pop-btn { text-align: center; padding: 12px; border-radius: 8px; font-weight: 800; font-family: 'Montserrat', sans-serif; font-size: 13px; text-decoration: none; transition: 0.2s; }
.pop-btn.outline { border: 2px solid var(--brand-blue); color: var(--brand-blue); background: white; }
.pop-btn.outline:hover { background: #f1f5f9; }
.pop-btn.solid { border: none; color: white; background: var(--brand-blue); }
.pop-btn.solid:hover { background: var(--brand-blue-hover); }

.cart-floating-btn { background-color: var(--brand-blue); color: white; width: 65px; height: 65px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; box-shadow: 0 4px 15px rgba(0,86,255,0.4); cursor: pointer; transition: 0.3s; border: 3px solid white;}
.cart-floating-btn:hover { transform: scale(1.1); background-color: var(--brand-blue-hover);}
.cart-badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; font-family: 'Montserrat'; font-size: 12px; font-weight: 800; width: 24px; height: 24px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 2px solid white; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);}

/* 🟢 WISHLIST DRAWER Y MODAL */
.wishlist-drawer { position: fixed; top: 0; right: -400px; width: 100%; max-width: 380px; height: 100%; background: #fff; z-index: 3000; box-shadow: -5px 0 30px rgba(0,0,0,0.15); transition: right 0.3s ease; display: flex; flex-direction: column; font-family: 'Nunito', sans-serif;}
.wishlist-drawer.active { right: 0; }
.wishlist-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: white; }
.wishlist-header h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif;}
.wishlist-header .close-wishlist { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); transition: 0.2s;}
.wishlist-header .close-wishlist:hover { color: var(--danger); }
.wishlist-body { flex: 1; overflow-y: auto; padding: 20px; background: #f8fafc; }
.wishlist-footer { padding: 20px; background: white; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; align-items: center;}

.wishlist-empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.wishlist-empty-circle { width: 80px; height: 80px; background: #f1f5f9; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 20px; }
.wishlist-empty-circle i { font-size: 35px; color: #cbd5e1; }
.wishlist-empty h3 { font-size: 18px; color: var(--primary); margin-bottom: 10px; font-weight: 800; font-family: 'Montserrat', sans-serif;}
.wishlist-empty p { font-size: 14px; color: var(--text-muted); margin-bottom: 25px; }
.wishlist-empty button { background: var(--brand-blue); color: white; border: none; padding: 12px 25px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.3s; font-family: 'Montserrat', sans-serif; width: 100%;}
.wishlist-empty button:hover { background: var(--brand-blue-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,86,255,0.2);}

.wishlist-item { background: white; border-radius: 10px; border: 1px solid var(--border); padding: 15px; margin-bottom: 15px; display: flex; gap: 15px; align-items: center; transition: 0.2s; }
.wishlist-item img { width: 60px; height: 60px; object-fit: contain; border-radius: 6px; border: 1px solid #f1f5f9; padding: 2px; }
.wishlist-item-info { flex: 1; }
.wishlist-item-title { font-size: 13px; font-weight: 700; color: var(--primary); margin: 0 0 5px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wishlist-item-sku { font-size: 11px; color: var(--text-muted); }
.wishlist-item-actions { display: flex; flex-direction: column; gap: 10px; }
.wishlist-item-actions button { background: none; border: none; cursor: pointer; transition: 0.2s; }
.wishlist-item-actions .view-btn { color: var(--brand-blue); font-size: 16px; }
.wishlist-item-actions .del-btn { color: var(--danger); font-size: 16px; opacity: 0.7;}
.wishlist-item-actions .del-btn:hover { opacity: 1; }

.btn-limpiar-lista { flex: 1; background: white; color: var(--brand-blue); border: 2px solid var(--brand-blue); padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.3s; font-family: 'Montserrat', sans-serif; font-size: 13px;}
.btn-limpiar-lista:hover { background: #f1f5f9; }
.wishlist-btn-seguir { flex: 1; background: var(--brand-blue); color: white; border: none; padding: 14px; border-radius: 8px; font-weight: 800; cursor: pointer; transition: 0.3s; font-family: 'Montserrat', sans-serif; font-size: 13px;}
.wishlist-btn-seguir:hover { background: var(--brand-blue-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,86,255,0.2);}

.confirm-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 4000; display: none; justify-content: center; align-items: center; backdrop-filter: blur(3px); }
.confirm-modal { background: white; padding: 30px; border-radius: 16px; text-align: center; width: 90%; max-width: 350px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.confirm-modal i { font-size: 40px; color: var(--danger); margin-bottom: 15px; }
.confirm-modal h3 { margin: 0 0 10px 0; font-family: 'Montserrat'; font-weight: 800; color: var(--primary); }
.confirm-modal p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.confirm-btns { display: flex; gap: 10px; justify-content: center; }
.confirm-btns button { flex: 1; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; border: none; transition: 0.2s; font-family: 'Montserrat', sans-serif;}
.btn-confirm-cancel { background: #f1f5f9; color: var(--text-main); }
.btn-confirm-cancel:hover { background: #e2e8f0; }
.btn-confirm-yes { background: var(--danger); color: white; }
.btn-confirm-yes:hover { background: #dc2626; }

/* ================= FOOTER ================= */
.footer {
    background: #f2f2f2;
    padding: 30px 0;
}

.footer-search {
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #cfcfcf;
}

.footer-search img {
    width: 120px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.footer-grid h4 {
    margin-bottom: 12px;
}

.footer a {
    display: block;
    margin: 6px 0;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
}

.footer a:hover {
    color: #0056ff;
}

/* ================= FOOTER SOCIAL ================= */
.footer-social {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.footer-social a:hover {
    transform: translateY(-4px);
    background: #0056ff;
}

.footer-social img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ================= PROVEEDORES LOGOS ================= */
.proveedores-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.proveedores-logos img {
    width: 100%;
    height: 55px;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    border-radius: 10px;
}

/* ================= WHATSAPP ================= */

.whatsapp-float { position: fixed; bottom: 20px; right: 20px; background-color: #25d366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 32px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); text-decoration: none; z-index: 100; transition: 0.3s; }
.whatsapp-float:hover { transform: scale(1.1); background-color: #1ebe57; color: white;}

/* CONTROLES Y HAMBURGUESA */
.store-controls { display: flex; gap: 15px; margin-bottom: 25px; align-items: center; flex-wrap: wrap;}
.btn-toggle-sidebar { background: white; border: 1px solid var(--border); padding: 12px 20px; border-radius: 10px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px; color: var(--primary); cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px;}
.btn-toggle-sidebar:hover { background: #f1f5f9; }
.search-bar-tienda { flex: 1; display: flex; align-items: center; background: white; border: 1px solid var(--border); border-radius: 10px; padding: 0 15px; overflow: hidden;}
.search-bar-tienda:focus-within { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0, 86, 255, 0.1); }
.search-bar-tienda i { color: var(--text-muted); font-size: 16px;}
.search-bar-tienda input { flex: 1; border: none; padding: 14px 10px; font-family: 'Nunito', sans-serif; font-size: 15px; outline: none; background: transparent; color: var(--text-main);}
.store-grid.collapsed { grid-template-columns: 1fr; }
.store-grid.collapsed .filters { display: none; }

.hamburger, .hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; z-index: 1001; border-radius: 8px; transition: background 0.2s; }
.hamburger:hover, .hamburger-btn:hover { background: #f1f5f9; }
.hamburger span, .hamburger-btn span { display: block; width: 25px; height: 3px; background: var(--primary); border-radius: 2px; }
.mobile-overlay, .mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 2000; opacity: 0; transition: 0.3s; backdrop-filter: blur(3px);}
.mobile-overlay.active, .mobile-menu-overlay.active { display: block; opacity: 1; }
.mobile-menu-drawer { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: #fff; z-index: 2001; box-shadow: -5px 0 30px rgba(0,0,0,0.15); transition: right 0.3s; display: flex; flex-direction: column; overflow-y: auto; padding-top: 20px;}
.mobile-menu-drawer.active { right: 0; }
.mobile-menu-drawer .close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; }

.mobile-menu-drawer a { display: block; padding: 15px 25px; font-family: 'Montserrat'; font-weight: 700; color: var(--text-main); text-decoration: none; border-bottom: 1px solid #f1f5f9; font-size: 1.15rem;}

/* =========================================
   RESPONSIVE GRID (COMPUTADORA -> TABLET -> MOVIL)
   ========================================= */
@media (max-width: 1366px) {
    .menu { display: none !important; }
    .hamburger, .hamburger-btn { display: flex !important; }
    .nav { justify-content: space-between; flex-wrap: nowrap; }
}

@media (max-width: 1024px) { /* TABLET LANDSCAPE/PORTRAIT */
    .product-view-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "gallery info"
            "badges badges"
            "cart cart"
            "tabs tabs";
        gap: 20px;
        padding: 30px;
    }
    .item-gallery, .item-info, .item-cart, .item-badges, .item-tabs { position: static; width: 100%; max-width: 100%; box-sizing: border-box;}
    .item-info { padding: 0; }
    
    .trust-badges { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
    .logistics-info-box { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    .related-card { flex: 0 0 calc(33.333% - 14px); }
}

@media (max-width: 768px) { /* TELEFONO */
    .container { width: 92%; }
    .nav { height: 70px; padding: 0 5px; }
    .logo a { font-size: 3.0rem; }
    
    .store-grid { grid-template-columns: 1fr; margin-bottom: 40px;}
    .filters { display: none; position: static; width: 100%; margin-bottom: 20px; z-index: 10; top: auto; }
    .filters.show-mobile { display: block; }
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .product-card { border-radius: 10px; }
    .product-img-box { height: 130px; padding: 10px; }
    .product-info { padding: 12px; }
    .product-title { font-size: 12px; height: 34px; margin-bottom: 8px; }
    .stock-badge { font-size: 9px; padding: 3px 6px; }
    
    .product-view-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "gallery"
            "info"
            "cart"
            "badges"
            "tabs";
        padding: 20px 15px;
        gap: 25px;
    }
    .pv-action-box { padding: 20px 15px;}
    .trust-badges { grid-template-columns: 1fr; }
    .logistics-info-box { grid-template-columns: 1fr; }
    
    /* Corrección precio móvil estricta */
    .pv-price-value { font-size: 32px !important; line-height: 1; word-break: break-all;}
    .price-value { font-size: 18px; word-break: break-all;}
    
    .badge-oferta{
    display:block;
    width:max-content;
    margin-top:6px;
}
    
    /* Ajustes Botones Móvil */
    .pv-action-grid { display: flex; flex-wrap: wrap; gap: 10px; height: auto;}
    .action-icon-btn { flex: 1; min-width: 45px;}
    .btn-whatsapp-advisor { flex: 100%; margin-top: 5px; min-width: 100%;}
    
    /* Ajustes Galería Móvil */
    .main-image-wrapper { height: 300px; touch-action: pan-y pinch-zoom; }
    .gallery-nav-btn { display: none; }
    
    /* Carrusel móvil */
    .related-wrapper { padding: 0; }
    .footer-grid { text-align: center; gap: 30px;}
    .footer a:hover { transform: none; }
    .footer-social { justify-content: center; }
    .proveedores-logos { margin: 0 auto; max-width: 250px;}
    
    .related-card { flex: 0 0 calc(50% - 10px); padding: 10px;}
    .r-img { height: 110px; }
    .carousel-btn { display: none; }
}

/* ========================================================================= */
/* --- RESPONSIVE DEL FOOTER --- */
/* ========================================================================= */

/* TABLETS */
@media (max-width: 992px) {
    .footer-grid { 
        grid-template-columns: 1fr 1fr; 
    }
}

/* MÓVILES */
@media (max-width: 768px) {
    .footer { 
        padding: 40px 0; 
    }
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 25px; 
    }
    .footer-grid div { 
        text-align: center; 
    }
    .footer-search { 
        display: flex; 
        justify-content: center; 
    }
    .footer-social { 
        justify-content: center; 
    }
    .proveedores-logos { 
        max-width: 220px; 
        margin: auto; 
    }
}