/* ==========================================================================
   Jeeva Earth Custom Header Stylesheet
   Matching Reference Design
   ========================================================================== */

/* Wrapper */
.jeeva-header-wrapper {
    width: 100%;
    background-color: #ffffff;
    position: relative;
    z-index: 1000;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* 1. Top Green Accent / Announcement Bar */
.jeeva-header-top-bar {
    width: 100%;
    background-color: var(--jeeva-green, #045A31);
    height: 8px;
    line-height: 0;
    transition: all 0.2s ease;
}

.jeeva-header-top-bar.has-text {
    height: auto;
    background-color: var(--jeeva-green, #045A31);
    padding: 8px 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15px;
    line-height: normal;
}

.jeeva-top-bar-inner {
    justify-content: center !important;
    text-align: center;
}

.jeeva-top-bar-content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
    text-align: center;
    gap: 24px;
    flex-wrap: wrap;
    margin: 0 auto;
}

.jeeva-top-bar-item {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
}

.jeeva-top-bar-separator {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
    font-size: 13px;
}

/* Container */
.jeeva-header-inner-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 2. Main Header Row */
.jeeva-header-main {
    padding: 14px 0;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.jeeva-header-logo-col {
    flex-shrink: 0;
}

.jeeva-header-logo-col .custom-logo-link,
.jeeva-logo-link {
    display: block;
    text-decoration: none;
    line-height: 1;
}

.jeeva-header-logo-col img.custom-logo,
.jeeva-brand-logo-svg {
    display: block;
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

/* Search Bar Pill */
.jeeva-header-search-col {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.jeeva-search-form-pill {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    background-color: #ffffff;
    padding: 4px 6px 4px 20px;
    width: 100%;
    max-width: 560px;
    height: 48px;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.jeeva-search-form-pill:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Category Dropdown */
.jeeva-search-cat-box {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.jeeva-search-select {
    border: none !important;
    background: transparent !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    padding: 0 18px 0 0 !important;
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.jeeva-dropdown-arrow {
    position: absolute;
    right: 2px;
    pointer-events: none;
    color: #64748b;
    display: flex;
    align-items: center;
}

/* Divider */
.jeeva-search-divider {
    width: 1px;
    height: 22px;
    background-color: #e2e8f0;
    margin: 0 16px;
    flex-shrink: 0;
}

/* Input Field */
.jeeva-search-field {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px !important;
    color: #1e293b !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    min-width: 0;
}

.jeeva-search-field::placeholder {
    color: #94a3b8;
}

/* Circular Search Button */
.jeeva-search-btn {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background: var(--jeeva-orange, #F47521) !important;
    border: none !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0;
    box-shadow: none !important;
    padding: 0 !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
}

.jeeva-search-btn:hover {
    background-color: var(--jeeva-orange-hover, #dd6212) !important;
    transform: scale(1.05);
}

.jeeva-search-lens-icon {
    display: block;
}

/* 3. Bottom Nav & Actions Row */
.jeeva-header-nav-row {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.jeeva-primary-nav {
    display: block;
}

.jeeva-nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.jeeva-nav-item,
.jeeva-nav-menu > li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.jeeva-nav-item a,
.jeeva-nav-menu > li > a {
    display: block;
    padding: 14px 0 16px;
    font-size: 14.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none !important;
    transition: color 0.2s ease;
    line-height: 1.2;
}

.jeeva-nav-item a:hover,
.jeeva-nav-menu > li > a:hover {
    color: var(--jeeva-orange, #F47521);
}

/* Active Item Orange Underline */
.jeeva-nav-item.active a,
.jeeva-nav-menu > li.current-menu-item > a,
.jeeva-nav-menu > li.current_page_item > a {
    color: #0f172a;
    font-weight: 700;
}

.jeeva-nav-item.active::after,
.jeeva-nav-menu > li.current-menu-item::after,
.jeeva-nav-menu > li.current_page_item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background-color: var(--jeeva-orange, #F47521);
    border-radius: 2px 2px 0 0;
}

/* Right Actions (Account & Cart) */
.jeeva-header-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}

.jeeva-header-action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.jeeva-header-action-btn:hover {
    color: var(--jeeva-orange, #F47521);
}

.jeeva-action-svg {
    display: block;
    flex-shrink: 0;
}

.jeeva-cart-status {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.jeeva-cart-total {
    font-weight: 700;
}

.jeeva-cart-count {
    color: #64748b;
    font-weight: 500;
    font-size: 13.5px;
}

/* Mobile Menu Toggle */
.jeeva-mobile-menu-btn {
    display: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.jeeva-hamburger-svg {
    display: block;
    width: 26px;
    height: 26px;
    stroke: #2c3e50;
    pointer-events: none;
}

/* Mobile Drawer */
.jeeva-mobile-drawer {
    display: none;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 18px 24px 24px;
}

.jeeva-mobile-drawer.is-open {
    display: block;
}

.jeeva-mobile-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 18px 0 !important;
}

.jeeva-mobile-nav li {
    margin: 0 0 12px 0 !important;
}

.jeeva-mobile-nav a {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: block;
    padding: 6px 0;
}

.jeeva-mobile-nav li.active a {
    color: var(--jeeva-orange, #F47521);
}

.jeeva-mobile-user-links {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.jeeva-mobile-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--jeeva-orange, #F47521);
    text-decoration: none;
}

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

/* Top Arrow Buttons (Mobile Slider) */
.jeeva-top-arrow {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1;
    outline: none;
    transition: opacity 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.jeeva-top-arrow:hover {
    opacity: 0.8;
}

.jeeva-top-arrow:active {
    transform: scale(0.92);
}

/* Mobile Action Buttons (Profile Circle, Cart Circle with Badge, Hamburger) */
.jeeva-header-mobile-actions {
    display: none;
}

.jeeva-mobile-action-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #ffffff;
    text-decoration: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.jeeva-mobile-action-circle:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.jeeva-mobile-action-circle:active {
    transform: scale(0.95);
}

.jeeva-mobile-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--jeeva-orange, #F47521);
    color: #ffffff;
    border-radius: 999px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #ffffff;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Responsive Breakpoints (Mobile Header matching reference screenshot)
   ========================================================================== */

@media (max-width: 1320px) {
    .jeeva-header-inner-container {
        padding: 0 20px;
    }
}

@media (max-width: 860px) {
    /* Hide desktop nav row */
    .jeeva-header-nav-row {
        display: none;
    }

    /* 1. Top Bar Mobile Carousel Slider */
    .jeeva-header-top-bar.has-text {
        padding: 8px 6px;
    }

    .jeeva-top-bar-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 4px !important;
        width: 100%;
        box-sizing: border-box;
    }

    .jeeva-top-arrow {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .jeeva-top-bar-content {
        display: block !important;
        text-align: center;
        flex: 1;
        margin: 0 !important;
        overflow: hidden;
        position: relative;
    }

    .jeeva-top-bar-separator {
        display: none !important;
    }

    .jeeva-top-bar-item {
        display: none !important;
        font-size: 13.5px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #ffffff;
    }

    .jeeva-top-bar-item.active {
        display: inline-block !important;
        animation: jeevaFadeIn 0.3s ease-in-out;
    }

    @keyframes jeevaFadeIn {
        from { opacity: 0; transform: translateY(2px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 2. Main Header 2-Row Layout */
    .jeeva-header-main {
        padding: 10px 0 14px !important;
        border-bottom: 1px solid #f1f5f9;
    }

    .jeeva-header-main .jeeva-header-inner-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 16px !important;
        row-gap: 12px;
    }

    /* Row 1 Left: Logo */
    .jeeva-header-logo-col {
        order: 1;
        flex-shrink: 0;
    }

    .jeeva-header-logo-col {
        order: 1;
        flex-shrink: 1;
        min-width: 0;
    }

    .jeeva-header-logo-col img.custom-logo,
    .jeeva-header-logo-col .jeeva-brand-logo-svg {
        max-height: 40px !important;
        max-width: 110px !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
    }

    /* Row 1 Right: Mobile Actions (Profile Circle + Cart Circle + Hamburger) */
    .jeeva-header-mobile-actions {
        order: 2;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        gap: 8px !important;
    }

    .jeeva-mobile-action-circle {
        width: 38px !important;
        height: 38px !important;
        flex-shrink: 0 !important;
    }

    .jeeva-mobile-menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }

    .jeeva-hamburger-svg {
        display: block !important;
        width: 24px !important;
        height: 24px !important;
        stroke: #2c3e50 !important;
        pointer-events: none !important;
    }

    /* Row 2: Full Width Search Pill */
    .jeeva-header-search-col {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-top: 0;
    }

    .jeeva-search-form-pill {
        width: 100% !important;
        max-width: 100% !important;
        height: 48px !important;
        border-radius: 999px !important;
        padding: 4px 6px 4px 18px !important;
        box-sizing: border-box;
    }

    .jeeva-search-cat-box {
        max-width: 125px;
    }

    .jeeva-search-select {
        font-size: 13.5px !important;
        max-width: 105px !important;
    }

    .jeeva-search-divider {
        height: 22px !important;
        margin: 0 12px !important;
    }

    .jeeva-search-field {
        font-size: 14px !important;
    }

    .jeeva-search-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }
}

@media (max-width: 480px) {
    .jeeva-header-main .jeeva-header-inner-container {
        padding: 0 16px !important;
    }

    .jeeva-header-mobile-actions {
        gap: 6px !important;
    }

    .jeeva-mobile-action-circle {
        width: 36px !important;
        height: 36px !important;
    }

    .jeeva-mobile-menu-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .jeeva-search-form-pill {
        padding-left: 14px !important;
    }

    .jeeva-search-cat-box {
        max-width: 110px;
    }

    .jeeva-search-select {
        font-size: 13px !important;
        max-width: 90px !important;
    }

    .jeeva-search-divider {
        margin: 0 8px !important;
    }
}
