/**
 * SaigonSticker - New Header Stylesheet
 * Matching design from customdesign.md screenshot
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --ss-pink: #ec008c;
    --ss-pink-hover: #d8007e;
    --ss-pink-gradient: linear-gradient(135deg, #f43f5e 0%, #ec008c 100%);
    --ss-pink-light: rgba(236, 0, 140, 0.08);
    --ss-pink-glow: rgba(236, 0, 140, 0.32);
    --ss-dark: #1e293b;
    --ss-slate: #334155;
    --ss-gray: #64748b;
    --ss-gray-light: #f8fafc;
    --ss-border: #e2e8f0;
    --ss-header-height: 78px;
    --ss-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    --ss-font: 'Plus Jakarta Sans', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header container & bar */
.ss-header {
    background: #ffffff !important;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: var(--ss-shadow);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    font-family: var(--ss-font);
    transition: all 0.3s ease;
}

.ss-header-container {
    max-width: 1540px !important;
    width: 100% !important;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.ss-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--ss-header-height);
    position: relative;
    width: 100%;
}

/* Brand Logo */
.ss-brand {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    flex-shrink: 0;
    padding-right: 20px;
}

.ss-brand-icon {
    width: 38px;
    height: 38px;
    margin-right: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ss-brand:hover .ss-brand-icon {
    transform: rotate(6deg) scale(1.05);
}

.ss-brand-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ss-brand-text {
    display: flex;
    flex-direction: column;
}

.ss-brand-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    font-family: var(--ss-font);
}

.ss-brand-name-dark {
    color: #1e293b;
}

.ss-brand-name-pink {
    color: var(--ss-pink);
    margin-left: 2px;
}

.ss-brand-tagline {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ss-gray);
    line-height: 1.3;
    margin-top: 2px;
    letter-spacing: -0.1px;
}

/* Main Navigation */
.ss-nav-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ss-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.ss-nav-item {
    position: relative;
    list-style: none;
}

.ss-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ss-dark) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
    white-space: nowrap;
    border-radius: 6px;
    font-family: var(--ss-font);
}

.ss-nav-link:hover,
.ss-nav-item.active > .ss-nav-link,
.ss-nav-item:hover > .ss-nav-link {
    color: var(--ss-pink) !important;
}

.ss-nav-link .ss-chevron {
    font-size: 10px;
    margin-left: 5px;
    color: #94a3b8;
    transition: transform 0.25s ease, color 0.2s ease;
}

.ss-nav-item:hover .ss-chevron {
    transform: rotate(180deg);
    color: var(--ss-pink);
}

/* Dropdown styling */
.ss-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid var(--ss-border);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.05);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 1050;
}

.ss-nav-item:hover > .ss-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mega dropdown for categories */
.ss-dropdown-mega {
    width: 620px;
    left: -120px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 12px;
    max-height: 450px;
    overflow-y: auto;
}

.ss-dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ss-slate) !important;
    text-decoration: none !important;
    transition: all 0.18s ease;
    font-family: var(--ss-font);
}

.ss-dropdown-item:hover {
    background: var(--ss-pink-light);
    color: var(--ss-pink) !important;
    transform: translateX(3px);
}

.ss-dropdown-item i.ss-item-icon {
    font-size: 12px;
    width: 20px;
    margin-right: 8px;
    color: var(--ss-pink);
    opacity: 0.85;
}

/* Right Section Actions */
.ss-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    margin-left: 15px;
}

/* Search Trigger & Search Box */
.ss-search-wrap {
    position: relative;
}

.ss-search-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 18px;
    color: var(--ss-dark);
    cursor: pointer;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ss-search-btn:hover {
    background: var(--ss-gray-light);
    color: var(--ss-pink);
}

.ss-search-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid var(--ss-border);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    padding: 10px;
    display: none;
    z-index: 1060;
}

.ss-search-dropdown.active {
    display: block;
    animation: ssFadeDown 0.2s ease;
}

.ss-search-input-group {
    display: flex;
    align-items: center;
    background: var(--ss-gray-light);
    border: 1px solid var(--ss-border);
    border-radius: 8px;
    padding: 2px 6px 2px 12px;
    transition: border-color 0.2s;
}

.ss-search-input-group:focus-within {
    border-color: var(--ss-pink);
    box-shadow: 0 0 0 3px rgba(236, 0, 140, 0.15);
}

.ss-search-input {
    border: none;
    background: transparent;
    font-size: 13.5px;
    width: 100%;
    padding: 8px 6px;
    outline: none !important;
    color: var(--ss-dark);
    font-family: var(--ss-font);
}

