/* Native Choobsa header: global; homepage uses overlay mode, inner views use solid mode. */

:root {
    --choobsa-header-height: 90px;
    --choobsa-header-z: 9999;
}

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

.choobsa-native-header {
    position: sticky;
    top: 0;
    z-index: var(--choobsa-header-z);
    width: 100%;
    height: var(--choobsa-header-height);
    transition: transform .8s ease, background-color .25s ease, border-color .25s ease;
}

.choobsa-native-header.is-hidden {
    transform: translateY(-100%);
}

.choobsa-native-header--solid {
    color: #0c0c0c;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .15);
}

.choobsa-native-header--overlay {
    color: #fff;
    background: transparent;
    border-bottom: 1px solid transparent;
}

.choobsa-native-header--overlay.is-scrolled {
    color: #0c0c0c;
    background: #fff;
    border-bottom-color: rgba(0, 0, 0, .15);
}

.choobsa-native-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px 45px;
}

.choobsa-native-header__actions {
    display: flex;
    align-items: center;
    justify-self: start;
    min-width: 0;
    gap: 18px;
}

.choobsa-native-header__balance {
    min-width: 0;
}

.choobsa-native-header__brand {
    justify-self: center;
    text-align: center;
    white-space: nowrap;
}

.choobsa-native-header__brand a {
    color: inherit;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
}

.choobsa-native-header__brand-short {
    display: none;
}

.choobsa-native-header--overlay:not(.is-scrolled) .choobsa-native-header__brand a,
.choobsa-native-header--overlay:not(.is-scrolled) .choobsa-native-header__menu-label,
.choobsa-native-header--overlay:not(.is-scrolled) .mycart-total-amount {
    text-shadow: 0 2px 4px rgba(0, 0, 0, .55);
}

.choobsa-native-header--overlay:not(.is-scrolled) .choobsa-native-header__menu-icon,
.choobsa-native-header--overlay:not(.is-scrolled) .mycart-toggle-icon svg {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}

.choobsa-native-header__menu-toggle,
.choobsa-native-header .menu-cart-toggle,
.choobsa-native-header__cart-fallback {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: 0;
    padding: 6px;
    margin: 0;
    color: inherit;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .2s ease, opacity .2s ease;
}

.choobsa-native-header__menu-toggle {
    gap: 5px;
}

.choobsa-native-header__menu-toggle:hover,
.choobsa-native-header .menu-cart-toggle:hover,
.choobsa-native-header__cart-fallback:hover {
    color: inherit;
    background: rgba(0, 0, 0, .035);
}

.choobsa-native-header--overlay:not(.is-scrolled) .choobsa-native-header__menu-toggle:hover,
.choobsa-native-header--overlay:not(.is-scrolled) .menu-cart-toggle:hover {
    background: rgba(255, 255, 255, .1);
}

/* The project intentionally suppresses visible focus rings inside the native header.
 * Keyboard focus management, Escape handling and focus trapping remain active in JavaScript. */
.choobsa-native-header :where(a, button, input, select, textarea, [tabindex]):focus,
.choobsa-native-header :where(a, button, input, select, textarea, [tabindex]):focus-visible,
.choobsa-menu-drawer :where(a, button, input, select, textarea, [tabindex]):focus,
.choobsa-menu-drawer :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.choobsa-native-header__menu-icon {
    display: block;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.choobsa-native-header__menu-label {
    font-weight: 400;
}

/* Keep the menu label and cart total on the same visual text axis. */
.choobsa-native-header__menu-label,
.choobsa-native-header .mycart-total-amount {
    display: inline-flex;
    align-items: center;
    height: 28px;
    line-height: 1;
}

.choobsa-native-header__cart,
.choobsa-native-header .menu-cart-popup-container {
    position: relative;
}

.choobsa-native-header .menu-cart-toggle {
    position: relative;
    flex-direction: row-reverse;
    gap: 8px;
}

.choobsa-native-header .mycart-toggle-icon {
    position: relative;
    display: inline-flex;
    color: inherit;
    line-height: 0;
}

.choobsa-native-header .mycart-toggle-icon svg {
    width: 28px;
    height: 29px;
}

.choobsa-native-header .mycart-toggle-icon path {
    fill: currentColor;
}

.choobsa-native-header .mycart-total-amount {
    margin-inline-end: 8px;
    color: inherit;
    white-space: nowrap;
}

.choobsa-native-header .mycart-badge,
.choobsa-native-header__cart-fallback .choobsa-cart-count {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    padding: 3px 0 0;
    border-radius: 999px;
    color: #0c0c0c;
    background: linear-gradient(-135deg, #e9d1af 0%, #d4aa78 55%, #b88756 100%);
    box-shadow: none;
    font-size: 11px;
    line-height: 1;
}

.choobsa-native-header .mycart-toggle-icon .mycart-badge {
    right: auto;
    left: -1px;
    bottom: -4px;
}

.choobsa-native-header__cart-fallback .choobsa-cart-count {
    right: auto;
    left: -1px;
    bottom: -4px;
}

.choobsa-native-header__cart-fallback {
    position: relative;
}

/* Menu drawer */
.choobsa-menu-drawer {
    position: fixed;
    inset: 0;
    z-index: 10020;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .8s;
}

.choobsa-menu-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.choobsa-menu-drawer__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(45, 45, 50, .6);
    opacity: 0;
    cursor: default;
    transition: opacity .35s ease;
}

.choobsa-menu-drawer.is-open .choobsa-menu-drawer__overlay {
    opacity: 1;
}

.choobsa-menu-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(700px, 100vw);
    height: 100dvh;
    max-height: 100vh;
    color: #2d2d32;
    background: #fff;
    box-shadow: -8px 0 35px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .8s ease;
    overflow: hidden;
}

