/* ==========================================================================
   Alpha SI — Header Styles (diseño tipo web-epc) v2.1.1
   2 filas: Logo+Search+Actions | Nav pills + mega dropdown
   ========================================================================== */

/* ---- Site Header container ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky, 100);
    background: var(--color-header-bg, rgba(10, 10, 20, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light, rgba(255,255,255,0.06));
    transition: background 0.3s, box-shadow 0.3s;
}

/* Cuando la admin bar de WP está activa (logueado) */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px; /* admin bar mobile es 46px */
    }
}

/* Compensar altura del header fijo (dinámico via JS) */
body {
    padding-top: var(--alphasi-header-offset, 110px);
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--color-border, #e5e7eb);
}

.site-header.is-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   ROW 1: Logo — Search — Actions
   ========================================================================== */
.header-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .header-top {
    border-bottom-color: var(--color-border, #e5e7eb);
}

.header-top__inner {
    display: flex;
    align-items: center;
    gap: var(--space-6, 1.5rem);
    height: 88px;
}

/* ---- Logo ---- */
.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    display: flex;
    align-items: center;
}

.site-branding img {
    height: 72px;
    width: auto;
}

/* Logo switch claro/oscuro */
.logo-dark { display: block; }
.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* ---- Search Bar ---- */
.header-search {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
}

