/* =========================================================
   CUBE AROMA — DESKTOP HEADER
   Reference driven
   ========================================================= */

:root {
    --cube-beige: #EAD6C9;
    --cube-dark: #4D4C50;
    --cube-grey: #5C5D60;
    --cube-header-height: 62px;
}


/* =========================================================
   GLOBAL FONT
   ========================================================= */

.cube-header,
.cube-header-drawer {
    font-family: "Cairo", sans-serif !important;
}


/* =========================================================
   RESET — منع ألوان وتصميم الثيم من التدخل
   ========================================================= */

.cube-header *,
.cube-header *::before,
.cube-header *::after,
.cube-header-drawer *,
.cube-header-drawer *::before,
.cube-header-drawer *::after {
    box-sizing: border-box;
}


.cube-header button,
.cube-header a {
    -webkit-appearance: none !important;
    appearance: none !important;

    background: transparent !important;
    background-color: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    color: var(--cube-dark) !important;

    text-decoration: none !important;
    outline: none !important;
}


.cube-header button:hover,
.cube-header button:focus,
.cube-header button:active,
.cube-header a:hover,
.cube-header a:focus,
.cube-header a:active {
    background: transparent !important;
    background-color: transparent !important;

    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;

    color: var(--cube-dark) !important;
}


/* =========================================================
   MAIN HEADER
   ========================================================= */

.cube-header {
    width: 100%;
    height: var(--cube-header-height);

    background: var(--cube-beige) !important;

    color: var(--cube-dark);

    position: relative;
    z-index: 9990;
}


.cube-header-inner {
    width: 100%;
    max-width: 1440px;
    height: var(--cube-header-height);

    margin: 0 auto;
    padding: 0 34px;

    display: grid;

    /* مساحة أكبر شوي للّوغو */
    grid-template-columns: 1fr 210px 1fr;

    align-items: center;
}


/* =========================================================
   LOGO
   ========================================================= */

.cube-header-logo-wrap {
    grid-column: 2;

    display: flex;
    justify-content: center;
    align-items: center;

    height: 100%;
}


.cube-header-logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
}


.cube-header-logo {
    display: block;

    width: 172px !important;
    height: auto !important;

    max-width: 172px !important;
    max-height: 48px !important;

    object-fit: contain;
}


/* =========================================================
   NAVIGATION — RIGHT
   ========================================================= */

.cube-header-nav-right {
    grid-column: 1;
    grid-row: 1;

    justify-self: start;

    display: flex;
    align-items: center;

    gap: 0;

    height: 100%;
}


.cube-nav-item {
    height: 100%;

    position: relative;

    display: flex;
    align-items: center;
}


.cube-nav-link {
    height: 100%;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 17px !important;

    color: var(--cube-dark) !important;

    font-family: "Cairo", sans-serif !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    position: relative;
}


/* الفاصل الرأسي الموجود بالريفرنس */
.cube-header-nav-right > *:not(:last-child)::after {
    content: "";

    position: absolute;

    left: 0;
    top: 50%;

    width: 1px;
    height: 22px;

    transform: translateY(-50%);

    background: var(--cube-grey);

    opacity: 0.22;
}


.cube-nav-link:hover {
    opacity: 0.70;
}


/* =========================================================
   CHEVRON
   ========================================================= */

.cube-nav-chevron {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-right: 1.25px solid var(--cube-dark);
    border-bottom: 1.25px solid var(--cube-dark);

    transform: rotate(45deg) translateY(-2px);

    margin-right: 1px;

    font-size: 0 !important;

    transition: transform 0.18s ease;
}


.cube-has-dropdown.is-open .cube-nav-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}


/* =========================================================
   DROPDOWNS
   ========================================================= */

.cube-dropdown {
    position: absolute;

    top: 100%;
    right: 0;

    min-width: 175px;
    width: max-content;

    padding: 7px 0;

    background: var(--cube-beige) !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow:
        0 9px 20px rgba(77, 76, 80, 0.08);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(3px);

    transition:
        opacity 0.16s ease,
        visibility 0.16s ease,
        transform 0.16s ease;

    z-index: 9999;
}


.cube-has-dropdown:hover .cube-dropdown,
.cube-has-dropdown.is-open .cube-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}/* =========================================
   DESKTOP HEADER SIZE + ALIGNMENT FIX
   add this at the END of cube-header.css
   ========================================= */

