/* HEADER CATEGORÍAS / MEGA MENÚ */

.hc-desktop {
    position: relative;
    z-index: 1020;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    font-family: var(--font-golos);
}

.hc-menu-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.hc-menu-scroll::-webkit-scrollbar {
    height: 4px;
}

.hc-menu-scroll::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

.hc-menu-scroll::-webkit-scrollbar-thumb {
    background-color: #d6d6d6;
    border-radius: 999px;
}

.hc-menu-list {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media screen and (max-width: 1200px) {
    .hc-menu-list {
        justify-content: flex-start;
    }
}

.hc-menu-item {
    flex: 0 0 auto;
}

.hc-menu-btn {
    height: 42px;
    padding: 0 10px;
    border: 0;
    border-left: 2px solid transparent;
    background-color: transparent;
    color: #111;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 42px;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.hc-menu-btn:hover,
.hc-menu-btn:focus,
.hc-menu-btn.is-active {
    color: var(--rojo);
    border-left-color: var(--rojo);
    background-color: #fff;
    outline: none;
}

.hc-arrow {
    display: inline-block;
    margin-left: 3px;
    font-size: 1.35em;
    line-height: 0;
    vertical-align: -2px;
}

.hc-sintacc-icon {
    width: 18px;
    margin-left: 4px;
    vertical-align: -4px;
    opacity: 0.8;
}

/* Paneles desktop */

.hc-panels {
    position: relative;
}

.hc-mega-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1030;
    min-height: 230px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding: 34px 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.hc-mega-panel.is-active {
    display: block;
}

.hc-mega-inner {
    max-width: 1500px;
    margin: 0 auto;
}

.hc-mega-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    column-gap: 42px;
    row-gap: 6px;
}

.hc-ofertas-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    column-gap: 32px;
    row-gap: 8px;
    max-width: 900px;
}

.hc-subcat {
    display: block;
    width: 100%;
    padding: 5px 0;
    border: 0;
    background-color: transparent;
    color: #111;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.hc-subcat:hover,
.hc-subcat:focus {
    color: var(--rojo);
    transform: translateX(2px);
    outline: none;
}

.hc-subcat-strong {
    color: var(--rojo);
    font-weight: 600;
}

.hc-subcat-muted {
    color: #777;
}

.hc-mega-panel::-webkit-scrollbar {
    width: 8px;
}

.hc-mega-panel::-webkit-scrollbar-track {
    background-color: #eeeeee;
    border-radius: 5px;
}

.hc-mega-panel::-webkit-scrollbar-thumb {
    background-color: var(--rojo);
    border-radius: 5px;
}

/* MOBILE */

.hc-mobile {
    display: none !important;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    font-family: var(--font-golos);
}

.hc-mobile details > summary {
    list-style: none;
}

.hc-mobile details > summary::-webkit-details-marker {
    display: none;
}

.hc-mobile-main {
    position: relative;
    padding: 12px 16px;
    color: #111;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.hc-mobile-main::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rojo);
    font-size: 1.3rem;
    font-weight: 600;
}

.hc-mobile-menu[open] > .hc-mobile-main::after {
    content: "−";
}

.hc-mobile-ofertas {
    border-bottom: 1px solid #eee;
}

.hc-mobile-ofertas > summary,
.hc-mobile-cat > summary {
    position: relative;
    padding: 12px 18px;
    color: #111;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.hc-mobile-ofertas > summary::after,
.hc-mobile-cat > summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rojo);
    font-size: 1.2rem;
    font-weight: 600;
}

.hc-mobile-ofertas[open] > summary,
.hc-mobile-cat[open] > summary {
    color: var(--rojo);
}

.hc-mobile-ofertas[open] > summary::after,
.hc-mobile-cat[open] > summary::after {
    content: "−";
}

.hc-mobile-cat {
    border-bottom: 1px solid #eee;
}

.hc-mobile-subcats {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 0 8px;
    background-color: #fafafa;
}

.hc-mobile-subcats button {
    width: 100%;
    padding: 9px 28px;
    border: 0;
    background-color: transparent;
    color: #111;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.hc-mobile-subcats button:hover,
.hc-mobile-subcats button:focus {
    color: var(--rojo);
    outline: none;
}

.hc-mobile-subcats .hc-subcat-strong {
    color: var(--rojo);
    font-weight: 600;
}

/* RESPONSIVE */

@media screen and (max-width: 1400px) {
    .hc-menu-btn {
        padding: 0 9px;
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 1200px) {
    .hc-menu-btn {
        padding: 0 8px;
        font-size: 0.78rem;
    }

    .hc-mega-grid {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
        column-gap: 34px;
    }
}

@media screen and (max-width: 900px) {
    .hc-mega-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .hc-ofertas-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .hc-desktop {
        display: none !important;
    }

    .hc-mobile {
        display: block !important;
    }
}