/* ── VARIABLES Y CONFIGURACIÓN GENERAL ── */
:root {
    --primary: #007bff;
    --secondary: #2c3e50;
    --success: #27ae60;
    --bg: #f4f7f6;
    --dark: #1a252f;
    --danger: #dc3545;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg);
    margin: 0;
    color: var(--secondary);
}

.barlow {
    font-family: 'Barlow Condensed', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ── BARRA DE ASISTENCIA / AUXILIO ── */
.auxilio-bar {
    background-color: var(--danger);
    color: white;
    font-size: 0.9rem;
    padding: 8px 0;
}

.auxilio-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.auxilio-bar__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auxilio-bar__pulse {
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
}

.auxilio-bar__btn {
    background: white;
    color: var(--danger);
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.auxilio-bar__btn:hover {
    background: #f8d7da;
}

/* ── HEADER Y CONTROL DEL LOGO (SOLUCIÓN) ── */
.header {
    background: var(--secondary);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px; /* Cabecera controlada y compacta */
}

.header__logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

/* Restricción estricta de tamaño para que el logo no desborde */
.header__logo {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.header__brand {
    display: flex;
    flex-direction: column;
}

.header__brand-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
}

.header__brand-sub {
    font-size: 0.8rem;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── NAVEGACIÓN PRINCIPAL ── */
.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav__link {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav__link:hover {
    color: var(--primary);
}

/* Botón Pedido/Carrito */
.header__pedido-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.header__pedido-btn:hover {
    background: #0056b3;
}

.header__pedido-btn--mobile {
    display: none; /* Oculto en PC */
}

.header__cart-badge {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Menú hamburguesa oculto por defecto para PC */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle__line {
    width: 22px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* ── BUSCADOR Y GRILLA (TUS ESTILOS ORIGINALES) ── */
.search-container {
    margin: 25px 0;
    text-align: center;
}

#search {
    padding: 12px 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 30px 0;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eef2f5;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--secondary);
    line-height: 1.4;
}

.sku {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.price {
    font-size: 1.5rem;
    color: var(--success);
    font-weight: bold;
    margin: 10px 0;
}

.btn-add {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-add:hover {
    background: #0056b3;
}

/* ── FOOTER ESTRUCTURAL ── */
.footer {
    background: var(--dark);
    color: #a0aab2;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__title {
    color: white;
    font-size: 1.8rem;
    margin: 0 0 15px 0;
}

.footer__subtitle {
    color: white;
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer__text {
    line-height: 1.6;
}

.footer__links, .footer__info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: #a0aab2;
    text-decoration: none;
    transition: color 0.2s;
}

.footer__links a:hover {
    color: white;
}

.footer__info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer__info svg {
    color: var(--primary);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    font-size: 0.85rem;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer__bottom-dev a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* ── RESPONSIVE (CELULARES Y TABLETS) ── */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex; /* Muestra hamburguesa */
    }

    .nav {
        display: none; /* Oculta menú en móviles por defecto */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--secondary);
        padding: 20px;
        box-sizing: border-box;
        border-top: 1px solid rgba(255,255,255,0.05);
    }

    .header__pedido-btn {
        display: none; /* Oculta botón principal en móvil */
    }

    .header__pedido-btn--mobile {
        display: flex; /* Muestra botón dentro del menú móvil */
        width: 100%;
        justify-content: center;
    }
}