/* ============================================================
   MOBILESHOP HEADER — header.css
   ============================================================ */

/* ── Hide Native Theme Header ──────────────────────────────── */
.site-header, #masthead, #header, .elementor-location-header, .main-header, .header-main, nav.navbar, .navbar {
    display: none !important;
}

/* ── Top Bar (Announcements) ──────────────────────────────── */
#ms-topbar {
    background: var(--primary);
    color: var(--white);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-family: var(--font-family);
    font-size: var(--fs-13);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ms-topbar__slides {
    overflow: hidden;
    width: 100%;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
}

.ms-topbar__track {
    display: flex;
    width: max-content;
    animation: ms-topbar-scroll 20s linear infinite;
}

.ms-topbar__slide {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    padding: 0 48px;
}

@keyframes ms-topbar-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Main Header ──────────────────────────────────────────── */
#ms-header {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 999;
    background: transparent;
    display: flex;
    align-items: center;
    font-family: var(--font-family);
    color: var(--white);
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

#ms-header.ms-header--solid {
    text-shadow: none;
}

/* GPU-friendly solid state: use opacity transition on a layer-backed pseudo */
#ms-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
    box-shadow: 0 4px 20px var(--overlay-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#ms-header.ms-header--solid {
    color: var(--text);
    box-shadow: 0 4px 20px var(--overlay-light);
}

#ms-header.ms-header--solid::before {
    opacity: 1;
}

.ms-header__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hamburger */
.ms-header__hamburger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-left: -8px;
    color: inherit;
}

.ms-header__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: all 0.2s ease;
}

/* Logo */
.ms-header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.ms-header__logo-text {
    font-size: var(--fs-28);
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--logo-dot-color);
    border-radius: 50%;
    margin: 0 2px;
    box-shadow: inset 0 0 0 4px #000;
}

#ms-header.ms-header--solid .logo-dot {
    box-shadow: none;
}

/* Right Actions */
.ms-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ms-header__icon-btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
}

.ms-header__icon-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#ms-cart-btn .ms-cart-count {
    position: absolute;
    top: 2px;
    right: 0;
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-10);
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Lang Dropdown */
.ms-lang {
    position: relative;
}

.ms-lang__btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: var(--fs-13);
    font-weight: 500;
    padding: 8px;
}

.ms-lang__chevron {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.ms-lang--open .ms-lang__chevron {
    transform: rotate(180deg);
}

.ms-lang__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    color: var(--text);
    border-radius: 8px;
    box-shadow: 0 10px 40px var(--overlay-medium);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.ms-lang--open .ms-lang__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ms-lang__option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--fs-14);
    text-align: left;
    color: var(--text);
}

.ms-lang__option:hover {
    background: rgba(0,0,0,0.03);
}

.ms-flag-icon {
    font-size: var(--fs-16);
    line-height: 1;
}
.ms-flag-icon--lg {
    font-size: var(--fs-18);
}

/* ── Sidebar Overlay ──────────────────────────────────────── */
#ms-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ms-sidebar-overlay--visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ── Sidebar ──────────────────────────────────────────────── */
#ms-sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: 420px;
    max-width: 90vw;
    background: var(--white);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    -webkit-transform: translateX(calc(-100% - 20px));
    transform: translateX(calc(-100% - 20px));
    transition: -webkit-transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px var(--overlay-medium);
    overflow: hidden;
}

#ms-sidebar.ms-sidebar--open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

.ms-sidebar__head {
    padding: 24px 32px 10px 32px;
    display: flex;
    align-items: center;
}

.ms-sidebar__close {
    background: transparent;
    border: 1px solid var(--overlay-medium);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-18);
    color: var(--text);
    transition: background 0.2s;
}

.ms-sidebar__close:hover {
    background: var(--overlay-light);
}

.ms-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 32px;
}

.ms-sidebar__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ms-sidebar__nav li {
    margin: 0;
    padding: 0;
}

.ms-sidebar__nav::-webkit-scrollbar {
    width: 6px;
}
.ms-sidebar__nav::-webkit-scrollbar-track {
    background: transparent;
}
.ms-sidebar__nav::-webkit-scrollbar-thumb {
    background: var(--overlay-15);
    border-radius: 6px;
}

.ms-sidebar__nav a {
    display: block;
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 400;
    color: var(--text);
    font-size: var(--fs-26);
    line-height: 34px;
    padding: 10px 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ms-sidebar__nav a:hover {
    opacity: 0.6;
}

.ms-sidebar__foot {
    padding: 10px 32px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ms-sidebar__social {
    display: flex;
    gap: 16px;
}

.ms-sidebar__social a {
    color: var(--text);
    transition: opacity 0.2s;
}

.ms-sidebar__social a:hover {
    opacity: 0.6;
}

.ms-sidebar__bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--overlay-light);
}

.ms-sidebar__lang-inline {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family);
    font-size: var(--fs-14);
    color: var(--text);
    cursor: pointer;
    padding: 0;
}

.ms-sidebar__account-link {
    color: var(--text);
    font-size: var(--fs-14);
    font-family: var(--font-family);
    text-decoration: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
    .ms-header__desktop-only { display: none !important; }
}

@media (max-width: 768px) {
    #ms-topbar { font-size: 8px; height: 30px; }
    .ms-header__inner { padding: 0 16px; }
    .ms-header__logo-text { font-size: var(--fs-24); }
    .logo-dot { width: 16px; height: 16px; }
    
    #ms-sidebar {
        top: 0;
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        border-radius: 0;
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
    }
    
    .ms-sidebar__head, .ms-sidebar__nav, .ms-sidebar__foot {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .ms-sidebar__nav a {
        font-size: var(--fs-22);
        line-height: 30px;
    }
}
