/* ==========================================================================
   SS FASHION - Header & Navbar Styling (Pixel-matched to reference)
   ========================================================================== */

:root {
    --ss-burgundy: #782337;
    --ss-burgundy-dark: #5c1828;
    --ss-gold: #c5a46d;
    --ss-gold-light: #eed59b;
    --ss-ivory: #fcfbf7;
    --ss-cream: #faf5ee;
    --ss-border: rgba(120, 35, 55, 0.09);
    --ss-text: #2c2421;
    --ss-text-muted: #6b5e58;
    --ss-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --ss-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 1. Top Slim Announcement Bar */
.top-announcement-bar {
    background-color: var(--ss-burgundy);
    color: #ffffff;
    font-family: var(--ss-font-sans);
    font-size: 11px;
    letter-spacing: 0.08em;
    font-weight: 500;
    padding: 7px 16px;
    text-align: center;
    position: relative;
    z-index: 1002;
    transition: background-color 0.25s ease;
}

.top-announcement-bar:hover {
    background-color: #631c2d;
}

@media (max-width: 480px) {
    .top-announcement-bar {
        font-size: 10px;
        letter-spacing: 0.04em;
        padding: 6px 12px;
        line-height: 1.4;
    }
}

.announcement-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.announcement-sparkle {
    color: var(--ss-gold-light);
    font-size: 10px;
}

.announcement-arrow {
    font-size: 14px;
    line-height: 1;
    opacity: 0.8;
}

/* 2. Main Site Header */
.site-header {
    background-color: var(--ss-ivory);
    border-bottom: 1px solid var(--ss-border);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(120, 35, 55, 0.03);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header Main Row (Left / Center / Right) */
.header-main-row {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 36px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Left Section: Menu & Search Buttons */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-btn {
    background: none;
    border: none;
    padding: 6px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ss-text);
    font-family: var(--ss-font-sans);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-btn:hover {
    color: var(--ss-burgundy);
}

.nav-btn .nav-icon {
    stroke: currentColor;
    display: block;
}

.nav-btn .nav-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Center Section: Best SS FASHION Logo */
.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ss-burgundy);
    user-select: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.brand-logo:hover {
    opacity: 0.95;
    transform: scale(1.01);
}

/* Large Serif Monogram "SS" */
.brand-monogram {
    font-family: var(--ss-font-serif);
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -3px;
    color: var(--ss-burgundy);
}

/* Right Column of Logo: Crown above "FASHION" */
.brand-text-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.brand-crown {
    width: 28px;
    height: 16px;
    margin-bottom: 2px;
    filter: drop-shadow(0 1px 1px rgba(197, 164, 109, 0.35));
}

.brand-word {
    font-family: var(--ss-font-serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.28em;
    line-height: 1;
    color: var(--ss-burgundy);
    margin-right: -0.28em; /* Offset trailing tracking */
}

/* Right Section: Wishlist, Cart & Account Icons */
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
}

.action-btn {
    position: relative;
    background: none;
    border: none;
    padding: 6px;
    color: var(--ss-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.action-btn:hover {
    color: var(--ss-burgundy);
    transform: translateY(-1px);
}

.action-btn svg {
    display: block;
    stroke: currentColor;
}

/* Cart Badge */
.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: 0px;
    right: -2px;
    width: 16px;
    height: 16px;
    background-color: var(--ss-burgundy);
    color: #ffffff;
    font-family: var(--ss-font-sans);
    font-size: 9.5px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1.5px solid var(--ss-ivory);
}

/* 3. Mobile Search Strip (Koskii Style) */
.mobile-search-strip {
    display: none;
    padding: 6px 14px 10px;
    background-color: var(--ss-ivory);
}

.mobile-search-pill {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid rgba(197, 164, 109, 0.4);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--ss-text-muted);
    font-family: var(--ss-font-sans);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 8px rgba(40, 35, 33, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-search-pill svg {
    color: var(--ss-burgundy);
    flex-shrink: 0;
}

.mobile-search-placeholder {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #8c827b;
}

/* 4. Category Navigation Strip Underneath */
.category-navbar {
    border-top: 1px solid var(--ss-border);
    background-color: var(--ss-ivory);
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(22px, 3.8vw, 54px);
}

.category-links a {
    color: var(--ss-text);
    font-family: var(--ss-font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.category-links a:hover,
.category-links a.active {
    color: var(--ss-burgundy);
}

.category-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0%;
    height: 1.5px;
    background-color: var(--ss-burgundy);
    transition: width 0.25s ease;
}

.category-links a:hover::after,
.category-links a.active::after {
    width: 100%;
}

/* 4. Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 35, 33, 0.6);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-box {
    width: 90%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    animation: searchDrop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDrop {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.search-form {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-form input {
    flex: 1;
    border: none;
    font-family: var(--ss-font-sans);
    font-size: 16px;
    outline: none;
    color: var(--ss-text);
}

.search-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--ss-text-muted);
    cursor: pointer;
    line-height: 1;
}

/* 5. Mobile Drawer Navigation */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 35, 33, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(85%, 340px);
    height: 100%;
    background-color: var(--ss-ivory);
    z-index: 1600;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ss-border);
}

.drawer-brand {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.drawer-ss {
    font-family: var(--ss-font-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--ss-burgundy);
}

.drawer-fashion {
    font-family: var(--ss-font-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--ss-burgundy);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--ss-text);
    cursor: pointer;
    line-height: 1;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
}

.drawer-nav a {
    padding: 13px 0;
    color: var(--ss-text);
    font-family: var(--ss-font-serif);
    font-size: 17px;
    text-decoration: none;
    border-bottom: 1px solid rgba(120, 35, 55, 0.06);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.drawer-nav a:hover {
    color: var(--ss-burgundy);
    padding-left: 4px;
}

.drawer-nav a.drawer-highlight-link {
    color: var(--ss-burgundy);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-nav a.drawer-highlight-link::after {
    content: 'NEW';
    font-family: var(--ss-font-sans);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--ss-burgundy);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 999px;
}

.drawer-divider {
    border: none;
    border-top: 1px solid var(--ss-border);
    margin: 14px 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
    .header-main-row {
        padding: 0 20px;
        height: 64px;
    }
    
    .nav-btn .nav-label {
        display: none; /* Icon-only on tablets/mobile */
    }
    
    .header-left {
        gap: 16px;
    }
    
    .header-right {
        gap: 16px;
    }
    
    .brand-monogram {
        font-size: 38px;
    }
    
    .brand-word {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .mobile-search-strip {
        display: block;
    }

    .category-navbar {
        height: 38px;
        display: block;
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid rgba(120, 35, 55, 0.08);
    }

    .category-navbar::-webkit-scrollbar {
        display: none;
    }

    .category-links {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 0 12px;
        min-width: 100%;
    }

    .category-links a {
        font-size: 10px;
        letter-spacing: 0.08em;
        padding: 10px 2px;
        flex-shrink: 0;
    }
}

@media (max-width: 600px) {
    .header-main-row {
        height: 56px;
        padding: 0 12px;
    }

    /* Hide desktop search button on mobile (since mobile search strip is right below); keep Admin/Account icon visible! */
    .header-left .search-btn {
        display: none;
    }

    .header-right .header-account-btn {
        display: inline-flex;
    }

    .header-left {
        flex: 0 0 auto;
    }

    .header-center {
        flex: 1;
        justify-content: center;
    }

    .header-right {
        flex: 0 0 auto;
        gap: 12px;
    }

    .brand-monogram {
        font-size: 30px;
        letter-spacing: -2px;
    }

    .brand-crown {
        width: 20px;
        height: 12px;
    }

    .brand-word {
        font-size: 12px;
        letter-spacing: 0.22em;
    }

    .action-btn {
        padding: 4px;
    }

    .action-btn svg {
        width: 19px;
        height: 19px;
    }

    .nav-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 360px) {
    .header-main-row {
        height: 52px;
        padding: 0 8px;
    }

    .brand-monogram {
        font-size: 26px;
        letter-spacing: -1.5px;
    }

    .brand-crown {
        width: 17px;
        height: 10px;
    }

    .brand-word {
        font-size: 10.5px;
        letter-spacing: 0.18em;
    }

    .header-right {
        gap: 8px;
    }

    .action-btn svg {
        width: 18px;
        height: 18px;
    }

    .nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .mobile-search-strip {
        padding: 4px 8px 8px;
    }

    .mobile-search-pill {
        padding: 6px 10px;
        font-size: 11px;
    }
}
