body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

/* Evitar desbordes horizontales en toda la página */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

/* ======================================= */
/* 2. HEADER PRINCIPAL (PC)                */
/* ======================================= */

header {
    background: #ffd900;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}


/* Logo */
#headerLogo {
    width: 130px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(5px 10px 8px rgba(0, 0, 0, 0.5));
}

/* Contenedor del Buscador */
#headerSearch {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    max-width: 500px;
}

.headerInput {
    width: 100%;
    padding: 8px 15px;
    border: 2px solid #ccc;
    border-radius: 10px 0 0 10px;
    font-size: 14px;
    outline: none;
}

.headerInput:focus {
    border-color: #fff;
}

.headerButton {
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.headerButton:hover {
    background-color: #c4c4c4;
}

.headerSearchIcon {
    width: 16px;
    height: 16px;
}

/* Ocultar el botón hamburguesa en PC */
.hamburger-btn {
    display: none;
}

/* ======================================= */
/* 3. NAVEGACIÓN (PC)                      */
/* ======================================= */

#headerNav {
    display: flex;
    align-items: center;
}

#headerUl {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 15px; /* Espaciado entre los enlaces */
}

.headerA {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 15px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.headerA:hover {
    color: #ffffff;
}

/* Separador "|" */
.headerSpam {
    font-size: 20px;
    color: #000;
    user-select: none;
}

/* Iconos de Redes/Contacto en el menú */
#headerUl .headerImage {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

#headerUl .headerA:hover .headerImage {
    transform: scale(1.15);
}

/* ======================================= */
/* 4. BARRA DE CATEGORÍAS (PC)             */
/* ======================================= */

#divCategorias {
    width: 100%;
    background-color: #ededed;
    display: flex;
    justify-content: space-between; /* Distribuye las categorías equitativamente */
    flex-wrap: nowrap;
    border-bottom: 1px solid #e0e0e0;
    
    /* Scroll horizontal oculto pero funcional por si la pantalla es menor a 1200px */
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Ocultar scrollbar en Chrome/Safari */
#divCategorias::-webkit-scrollbar {
    display: none;
}

/* Cada bloque de categoría */
#divCategorias .categoria {
    flex: 1; /* Hace que todas ocupen el mismo ancho en PC */
    background-color: #f7f7f7;
    border-right: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
}

#divCategorias .categoria:last-child {
    border-right: none;
}

#divCategorias .categoria:hover {
    background-color: #e8e8e8;
}

/* Enlaces dentro de las categorías */
#divCategorias .headerA {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 5px;
    width: 100%;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

/* Imágenes dentro de las categorías */
#divCategorias .headerImage {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

#divCategorias .categoria:hover .headerImage {
    transform: scale(1.08); /* Pequeño efecto al pasar el mouse */
}

.headerWhatsAppText, .headerEmailText, .headerInstagramText, .headerPhoneText {
        display: none;
    }


/* ======================================= */
/* 5. ESTILOS MÓVIL (TABLETS / CELULARES)  */
/* ======================================= */