.ss-search-submit {
    background: var(--ss-pink);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.ss-search-submit:hover {
    background: var(--ss-pink-hover);
}

/* Hotline Box */
.ss-hotline {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 9px;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.ss-hotline:hover {
    background: var(--ss-gray-light);
}

.ss-hotline-icon {
    width: 32px;
    height: 32px;
    color: var(--ss-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.ss-hotline:hover .ss-hotline-icon {
    transform: rotate(12deg) scale(1.1);
}

.ss-hotline-icon svg {
    width: 22px;
    height: 22px;
}

.ss-hotline-content {
    display: flex;
    flex-direction: column;
}

.ss-hotline-label {
    font-size: 11px;
    color: var(--ss-gray);
    font-weight: 500;
    line-height: 1.1;
    font-family: var(--ss-font);
}

.ss-hotline-number {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ss-pink);
    line-height: 1.25;
    letter-spacing: -0.2px;
    font-family: var(--ss-font);
}

/* CTA Button ("Tính giá ngay") */
.ss-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ss-pink-gradient);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 9999px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px var(--ss-pink-glow);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: var(--ss-font);
}

.ss-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 0, 140, 0.45);
    color: #ffffff !important;
}

.ss-btn-cta:active {
    transform: translateY(0);
}

.ss-btn-cta svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* Mobile Toggle Hamburger */
.ss-mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--ss-dark);
    font-size: 22px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ss-mobile-toggle:hover {
    background: var(--ss-gray-light);
    color: var(--ss-pink);
}

/* Mobile Offcanvas Drawer */
.ss-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

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

.ss-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: #ffffff;
    z-index: 2001;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-family: var(--ss-font);
}

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

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

.ss-drawer-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--ss-gray);
    cursor: pointer;
    padding: 4px;
}

.ss-drawer-close:hover {
    color: var(--ss-pink);
}

.ss-drawer-body {
    padding: 16px 20px;
    flex: 1;
}

.ss-drawer-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.ss-drawer-item {
    border-bottom: 1px solid #f1f5f9;
}

.ss-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ss-dark) !important;
    text-decoration: none !important;
}

.ss-drawer-link:hover {
    color: var(--ss-pink) !important;
}

.ss-drawer-submenu {
    list-style: none;
    padding: 0 0 8px 16px;
    margin: 0;
    display: none;
}

.ss-drawer-item.open .ss-drawer-submenu {
    display: block;
}

.ss-drawer-item.open .ss-drawer-chevron {
    transform: rotate(180deg);
}

.ss-drawer-sublink {
    display: block;
    padding: 7px 4px;
    font-size: 14px;
    color: var(--ss-slate) !important;
    text-decoration: none !important;
}

.ss-drawer-sublink:hover {
    color: var(--ss-pink) !important;
}

.ss-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--ss-border);
    background: var(--ss-gray-light);
}

/* Animations */
@keyframes ssFadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 1399.98px) {
    .ss-nav {
        gap: 4px;
    }
    .ss-nav-link {
        padding: 8px 10px;
        font-size: 13.5px;
    }
    .ss-actions {
        gap: 14px;
        margin-left: 10px;
    }
    .ss-btn-cta {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 1199.98px) {
    .ss-nav {
        gap: 2px;
    }
    .ss-nav-link {
        padding: 8px 7px;
        font-size: 13px;
    }
    .ss-actions {
        gap: 10px;
        margin-left: 8px;
    }
    .ss-brand {
        padding-right: 12px;
    }
    .ss-brand-tagline {
        display: none;
    }
    .ss-hotline-content {
        display: none;
    }
    .ss-btn-cta {
        padding: 8px 13px;
        font-size: 12.5px;
    }
}

@media (max-width: 991.98px) {
    .ss-nav-wrap {
        display: none !important;
    }
    .ss-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: -1;
        margin-right: 8px;
    }
    .ss-brand-tagline {
        display: none;
    }
    .ss-hotline-content {
        display: none;
    }
    .ss-hotline-icon {
        width: 36px;
        height: 36px;
    }
    .ss-btn-cta span {
        display: none;
    }
    .ss-btn-cta {
        padding: 9px;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
    .ss-btn-cta svg {
        margin: 0 !important;
    }
}

@media (max-width: 575.98px) {
    :root {
        --ss-header-height: 64px;
    }
    .ss-brand-title {
        font-size: 17px;
    }
    .ss-brand-icon {
        width: 30px;
        height: 30px;
        margin-right: 6px;
    }
    .ss-actions {
        gap: 8px;
    }
    .ss-search-dropdown {
        width: 280px;
        right: -30px;
    }
}
