/* ==========================================================================
   ROGX Beauty - Header System (Stitch Design Integration)
   ========================================================================== */

.stitch-site-header {
    width: 100%;
    position: relative;
    background-color: var(--stitch-on-surface); /* Solid dark background by default */
    color: var(--stitch-surface-bright); /* White text */
    z-index: 1000;
}

/* Transparent Overlay Modifier (Used on Homepage) */
.stitch-site-header.is-transparent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    background-color: transparent;
    border-bottom: none;
}

.stitch-header-container {
    width: 100%;
    max-width: var(--stitch-container-max);
    margin: 0 auto;
    padding: var(--stitch-unit-lg) var(--stitch-margin-desktop);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--stitch-unit-lg);
}

@media (max-width: 1023px) {
    .stitch-header-container {
        padding: var(--stitch-unit-md) var(--stitch-margin-mobile);
        gap: var(--stitch-unit-sm);
    }
}

/* Header Columns */
.stitch-header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.stitch-header-center {
    text-align: center;
}

.stitch-header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 1023px) {
    .stitch-header-left {
        display: none; /* Hide left nav on mobile */
    }
    .stitch-header-center {
        text-align: left; /* Align logo to left on mobile if preferred, but stitch has it center/left depending on flex */
        flex: 1;
    }
}

/* Navigation Lists (Split Nav) */
.stitch-desktop-split-nav {
    display: flex;
    gap: var(--stitch-unit-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 1023px) {
    .stitch-desktop-split-nav {
        display: none;
    }
}

.stitch-nav-right-margin {
    margin-right: var(--stitch-unit-md);
}

.stitch-desktop-split-nav a,
.stitch-desktop-split-nav li a {
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stitch-surface-bright);
    text-decoration: none;
    transition: color 0.2s ease;
}

.stitch-desktop-split-nav a:hover,
.stitch-desktop-split-nav li a:hover {
    color: var(--stitch-primary);
}

/* Logo */
.stitch-logo-link {
    text-decoration: none;
    display: inline-block;
}

.stitch-text-logo {
    font-family: var(--stitch-font-display);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    color: var(--stitch-surface-bright);
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.stitch-text-primary {
    color: var(--stitch-primary);
}

.custom-logo {
    max-height: 80px;
    width: auto;
}

/* Utility Icons */
.stitch-utility-icons {
    display: flex;
    align-items: center;
    gap: var(--stitch-unit-sm);
    color: var(--stitch-surface-bright);
}

.stitch-icon-btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: color 0.2s ease;
    padding: 4px;
}

.stitch-icon-btn:hover {
    color: var(--stitch-primary);
}

.stitch-cart-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: var(--stitch-primary);
    color: var(--stitch-on-primary);
    font-size: 10px;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stitch-mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--stitch-surface-bright);
    cursor: pointer;
    display: none;
    padding: 4px;
}

@media (max-width: 1023px) {
    .stitch-mobile-menu-btn {
        display: flex;
    }
}

/* Mobile Side Drawer */
.stitch-mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(49, 48, 48, 0.5); /* inverse-surface */
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stitch-mobile-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.stitch-mobile-drawer {
    position: fixed;
    inset: 0 0 0 -100%;
    width: 320px;
    max-width: 80vw;
    background-color: var(--stitch-surface);
    border-right: 1px solid var(--stitch-on-surface);
    box-shadow: 25px 0 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
}

.stitch-mobile-drawer.is-open {
    transform: translateX(100%);
}

.stitch-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--stitch-unit-md);
    border-bottom: 1px solid var(--stitch-surface-variant);
}

.stitch-drawer-title {
    font-family: var(--stitch-font-display);
    color: var(--stitch-primary);
    font-size: 32px;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
}

.stitch-drawer-subtitle {
    font-family: var(--stitch-font-body);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--stitch-on-surface);
    margin: 4px 0 0 0;
}

.stitch-drawer-close {
    background: transparent;
    border: none;
    color: var(--stitch-on-surface);
    cursor: pointer;
    font-size: 24px;
}

.stitch-drawer-close:hover {
    color: var(--stitch-primary);
}

.stitch-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--stitch-unit-sm) 0;
}

.stitch-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.stitch-mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: var(--stitch-unit-md);
    padding: var(--stitch-unit-sm) var(--stitch-margin-mobile);
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stitch-on-surface);
    text-decoration: none;
    transition: all 0.2s ease;
    transform-origin: left;
}

.stitch-mobile-nav-list li a:hover {
    background-color: var(--stitch-on-surface);
    color: var(--stitch-surface);
    transform: scale(0.98);
}