@media (max-width: 768px) {
    header {
        padding: 6px 8px;
        height: auto;
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Asegurar que los elementos del header no provoquen overflow */
    #headerLogo { flex: 0 0 auto; width: 76px; }
    .hamburger-btn { flex: 0 0 auto; width:40px;height:40px }
    #headerSearch { flex: 1 1 auto; min-width: 0; max-width: 45%; }
    #headerSearch .headerInput { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

    /* Mostrar botón hamburguesa en móvil */
    .hamburger-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-right: 6px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding:0;
    }

    .hamburger-lines {
        display: block;
        width: 18px;
        height: 2px;
        background: #000;
        position: relative;
    }
    .hamburger-lines::before,
    .hamburger-lines::after {
        content: '';
        position: absolute;
        left: 0;
        width: 18px;
        height: 2px;
        background: #000;
    }
    .hamburger-lines::before { top: -5px; }
    .hamburger-lines::after { top: 5px; }


    /* Estilos móviles del menú hamburguesa */
    .headerNav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        max-width: 320px;
        background: #ffffff;
        border-right: 1px solid #f0f0f0;
        box-shadow: 6px 0 20px rgba(0,0,0,0.08);
        padding: 80px 16px 24px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 10001;
    }

    .headerNav.open {
        transform: translateX(0);
    }

    #headerUl {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 0;
        margin: 0;
    }

    #headerUl .headerLi {
        width: 100%;
    }

    span {
        display: none;
    }


    .headerNav .headerA {
        width: 100%;
        display: block;
        padding: 14px 18px;
        color: #1f1f1f;
        font-size: 17px;
        font-weight: 600;
        border-radius: 14px;
        background: #fafafa;
        border: 1px solid #f0f0f0;
        transition: background 0.25s ease, transform 0.2s ease;
    }

    .headerNav .headerA:hover {
        background: #fff3bf;
        color: #111;
        transform: translateX(2px);
    }

    #headerUl .headerImage {
        width: 24px;
        height: 24px;
    }

    .hamburger-btn {
        display: inline-flex;
        background: transparent;
        border: none;
        padding: 0;
    }

    .hamburger-btn:hover {
        background: transparent;
    }

    /* Mostrar búsqueda en móvil (no ocultar) y mantenerla compacta */
    #headerSearch {
        display: flex;
        flex: 0 0 auto;
        max-width: 180px;
        margin: 0 4px 0 0;
        padding: 0 4px;
        align-items: center;
        min-width: 0;
        width: auto;
    }

    #headerSearchInput {
        flex: 1;
        width: 100%;
        min-width: 0;
    }

    .headerInput {
        font-size: 12px;
    }

    .headerButton {
        padding: 5px 8px;
        height: 34px;
    }

    /* Menú lateral fijo desde la izquierda: ocupa toda la altura, no sale de la pantalla */
    .headerNav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 72vw;
        max-width: 320px;
        background: #ffd900;
        transform: translateX(-100%);
        transition: transform 0.22s cubic-bezier(.2,.9,.2,1);
        box-shadow: 6px 0 18px rgba(0,0,0,0.12);
        overflow-y: auto;
        z-index: 10001;
        padding-top: 52px; /* dejar espacio para header */
        box-sizing: border-box;
    }

    .headerNav.open {
        transform: translateX(0);
    }

    /* Overlay que cubre el resto de la pantalla */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: transparent;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: 10000;
        pointer-events: none;
    }
    .nav-overlay.visible {
        opacity: 0;
        visibility: hidden;
    }

    /* Evitar scroll del body cuando el menú está abierto */
    body.nav-open {
        overflow: hidden;
    }

    #headerUl {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 10px;
        align-items: stretch;
    }

    .headerA { font-size: 12px; color: #000; }

    /* Enlaces ocupan todo el ancho de la barra lateral */
    .headerNav .headerA {
        width: 100%;
        display: block;
        padding: 6px 8px;
        border-radius: 6px;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Animación botón hamburguesa -> X */
    .hamburger-lines {
        transition: transform 0.22s ease, background-color 0.15s ease;
    }

    .hamburger-lines::before,
    .hamburger-lines::after {
        transition: transform 0.22s ease, top 0.22s ease, opacity 0.22s ease;
    }

    .hamburger-btn.open .hamburger-lines {
        background: transparent;
    }
    .hamburger-btn.open .hamburger-lines::before {
        transform: rotate(45deg);
        top: 0;
    }
    .hamburger-btn.open .hamburger-lines::after {
        transform: rotate(-45deg);
        top: 0;
    }

    /* Categorías: permitir scroll horizontal y mostrar elementos en fila, más compactos */
    #divCategorias {
        overflow-x: auto;
        padding: 4px 4px 4px 6px;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        box-sizing: border-box;
    }

    #divCategorias .categoria {
        flex: 0 0 auto;
        min-width: 60px;
        padding: 4px 6px;
        justify-content: center;
        box-sizing: border-box;
        margin-right: 6px;
    }

    #divCategorias .categoria:last-child {
        margin-right: 0;
    }

    /* Texto de categorías en mayúsculas */
    #divCategorias .headerA {
        text-transform: uppercase;
        font-size: 9px;
        white-space: normal;
        line-height: 1.05;
    }

    /* Ajustes para imágenes de categorías en móvil (más pequeñas) */
    #divCategorias .headerImage {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }

    /* TEXTO DE ICONOS EN MENU HAMBURGUESA ABIERTO */
.headerNav.open .headerWhatsAppText,
.headerNav.open .headerEmailText,
.headerNav.open .headerInstagramText,
.headerNav.open .headerPhoneText {
    display: block;

    margin: 0;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    color: #000;

    opacity: 1;
    visibility: visible;
}

/* Asegurar alineación bonita con iconos */
.headerNav.open a.headerA {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Evitar que se escondan por estilos globales */
.headerNav.open p {
    margin: 0;
}
}

.footer-centered {
    background: linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
    color: #1f2937;

    padding: 3rem 1.5rem;

    border-top: 3px solid #ffd900;

    text-align: center;
}

.footer-centered__container {
    max-width: 950px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.3rem;
}

/* LOGO */
.footer-centered__logo {
    width: 140px;
    display: block;
}

.footer-centered__logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* INFO EMPRESA */
.footer-centered__info {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;

    max-width: 600px;
}

/* NAVIGATION */
.footer-centered__nav ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.footer-centered__nav a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
    font-size: 14px;

    padding: 6px 10px;
    border-radius: 8px;

    transition: all 0.25s ease;
}

.footer-centered__nav a:hover {
    background: #ffd900;
    color: #000;
    transform: translateY(-2px);
}

/* SOCIAL MEDIA */
.footer-centered__social ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    justify-content: center;
    gap: 18px;
}

.footer-centered__social img {
    width: 28px;
    height: 28px;
    object-fit: contain;

    transition: transform 0.25s ease, filter 0.25s ease;
    cursor: pointer;
}

.footer-centered__social img:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

/* COPYRIGHT */
.footer-centered__copyright {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .footer-centered__nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .footer-centered__info {
        font-size: 13px;
        padding: 0 10px;
    }
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(0, 123, 255, 0.5), transparent);
    margin: 40px auto;
    width: 60%;
}

#loader {
    position: fixed;
    inset: 0;
    background: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 99999;
}

/* Spinner amarillo One Safety */
.spinner {
    width: 55px;
    height: 55px;

    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid #ffd900;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade out suave */
#loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Ancho de la barra de scroll */
::-webkit-scrollbar {
    width: 10px;
}

/* Fondo de la barra (donde se desliza el indicador) */
::-webkit-scrollbar-track {
    background: #000000; /* Fondo negro */
}

/* El indicador de desplazamiento (la parte que mueves) */
::-webkit-scrollbar-thumb {
    background: #FFD100; /* Amarillo corporativo brillante */
    border-radius: 5px; /* Bordes suaves y modernos */
    border: 2px solid #000000; /* Línea negra para darle contraste y efecto 3D */
}

/* Cambia de color cuando pasas el ratón por encima */
::-webkit-scrollbar-thumb:hover {
    background: #ffffff; /* Se vuelve blanca al pasar el cursor */
}

@media (min-width: 820px) and (max-width: 870px) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    .headerA {
        font-size: 11px;
    }
}