.choobsa-menu-drawer.is-open .choobsa-menu-drawer__panel {
    transform: translateX(0);
}

.choobsa-menu-drawer__close {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #0c0c0c;
    background: linear-gradient(-135deg, #e9d1af 0%, #d4aa78 55%, #b88756 100%);
    cursor: pointer;
    transition: opacity .2s ease;
}

.choobsa-menu-drawer__close:hover {
    opacity: .8;
}

.choobsa-menu-drawer__close svg {
    width: 19px;
    height: 19px;
}


.choobsa-menu-drawer__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 70px 80px 50px;
}

.choobsa-menu-drawer__content,
.choobsa-menu-drawer .theme-ppls-results {
    scrollbar-width: thin;
    scrollbar-color: #b4b4b4 transparent;
}

.choobsa-menu-drawer__content::-webkit-scrollbar,
.choobsa-menu-drawer .theme-ppls-results::-webkit-scrollbar {
    width: 6px;
}

.choobsa-menu-drawer__content::-webkit-scrollbar-track,
.choobsa-menu-drawer .theme-ppls-results::-webkit-scrollbar-track {
    background: transparent;
}

.choobsa-menu-drawer__content::-webkit-scrollbar-thumb,
.choobsa-menu-drawer .theme-ppls-results::-webkit-scrollbar-thumb {
    background: #b4b4b4;
    border-radius: 20px;
}

.choobsa-menu-drawer__search {
    margin-bottom: 25px;
}

.choobsa-menu-drawer .theme-ppls-wrap {
    max-width: none;
}

.choobsa-menu-drawer .theme-ppls-search-icon svg {
    width: 20px;
}

.choobsa-menu-drawer .theme-ppls-close-icon svg {
    width: 18px;
}

.choobsa-menu-drawer__categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.choobsa-menu-drawer__category {
    margin: 0;
    padding: 0;
}

.choobsa-menu-drawer__category > a {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 67px;
    padding: 8px 1px 8px 0;
    color: #2d2d32;
    border-bottom: 1px solid #e4e4e4;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.choobsa-menu-drawer__category > a:hover {
    color: #8b613b;
    background: rgba(212, 170, 120, .06);
    border-bottom-color: rgba(212, 170, 120, .55);
}

.choobsa-menu-drawer__category-image {
    display: block;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    border-radius: 50%;
    background: #f7f7f7;
}

.choobsa-menu-drawer__category-image img {
    display: block;
    width: 50px !important;
    height: 50px !important;
    margin: 0 !important;
    object-fit: cover;
    object-position: center;
}

.choobsa-menu-drawer__category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.choobsa-menu-drawer__category-title > span {
    overflow-wrap: anywhere;
}

.choobsa-menu-drawer__category-title svg {
    flex: 0 0 auto;
    margin: 8px;
}

/* Reuse the same WordPress menu assigned to the native footer, with a light-panel variant of the footer navigation style. */
.choobsa-menu-drawer__footer-nav {
    margin-top: 38px;
    padding: 7px 5px 5px;
}

.choobsa-menu-drawer__footer-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
}

.choobsa-menu-drawer__footer-menu > li {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.choobsa-menu-drawer__footer-menu > li + li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 1px;
    height: 35%;
    background: #c9c9c9;
    transform: translateY(-50%);
    pointer-events: none;
}

.choobsa-menu-drawer__footer-menu a {
    display: flex;
    align-items: center;
    padding: 22px 35px 20px;
    color: #2d2d32;
    line-height: 20px;
    text-decoration: none;
    transition: color .3s ease;
}

.choobsa-menu-drawer__footer-menu a:hover,
.choobsa-menu-drawer__footer-menu a:focus,
.choobsa-menu-drawer__footer-menu .current-menu-item > a,
.choobsa-menu-drawer__footer-menu .current_page_item > a {
    color: #8b613b;
}

