@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─── Reset & Hide Astra defaults ─────────────────────────────── */
#masthead,
.site-header,
.ast-main-header-bar,
.ast-mobile-header-wrap,
.ast-mobile-header-bar,
.ast-header-break-point .site-header,
.elixira-announcement-bar {
    display: none !important;
}

/* ─── Remove Astra page-level spacing that creates gap above slider ─ */
header.entry-header,
.entry-header,
.ast-no-thumbnail,
.ast-header-without-markup,
.ast-page-builder-template .entry-header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Remove Astra default content top padding */
.site-content,
#content,
.ast-container,
.ast-page-builder-template .site-content,
.entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.ast-page-builder-template .entry-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* ─── Header Shell ────────────────────────────────────────────── */
.elixira-header-container {
    font-family: 'Outfit', sans-serif;
    background: #fff;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid #ebebeb;
}

/* ─── Main Row ────────────────────────────────────────────────── */
.elixira-main-header-row {
    padding: 0 48px;
    background: #fff;
}

.elixira-header-content-wrapper {
    display: flex;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    height: 80px;
    gap: 40px;
}

/* ─── Hamburger (mobile only) ─────────────────────────────────── */
.elixira-mobile-menu-trigger {
    display: none;
    border: none;
    background: transparent;
    color: #111;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.elixira-mobile-menu-trigger:hover { opacity: 0.5; }

/* ─── Logo ────────────────────────────────────────────────────── */
.elixira-logo-container { flex-shrink: 0; }
.elixira-logo-container img {
    max-height: 44px;
    width: auto;
    display: block;
}
.site-title-fallback {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    text-decoration: none;
    letter-spacing: -0.04em;
    text-transform: lowercase;
    font-style: italic;
    font-family: 'Outfit', sans-serif;
    display: inline-block;
    transition: opacity 0.2s ease;
}
.site-title-fallback:hover { opacity: 0.6; }

/* ─── Search ──────────────────────────────────────────────────── */
.elixira-search-container {
    flex: 1;
    max-width: 640px;  /* wider on desktop */
}

.elixira-search-form {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 100px;
    padding: 0 8px 0 22px;
    height: 50px;
    border: 1.5px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: text;
}
.elixira-search-form:focus-within {
    background: #f4f4f4;
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Category Select */
.elixira-search-category-select {
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}
.elixira-search-category-select select {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    padding-right: 20px;
    height: auto !important;
    line-height: normal !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Outfit', sans-serif;
    transition: color 0.2s;
}
.elixira-search-category-select select:hover { color: #555; }
.select-chevron {
    position: absolute;
    right: 0;
    pointer-events: none;
    color: #888;
    flex-shrink: 0;
}

/* Separator */
.elixira-search-separator {
    color: #d1d5db;
    margin: 0 14px;
    font-weight: 300;
    font-size: 18px;
    user-select: none;
    flex-shrink: 0;
}

/* Text Input */
.elixira-search-field {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    flex: 1;
    font-size: 14px;
    color: #111;
    padding: 0 !important;
    height: auto !important;
    font-family: 'Outfit', sans-serif;
    min-width: 0;
}
.elixira-search-field::placeholder { color: #aaa; }

/* Submit Button */
.elixira-search-submit {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}
.elixira-search-submit:hover {
    background: rgba(0,0,0,0.06);
    transform: scale(1.08);
}

/* ─── Actions ─────────────────────────────────────────────────── */
.elixira-actions-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Account */
.elixira-account-link {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #111;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.elixira-account-link:hover { color: #555; }
.elixira-account-link .elixira-account-text {
    font-size: 13.5px;
}

/* Cart */
.elixira-cart-link {
    text-decoration: none;
    color: #111;
    display: flex;
    align-items: center;
}
.elixira-cart-icon-wrapper {
    position: relative;
    background: transparent;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.elixira-cart-link:hover .elixira-cart-icon-wrapper {
    border-color: #bbb;
    transform: scale(1.05);
}
.elixira-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #111;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    transition: transform 0.2s ease;
}
.elixira-cart-link:hover .elixira-cart-count { transform: scale(1.1); }

/* ─── Desktop Nav Row ─────────────────────────────────────────── */
.elixira-nav-row-desktop {
    border-top: 1px solid #f0f0f0;
    background: #fff;
}
.elixira-nav-row-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
}

.elixira-desktop-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.elixira-desktop-menu > li { position: relative; }

.elixira-desktop-menu > li > a {
    text-decoration: none;
    color: #333;
    font-size: 13.5px;
    font-weight: 500;
    padding: 12px 10px;
    display: block;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* Smooth underline slide from left */
.elixira-desktop-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: #111;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}
.elixira-desktop-menu > li > a:hover { color: #111; }
.elixira-desktop-menu > li > a:hover::after { transform: scaleX(1); }

/* Active state */
.elixira-desktop-menu > li.current-menu-item > a,
.elixira-desktop-menu > li.current_page_item > a { color: #111; font-weight: 600; }
.elixira-desktop-menu > li.current-menu-item > a::after,
.elixira-desktop-menu > li.current_page_item > a::after { transform: scaleX(1); }

/* Dropdown */
.elixira-desktop-menu li ul {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border: 1px solid #ebebeb;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 8px 0;
    list-style: none;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    border-radius: 10px;
    z-index: 100;
}
.elixira-desktop-menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.elixira-desktop-menu li ul a {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 400;
    color: #555;
    transition: background 0.15s, color 0.15s;
    display: block;
}
.elixira-desktop-menu li ul a:hover { background: #f9f9f9; color: #111; }
.elixira-desktop-menu li ul a::after { display: none; }

/* ─── Mobile Overlay ──────────────────────────────────────────── */
.elixira-mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}
.elixira-mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─── Mobile Drawer ───────────────────────────────────────────── */
.elixira-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 84vw;
    height: 100%;
    background: #fff;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 12px 0 40px rgba(0,0,0,0.08);
}
.elixira-mobile-drawer.active { transform: translateX(0); }

.elixira-drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.drawer-title { font-size: 16px; font-weight: 700; color: #111; }
.elixira-drawer-close {
    border: none;
    background: transparent;
    color: #111;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
}
.elixira-drawer-close:hover { opacity: 0.5; }

.elixira-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.elixira-mobile-menu { list-style: none; padding: 0; margin: 0; }
.elixira-mobile-menu > li { border-bottom: 1px solid #f4f4f4; }
.elixira-mobile-menu a {
    text-decoration: none;
    color: #111;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}
.elixira-mobile-menu a:hover { color: #555; }

/* Mobile sub-menu */
.elixira-mobile-menu li ul { list-style: none; padding-left: 16px; display: none; }
.elixira-mobile-menu li.menu-item-has-children > a::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.25s ease;
    display: inline-block;
}
.elixira-mobile-menu li.menu-item-has-children.open > a::after {
    transform: rotate(45deg);
}
.elixira-mobile-menu li.menu-item-has-children.open > ul { display: block; }
.elixira-mobile-menu li ul a {
    padding: 9px 0;
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

.elixira-drawer-footer { margin-top: auto; padding-top: 16px; }
.elixira-mobile-account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #111;
    color: #fff;
    text-decoration: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.2s;
}
.elixira-mobile-account-btn:hover { background: #333; }

/* ─── Mobile Overrides ────────────────────────────────────────── */
@media (max-width: 767px) {
    .elixira-main-header-row { padding: 0 16px; }
    .elixira-header-content-wrapper {
        height: 62px;
        gap: 12px;
        flex-wrap: nowrap;
    }
    .elixira-mobile-menu-trigger { display: flex; order: 1; }

    .elixira-logo-container {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
    }
    .elixira-logo-container img { max-height: 36px; }
    .site-title-fallback { font-size: 22px; }

    .elixira-search-container { display: none; } /* hidden in top row on mobile */
    .elixira-actions-container { order: 3; gap: 10px; margin-left: 0; }
    .elixira-account-link { display: none; }

    .elixira-nav-row-desktop { display: none; }

    /* Show search bar below header row on mobile */
    .elixira-mobile-search-row {
        display: block;
        padding: 0 16px 16px;
    }
    .elixira-mobile-search-row .elixira-search-form {
        height: 48px;
        padding: 0 8px 0 20px;
    }
}

@media (min-width: 768px) {
    .elixira-mobile-search-row { display: none; }
}
