/* Estilos para el Widget de Iconos de Encabezado v1.2 */

/* --- REGLAS DE RESCATE PARA HOVER Y VISIBILIDAD --- */
/* Estas reglas anulan problemas comunes de temas como overflow:hidden y z-index bajo. */
.header-icons-wrapper {
    overflow: visible !important; /* Permite que el popup se "salga" de la caja */
}
.ayuda-popup {
    z-index: 99999 !important; /* Asegura que el popup esté por encima de todo */
}
/* ------------------------------------------------ */

.header-icons-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 40px;
    padding: 0px;
}

.header-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: transform 0.2s ease-in-out;
}

.header-icon:hover {
    transform: scale(1.1);
}

.header-icon img {
    width: 50px;
    height: auto;
    margin-bottom: 5px;
}

/* --- Popup de Ayuda --- */
.ayuda-popup {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: #333;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.icon-ayuda:hover .ayuda-popup {
    opacity: 1;
    visibility: visible;
}

.ayuda-popup a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ayuda-popup a:hover {
    color: #0056b3;
}

/* --- Burbuja del Contador del Carrito --- */
.cart-count-bubble {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #E60000;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cart-count-bubble.show {
    transform: scale(1);
    opacity: 1;
}

/* --- REGLAS RESPONSIVE --- */
@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
    .header-icons-wrapper .icon-label {
        display: none;
    }
    .header-icon img {
        width: 50px !important; /* Mantenemos el !important por si el tema es muy agresivo */
        margin-bottom: 0;
    }
    .header-icons-wrapper {
        gap: 15px;
        margin: 0px;
    }
}