/* ==========================================
   RESET & VARIABLES GLOBALES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    /* Paleta de Colores de Marca */
    --primary-blue: #0088ff;
    --primary-dark: #0e3d6c;
    --accent-green: #00e676;
    --whatsapp-green: #25d366;
    
    /* Fondos */
    --bg-light: #f8fafc;
    --bg-dark: #050b14;
    --bg-footer-bottom: #004d61;
    --bg-card: #ffffff;
    
    /* Textos y Bordes */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #ffffff;
    --border-color: #e5e7eb;
    
    /* Bordes Redondeados */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   HEADER PRINCIPAL (TOP HEADER)
   ========================================== */
.top-header {
    background-color: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img.logo {
    max-height: 48px;
    width: auto;
}

.brand-info h2 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.brand-info p strong {
    color: var(--accent-green);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   BARRA DE BÚSQUEDA (INTEGRADA EN HEADER)
   ========================================== */
.search-form {
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2px 8px 2px 14px;
    width: 100%;
    max-width: 300px;
    transition: all 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15);
    background-color: #ffffff;
}

.search-form input {
    border: none;
    background: transparent;
    outline: none;
    padding: 6px 0;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-main);
}

.search-form button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-form button:hover {
    color: var(--primary-blue);
}

.icon-btn {
    background: #f1f5f9;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.icon-btn:hover {
    background: #e2e8f0;
    color: var(--primary-blue);
}

.btn-header-login {
    background: #0ea5e9;
    color: var(--text-light);
    padding: 8px 18px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
}

.btn-header-login:hover {
    background: #0284c7;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==========================================
   SUBBAR DE NAVEGACIÓN
   ========================================== */
.nav-subbar {
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    border-bottom: 2px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    display: block;
    padding: 14px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-links li a:hover, 
.nav-links li a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.btn-whatsapp {
    background: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    padding: 6px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-whatsapp:hover {
    background: rgba(0, 230, 118, 0.1);
}

/* ==========================================
   PANEL LATERAL DEL CARRITO (OFFCANVAS)
   ========================================== */
.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.cart-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 380px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.cart-sidebar.active {
    right: 0;
}

/* Header del Carrito */
.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.btn-close-cart {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.btn-close-cart:hover {
    color: var(--text-main);
}

/* Cuerpo del Carrito */
.cart-sidebar-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 30px;
    line-height: 1.5;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.item-details h4 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--text-main);
}

.item-details p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-total {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-blue);
}

/* Footer del Carrito */
.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.cart-garantias {
    margin-bottom: 15px;
}

.cart-garantias p {
    margin: 4px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-garantias i {
    color: var(--primary-blue);
}

.cart-resumen-precios {
    margin: 15px 0;
}

.linea-monto {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 6px;
}

.linea-monto.total-destacado {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
}

/* Botón Verde para el Carrito */
.btn-realizar-pedido-verde {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: #23d160; /* Verde brillante como el de tu captura */
    color: #ffffff;
    padding: 14px;
    border-radius: 25px; /* Bordes redondeados píldora */
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(35, 209, 96, 0.25);
}

.btn-realizar-pedido-verde:hover {
    background-color: #1fbe56;
    color: #ffffff;
}
/* Color verde para el texto del total si aplica */
.total-texto-verde {
    color: #0088ff;
    font-size: 1.25rem;
    font-weight: 800;
}
/* ==========================================
   PIE DE PÁGINA (FOOTER)
   ========================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: #94a3b8;
    margin-top: auto;
    font-size: 0.85rem;
}

/* 1. Beneficios Superiores */
.footer-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    background: #080e1a;
    padding: 20px 5%;
    border-bottom: 1px solid #1f2937;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.benefit-item i {
    font-size: 1.3rem;
    color: #38bdf8;
}

/* 2. Secciones Principales */
.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 40px 5%;
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #9ca3af;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--text-light);
}

.contact-info li {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.contact-info i {
    color: #38bdf8;
    margin-top: 3px;
}

.whatsapp-link {
    color: var(--accent-green);
    font-weight: bold;
}

/* Iconos de Redes y Métodos de Pago */
.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-btn {
    width: 32px;
    height: 32px;
    background: #1e293b;
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.social-btn:hover {
    background: var(--primary-blue);
}

.payment-methods {
    display: flex;
    gap: 6px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.payment-badge {
    background: #1e293b;
    color: #cbd5e1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 3. Marcas y Divisiones */
.footer-brands {
    background: #030712;
    padding: 15px 5%;
    display: flex;
    gap: 20px;
    align-items: center;
    border-top: 1px solid #1f2937;
    color: #64748b;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.footer-brands strong {
    color: var(--text-light);
}

/* 4. Pie Final y Copyright */
.footer-bottom {
    background: var(--bg-footer-bottom);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e0f2fe;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-links {
    display: flex;
    gap: 15px;
}

.legal-links a {
    color: #e0f2fe;
    transition: opacity 0.2s;
}

.legal-links a:hover {
    opacity: 0.8;
}

.admin-btn {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Imágenes de fondo individuales para cada slide */
.hero-slide.slide-1 {
    background-image: url('img/fondo.jpeg');
}

.hero-slide.slide-2 {
    background-image: url('../img/2.png');
}

.hero-slide.slide-3 {
    background-image: url('../img/3.png');
}