/* Existing cart shortcode: logic remains in the theme compatibility layer for this preview. */
.choobsa-native-header .mycart-overlay {
    position: fixed;
    inset: 0;
    z-index: 10018;
    height: 100vh;
    background: rgba(45, 45, 50, .6);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .8s;
}

.choobsa-native-header .mycart-overlay.open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.choobsa-native-header .mycart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10019;
    display: flex;
    flex-direction: column;
    width: min(600px, 100vw);
    height: 100dvh;
    max-height: 100vh;
    padding: 0;
    color: #0c0c0c;
    background: #fff;
    box-shadow: -2px 0 24px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .8s ease;
    overflow: hidden;
}

.choobsa-native-header .mycart-drawer.open {
    transform: translateX(0);
}

.choobsa-native-header .mycart-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 70px 80px;
    scrollbar-width: thin;
    scrollbar-color: #b4b4b4 transparent;
}

.choobsa-native-header .mycart-scroll::-webkit-scrollbar {
    width: 6px;
}

.choobsa-native-header .mycart-scroll::-webkit-scrollbar-thumb {
    background: #b4b4b4;
    border-radius: 20px;
}

.choobsa-native-header .mycart-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px 37px;
    color: #0c0c0c;
}

.choobsa-native-header .mycart-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 400;
}

.choobsa-native-header .mycart-title::after {
    position: absolute;
    bottom: -17px;
    left: 50%;
    width: 26px;
    height: 2px;
    margin-left: -13px;
    border-radius: 4px;
    background: linear-gradient(-135deg, #e4c39b 0%, #c79255 55%, #a06b2e 100%);
    content: "";
}

.choobsa-native-header .mycart-close {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #0c0c0c;
    background: linear-gradient(-135deg, #e9d1af 0%, #d4aa78 55%, #b88756 100%);
    cursor: pointer;
}

.choobsa-native-header .mycart-close:hover {
    opacity: .8;
}

.choobsa-native-header .mycart-empty {
    padding: 28px 6px;
    color: #444;
    text-align: center;
}

.choobsa-native-header .mycart-empty .icon {
    margin-bottom: 10px;
    font-size: 48px;
}

.choobsa-native-header .mycart-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.choobsa-native-header .mycart-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(72, 72, 72, .15);
}

.choobsa-native-header .mycart-item:last-child {
    border-bottom: 0;
}

.choobsa-native-header .mycart-item.is-loading {
    opacity: .55;
    pointer-events: none;
}

.choobsa-native-header .mycart-thumb {
    flex: 0 0 120px;
}

.choobsa-native-header .mycart-thumb img {
    display: block;
    width: 120px;
    height: 180px;
    margin: 0;
    object-fit: cover;
}

.choobsa-native-header .mycart-meta {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.choobsa-native-header .mycart-name {
    display: block;
    color: #0c0c0c;
    font-size: 15px;
    line-height: 28px;
    text-decoration: none;
}

.choobsa-native-header .mycart-price {
    margin: 10px 0 13px;
    color: #0c0c0c;
    font-size: 15px;
}

.choobsa-native-header .mycart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 5px;
    border-radius: 4px;
}

.choobsa-native-header .mycart-remove:hover {
    background: rgba(0, 0, 0, .03);
}

.choobsa-native-header .mycart-qty {
    display: flex;
    flex-direction: row-reverse;
    width: 80px;
    height: 29px;
    color: #0c0c0c;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: .25rem;
}

.choobsa-native-header .mycart-qty * {
    width: 29px !important;
    height: 27px !important;
    border: 0 !important;
    padding: 0 !important;
    color: #0c0c0c !important;
    background: transparent;
    font-size: 15px;
}

.choobsa-native-header .mycart-qty input {
    width: 20px !important;
    text-align: center;
    pointer-events: none;
    appearance: textfield;
}

.choobsa-native-header .mycart-qty input::-webkit-outer-spin-button,
.choobsa-native-header .mycart-qty input::-webkit-inner-spin-button {
    display: none;
    margin: 0;
    appearance: none;
}

.choobsa-native-header .mycart-qty button:hover {
    background: rgba(0, 0, 0, .03);
}

.choobsa-native-header .mycart-totals {
    padding: 30px 20px 5px;
    color: #0c0c0c;
    font-size: 23px;
    font-weight: 500;
    text-align: center;
}

.choobsa-native-header .mycart-totals p {
    margin: 10px 0 20px !important;
    color: #2d2d32;
    font-size: 15px;
    font-weight: 400;
}

.choobsa-native-header .mycart-footer {
    margin-top: 20px;
}

.choobsa-native-header .mycart-footer a,
.choobsa-native-header .mycart-actions-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 10px 14px 8px;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(-135deg, #e9d1af 0%, #d4aa78 55%, #b88756 100%);
    box-shadow: 0 6px 18px rgba(46, 27, 15, .12);
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .5);
    text-decoration: none;
}

