/* GS Header Styles */
:root {
    --gs-primary: #161A45;
    --gs-secondary: #E63946;
    --gs-text: #333;
    --gs-text-light: #666;
    --gs-border: #e0e0e0;
    --gs-bg-light: #f8f9fa;
    --gs-white: #fff;
    --gs-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Container */
.gs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Base */
.gs-header {
    position: relative;
    z-index: 9999;
    background: var(--gs-white);
}

.gs-header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: var(--gs-shadow);
    animation: slideDown 0.3s ease;
}

.gs-header-sticky .gs-header-top {
    display: none;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Header Top Bar */
.gs-header-top {
    background: var(--gs-primary);
    color: var(--gs-white);
    font-size: 13px;
    padding: 8px 0;
}

.gs-header-top .gs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gs-header-top-left {
    display: flex;
    gap: 20px;
}

.gs-usp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gs-usp .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #4CAF50;
}

.gs-header-top-right {
    display: flex;
    gap: 20px;
}

.gs-header-top-right a {
    color: var(--gs-white);
    text-decoration: none;
    transition: opacity 0.2s;
}

.gs-header-top-right a:hover {
    opacity: 0.8;
}

/* Header Main */
.gs-header-main {
    padding: 15px 0;
    border-bottom: 1px solid var(--gs-border);
}

.gs-header-main .gs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.gs-header-logo a {
    display: block;
}

.gs-header-logo img.gs-logo {
    max-height: 50px;
    width: auto;
}

.gs-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--gs-primary);
}

/* Navigation */
.gs-header-nav {
    flex: 1;
}

.gs-nav-menu {
    display: flex;
    justify-content: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gs-nav-menu > li {
    position: relative;
}

.gs-nav-menu > li > a {
    display: block;
    padding: 10px 15px;
    color: var(--gs-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.gs-nav-menu > li > a:hover,
.gs-nav-menu > li.current-menu-item > a {
    color: var(--gs-secondary);
}

/* Dropdown */
.gs-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--gs-white);
    border-radius: 4px;
    box-shadow: var(--gs-shadow);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
}

.gs-nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gs-nav-menu .sub-menu li a {
    display: block;
    padding: 8px 20px;
    color: var(--gs-text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.gs-nav-menu .sub-menu li a:hover {
    background: var(--gs-bg-light);
    color: var(--gs-secondary);
}

/* Header Actions */
.gs-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gs-header-search-link,
.gs-header-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gs-bg-light);
    color: var(--gs-text);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.gs-header-search-link:hover,
.gs-header-cart:hover {
    background: var(--gs-primary);
    color: var(--gs-white);
}

.gs-header-cart {
    position: relative;
}

.gs-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gs-secondary);
    color: var(--gs-white);
    font-size: 11px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Toggle */
.gs-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.gs-hamburger {
    display: block;
    width: 24px;
    height: 18px;
    position: relative;
}

.gs-hamburger span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gs-text);
    transition: all 0.3s;
}

.gs-hamburger span:nth-child(1) {
    top: 0;
}

.gs-hamburger span:nth-child(2) {
    top: 8px;
}

.gs-hamburger span:nth-child(3) {
    top: 16px;
}

.gs-mobile-toggle.active .gs-hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

.gs-mobile-toggle.active .gs-hamburger span:nth-child(2) {
    opacity: 0;
}

.gs-mobile-toggle.active .gs-hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

/* Search Overlay */
.gs-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.gs-search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.gs-search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    outline: none;
}

.gs-search-submit {
    padding: 15px 30px;
    background: var(--gs-secondary);
    color: var(--gs-white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gs-search-submit:hover {
    background: #c5303d;
}

.gs-search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--gs-white);
    cursor: pointer;
    padding: 10px;
}

/* Mobile Menu */
.gs-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--gs-white);
    z-index: 10000;
    transition: right 0.3s;
    overflow-y: auto;
}

.gs-mobile-menu.active {
    right: 0;
}

/* Mobile Close Button */
.gs-mobile-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gs-bg-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gs-text);
    transition: all 0.2s;
    z-index: 10;
}

.gs-mobile-close:hover {
    background: var(--gs-secondary);
    color: var(--gs-white);
}

.gs-mobile-menu-inner {
    padding: 80px 20px 20px;
}

.gs-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gs-mobile-nav-menu li {
    border-bottom: 1px solid var(--gs-border);
}

.gs-mobile-nav-menu li a {
    display: block;
    padding: 15px 0;
    color: var(--gs-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.gs-mobile-nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 20px;
    display: none;
}

.gs-mobile-nav-menu .submenu-open > .sub-menu {
    display: block;
}

.gs-mobile-nav-menu .sub-menu li a {
    font-size: 14px;
    font-weight: 400;
    padding: 10px 0;
}

.gs-mobile-menu-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gs-border);
}

.gs-mobile-menu-footer a {
    display: block;
    padding: 10px 0;
    color: var(--gs-text);
    text-decoration: none;
}

.gs-mobile-phone {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--gs-primary) !important;
}

/* Mobile Menu Button */
.gs-mobile-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 10px;
}

.gs-mobile-btn-primary {
    background: #EC8B5D;
    color: #fff !important;
}

.gs-mobile-btn-primary:hover {
    background: #d67a4f;
}

body.gs-menu-open {
    overflow: hidden;
}

body.gs-menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Responsive */
@media (max-width: 1200px) {
    .gs-nav-menu > li > a {
        padding: 10px 10px;
        font-size: 14px;
    }
}

@media (max-width: 991px) {
    .gs-header-top-left {
        display: none;
    }

    .gs-header-nav {
        display: none;
    }

    .gs-mobile-toggle {
        display: block;
    }
}

@media (max-width: 600px) {
    .gs-header-top-right {
        gap: 10px;
        font-size: 12px;
    }

    .gs-header-actions {
        gap: 8px;
    }

    .gs-header-search button,
    .gs-header-account,
    .gs-header-cart {
        width: 36px;
        height: 36px;
    }

    .gs-header-logo img.gs-logo {
        max-height: 40px;
    }
}

/* Promo Bar */
.gs-promo-bar {
    background: #000;
    color: #fff;
    padding: 10px 0;
}

.gs-promo-bar .gs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gs-promo-text {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gs-countdown {
    display: flex;
    gap: 15px;
}

.gs-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.gs-countdown-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #EC8B5D;
}

.gs-countdown-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

@media (max-width: 600px) {
    .gs-promo-bar .gs-container {
        gap: 10px;
    }

    .gs-promo-text {
        font-size: 13px;
        text-align: center;
        width: 100%;
    }

    .gs-countdown {
        gap: 10px;
    }

    .gs-countdown-item {
        min-width: 35px;
    }

    .gs-countdown-number {
        font-size: 18px;
    }

    .gs-countdown-label {
        font-size: 9px;
    }
}

/* Body padding when header is sticky */
body.admin-bar .gs-header-sticky {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .gs-header-sticky {
        top: 46px;
    }
}

/* Prevent WooFC from overwriting cart icon */
.gs-header-cart.woofc-cart-link > svg {
    display: block !important;
}

.gs-header-cart.woofc-cart-link > i,
.gs-header-cart.woofc-cart-link > span:not(.gs-cart-count),
.gs-header-cart.woofc-cart-link::before,
.gs-header-cart.woofc-cart-link::after {
    display: none !important;
}