/* اخفاء هيدر الثيم الافتراضي يلي طالع فوق */
header.site-header,
.site-header,
.site-branding,
.site-title,
.site-description {
    display: none !important;
}

/* مقاس عام أقرب للريفرنس */
:root {
    --cube-header-height: 84px;
}

/* الهيدر الرئيسي */
.cube-header {
    height: var(--cube-header-height) !important;
    min-height: var(--cube-header-height) !important;
    background: #EAD6C9 !important;
}

/* الحاوية الداخلية */
.cube-header-inner {
    max-width: 1365px !important;
    height: var(--cube-header-height) !important;
    padding: 0 38px !important;
    grid-template-columns: 1fr 290px 1fr !important;
    align-items: center !important;
}

/* اللوقو */
.cube-header-logo-wrap {
    height: var(--cube-header-height) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cube-header-logo-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
}

.cube-header-logo {
    width: 235px !important;
    max-width: 235px !important;
    height: auto !important;
    max-height: 60px !important;
    object-fit: contain !important;
    display: block !important;
}

/* طرفي الهيدر */
.cube-header-nav-right,
.cube-header-tools {
    height: var(--cube-header-height) !important;
    display: flex !important;
    align-items: center !important;
}

/* كل عناصر المنيو نفس المقاس */
.cube-nav-item,
.cube-nav-link,
.cube-header-nav-right a,
.cube-header-nav-right button {
    height: var(--cube-header-height) !important;
    display: inline-flex !important;
    align-items: center !important;
    font-family: "Cairo", sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    color: #4D4C50 !important;
    white-space: nowrap !important;
}

/* حتى "تعطيرات الشركات" ما تطلع أصغر */
.cube-header-nav-right .cube-nav-link,
.cube-header-nav-right a,
.cube-header-nav-right button {
    font-size: 15px !important;
    font-weight: 500 !important;
}

.cube-nav-link {
    padding: 0 18px !important;
    gap: 8px !important;
}

/* الفواصل بين العناصر */
.cube-header-nav-right > *:not(:last-child)::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: 1px !important;
    height: 25px !important;
    transform: translateY(-50%) !important;
    background: #5C5D60 !important;
    opacity: 0.20 !important;
}

/* السهم تبع الدروب داون */
.cube-nav-chevron {
    width: 8px !important;
    height: 8px !important;
    border-right: 1.4px solid #4D4C50 !important;
    border-bottom: 1.4px solid #4D4C50 !important;
    transform: rotate(45deg) translateY(-2px) !important;
    margin-right: 2px !important;
    display: inline-block !important;
}

/* أدوات اليسار */
.cube-header-tools {
    gap: 0 !important;
    direction: ltr !important;
}

.cube-header-tool,
.cube-header-language {
    height: var(--cube-header-height) !important;
    min-width: 46px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #4D4C50 !important;
}

.cube-header-language {
    font-family: "Cairo", sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.cube-header-separator {
    width: 1px !important;
    height: 24px !important;
    background: #5C5D60 !important;
    opacity: 0.22 !important;
}

.cube-header-icon {
    width: 20px !important;
    height: 20px !important;
}

.cube-header-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #4D4C50 !important;
    stroke-width: 1.5 !important;
}

/* عداد السلة */
.cube-cart-trigger {
    position: relative !important;
}

.cube-cart-count {
    position: absolute !important;
    top: 18px !important;
    right: 4px !important;
    min-width: 15px !important;
    height: 15px !important;
    padding: 0 3px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #4D4C50 !important;
    color: #EAD6C9 !important;
    border-radius: 50% !important;
    font-size: 8px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
}

/* الدروب داون */
.cube-dropdown {
    top: calc(100% - 1px) !important;
    right: 0 !important;
    min-width: 225px !important;
    padding: 0 !important;
    background: #EAD6C9 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 24px rgba(77, 76, 80, 0.08) !important;
    overflow: hidden !important;
}

.cube-dropdown a {
    display: block !important;
    position: relative !important;
    padding: 14px 18px !important;
    font-family: "Cairo", sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #4D4C50 !important;
    text-align: right !important;
    background: transparent !important;
}

