/* --- CONFIGURACIÓN DE COLORES MARCA --- */
:root {
    --brand-red: #A81818;      /* Rojo oscuro del banner */
    --brand-red-light: #D62828; /* Rojo brillante para botones */
    --bg-body: #F4F6F8;        /* Gris muy claro (mejor que blanco puro) */
    --bg-card: #FFFFFF;        /* Blanco puro para productos */
    --text-dark: #1F2937;      /* Gris oscuro para lectura */
    --accent-yellow: #FFD60A;  /* Amarillo para resaltar */
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --font-main: 'Rubik', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    color: var(--text-dark);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* --- HEADER --- */
#header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 1000;
    padding: 10px 0;
}

.navbar {
    display: flex; justify-content: space-between; align-items: center; gap: 15px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

.logo-img { height: 50px; width: auto; object-fit: contain; }

.search-box {
    flex-grow: 1; display: flex;
    background: #F3F4F6; border-radius: 8px;
    padding: 5px; max-width: 500px;
}
.search-box input {
    border: none; background: transparent; width: 100%; padding: 8px; outline: none; font-weight: 500;
}
.search-box button { background: var(--brand-red); color: #fff; width: 40px; border-radius: 6px; }

.cart-btn-container {
    display: flex; flex-direction: column; align-items: center; cursor: pointer;
}
.cart-icon { position: relative; font-size: 1.4rem; color: var(--brand-red); }
.badge {
    position: absolute; top: -8px; right: -8px;
    background: var(--accent-yellow); color: #000;
    font-size: 0.75rem; font-weight: 900;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.cart-text { font-size: 0.75rem; font-weight: 700; margin-top: 2px; }

/* --- HERO SECTION (BANNER ROJO) --- */
.hero-brand {
    background: linear-gradient(135deg, var(--brand-red) 0%, #800e0e 100%);
    color: #fff;
    text-align: center;
    padding: 40px 0;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); /* Corte diagonal moderno */
}

.hero-content h2 { font-size: 1.2rem; font-weight: 500; letter-spacing: 2px; margin-bottom: 5px; }
.hero-content h1 { font-size: 2.5rem; font-weight: 900; line-height: 1.1; text-transform: uppercase; margin-bottom: 25px; }
.highlight { color: var(--accent-yellow); }

.delivery-info-box {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 20px;
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.delivery-price { font-size: 1.4rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.small-text { font-size: 0.8rem; font-weight: 400; margin-top: 5px; opacity: 0.9; }

.phone-number {
    background: #fff; color: var(--brand-red);
    padding: 8px 20px; border-radius: 50px;
    font-size: 1.5rem; font-weight: 900;
    margin-top: 10px;
}

.badge-24h {
    margin-top: 25px;
    display: inline-block;
    background: var(--accent-yellow);
    color: #000;
    padding: 5px 15px;
    font-weight: 900;
    transform: rotate(-2deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Animación simple */
.animate-up { animation: fadeUp 0.8s ease forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* --- FILTROS (BOTONES) --- */
.sticky-nav { position: sticky; top: 75px; z-index: 900; background: var(--bg-body); padding: 15px 0; }
.filters-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.filters-scroll::-webkit-scrollbar { display: none; }

.filter-btn {
    background: #fff; border: 1px solid #ddd;
    padding: 10px 20px; border-radius: 50px;
    font-weight: 600; color: #555;
    white-space: nowrap; transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.filter-btn.active, .filter-btn:hover {
    background: var(--brand-red); color: #fff; border-color: var(--brand-red); transform: translateY(-2px);
}

/* --- PRODUCTOS --- */
.products-section { padding-bottom: 80px; }
.section-title { font-size: 1.8rem; margin-bottom: 20px; color: var(--text-dark); border-left: 5px solid var(--brand-red); padding-left: 15px; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid #eee;
    display: flex; flex-direction: column;
}

.product-card:hover { border-color: var(--brand-red); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

.img-container {
    height: 200px; padding: 10px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #fff 0%, #f9f9f9 100%);
}
.img-container img { max-height: 100%; max-width: 100%; object-fit: contain; }

.info { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.info h3 { font-size: 1rem; color: #333; margin-bottom: 5px; line-height: 1.3; }
.info .desc { font-size: 0.8rem; color: #777; margin-bottom: 15px; flex-grow: 1; }

.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { font-size: 1.3rem; font-weight: 900; color: var(--brand-red); }

.add-btn {
    background: var(--brand-red); color: #fff;
    width: 35px; height: 35px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s; font-size: 1.1rem;
}
.add-btn:active { transform: scale(0.9); background: #800e0e; }

/* --- CARRITO --- */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1100; display: none; }
.cart-overlay.active { display: block; }
.cart-sidebar {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 400px; height: 100%;
    background: #fff; z-index: 1200; transition: 0.3s; display: flex; flex-direction: column;
}
.cart-sidebar.active { right: 0; }

.cart-header { padding: 20px; background: var(--brand-red); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.close-cart { background: transparent; color: #fff; font-size: 1.5rem; }

.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; justify-content: space-between; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.item-info h4 { font-size: 0.9rem; margin-bottom: 5px; }

.cart-footer { padding: 20px; border-top: 1px solid #eee; background: #f9f9f9; }
.total-row { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 900; margin-bottom: 15px; }

.checkout-btn {
    width: 100%; background: #25D366; color: #fff;
    padding: 15px; border-radius: 50px; font-weight: 900; font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px;
    background: #25D366; color: #fff;
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 35px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 1000;
}
footer { text-align: center; padding: 20px; font-size: 0.8rem; color: #888; margin-top: 30px; }

@media (min-width: 768px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .hero-content h1 { font-size: 3.5rem; }
    .logo-img { height: 70px; }
}