/* ============================================================
   ESTILOS COMPARTIDOS: encabezado y menú desplegable
   Usado por index.php, servicios.php y ubicacion.php
   ============================================================ */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

input[type="radio"], input[type="checkbox"] {
    accent-color: #f5765a;
    width: 18px; 
    height: 18px;
    cursor: pointer;
}

body { 
    font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; 
    background: #ffffff; 
    color: #1a1a2e; 
    padding-top: 74px; 
}

/* Control de visibilidad Responsiva */
.mobile-hide { 
    display: none !important; 
}

/* ------------------------------------------------------------
   ENCABEZADO / HEADER
   ------------------------------------------------------------ */
.top-fixed {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0;
    z-index: 40;
    transform: translateZ(0);
    will-change: transform;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

header {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

header .icon-btn {
    background: none; 
    border: none; 
    color: #1a1a2e; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: relative;
    padding: 6px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

header .icon-btn:hover {
    background-color: #f5f5f7;
}

header .icon-btn svg { 
    width: 26px; 
    height: 26px; 
}

.badge-carrito {
    position: absolute; 
    top: -4px; 
    right: -6px;
    background: #f5765a; 
    color: #ffffff; 
    font-size: 11px; 
    font-weight: 800;
    min-width: 18px; 
    height: 18px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 0 4px; 
    line-height: 1;
}

@keyframes agitar-carrito {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(12deg); }
    60% { transform: rotate(-10deg); }
    80% { transform: rotate(6deg); }
}

header .icon-btn.agitando { 
    animation: agitar-carrito 0.5s ease-in-out; 
    transform-origin: 50% 50%; 
}

.logo-pagina {
    display: block; 
    max-width: 200px; 
    max-height: 80px; 
    width: auto; 
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

/* ------------------------------------------------------------
   MENÚ DESPLEGABLE / OVERLAY (MÓVIL)
   ------------------------------------------------------------ */
.menu-overlay {
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.4); 
    z-index: 60;
    backdrop-filter: blur(2px);
}

.menu-overlay.active { 
    display: block; 
}

.menu-panel {
    position: fixed; 
    top: 0; 
    left: 0; 
    bottom: 0; 
    width: 78%; 
    max-width: 320px;
    background: #1565C0; 
    color: #fff; 
    padding: 28px 24px; 
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}

.menu-close { 
    text-align: right; 
    margin-bottom: 24px; 
}

.menu-close button {
    background: none; 
    border: none; 
    color: #fff; 
    font-size: 26px; 
    cursor: pointer; 
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.menu-close button:hover {
    opacity: 1;
}

.menu-links { 
    display: flex; 
    flex-direction: column; 
    gap: 22px; 
}

.menu-links a {
    color: #fff; 
    text-decoration: none; 
    font-size: 18px; 
    font-weight: 600;
    display: flex; 
    align-items: center; 
    gap: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.menu-links a:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.menu-links svg { 
    width: 22px; 
    height: 22px; 
    flex-shrink: 0; 
}

body.scroll-bloqueado { 
    overflow: hidden; 
    height: 100%; 
}

/* ============================================================
   MEJORAS ESPECÍFICAS PARA PC Y PANTALLAS ANCHAS (>= 768px)
   ============================================================ */
@media (min-width: 768px) {
    body {
        padding-top: 86px;
    }

    .desktop-hide { 
        display: none !important; 
    }
    
    .mobile-hide { 
        display: flex !important; 
    }

    /* Centra y limita el ancho del header en PC */
    header {
        max-width: 1280px;
        margin: 0 auto;
        padding: 16px 32px;
    }

    .logo-pagina {
        max-width: 240px;
        max-height: 90px;
        margin: 0;
    }

    /* Navegación Horizontal Directa */
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 28px;
    }

    .nav-desktop a {
        text-decoration: none;
        color: #1a1a2e;
        font-weight: 600;
        font-size: 16px;
        transition: color 0.2s ease;
        padding: 6px 0;
        position: relative;
    }

    .nav-desktop a:hover {
        color: #f5765a;
    }

    .nav-desktop a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background-color: #f5765a;
        transition: width 0.2s ease;
    }

    .nav-desktop a:hover::after {
        width: 100%;
    }

    header .icon-btn {
        padding: 8px;
    }

    header .icon-btn svg {
        width: 28px;
        height: 28px;
    }

    .badge-carrito {
        top: -2px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .menu-panel {
        max-width: 360px;
        padding: 36px 32px;
    }

    /* ------------------------------------------------------------
       GRID DE PRODUCTOS EN PC: 2 por fila
       ------------------------------------------------------------ */
    .grid-productos, 
    .productos-container, 
    .catalogo-grid,
    .productos,
    .productos-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
        max-width: 1280px;
        margin: 0 auto;
        padding: 20px 32px;
    }

    .tarjeta-producto,
    .producto-card,
    .card-producto,
    .producto {
        width: 100% !important;
        max-width: none !important;
    }
}