.cube-dropdown a:not(:last-child)::after {
    content: "" !important;
    position: absolute !important;
    right: 18px !important;
    left: 18px !important;
    bottom: 0 !important;
    height: 1px !important;
    background: #5C5D60 !important;
    opacity: 0.16 !important;
}

.cube-dropdown a:hover {
    background: rgba(92, 93, 96, 0.05) !important;
}

/* بانل السلة والسيرش */
.cube-header-drawer {
    width: 390px !important;
    max-width: 90vw !important;
    background: #EAD6C9 !important;
}

.cube-drawer-header {
    height: 74px !important;
    min-height: 74px !important;
    padding: 0 22px !important;
    border-bottom: 1px solid rgba(92, 93, 96, 0.16) !important;
}

.cube-drawer-header h2 {
    font-family: "Cairo", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #4D4C50 !important;
}

/* إزالة أي بوردر عن زر X */
.cube-drawer-close,
.cube-drawer-close:hover,
.cube-drawer-close:focus,
.cube-drawer-close:active {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #4D4C50 !important;
    font-size: 28px !important;
    line-height: 1 !important;
    border-radius: 0 !important;
}

/* فقط ديسكتوب */
@media (max-width: 1024px) {
    .cube-header-desktop {
        display: none !important;
    }
}


.cube-dropdown a {
    display: block !important;

    position: relative;

    padding: 10px 17px !important;

    background: transparent !important;

    color: var(--cube-dark) !important;

    font-family: "Cairo", sans-serif !important;
    font-size: 12.5px;
    font-weight: 400;

    text-align: right;

    white-space: nowrap;
}


/* الخط الفاصل بين عناصر الـdropdown */
.cube-dropdown a:not(:last-child)::after {
    content: "";

    position: absolute;

    right: 17px;
    left: 17px;
    bottom: 0;

    height: 1px;

    background: var(--cube-grey);

    opacity: 0.18;
}


.cube-dropdown a:hover {
    background: rgba(92, 93, 96, 0.055) !important;
}


/* =========================================================
   LEFT TOOLS
   ========================================================= */

.cube-header-tools {
    grid-column: 3;
    grid-row: 1;

    justify-self: end;

    height: 100%;

    display: flex;
    align-items: center;

    direction: ltr;
}


.cube-header-tool,
.cube-header-language {
    height: 100%;

    min-width: 44px;

    padding: 0 13px !important;

    display: inline-flex !important;
    justify-content: center;
    align-items: center;

    color: var(--cube-dark) !important;

    cursor: pointer;
}


.cube-header-tool:hover,
.cube-header-language:hover {
    opacity: 0.68;
}