.header-search__form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search__icon {
    position: absolute;
    left: 14px;
    display: flex;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

[data-theme="light"] .header-search__icon {
    color: var(--color-text-muted, #999);
}

.header-search__input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full, 999px);
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header-search__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search__input:focus {
    border-color: var(--color-primary, #FFD000);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.15);
}

[data-theme="light"] .header-search__input {
    background: var(--color-bg, #f5f5f5);
    border-color: var(--color-border, #e5e7eb);
    color: var(--color-text, #1a1a2e);
}

[data-theme="light"] .header-search__input::placeholder {
    color: var(--color-text-muted, #999);
}

[data-theme="light"] .header-search__input:focus {
    background: #fff;
    border-color: var(--color-primary, #FFD000);
}

/* ---- FiboSearch Integration ---- */
.header-search .dgwt-wcas-search-wrapp {
    width: 100%;
    max-width: 100%;
}

.header-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp {
    border-radius: var(--radius-full, 999px) !important;
    overflow: hidden;
}

.header-search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full, 999px);
    font-size: 14px;
    color: #fff;
    outline: none;
    height: auto;
    box-shadow: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header-search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input:focus {
    border-color: var(--color-primary, #FFD000);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.15);
}

[data-theme="light"] .header-search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input {
    background: var(--color-bg, #f5f5f5);
    border-color: var(--color-border, #e5e7eb);
    color: var(--color-text, #1a1a2e);
}

[data-theme="light"] .header-search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
    color: var(--color-text-muted, #999);
}

[data-theme="light"] .header-search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input:focus {
    background: #fff;
    border-color: var(--color-primary, #FFD000);
}

/* FiboSearch submit button */
.header-search .dgwt-wcas-search-wrapp .dgwt-wcas-search-submit,
.header-search .dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier-handler {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    border-radius: 0 var(--radius-full, 999px) var(--radius-full, 999px) 0;
}

[data-theme="light"] .header-search .dgwt-wcas-search-wrapp .dgwt-wcas-search-submit,
[data-theme="light"] .header-search .dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier-handler {
    color: var(--color-text-muted, #999);
}

/* FiboSearch autocomplete dropdown */
.dgwt-wcas-suggestions-wrapp {
    background: var(--color-surface, #1e1e2e) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-2xl, 16px) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden;
    margin-top: 8px !important;
}

[data-theme="light"] .dgwt-wcas-suggestions-wrapp {
    background: #fff !important;
    border-color: var(--color-border, #e5e7eb) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12) !important;
}

.dgwt-wcas-suggestion {
    padding: 10px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: background 0.15s !important;
}

.dgwt-wcas-suggestion:hover,
.dgwt-wcas-suggestion.dgwt-wcas-suggestion-selected {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

[data-theme="light"] .dgwt-wcas-suggestion {
    color: var(--color-text, #1a1a2e) !important;
    border-bottom-color: var(--color-border, #e5e7eb) !important;
}

[data-theme="light"] .dgwt-wcas-suggestion:hover,
[data-theme="light"] .dgwt-wcas-suggestion.dgwt-wcas-suggestion-selected {
    background: var(--color-bg, #f5f5f5) !important;
    color: var(--color-primary, #FFD000) !important;
}

.dgwt-wcas-st {
    font-size: 13px !important;
    font-weight: 500 !important;
}

.dgwt-wcas-sp {
    font-size: 12px !important;
    color: var(--color-primary, #FFD000) !important;
    font-weight: 600 !important;
}

.dgwt-wcas-suggestion .dgwt-wcas-si {
    border-radius: var(--radius-md, 8px) !important;
    overflow: hidden;
}

/* Mobile search FiboSearch */
.mobile-nav__search .dgwt-wcas-search-wrapp {
    width: 100%;
}

.mobile-nav__search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input {
    border-radius: var(--radius-full, 999px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    padding: 10px 16px 10px 42px;
}

[data-theme="light"] .mobile-nav__search .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input {
    background: var(--color-bg, #f5f5f5);
    border-color: var(--color-border, #e5e7eb);
    color: var(--color-text, #1a1a2e);
}

/* ---- Header Actions (right) ---- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.header-actions__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px;
    border-radius: var(--radius-lg, 10px);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.header-actions__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

[data-theme="light"] .header-actions__btn {
    color: var(--color-text-secondary, #666);
}

[data-theme="light"] .header-actions__btn:hover {
    background: var(--color-surface-hover, rgba(0,0,0,0.04));
    color: var(--color-text, #1a1a2e);
}

.header-actions__btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.header-actions__cart svg {
    width: 24px;
    height: 24px;
}

.header-actions__label {
    display: inline;
}

/* Cart count badge */
.header-actions__cart-count {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header-actions__cart-count.is-empty {
    display: none;
}

/* ---- Header Cart Drawer ---- */
.header-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 11, 18, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 260;
}

.header-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.header-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 94vw);
    z-index: 270;
    pointer-events: none;
}

.header-cart-drawer__panel {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--color-surface, #fff);
    border-left: 1px solid var(--color-border, #e5e7eb);
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.header-cart-drawer.is-open {
    pointer-events: auto;
}

.header-cart-drawer.is-open .header-cart-drawer__panel {
    transform: translateX(0);
}

.header-cart-drawer__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md, 8px);
    border: none;
    background: transparent;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    z-index: 2;
}

.header-cart-drawer__close:hover {
    background: var(--color-bg, #f3f4f6);
    color: var(--color-text, #111827);
}

.header-cart-drawer__content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.header-cart-drawer__header {
    padding: 16px 16px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.header-cart-drawer__title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text, #111827);
}

.header-cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}

.header-cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-bg, #f8fafc);
    margin-bottom: 10px;
}

.header-cart-item__thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    background: #fff;
}

.header-cart-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-cart-item__name {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
}

.header-cart-item__name a {
    color: var(--color-text, #111827);
    text-decoration: none;
}

.header-cart-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
}

.header-cart-item__price {
    font-weight: 700;
    color: var(--color-text, #111827);
}

.header-cart-item__remove {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted, #6b7280);
    text-decoration: none;
}

.header-cart-item__remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.header-cart-drawer__footer {
    border-top: 1px solid var(--color-border, #e5e7eb);
    padding: 12px;
    background: var(--color-surface, #fff);
}

.header-cart-summary {
    margin-bottom: 10px;
}

.header-cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 6px;
}

.header-cart-summary__row strong {
    color: var(--color-text, #111827);
}

.header-cart-summary__row .is-success {
    color: #16a34a;
}

.header-cart-summary__row.is-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border, #e5e7eb);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text, #111827);
}

.header-cart-drawer__actions {
    display: grid;
    gap: 8px;
}

.header-cart-drawer__actions .btn {
    justify-content: center;
}

.header-cart-drawer__empty-btn {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
    text-decoration: none;
    padding-top: 4px;
}

.header-cart-drawer__empty-btn:hover {
    color: #dc2626;
}

.header-cart-drawer__empty {
    margin: auto;
    width: calc(100% - 32px);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-xl, 14px);
    padding: 18px;
    text-align: center;
}

.header-cart-drawer__empty p {
    margin: 0 0 12px;
    color: var(--color-text-muted, #6b7280);
}

@media (max-width: 768px) {
    .header-cart-drawer {
        width: min(380px, 96vw);
    }

    .header-cart-drawer__title {
        font-size: 20px;
    }
}

/* ---- Theme Toggle ---- */
.theme-toggle {
    width: 40px;
    padding: 0;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .theme-toggle .icon-sun { display: flex; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: flex; }

/* ==========================================================================
   ROW 2: Navigation Pills + Mega Dropdown
   ========================================================================== */
.header-nav {
    position: relative;
}

.header-nav__inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Nav pills list */
.nav-pills {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.nav-pills__item {
    position: relative;
}

/* Individual pill */
.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full, 999px);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    line-height: 1.2;
    font-family: inherit;
}

.nav-pill svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-pill:hover svg {
    opacity: 1;
}

/* Active pill */
.nav-pills__item.is-active .nav-pill,
.nav-pill.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Light mode pills */
[data-theme="light"] .nav-pill {
    color: var(--color-text, #1a1a2e);
}

[data-theme="light"] .nav-pill:hover {
    color: var(--color-text, #1a1a2e);
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--color-border, #e5e7eb);
}

[data-theme="light"] .nav-pills__item.is-active .nav-pill,
[data-theme="light"] .nav-pill.is-active {
    color: var(--color-primary, #FFD000);
    background: rgba(0, 100, 255, 0.08);
    border-color: rgba(0, 100, 255, 0.2);
}

/* Dropdown toggle pill */
.nav-pill--dropdown {
    font-family: inherit;
}

.nav-pill--dropdown svg:last-child {
    width: 14px;
    height: 14px;
    margin-left: -2px;
    transition: transform 0.2s;
}

.nav-pill--dropdown[aria-expanded="true"] svg:last-child {
    transform: rotate(180deg);
}

.nav-pill--dropdown[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .nav-pill--dropdown[aria-expanded="true"] {
    color: var(--color-primary, #FFD000);
    background: rgba(0, 100, 255, 0.08);
    border-color: rgba(0, 100, 255, 0.2);
}

/* CTA pill — gradient */
.nav-pill--cta {
    background: linear-gradient(135deg, var(--color-secondary, #FF9500), var(--color-accent, #FFB300));
    color: #fff;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(161, 48, 255, 0.3);
}

.nav-pill--cta:hover {
    box-shadow: 0 4px 20px rgba(161, 48, 255, 0.5);
    transform: translateY(-1px);
    color: #fff;
    background: linear-gradient(135deg, var(--color-secondary, #FF9500), var(--color-accent, #FFB300));
    border-color: transparent;
}

.nav-pill--cta svg {
    opacity: 1;
}

[data-theme="light"] .nav-pill--cta {
    background: linear-gradient(135deg, var(--color-secondary, #FF9500), var(--color-accent, #FFB300));
    color: #fff;
    border-color: transparent;
}

[data-theme="light"] .nav-pill--cta:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--color-secondary, #FF9500), var(--color-accent, #FFB300));
    border-color: transparent;
}

/* Ofertas pill — destacado */
.nav-pill--ofertas {
    color: #ff4444;
    font-weight: 600;
}

.nav-pill--ofertas svg {
    opacity: 1;
}

.nav-pill--ofertas:hover {
    color: #ff2222;
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.2);
}

[data-theme="light"] .nav-pill--ofertas {
    color: #e53030;
}

[data-theme="light"] .nav-pill--ofertas:hover {
    color: #cc1a1a;
    background: rgba(229, 48, 48, 0.08);
    border-color: rgba(229, 48, 48, 0.2);
}

/* ==========================================================================
   MEGA DROPDOWN
   ========================================================================== */

/* El li actúa como static para que el dropdown se posicione
   relativo a .header-nav (ancho full-viewport) y quede centrado */
.nav-pills__item--dropdown {
    position: static;
}

.mega-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(960px, 94vw);
    background: var(--color-surface, #1e1e2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl, 16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 100, 255, 0.05);
    padding: 0;
    z-index: var(--z-dropdown, 200);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    overflow: hidden;
}

.mega-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .mega-dropdown {
    background: #fff;
    border-color: var(--color-border, #e5e7eb);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04);
}

/* Header */
.mega-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mega-dropdown__header {
    border-bottom-color: var(--color-border, #e5e7eb);
}

.mega-dropdown__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .mega-dropdown__title {
    color: var(--color-text-muted, #999);
}

.mega-dropdown__viewall {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary, #FFD000);
    text-decoration: none;
    transition: gap 0.2s;
}

.mega-dropdown__viewall:hover {
    gap: 8px;
    color: var(--color-primary, #FFD000);
}

.mega-dropdown__viewall svg {
    width: 14px;
    height: 14px;
}

/* Mega columnas — grid de 5 columnas */
.mega-cols {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr 1fr;
    align-items: start;
    padding: 0;
    min-width: 0; /* evita overflow en grid */
}

.mega-col {
    padding: 18px 14px 18px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0; /* para que el texto no desborde */
}

.mega-col:first-child {
    padding-left: 20px;
}

.mega-col:last-child {
    border-right: none;
}

[data-theme="light"] .mega-col {
    border-right-color: var(--color-border, #e5e7eb);
}

/* ── Heading de categoría principal ── */
.mega-col__heading {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    text-decoration: none;
    padding: 4px 4px 9px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    line-height: 1.2;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-col__heading:hover {
    color: var(--color-primary, #FFD000);
}

.mega-col__heading svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--color-accent, #FF9500);
    transition: color 0.15s;
}

.mega-col__heading:hover svg {
    color: var(--color-accent-hover, #FFB300);
}

[data-theme="light"] .mega-col__heading {
    color: var(--color-text, #1a1a2e);
    border-bottom-color: var(--color-border, #e5e7eb);
}

[data-theme="light"] .mega-col__heading svg {
    color: var(--color-accent, #FFB300);
}

/* Grupo adicional dentro de una columna */
.mega-col__heading--mt {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .mega-col__heading--mt {
    border-top-color: var(--color-border, #e5e7eb);
}

/* Heading de Ofertas — ámbar */
.mega-col__heading--offers {
    color: #f59e0b !important;
    border-bottom-color: rgba(245, 158, 11, 0.18) !important;
}

.mega-col__heading--offers svg {
    color: #f59e0b !important;
}

/* ── Lista de subcategorías ── */
.mega-col__subs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-col__subs > li {
    margin: 0;
}

.mega-col__link {
    display: block;
    padding: 5px 6px;
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.52);
    text-decoration: none;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s, padding-left 0.15s;
}

.mega-col__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    padding-left: 11px;
}

[data-theme="light"] .mega-col__link {
    color: var(--color-text-secondary, #555);
}

[data-theme="light"] .mega-col__link:hover {
    color: var(--color-primary, #FFD000);
    background: rgba(0, 100, 255, 0.06);
    padding-left: 11px;
}

/* Link padre (ej: Procesadores) — más visible */
.mega-col__link--parent {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
}

.mega-col__link--parent:hover {
    color: #fff;
}

[data-theme="light"] .mega-col__link--parent {
    color: var(--color-text, #1a1a2e);
}

/* ── Sub-sub (ej: AMD / Intel) ── */
.mega-col__subsubs {
    list-style: none;
    margin: 0 0 6px;
    padding: 2px 0 2px 12px;
    border-left: 2px solid rgba(0, 100, 255, 0.22);
}

.mega-col__subsubs > li {
    margin: 0;
}

.mega-col__subsubs a {
    display: block;
    padding: 3px 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.15s;
}

.mega-col__subsubs a:hover {
    color: var(--color-primary, #FFD000);
}

[data-theme="light"] .mega-col__subsubs {
    border-left-color: rgba(0, 100, 255, 0.15);
}

[data-theme="light"] .mega-col__subsubs a {
    color: var(--color-text-muted, #999);
}

[data-theme="light"] .mega-col__subsubs a:hover {
    color: var(--color-primary, #FFD000);
}

/* Footer */
.mega-dropdown__footer {
    padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mega-dropdown__footer {
    border-top-color: var(--color-border, #e5e7eb);
}

.mega-dropdown__explore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-lg, 10px);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-dropdown__explore:hover {
    background: rgba(0, 100, 255, 0.1);
    color: var(--color-primary, #FFD000);
}

[data-theme="light"] .mega-dropdown__explore {
    background: var(--color-bg, #f5f5f5);
    color: var(--color-text-secondary, #555);
}

[data-theme="light"] .mega-dropdown__explore:hover {
    background: rgba(0, 100, 255, 0.08);
    color: var(--color-primary, #FFD000);
}

.mega-dropdown__explore svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

/* ---- Mobile Menu Toggle ---- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg, 10px);
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 5px;
    transition: background 0.2s;
}

[data-theme="light"] .mobile-menu-toggle {
    color: var(--color-text, #1a1a2e);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.3s;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Mobile Nav Panel ---- */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 90vw);
    background: var(--color-surface, #1a1a2e);
    z-index: var(--z-modal, 300);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    flex-direction: column;
}

[data-theme="light"] .mobile-nav {
    background: #fff;
}

.mobile-nav.is-open {
    display: flex;
    transform: translateX(0);
    animation: slide-in-right 0.3s ease forwards;
}

@keyframes slide-in-right {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mobile-nav__header {
    border-bottom-color: var(--color-border, #e5e7eb);
}

.mobile-nav__header img {
    height: 30px;
    width: auto;
}

.mobile-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg, 10px);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="light"] .mobile-nav__close {
    color: var(--color-text-muted, #999);
}

.mobile-nav__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mobile-nav__close svg {
    width: 20px;
    height: 20px;
}

/* Search in mobile */
.mobile-nav__search {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mobile-nav__search {
    border-bottom-color: var(--color-border, #e5e7eb);
}

/* Links */
.mobile-nav__menu {
    padding: 12px 16px;
    flex: 1;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-lg, 10px);
    transition: all 0.15s;
}

.mobile-nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

[data-theme="light"] .mobile-nav__link {
    color: var(--color-text, #1a1a2e);
}

[data-theme="light"] .mobile-nav__link:hover {
    background: var(--color-bg, #f5f5f5);
    color: var(--color-primary, #FFD000);
}

.mobile-nav__link svg {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    flex-shrink: 0;
}

/* Etiqueta de sección */
.mobile-nav__section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.28);
    padding: 14px 12px 4px;
    margin: 0;
}

[data-theme="light"] .mobile-nav__section-label {
    color: var(--color-text-muted, #aaa);
}

/* Acordeón mobile (detalles nativos) */
.mobile-nav__accordion {
    border-radius: var(--radius-lg, 10px);
    overflow: hidden;
    margin-bottom: 2px;
}

.mobile-nav__accordion summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    user-select: none;
}

.mobile-nav__accordion summary::-webkit-details-marker {
    display: none;
}

.mobile-nav__accordion summary svg {
    width: 20px;
    height: 20px;
    opacity: 0.45;
    flex-shrink: 0;
}

.mobile-nav__accordion-chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.mobile-nav__accordion-chevron svg {
    width: 16px;
    height: 16px;
    opacity: 0.4;
}

.mobile-nav__accordion[open] summary {
    color: #fff;
}

.mobile-nav__accordion[open] .mobile-nav__accordion-chevron {
    transform: rotate(180deg);
}

.mobile-nav__accordion[open] summary svg:first-child {
    opacity: 0.75;
}

[data-theme="light"] .mobile-nav__accordion summary {
    color: var(--color-text, #1a1a2e);
}

/* Cuerpo del acordeón */
.mobile-nav__accordion-body {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg, 10px);
    margin: 0 4px 4px;
    padding: 4px 0;
}

.mobile-nav__accordion-body a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.15s;
}

.mobile-nav__accordion-body a:hover {
    color: #fff;
    padding-left: 26px;
}

[data-theme="light"] .mobile-nav__accordion-body {
    background: var(--color-bg, #f5f5f5);
}

[data-theme="light"] .mobile-nav__accordion-body a {
    color: var(--color-text-secondary, #555);
}

[data-theme="light"] .mobile-nav__accordion-body a:hover {
    color: var(--color-primary, #FFD000);
}

.mobile-nav__link--cta {
    background: linear-gradient(135deg, var(--color-secondary, #FF9500), var(--color-accent, #FFB300));
    color: #fff !important;
    border-radius: var(--radius-lg);
    font-weight: var(--fw-semibold);
    text-align: center;
    justify-content: center;
    margin-top: var(--space-2);
}

.mobile-nav__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="light"] .mobile-nav__footer {
    border-top-color: var(--color-border, #e5e7eb);
}

/* Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-modal, 300) - 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-nav-overlay.is-open {
    display: block;
}

/* ==========================================================================
   MOBILE SEARCH SUB-HEADER
   ========================================================================== */
.header-search-mobile {
    display: none;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
    }

    .header-actions__label {
        display: none;
    }

    .header-search {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop search, show mobile sub-header */
    .header-top .header-search {
        display: none;
    }

    .header-search-mobile {
        display: block;
        border-top: 1px solid rgba(255,255,255,0.06);
        transition: transform 0.3s ease, opacity 0.3s ease;
        will-change: transform, opacity;
    }

    [data-theme="light"] .header-search-mobile {
        border-top-color: var(--color-border, #e5e7eb);
    }

    .header-search-mobile__inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .header-search-mobile .header-search--mobile {
        display: block;
        flex: 1;
        max-width: none;
    }

    /* Hide on scroll */
    .site-header.header--search-hidden .header-search-mobile {
        transform: translateY(-100%);
        opacity: 0;
        height: 0;
        overflow: hidden;
        border-top: none;
        pointer-events: none;
    }

    .header-top__inner {
        height: 60px;
        gap: var(--space-3, 0.75rem);
    }

    .site-branding img {
        height: 44px;
    }

    .header-actions__account {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .header-top__inner {
        height: 56px;
        gap: var(--space-2, 0.5rem);
        justify-content: space-between;
    }

    .header-actions {
        gap: 2px;
    }

    .header-actions__btn {
        width: 36px;
        height: 36px;
        padding: 0;
    }

    .header-actions__account .header-actions__label {
        display: none;
    }
}