.choobsa-native-header .mycart-footer a:hover,
.choobsa-native-header .mycart-actions-link:hover {
    color: #fff;
    filter: brightness(1.03) saturate(1.04);
}

@media (max-width: 1379px) {
    :root {
        --choobsa-header-height: 70px;
    }

    /* Keep the 70px header visually balanced instead of only shrinking its container. */
    .choobsa-native-header__inner {
        padding-block: 10px;
    }

    .choobsa-native-header__brand a {
        font-size: 24px;
        line-height: 1.15;
    }

    .choobsa-native-header__actions {
        gap: 14px;
    }

    .choobsa-native-header__menu-toggle,
    .choobsa-native-header .menu-cart-toggle,
    .choobsa-native-header__cart-fallback {
        padding: 5px;
    }

    .choobsa-native-header__menu-toggle {
        gap: 4px;
    }

    .choobsa-native-header__menu-icon {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .choobsa-native-header .mycart-toggle-icon svg {
        width: 26px;
        height: 27px;
    }

    .choobsa-native-header__menu-label,
    .choobsa-native-header .mycart-total-amount {
        height: 26px;
    }

    .choobsa-native-header .menu-cart-toggle {
        gap: 6px;
    }

    .choobsa-native-header .mycart-total-amount {
        margin-inline-end: 6px;
    }

    /* The Elementor homepage hero is intentionally pulled behind the overlay header.
     * Keep its negative offset synchronized with the responsive header height. */
    body.home .elementor-2 .elementor-element.elementor-element-f2817d0 {
        --margin-top: -70px;
    }
}

@media (max-width: 1199px) {
    /* Compact header: menu + brand stay together on the RTL/start side, cart moves to the opposite edge. */
    .choobsa-native-header__inner {
        display: flex;
        align-items: center;
        padding-inline: 20px;
    }

    .choobsa-native-header__actions {
        display: contents;
    }

    .choobsa-native-header__menu-toggle {
        order: 1;
    }

    .choobsa-native-header__brand {
        order: 2;
        justify-self: auto;
        margin-inline-start: 12px;
        text-align: start;
    }

    .choobsa-native-header__cart {
        order: 3;
        margin-inline-start: auto;
    }

    .choobsa-native-header__balance {
        display: none;
    }

    .choobsa-native-header__menu-label,
    .choobsa-native-header .mycart-total-amount {
        display: none;
    }
}

@media (max-width: 991px) {
    .choobsa-menu-drawer__panel {
        width: min(700px, 88vw);
    }

    .choobsa-menu-drawer__content,
    .choobsa-native-header .mycart-scroll {
        padding-inline: 40px;
    }
}

@media (max-width: 767px) {
    .choobsa-native-header__brand-full {
        display: none;
    }

    .choobsa-native-header__brand-short {
        display: inline;
    }
}

@media (max-width: 782px) {
    .admin-bar .choobsa-native-header {
        top: 46px;
    }
}

@media (min-width: 783px) {
    .admin-bar .choobsa-native-header {
        top: 32px;
    }
}

@media (max-width: 600px) {
    .admin-bar .choobsa-native-header {
        top: 0;
    }
}

@media (max-width: 480px) {
    .choobsa-native-header__inner {
        gap: 0;
        padding: 10px 20px;
    }

    .choobsa-native-header__brand {
        min-width: 0;
    }

    .choobsa-native-header__brand a {
        display: block;
        overflow: hidden;
        font-size: 22px;
        text-overflow: ellipsis;
    }

    .choobsa-native-header__menu-toggle,
    .choobsa-native-header .menu-cart-toggle {
        padding: 4px;
    }

    .choobsa-menu-drawer__panel,
    .choobsa-native-header .mycart-drawer {
        width: 100vw;
    }

    .choobsa-menu-drawer__content,
    .choobsa-native-header .mycart-scroll {
        padding: 70px 20px 35px;
    }

    .choobsa-menu-drawer__close,
    .choobsa-native-header .mycart-close {
        width: 60px;
        height: 60px;
    }

    .choobsa-menu-drawer__footer-menu a {
        padding-inline: 20px;
    }

    .choobsa-native-header .mycart-item {
        gap: 10px;
    }

    .choobsa-native-header .mycart-thumb {
        flex-basis: 90px;
    }

    .choobsa-native-header .mycart-thumb img {
        width: 90px;
        height: 135px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .choobsa-native-header,
    .choobsa-menu-drawer,
    .choobsa-menu-drawer__overlay,
    .choobsa-menu-drawer__panel,
    .choobsa-native-header .mycart-overlay,
    .choobsa-native-header .mycart-drawer {
        transition: none !important;
    }
}