.cube-header-icon {
    width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.cube-header-icon svg {
    width: 18px;
    height: 18px;

    fill: none;

    stroke: var(--cube-dark);

    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.cube-header-separator {
    width: 1px;
    height: 21px;

    background: var(--cube-grey);

    opacity: 0.24;
}


.cube-header-language {
    min-width: auto;

    padding-left: 11px !important;
    padding-right: 11px !important;

    font-family: "Cairo", sans-serif !important;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;

    direction: ltr;
}


/* =========================================================
   CART BADGE
   ========================================================= */

.cube-cart-trigger {
    position: relative;
}


.cube-cart-count {
    position: absolute;

    top: 10px;
    right: 3px;

    min-width: 14px;
    height: 14px;

    padding: 0 3px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: var(--cube-dark) !important;
    color: var(--cube-beige) !important;

    border-radius: 50%;

    font-size: 8px;
    line-height: 1;
    font-weight: 600;
}


/* =========================================================
   DRAWER OVERLAY
   ========================================================= */

.cube-header-drawer-overlay {
    position: fixed;
    inset: 0;

    background: rgba(32, 31, 33, 0.27);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;

    z-index: 99998;
}


.cube-header-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   SEARCH + CART DRAWERS
   ========================================================= */

.cube-header-drawer {
    position: fixed;

    top: 0;
    right: 0;

    width: 390px;
    max-width: 90vw;
    height: 100dvh;

    background: var(--cube-beige);

    color: var(--cube-dark);

    transform: translateX(100%);

    visibility: hidden;

    transition:
        transform 0.32s cubic-bezier(.4, 0, .2, 1),
        visibility 0.32s;

    z-index: 99999;

    display: flex;
    flex-direction: column;

    box-shadow:
        -10px 0 28px rgba(77, 76, 80, 0.10);
}


.cube-header-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}


/* =========================================================
   DRAWER HEADER
   ========================================================= */

.cube-drawer-header {
    height: 62px;
    min-height: 62px;

    padding: 0 22px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom:
        1px solid rgba(92, 93, 96, 0.18);
}


.cube-drawer-header h2 {
    margin: 0;

    color: var(--cube-dark);

    font-family: "Cairo", sans-serif !important;
    font-size: 17px;
    font-weight: 500;
}


/* =========================================================
   X CLOSE BUTTON — بدون أي بوردر نهائياً
   ========================================================= */

.cube-drawer-close,
.cube-drawer-close:hover,
.cube-drawer-close:focus,
.cube-drawer-close:active {
    -webkit-appearance: none !important;
    appearance: none !important;

    width: 30px;
    height: 30px;

    display: flex !important;
    justify-content: center;
    align-items: center;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;

    border-radius: 0 !important;

    outline: 0 !important;
    outline-offset: 0 !important;

    box-shadow: none !important;

    background: transparent !important;
    background-color: transparent !important;

    color: var(--cube-dark) !important;

    font-family: Arial, sans-serif;
    font-size: 27px;
    font-weight: 200;
    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   DRAWER CONTENT
   ========================================================= */

.cube-drawer-content {
    flex: 1;

    padding: 25px 22px;

    overflow-y: auto;
}


/* =========================================================
   SEARCH
   ========================================================= */

.cube-search-field-wrap {
    display: flex;
    align-items: center;

    border-bottom:
        1px solid rgba(92, 93, 96, 0.55);

    padding-bottom: 7px;
}


.cube-search-field {
    width: 100%;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;

    background: transparent !important;

    color: var(--cube-dark) !important;

    padding: 8px 0 !important;

    font-family: "Cairo", sans-serif !important;
    font-size: 14px;
}


.cube-search-field::placeholder {
    color: rgba(77, 76, 80, 0.48);
}


.cube-search-submit,
.cube-search-submit:hover,
.cube-search-submit:focus,
.cube-search-submit:active {
    -webkit-appearance: none !important;
    appearance: none !important;

    width: 19px;
    height: 19px;

    flex: 0 0 19px;

    padding: 0 !important;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;

    background: transparent !important;
    background-color: transparent !important;

    color: var(--cube-dark) !important;

    cursor: pointer;
}


.cube-search-submit svg {
    width: 19px;
    height: 19px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   WOOCOMMERCE MINI CART
   ========================================================= */

.cube-mini-cart {
    font-family: "Cairo", sans-serif !important;
}


.cube-mini-cart .woocommerce-mini-cart {
    list-style: none;

    margin: 0;
    padding: 0;
}


.cube-mini-cart .woocommerce-mini-cart-item {
    position: relative;

    padding: 0 0 18px 0 !important;
    margin-bottom: 18px;

    border-bottom:
        1px solid rgba(92, 93, 96, 0.18);
}


.cube-mini-cart .woocommerce-mini-cart-item img {
    width: 72px;
    height: 72px;

    object-fit: cover;

    margin-left: 14px;
}


.cube-mini-cart a {
    color: var(--cube-dark) !important;
    text-decoration: none !important;
}


.cube-mini-cart .woocommerce-mini-cart__total {
    margin-top: 25px;

    padding-top: 17px;

    border-top:
        1px solid rgba(92, 93, 96, 0.25);
}


.cube-mini-cart .woocommerce-mini-cart__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}


.cube-mini-cart .button {
    min-height: 44px;

    display: flex !important;
    justify-content: center;
    align-items: center;

    border: 0 !important;
    border-radius: 0 !important;

    background: var(--cube-dark) !important;

    color: var(--cube-beige) !important;

    font-family: "Cairo", sans-serif !important;
    font-size: 13px;
    font-weight: 500;

    text-decoration: none !important;
}


/* =========================================================
   BODY LOCK
   ========================================================= */

body.cube-header-drawer-open {
    overflow: hidden;
}


/* =========================================================
   DESKTOP ONLY FOR NOW
   ========================================================= */

@media (max-width: 1024px) {

    .cube-header-desktop {
        display: none !important;
    }

}