/* ==========================================================================
   ARC GAMES — Header
   Mobile First
   ========================================================================== */


/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.arc-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: var(--arc-bg-dark);

    border-bottom: 1px solid rgba(0, 229, 255, 0.65);

    box-shadow:
        0 1px 6px rgba(0, 229, 255, 0.35),
        0 4px 20px rgba(0, 0, 0, 0.30);
}


/* --------------------------------------------------------------------------
   Header inner
   -------------------------------------------------------------------------- */

.arc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 72px;

    gap: var(--arc-space-md);
}


/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */

.arc-logo {
    display: inline-flex;
    align-items: center;

    flex: 0 0 auto;

    width: auto;
    max-width: 180px;
}

.arc-logo img {
    display: block;

    width: 100%;
    height: auto;
}


/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.arc-nav {
    display: none;
}

.arc-nav-list {
    display: flex;
    align-items: center;

    margin: 0;
    padding: 0;

    list-style: none;

    gap: var(--arc-space-xl);
}

.arc-nav-list li {
    margin: 0;
    padding: 0;
}

.arc-nav-list a {
    display: inline-block;

    color: #ffffff;

    font-family: var(--arc-font-heading);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;

    transition:
        color 200ms ease,
        text-shadow 200ms ease;
}

.arc-nav-list a:hover,
.arc-nav-list a:focus-visible {
    color: var(--arc-primary);

    text-shadow:
        0 0 8px rgba(0, 229, 255, 0.75),
        0 0 18px rgba(0, 229, 255, 0.45);
}


/* --------------------------------------------------------------------------
   Header actions
   -------------------------------------------------------------------------- */

.arc-header-actions {
    display: flex;
    align-items: center;

    gap: var(--arc-space-md);
}


/* --------------------------------------------------------------------------
   Cart
   -------------------------------------------------------------------------- */

.arc-cart {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 42px;
    height: 42px;
}

.arc-cart img {
    width: 34px;
    height: auto;

    transition:
        filter 200ms ease,
        transform 200ms ease;
}

.arc-cart:hover img,
.arc-cart:focus-visible img {
    filter:
        drop-shadow(0 0 5px rgba(0, 229, 255, 0.85))
        drop-shadow(0 0 12px rgba(0, 229, 255, 0.50));

    transform: translateY(-1px);
}

.arc-cart-counter {
    position: absolute;
    top: -2px;
    right: -3px;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 19px;
    height: 19px;
    padding-inline: 4px;

    border-radius: 50%;

    background: var(--arc-primary);
    color: #000000;

    font-family: var(--arc-font-main);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.arc-cart-counter[hidden] {
    display: none;
}


/* --------------------------------------------------------------------------
   Comprar ahora
   -------------------------------------------------------------------------- */

.arc-header-buy {
    display: none;
}


/* --------------------------------------------------------------------------
   Mobile menu toggle
   -------------------------------------------------------------------------- */

.arc-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    padding: 0;

    border: 0;

    background: transparent;
    color: #ffffff;

    gap: 5px;
}

.arc-menu-toggle-line {
    display: block;

    width: 24px;
    height: 2px;

    background: #ffffff;

    transition:
        transform 200ms ease,
        background-color 200ms ease,
        box-shadow 200ms ease;
}

.arc-menu-toggle:hover .arc-menu-toggle-line,
.arc-menu-toggle:focus-visible .arc-menu-toggle-line {
    background: var(--arc-primary);

    box-shadow:
        0 0 8px rgba(0, 229, 255, 0.70);
}


/* --------------------------------------------------------------------------
   Mobile menu — abierto
   -------------------------------------------------------------------------- */

.arc-header.menu-open .arc-nav {
    display: block;

    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    padding: var(--arc-space-lg);

    background: var(--arc-bg-dark);

    border-bottom: 1px solid rgba(0, 229, 255, 0.30);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.45);
}

.arc-header.menu-open .arc-nav-list {
    flex-direction: column;
    align-items: stretch;

    gap: 0;
}

.arc-header.menu-open .arc-nav-list a {
    display: block;

    padding-block: var(--arc-space-md);

    border-bottom: 1px solid rgba(0, 229, 255, 0.12);
}

.arc-header.menu-open .arc-nav-list li:last-child a {
    border-bottom: 0;
}


/* --------------------------------------------------------------------------
   Mobile menu icon — abierto
   -------------------------------------------------------------------------- */

.arc-header.menu-open .arc-menu-toggle-line:nth-child(2) {
    transform: translateY(7px) rotate(45deg);
}

.arc-header.menu-open .arc-menu-toggle-line:nth-child(3) {
    opacity: 0;
}

.arc-header.menu-open .arc-menu-toggle-line:nth-child(4) {
    transform: translateY(-7px) rotate(-45deg);
}


/* --------------------------------------------------------------------------
   Tablet / Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {

    .arc-header-inner {
        min-height: 58px;
    }

    .arc-logo {
        max-width: 200px;
    }

    .arc-menu-toggle {
        display: none;
    }

    .arc-nav {
        display: block;
        margin-inline-start: auto;
    }

    .arc-header-actions {
        margin-inline-start: var(--arc-space-lg);
    }

    .arc-header-buy {
        display: inline-flex;
    }

    .arc-cart {
        width: 46px;
        height: 46px;
    }

    .arc-cart img {
        width: 30px;
    }
}


/* --------------------------------------------------------------------------
   Large desktop
   -------------------------------------------------------------------------- */

@media (min-width: 1200px) {

    .arc-header-inner {
        min-height: 68px;
    }

    .arc-logo {
        max-width: 170px;
    }

    .arc-nav-list {
        gap: var(--arc-space-xl);
    }

    .arc-nav-list a {
        font-size: 0.85rem;
    }

    .arc-cart img {
        width: 32px;
    }
}


/* --------------------------------------------------------------------------
   WordPress admin bar
   -------------------------------------------------------------------------- */

@media (min-width: 783px) {

    body.admin-bar .arc-header {
        top: 32px;
    }
}

@media (max-width: 782px) {

    body.admin-bar .arc-header {
        top: 46px;
    }
}