/* =========================================================
   Amazon-Like Theme — Main Stylesheet
   Version: 2.1.0
   Author: Happiness Colors
   Language: AR + EN (RTL/LTR)
   Devices: Mobile / Tablet / Desktop / 4K
   ========================================================= */

/* =========================================================
   0. FONTS (OPTIONAL)
   ========================================================= */
/*
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
*/

/* =========================================================
   1. RESET & BASE
   ========================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overscroll-behavior-y: none;
}

body {
    font-family: "Amazon Ember", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    direction: inherit;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body {
    font-family: "Tajawal", "Amazon Ember", "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    color: transparent;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}
a:focus-visible {
    outline: 2px solid var(--amz-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}
button { cursor: pointer; }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--amz-blue);
    outline-offset: 2px;
}

ul, ol { list-style: none; }

p, h1, h2, h3, h4, h5, h6, a, span, li, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* =========================================================
   2. THEME VARIABLES
   ========================================================= */
:root {
    --amz-navy:        #131921;
    --amz-navy-2:      #232f3e;
    --amz-navy-3:      #37475a;
    --amz-yellow:      #ffd814;
    --amz-yellow-hov:  #f7ca00;
    --amz-orange:      #ffa41c;
    --amz-orange-hov:  #fa8900;
    --amz-red:         #b12704;
    --amz-green:       #067d62;
    --amz-blue:        #007185;
    --amz-blue-hov:    #c7511f;

    --color-bg:        #eaeded;
    --color-surface:   #ffffff;
    --color-border:    #d5d9d9;
    --color-border-2:  #ddd;
    --color-text:      #0f1111;
    --color-text-soft: #565959;
    --color-text-mute: #767676;

    --color-link:       var(--amz-blue);
    --color-link-hover: var(--amz-blue-hov);

    --color-success: #067d62;
    --color-warning: #f0c14b;
    --color-danger:  #b12704;
    --color-info:    #007185;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: clamp(12px, 1.1vw, 18px);
    --space-lg: 24px;
    --space-xl: clamp(28px, 2.8vw, 44px);

    --radius-sm: 3px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;
    --btn-radius: var(--radius-pill);

    --shadow-sm: 0 1px 2px rgba(15, 17, 17, 0.15);
    --shadow-md: 0 2px 5px rgba(15, 17, 17, 0.15);
    --shadow-lg: 0 4px 12px rgba(15, 17, 17, 0.15);

    --container-max: 1500px;
    --header-h: 60px;
    --subheader-h: 40px;
    --mobile-bar-h: 60px;

    --t-fast: 0.15s ease;
    --t-med:  0.25s ease;

    /* Carousel card fixed dimensions */
    --carousel-slide-h: 380px;
    --carousel-image-h: 180px;
}

@media (min-width: 1920px) {
    :root {
        --container-max: 1600px;
        --header-h: 66px;
    }
    body { font-size: 15px; }
}
@media (min-width: 2560px) {
    :root {
        --container-max: 1900px;
        --header-h: 72px;
        --subheader-h: 46px;
    }
    body { font-size: 16px; }
}

/* =========================================================
   3. LAYOUT HELPERS
   ========================================================= */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

.container-fluid {
    width: 100%;
    padding-inline: var(--space-md);
}

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid   { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.hidden { display: none !important; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header {
    background-color: var(--amz-navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    height: var(--header-h);
    padding-inline: var(--space-md);
    max-width: var(--container-max);
    margin-inline: auto;
}

.site-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}
.site-logo:hover {
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}
.site-logo span { color: var(--amz-orange); }

.header-location {
    display: flex;
    flex-direction: column;
    color: #fff;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    line-height: 1.2;
    flex-shrink: 0;
}
.header-location:hover { border-color: #fff; }
.header-location strong { font-size: 13px; }

.header-search {
    flex: 1;
    display: flex;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
    min-width: 150px;
}
.header-search__select {
    background: #f3f3f3;
    border: none;
    padding: 0 10px;
    color: var(--color-text-soft);
    cursor: pointer;
    font-size: 12px;
    border-inline-end: 1px solid var(--color-border);
}
.header-search__input {
    flex: 1;
    border: none;
    padding: 0 12px;
    outline: none;
    font-size: 15px;
    color: var(--color-text);
    background: #fff;
    min-width: 0;
}
.header-search__input::placeholder { color: var(--color-text-mute); }
.header-search__btn {
    background: var(--amz-yellow);
    border: none;
    padding: 0 clamp(12px, 1.4vw, 20px);
    cursor: pointer;
    font-size: 18px;
    color: var(--amz-navy);
    transition: background var(--t-fast);
    flex-shrink: 0;
}
.header-search__btn:hover { background: var(--amz-yellow-hov); }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.header-action {
    color: #fff;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    cursor: pointer;
    font-size: 12px;
    transition: border-color var(--t-fast);
    white-space: nowrap;
}
.header-action:hover,
.header-action:focus-visible {
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}
.header-action strong { font-size: 14px; }

.header-cart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    position: relative;
    color: #fff;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
}
.header-cart:hover {
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}
.header-cart__icon {
    font-size: 26px;
    position: relative;
    display: inline-block;
}
.header-cart__count {
    position: absolute;
    top: -4px;
    inset-inline-start: 14px;
    color: var(--amz-orange);
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}
.header-cart__label {
    font-size: 13px;
    font-weight: 700;
}

/* =========================================================
   5. SUB-HEADER / MEGA NAV — Amazon-style
   ========================================================= */

.site-subheader {
    background-color: var(--amz-navy-2);
    color: #fff;
    min-height: 44px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1020;
    overflow: visible !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-subheader__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-inline: var(--space-md);
    max-width: var(--container-max);
    margin-inline: auto;
    width: 100%;
    min-height: 44px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.site-subheader__inner::-webkit-scrollbar { display: none; }

/* =========================================================
   Navigation lists
   ========================================================= */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav--categories {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   Nav link
   ========================================================= */
.mega-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff !important;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all var(--t-fast);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
}

.mega-nav__link:hover,
.mega-nav__link:focus-visible {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    color: #fff !important;
    text-decoration: none;
    outline: none;
}

.mega-nav__link.is-active {
    font-weight: 700;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.mega-nav__link i:first-child {
    font-size: 13px;
    opacity: 0.95;
}

.mega-nav__link span {
    display: inline;
}

/* Hide labels on tablet */
@media (max-width: 1024px) {
    .mega-nav__link span {
        display: none;
    }
    .mega-nav__link {
        padding: 8px;
    }
}

/* =========================================================
   Caret
   ========================================================= */
.mega-nav__caret {
    font-size: 9px;
    opacity: 0.75;
    transition: transform var(--t-med);
    margin-inline-start: 2px;
}

.mega-nav__item.is-open .mega-nav__caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* =========================================================
   Nav item
   ========================================================= */
.mega-nav__item {
    position: relative;    /* ✅ يُنشئ containing block */
    list-style: none;
    z-index: 1020;    /* ✅ أعلى من mega-overlay (1010) */
}

.mega-nav__item.is-open > .mega-nav__link {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================================
   Mega panel — full width dropdown
   ========================================================= */
.mega-panel {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    width: 100%;
    background: #fff;
    color: var(--color-text);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: var(--space-lg) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
    z-index: 999;
    pointer-events: none;
}

.mega-nav__item.is-open .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-panel__inner {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

/* ---- Media column ---- */
.mega-panel__media {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-inline-end: var(--space-lg);
    border-inline-end: 1px solid var(--color-border);
}

.mega-panel__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform var(--t-med);
    display: block;
    background: #f7f7f7;
}

.mega-panel__media:hover .mega-panel__image {
    transform: scale(1.02);
}

.mega-panel__cta {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--amz-blue);
    transition: color var(--t-fast);
}

.mega-panel__cta:hover {
    color: var(--amz-blue-hov);
    text-decoration: underline;
}

/* ---- Columns ---- */
.mega-panel__cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.mega-panel__col {
    min-width: 0;
}

.mega-panel__heading {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.mega-panel__heading a {
    color: var(--color-text);
}

.mega-panel__heading a:hover {
    color: var(--amz-blue-hov);
    text-decoration: underline;
}

.mega-panel__divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 6px 0 var(--space-md);
}

.mega-panel__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-panel__link {
    display: block;
    color: var(--color-text-soft);
    font-size: 13px;
    padding: 5px 0;
    transition: color var(--t-fast), padding-inline-start var(--t-fast);
    text-decoration: none;
}

.mega-panel__link:hover {
    color: var(--amz-blue-hov);
    padding-inline-start: 4px;
    text-decoration: none;
}

.mega-panel__empty {
    font-size: 13px;
    font-style: italic;
    padding: 4px 0;
}

/* ---- Overlay ---- */
.mega-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    background: rgba(15, 17, 17, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-med), visibility var(--t-med);
    z-index: 1010;
    pointer-events: none;
}

.site-subheader.is-panel-open .mega-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .mega-panel__inner {
        grid-template-columns: 200px 1fr;
        gap: var(--space-lg);
    }
    .mega-panel__cols {
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .site-subheader {
        min-height: 40px;
    }
    .site-subheader__inner {
        min-height: 40px;
        padding-inline: var(--space-sm);
    }
    .mega-nav__link {
        padding: 6px 8px;
        font-size: 12px;
    }
    .mega-panel {
        padding: var(--space-md) 0;
    }
    .mega-panel__inner {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .mega-panel__media {
        border-inline-end: none;
        border-bottom: 1px solid var(--color-border);
        padding-inline-end: 0;
        padding-bottom: var(--space-md);
    }
    .mega-panel__image {
        height: 160px;
    }
    .mega-panel__cols {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* =========================================================
   6. HERO / BIG SLIDER
   ========================================================= */
.hero,
#bigSliderCarousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

#bigSliderCarousel .swiper-slide img,
.hero__image {
    width: 100%;
    height: clamp(220px, 45vw, 600px);
    object-fit: cover;
    display: block;
}

.hero__slide { display: none; }
.hero__slide.is-active { display: block; }

.hero::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(to top, var(--color-bg), transparent);
    pointer-events: none;
    z-index: 1;
}

#bigSliderCarousel .swiper-pagination {
    bottom: 12px !important;
    z-index: 2;
}
#bigSliderCarousel .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.6;
    width: 8px;
    height: 8px;
}
#bigSliderCarousel .swiper-pagination-bullet-active {
    background: var(--amz-orange);
    opacity: 1;
    transform: scale(1.3);
}

/* =========================================================
   7. CARDS
   ========================================================= */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.card:hover { box-shadow: var(--shadow-md); }

.card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}
.card__link {
    color: var(--color-link);
    font-size: 13px;
    margin-top: auto;
    padding-top: var(--space-sm);
    font-weight: 500;
}
.card__link:hover { color: var(--color-link-hover); }

/* =========================================================
   8. PRODUCT CARD
   ========================================================= */
.product-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
    position: relative;
    overflow: hidden;
    /* NOTE: لا نضع height: 100% هنا — يتحدد حسب السياق */
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card__image-wrap {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    overflow: hidden;
    background: #f7f7f7;
    border-radius: var(--radius-sm);
}
.product-card__image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform var(--t-med);
}
.product-card:hover .product-card__image { transform: scale(1.04); }

.product-card__title {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.product-card__title a { color: var(--color-text); }
.product-card__title a:hover { color: var(--color-link-hover); }

.product-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--amz-blue);
    margin-bottom: 6px;
}
.product-card__stars {
    color: var(--amz-orange);
    letter-spacing: 1px;
    font-size: 14px;
}
.product-card__reviews { color: var(--amz-blue); }

.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}
.product-card__price .price-now {
    font-size: 21px;
    color: var(--amz-red);
    font-weight: 500;
    line-height: 1;
}
.product-card__price .price-now sup {
    font-size: 0.6em;
    top: -0.4em;
    position: relative;
}
.product-card__price .price-old {
    font-size: 13px;
    color: var(--color-text-mute);
    text-decoration: line-through;
}
.product-card__price .price-discount {
    font-size: 12px;
    color: var(--amz-red);
    background: #fdebd8;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.product-card__badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: var(--amz-red);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    z-index: 2;
}
.product-card__badge--new   { background: var(--amz-green); }
.product-card__badge--prime { background: #00a8e1; }

.product-card__fav {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    font-size: 15px;
    box-shadow: var(--shadow-sm);
    transition: background var(--t-fast), transform var(--t-fast);
}
.product-card__fav:hover {
    background: #fff;
    transform: scale(1.08);
}
.product-card__fav.is-active .heart-icon { color: red; }

.product-card__stock {
    font-size: 12px;
    margin: 4px 0;
}

/* =========================================================
   9. BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled,
.btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: var(--amz-yellow);
    border-color: #fcd200;
    color: var(--amz-navy);
}
.btn-primary:hover {
    background: var(--amz-yellow-hov);
    border-color: #f2c200;
    color: var(--amz-navy);
}

.btn-buy {
    background: var(--amz-orange);
    border-color: #ff8f00;
    color: var(--amz-navy);
}
.btn-buy:hover {
    background: var(--amz-orange-hov);
    border-color: #e07b00;
    color: var(--amz-navy);
}

.btn-secondary {
    background: #fff;
    border-color: var(--color-border);
    color: var(--color-text);
    box-shadow: 0 2px 5px rgba(15,17,17,0.12);
}
.btn-secondary:hover {
    background: #f7fafa;
    border-color: #adb1b8;
    color: var(--color-text);
}

.btn-dark {
    background: var(--amz-navy-3);
    color: #fff;
    border-color: var(--amz-navy-3);
}
.btn-dark:hover { background: #485769; color: #fff; }

.btn-outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}
.btn-outline:hover {
    background: #f7fafa;
    border-color: #adb1b8;
    color: var(--color-text);
}

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }

/* =========================================================
   10. FORMS
   ========================================================= */
.form-group { margin-bottom: var(--space-md); }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #888c8c;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus {
    outline: none;
    border-color: var(--amz-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 133, 0.2);
}
.form-control.is-invalid {
    border-color: var(--amz-red);
    box-shadow: 0 0 0 3px rgba(177, 39, 4, 0.15);
}
.form-error {
    color: var(--amz-red);
    font-size: 12px;
    margin-top: 4px;
}
.form-hint {
    color: var(--color-text-mute);
    font-size: 12px;
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.form-check input {
    accent-color: var(--amz-blue);
    width: 16px;
    height: 16px;
}

/* =========================================================
   11. PRICE
   ========================================================= */
.price {
    color: var(--amz-red);
    font-weight: 500;
}
.price sup { font-size: 0.6em; top: -0.5em; position: relative; }
.price-old {
    color: var(--color-text-mute);
    text-decoration: line-through;
    font-size: 0.85em;
}

/* =========================================================
   12. BADGES
   ========================================================= */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    background: #e7e9ec;
    color: var(--color-text);
}
.badge-success { background: #e3f6ef; color: var(--amz-green); }
.badge-danger  { background: #fde7e3; color: var(--amz-red); }
.badge-warning { background: #fff4d6; color: #7a5c00; }
.badge-info    { background: #e5f3f6; color: var(--amz-blue); }

/* =========================================================
   13. RATING STARS
   ========================================================= */
.stars {
    display: inline-flex;
    color: var(--amz-orange);
    font-size: 14px;
    letter-spacing: 1px;
}
.stars--sm { font-size: 12px; }
.stars--lg { font-size: 18px; }

/* =========================================================
   14. FOOTER
   ========================================================= */
.site-footer {
    background: var(--amz-navy-2);
    color: #ddd;
    margin-top: var(--space-xl);
}
.site-footer__top {
    background: var(--amz-navy-3);
    text-align: center;
    padding: 14px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background var(--t-fast);
}
.site-footer__top:hover { background: #485769; }

.site-footer__links {
    max-width: var(--container-max);
    margin-inline: auto;
    padding: var(--space-xl) var(--space-md);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}
.site-footer__col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: var(--space-sm);
}
.site-footer__col ul li { margin-bottom: 6px; }
.site-footer__col a {
    color: #ddd;
    font-size: 13px;
}
.site-footer__col a:hover { color: #fff; text-decoration: underline; }

.site-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.site-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.site-footer__contact i {
    color: #fff;
    width: 16px;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

.site-footer__payments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.site-footer__payments img {
    height: 26px;
    width: auto;
    background: #fff;
    padding: 3px 5px;
    border-radius: var(--radius-sm);
}

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.social-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4a5666;
    border-radius: 50%;
    color: #ddd;
    background: transparent;
    font-size: 14px;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.social-btn:hover {
    background: #fff;
    color: var(--amz-navy);
    border-color: #fff;
    text-decoration: none;
}

.site-footer__bottom {
    background: var(--amz-navy);
    color: #ddd;
    padding: var(--space-md);
    text-align: center;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.site-footer__bottom a { color: #fff; text-decoration: underline; }

/* =========================================================
   15. UTILITIES
   ========================================================= */
.mt-0 { margin-top: 0 !important; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

.text-soft { color: var(--color-text-soft); }
.text-mute { color: var(--color-text-mute); }
.text-danger { color: var(--amz-red); }
.text-success { color: var(--amz-green); }
.fw-bold { font-weight: 700; }

.rounded { border-radius: var(--radius-md); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.bg-white { background: #fff; }
.bg-light { background: var(--color-bg); }
.bg-navy  { background: var(--amz-navy); color: #fff; }

.w-100 { width: 100%; }

/* =========================================================
   16. MEGA MENU
   ========================================================= */
.mega-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff !important;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: border-color var(--t-fast), background var(--t-fast);
    position: relative;
    cursor: pointer;
}
.mega-nav__link:hover {
    border-color: #fff;
    text-decoration: none;
    color: #fff !important;
}
.mega-nav__link.is-active { font-weight: 700; }

.mega-nav__caret {
    font-size: 10px;
    opacity: 0.85;
    transition: transform var(--t-med);
}
.mega-nav__item.is-open .mega-nav__caret { transform: rotate(180deg); }

.mega-nav__item { position: static; }

.mega-nav__item.is-open > .mega-nav__link {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.mega-panel {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    width: 100%;
    background: #fff;
    color: var(--color-text);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    padding: var(--space-lg) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
    z-index: 999;
}
.mega-nav__item.is-open .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-panel__inner {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.mega-panel__media {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-inline-end: var(--space-lg);
    border-inline-end: 1px solid var(--color-border);
}
.mega-panel__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform var(--t-med);
}
.mega-panel__media:hover .mega-panel__image { transform: scale(1.02); }
.mega-panel__cta {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--amz-blue);
}
.mega-panel__cta:hover {
    color: var(--amz-blue-hov);
    text-decoration: underline;
}

.mega-panel__cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}
.mega-panel__heading {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}
.mega-panel__heading a { color: var(--color-text); }
.mega-panel__heading a:hover {
    color: var(--amz-blue-hov);
    text-decoration: underline;
}
.mega-panel__divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 6px 0 var(--space-md) 0;
}
.mega-panel__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mega-panel__link {
    display: block;
    color: var(--color-text-soft);
    font-size: 13px;
    padding: 4px 0;
    transition: color var(--t-fast), padding-inline-start var(--t-fast);
}
.mega-panel__link:hover {
    color: var(--amz-blue-hov);
    padding-inline-start: 4px;
    text-decoration: none;
}
.mega-panel__empty {
    font-size: 13px;
    font-style: italic;
}

.mega-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    background: rgba(15, 17, 17, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-med), visibility var(--t-med);
    z-index: 1010;
    pointer-events: none;
}
.site-subheader.is-panel-open .mega-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =========================================================
   17. HOME PAGE — PRODUCTS GRID
   ========================================================= */
.home-products { padding-block: var(--space-lg); }

.home-products__header {
    padding-block: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}
.home-products__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.home-products__grid { row-gap: var(--space-lg); }

.home-products__loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xl) 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--amz-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.home-products__more {
    padding: var(--space-xl) 0;
    text-align: center;
}
.home-products__end {
    padding: var(--space-lg) 0;
    font-size: 14px;
}

/* =========================================================
   18. FEATURES STRIP
   ========================================================= */
.features-strip {
    background: #f4f4f4;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg) 0;
}
.features-strip__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    align-items: center;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-inline: var(--space-md);
    border-inline-end: 1px solid var(--color-border);
}
.feature-item:last-child { border-inline-end: none; }

.feature-item__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: var(--amz-navy-2);
    font-size: 22px;
    box-shadow: var(--shadow-sm);
}
.feature-item__text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}
.feature-item__text strong {
    font-size: 14px;
    color: var(--color-text);
}
.feature-item__text span {
    font-size: 12px;
    color: var(--color-text-soft);
}

/* =========================================================
   19. MOBILE BOTTOM BAR
   ========================================================= */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 1025;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    color: var(--color-text-soft);
    font-size: 11px;
    text-align: center;
    text-decoration: none;
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
    transition: color var(--t-fast);
    min-height: 56px;
}
.mobile-bottom-bar__item:hover,
.mobile-bottom-bar__item:active { color: var(--amz-orange); text-decoration: none; }
.mobile-bottom-bar__item i { font-size: 18px; }
.mobile-bottom-bar__item > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

.mobile-bottom-bar__cart { position: relative; display: inline-block; }
.mobile-bottom-bar__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--amz-red);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
}

/* =========================================================
   20. SWIPER — BASE STYLES
   ========================================================= */
.swiper {
    width: 100%;
    padding: 4px 0 8px;
}
.swiper-wrapper {
    align-items: flex-start;   /* ✅ لا stretch — يمنع التمدد */
}
.swiper-slide {
    display: flex;
    /* ✅ لا max-height — يتحدد حسب السياق */
}

/* Custom nav buttons (external) */
.product_slider_nav {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.product_slider_nav:hover {
    background: var(--amz-navy);
    color: #fff;
    border-color: var(--amz-navy);
}
.product_slider_nav:focus-visible {
    outline: 2px solid var(--amz-blue);
    outline-offset: 2px;
}
.product_slider_nav.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =========================================================
   21. FEEDBACK CAROUSEL ("Last Reviews") — Vertical Layout
   ========================================================= */
.feedback-carousel-section { padding-block: var(--space-lg); }

.feedback-carousel-section__header {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
}
.feedback-carousel-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.feedback-carousel-section__nav {
    display: flex;
    gap: 4px;
}

.feedback-swiper {
    height: 300px;              /* 320px بطاقة + 20px padding */
    max-height: 300px;
    overflow: hidden;
    padding: 6px 4px 10px;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   Swiper Slide — ارتفاع ثابت
   --------------------------------------------------------- */
.feedback-swiper .swiper-slide {
    height: 320px;              /* ✅ ارتفاع ثابت */
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* ---------------------------------------------------------
   Feedback Card — تخطيط عمودي
   --------------------------------------------------------- */
.feedback-card {
    display: flex;
    flex-direction: column;     /* ✅ عمودي */
    align-items: center;        /* ✅ توسيط أفقي */
    text-align: center;
    gap: 6px;
    padding: var(--space-md);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    width: 100%;
    height: 100%;
    max-height: 320px;
    overflow: hidden;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.feedback-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------
   Media (الصورة + التقييم)
   --------------------------------------------------------- */
.feedback-card__media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.feedback-card__image-link {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--t-med);
}
.feedback-card:hover .feedback-card__image { transform: scale(1.04); }

.feedback-card__rating {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    max-height: 20px;
    overflow: hidden;
}

/* ---------------------------------------------------------
   Body (الاسم + التاريخ + التعليق)
   --------------------------------------------------------- */
.feedback-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    text-align: center;
}

.feedback-card__product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
    max-height: calc(13px * 1.35 * 2);
}
.feedback-card__product-name a { color: var(--color-text); }
.feedback-card__product-name a:hover {
    color: var(--amz-blue-hov);
    text-decoration: underline;
}

.feedback-card__date {
    font-size: 11px;
    color: var(--color-text-mute);
    flex-shrink: 0;
    height: 16px;
    line-height: 16px;
    overflow: hidden;
}

.feedback-card__comment {
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-text-soft);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .feedback-swiper .swiper-slide { height: 300px; }
    .feedback-card {
        padding: var(--space-sm);
        max-height: 300px;
    }
    .feedback-card__image-link { width: 90px; height: 90px; }
    .feedback-card__product-name {
        font-size: 12px;
        max-height: calc(12px * 1.35 * 2);
    }
    .feedback-card__comment {
        font-size: 11.5px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media (max-width: 575px) {
    .feedback-swiper .swiper-slide { height: 280px; }
    .feedback-card {
        padding: 10px;
        max-height: 280px;
    }
    .feedback-card__image-link { width: 80px; height: 80px; }
    .feedback-card__product-name {
        font-size: 11.5px;
        max-height: calc(11.5px * 1.35 * 2);
    }
}

/* ---------------------------------------------------------
   RTL — التخطيط العمودي لا يحتاج تعديلاً
   --------------------------------------------------------- */
[dir="rtl"] .feedback-card { text-align: center; }

/* =========================================================
   22. BOOTSTRAP DROPDOWN OVERRIDES
   ========================================================= */
.site-header .dropdown-menu,
.site-footer .dropdown-menu,
.mobile-bottom-bar .dropdown-menu {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 6px;
    min-width: 220px;
    padding: 6px 0;
    z-index: 1050;
}
.site-header .dropdown-item,
.site-footer .dropdown-item,
.mobile-bottom-bar .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--color-text);
    transition: background var(--t-fast), color var(--t-fast);
}
.site-header .dropdown-item:hover,
.site-footer .dropdown-item:hover,
.mobile-bottom-bar .dropdown-item:hover {
    background: #f0f2f2;
    color: var(--amz-blue-hov);
}
.dropdown-item img { vertical-align: middle; }

.mobile-bottom-bar .dropdown-menu {
    bottom: 100%;
    top: auto;
    margin-bottom: 6px;
    margin-top: 0;
}

[dir="rtl"] .dropdown-menu-end {
    --bs-position: start;
    right: auto;
    left: 0;
}
[dir="rtl"] .dropdown-menu-start {
    right: 0;
    left: auto;
}

/* =========================================================
   23. WHATSAPP FLOATING BUTTON
   ========================================================= */
.whatsapp-float {
    position: fixed;
    bottom: 85px;
    inset-inline-end: 20px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1020;
    text-decoration: none;
    animation: waPulse 2s infinite;
}
.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}
@keyframes waPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================================
   24. RESPONSIVE — TABLET (≤ 1024px)
   ========================================================= */
@media (max-width: 1024px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .site-footer__links { grid-template-columns: repeat(2, 1fr); }

    #bigSliderCarousel .swiper-slide img,
    .hero__image { height: clamp(220px, 55vw, 420px); }

    .mega-panel__inner {
        grid-template-columns: 200px 1fr;
        gap: var(--space-lg);
    }
    .mega-panel__cols { gap: var(--space-lg); }
}

/* =========================================================
   25. RESPONSIVE — TABLET/SMALL (≤ 768px)
   ========================================================= */
@media (max-width: 768px) {
    .site-header__inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px;
        gap: 8px;
    }
    .header-search {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }
    .header-location { display: none; }
    .header-action { font-size: 11px; padding: 4px 6px; }
    .header-action strong { font-size: 13px; }

    .grid-5,
    .grid-4,
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }

    #bigSliderCarousel .swiper-slide img,
    .hero__image { height: clamp(180px, 60vw, 300px); }

    .site-footer__links { grid-template-columns: 1fr; gap: var(--space-md); }

    .home-products__grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    .home-products__title { font-size: 18px; }

    .feedback-carousel-section__title { font-size: 17px; }
    .feedback-card {
        grid-template-columns: 80px 1fr;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }
    .feedback-card__image-link { width: 80px; height: 80px; }

    .mega-panel__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .mega-panel__media {
        border-inline-end: none;
        border-bottom: 1px solid var(--color-border);
        padding-inline-end: 0;
        padding-bottom: var(--space-md);
    }
    .mega-panel__image { height: 160px; }
    .mega-panel__cols { grid-template-columns: 1fr; gap: var(--space-md); }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 28px;
        bottom: 78px;
        inset-inline-end: 14px;
    }
}

/* =========================================================
   26. RESPONSIVE — MOBILE (≤ 575px)
   ========================================================= */
@media (max-width: 575px) {
    body {
        font-size: 13px;
        padding-bottom: calc(var(--mobile-bar-h) + 8px);
    }

    .container { padding-inline: 12px; }

    .grid-5,
    .grid-4,
    .grid-3,
    .grid-2 { grid-template-columns: repeat(2, 1fr); }

    .home-products__grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card { padding: 10px; }
    .product-card__title { font-size: 13px; min-height: 2.5em; }
    .product-card__price .price-now { font-size: 17px; }
    .product-card__price .price-old { font-size: 11px; }
    .product-card__fav { width: 30px; height: 30px; font-size: 13px; }
    .product-card__badge { font-size: 10px; padding: 2px 6px; }

    .header-action { font-size: 10px; padding: 3px 5px; }
    .header-action strong { font-size: 12px; }

    #bigSliderCarousel .swiper-slide img,
    .hero__image { height: clamp(140px, 55vw, 220px); }

    .home-products__title { font-size: 17px; }
    .feedback-carousel-section__title { font-size: 16px; }
    .feedback-card {
        grid-template-columns: 72px 1fr;
        padding: 10px;
    }
    .feedback-card__image-link { width: 72px; height: 72px; }
    .feedback-card__comment { -webkit-line-clamp: 2; line-clamp: 2; }

    .whatsapp-float {
        bottom: calc(var(--mobile-bar-h) + 15px);
        inset-inline-end: 12px;
    }

    .features-strip { padding: var(--space-md) 0; }
    .feature-item { padding-inline: 0; }
    .feature-item__icon { width: 40px; height: 40px; font-size: 18px; }
    .feature-item__text strong { font-size: 13px; }
    .feature-item__text span { font-size: 11px; }

    .site-footer__links { padding: var(--space-lg) var(--space-sm); }
    .site-footer__payments img { height: 22px; }
    .social-btn { width: 30px; height: 30px; font-size: 12px; }
}

/* =========================================================
   27. VERY SMALL MOBILE (≤ 360px)
   ========================================================= */
@media (max-width: 360px) {
    body { font-size: 12px; }
    .product-card__title { font-size: 12px; }
    .product-card__price .price-now { font-size: 15px; }
    .header-cart__icon { font-size: 22px; }
    .header-cart__count { font-size: 13px; }
    .mobile-bottom-bar__item { font-size: 10px; }
    .mobile-bottom-bar__item i { font-size: 16px; }
}

/* =========================================================
   28. RTL SUPPORT
   ========================================================= */
[dir="rtl"] .header-cart__count {
    left: auto;
    right: 14px;
}
[dir="rtl"] .product-card__badge {
    inset-inline-start: auto;
    inset-inline-end: 10px;
}
[dir="rtl"] .product-card__fav {
    inset-inline-end: auto;
    inset-inline-start: 8px;
}
[dir="rtl"] .site-footer__col { text-align: right; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }
[dir="rtl"] .mega-panel__cta::before { content: "← "; }
[dir="rtl"] .mega-panel__cta::after { content: ""; }
[dir="rtl"] .mega-panel__link:hover {
    padding-inline-start: 0;
    padding-inline-end: 4px;
}
[dir="rtl"] .header-search__select {
    border-inline-end: 1px solid var(--color-border);
    border-inline-start: none;
}
[dir="rtl"] .feedback-card { grid-template-columns: 1fr 96px; }
[dir="rtl"] .feedback-card__media { order: 2; }
[dir="rtl"] .feedback-card__body  { order: 1; }

/* =========================================================
   29. DARK MODE (OPTIONAL)
   ========================================================= */
html.dark {
    --color-bg: #0f1419;
    --color-surface: #1b2229;
    --color-border: #2b333b;
    --color-text: #e7e9ec;
    --color-text-soft: #b0b6bc;
    --color-text-mute: #8b9198;
}
html.dark body { background: var(--color-bg); color: var(--color-text); }
html.dark .card,
html.dark .product-card,
html.dark .feedback-card { background: var(--color-surface); }
html.dark .card__title,
html.dark .product-card__title a,
html.dark .feedback-card__product-name a { color: var(--color-text); }
html.dark .product-card__image-wrap,
html.dark .feedback-card__image-link { background: #131a20; }
html.dark .product_slider_nav {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}
html.dark .features-strip { background: #161c22; }
html.dark .feature-item__icon {
    background: var(--color-surface);
    color: var(--color-text);
}
html.dark .mobile-bottom-bar {
    background: var(--color-surface);
    border-color: var(--color-border);
}

/* =========================================================
   30. ACCESSIBILITY — REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .whatsapp-float { animation: none; }
    .spinner { animation: none; border-top-color: var(--amz-orange); }
}

/* =========================================================
   31. PRINT
   ========================================================= */
@media print {
    .site-header,
    .site-subheader,
    .site-footer,
    .mobile-bottom-bar,
    .whatsapp-float,
    .btn,
    .product-card__fav,
    .product_slider_nav { display: none !important; }
    body {
        background: #fff;
        color: #000;
        padding: 0;
        font-size: 12pt;
    }
    .container { max-width: 100%; padding: 0; }
    a { color: #000; text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 90%; }
}

/* =========================================================
   32. PRODUCTS CAROUSEL SECTIONS (Best Seller, Reavailable)
   ========================================================= */

.products-carousel-section {
    padding-block: var(--space-lg);
}

.products-carousel-section__header {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.products-carousel-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.products-carousel-section__nav {
    display: flex;
    gap: 4px;
}

/* ---------------------------------------------------------
   ✅ SWIPER CONTAINER — ارتفاع ثابت لكل نوع
   --------------------------------------------------------- */

/* السلايدر الأساسي للمنتجات (best seller / reavailable) */
.best-seller-swiper,
.reavailable-swiper {
    height: calc(var(--carousel-slide-h) + 16px);  /* slide + padding */
    max-height: calc(var(--carousel-slide-h) + 16px);
    overflow: hidden;
    padding: 6px 4px 10px;
    box-sizing: border-box;
}

/* wrapper — ارتفاع مطابق */
.best-seller-swiper .swiper-wrapper,
.reavailable-swiper .swiper-wrapper {
    height: var(--carousel-slide-h);
    align-items: stretch;
}

/* slide — ارتفاع ثابت */
.best-seller-swiper .swiper-slide,
.reavailable-swiper .swiper-slide {
    height: var(--carousel-slide-h);
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* منع أي slide-duplicate من التمدد */
.best-seller-swiper .swiper-slide-duplicate,
.reavailable-swiper .swiper-slide-duplicate {
    height: var(--carousel-slide-h) !important;
}

/* البطاقة تملأ السلايد */
.best-seller-swiper .swiper-slide > .product-card,
.reavailable-swiper .swiper-slide > .product-card {
    width: 100%;
    height: 100%;
    max-height: var(--carousel-slide-h);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---------------------------------------------------------
   Compact Product Card
   --------------------------------------------------------- */
.product-card--compact {
    padding: 10px;
}

.product-card--compact .product-card__image-wrap {
    width: 100%;
    height: var(--carousel-image-h);
    aspect-ratio: auto;
    margin-bottom: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-card--compact .product-card__image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-card--compact .product-card__title {
    font-size: 12px;
    line-height: 1.3;
    height: calc(12px * 1.3 * 2);
    min-height: calc(12px * 1.3 * 2);
    max-height: calc(12px * 1.3 * 2);
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.product-card--compact .product-card__rating {
    font-size: 11px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    margin-bottom: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.product-card--compact .product-card__stars {
    font-size: 12px;
    letter-spacing: 0;
}

.product-card--compact .product-card__price {
    height: 22px;
    min-height: 22px;
    max-height: 22px;
    margin-bottom: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.product-card--compact .product-card__price .price-now {
    font-size: 15px;
}

.product-card--compact .product-card__price .price-old {
    font-size: 11px;
}

.product-card__actions {
    margin-top: auto;
    padding-top: 4px;
    flex-shrink: 0;
}

.product-card__actions .btn {
    font-size: 11px;
    padding: 5px 8px;
}

.product-card__actions .btn i {
    font-size: 12px;
}

/* ---------------------------------------------------------
   Notify button
   --------------------------------------------------------- */
.btn-notify {
    background: #e7f3f8;
    border-color: #b8dbe8;
    color: var(--amz-blue);
}
.btn-notify:hover {
    background: #d4e9f2;
    border-color: #8fc4d6;
    color: var(--amz-blue);
}

[dir="rtl"] .product-card--compact .product-card__title {
    text-align: right;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --carousel-slide-h: 400px;
        --carousel-image-h: 180px;
    }
    .products-carousel-section__title { font-size: 17px; }
    .product-card--compact { padding: 10px; }
    .product-card--compact .product-card__title {
        font-size: 13px;
        height: calc(13px * 1.3 * 2);
        min-height: calc(13px * 1.3 * 2);
        max-height: calc(13px * 1.3 * 2);
    }
    .product-card--compact .product-card__price .price-now { font-size: 17px; }
    .product-card__actions .btn { font-size: 12px; padding: 6px 10px; }
}

@media (max-width: 480px) {
    :root {
        --carousel-slide-h: 420px;
        --carousel-image-h: 220px;
    }
    .product-card--compact { padding: 12px; }
    .product-card--compact .product-card__title {
        font-size: 14px;
        height: calc(14px * 1.3 * 2);
        min-height: calc(14px * 1.3 * 2);
        max-height: calc(14px * 1.3 * 2);
    }
    .product-card--compact .product-card__price .price-now { font-size: 18px; }
}

/* =========================================================
   33. JS HOOKS (empty — no styles)
   ========================================================= */
.js-cart-counter { /* hook only */ }

/* =========================================================
   34. HOME PRODUCTS GRID — يوازي بطاقات السلايدر
   ========================================================= */

.home-products__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}

/* 480px+ */
@media (min-width: 480px) {
    .home-products__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 768px+ */
@media (min-width: 768px) {
    .home-products__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 1024px+ */
@media (min-width: 1024px) {
    .home-products__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

/* 1280px+ */
@media (min-width: 1280px) {
    .home-products__grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 1600px+ */
@media (min-width: 1600px) {
    .home-products__grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 1920px+ */
@media (min-width: 1920px) {
    .home-products__grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ---------------------------------------------------------
   البطاقات داخل الشبكة — نفس أبعاد السلايدر بالضبط
   --------------------------------------------------------- */

/* كل بطاقة تأخذ ارتفاعاً موحداً */
.home-products__grid > .product-card--compact {
    width: 100%;
    height: var(--carousel-slide-h);
    max-height: var(--carousel-slide-h);
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* الصورة */
.home-products__grid > .product-card--compact .product-card__image-wrap {
    width: 100%;
    height: var(--carousel-image-h);
    aspect-ratio: auto;
    margin-bottom: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* العنوان */
.home-products__grid > .product-card--compact .product-card__title {
    font-size: 12px;
    line-height: 1.3;
    height: calc(12px * 1.3 * 2);
    min-height: calc(12px * 1.3 * 2);
    max-height: calc(12px * 1.3 * 2);
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

/* التقييم */
.home-products__grid > .product-card--compact .product-card__rating {
    font-size: 11px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    margin-bottom: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.home-products__grid > .product-card--compact .product-card__stars {
    font-size: 12px;
    letter-spacing: 0;
}

/* السعر */
.home-products__grid > .product-card--compact .product-card__price {
    height: 22px;
    min-height: 22px;
    max-height: 22px;
    margin-bottom: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.home-products__grid > .product-card--compact .product-card__price .price-now {
    font-size: 15px;
}

.home-products__grid > .product-card--compact .product-card__price .price-old {
    font-size: 11px;
}

/* زر الإضافة */
.home-products__grid > .product-card--compact .product-card__actions {
    margin-top: auto;
    padding-top: 4px;
    flex-shrink: 0;
}

.home-products__grid > .product-card--compact .product-card__actions .btn {
    font-size: 11px;
    padding: 5px 8px;
}

.home-products__grid > .product-card--compact .product-card__actions .btn i {
    font-size: 12px;
}


/* =========================================================
   35. PRODUCT GALLERY — Simple (no swiper) + Modal
   ========================================================= */

/* ---- Main image ---- */
.product-gallery-simple__main {
    position: relative;
    width: 100%;
    height: 500px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    user-select: none;
}

.product-gallery-simple__main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform var(--t-med);
}

.product-gallery-simple__main:hover img {
    transform: scale(1.02);
}

/* زر التكبير */
.product-gallery-simple__zoom {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    font-size: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-fast);
    z-index: 2;
}
.product-gallery-simple__zoom:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
}

/* ---- Thumbs (grid) ---- */
.product-gallery-simple__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 4px;
}

.product-gallery-simple__thumb {
    width: 80px;
    height: 80px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
    flex-shrink: 0;
}

.product-gallery-simple__thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-gallery-simple__thumb:hover {
    border-color: var(--amz-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.product-gallery-simple__thumb.is-active {
    border-color: var(--amz-orange);
    box-shadow: 0 0 0 3px rgba(255, 164, 28, 0.2);
}

/* ---- Modal ---- */
.product-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    background: rgba(0, 0, 0, 0.85);
}
.product-gallery-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backdrop — شفاف للضغط عليه للإغلاق */
.product-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: zoom-out;
}

/* Close */
.product-gallery-modal__close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    font-size: 18px;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: all var(--t-fast);
}
.product-gallery-modal__close:hover {
    background: var(--amz-red);
    color: #fff;
    transform: rotate(90deg);
}

/* Nav buttons */
.product-gallery-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    font-size: 20px;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: all var(--t-fast);
}
.product-gallery-modal__nav:hover {
    background: var(--amz-navy);
    color: #fff;
}
.product-gallery-modal__nav--prev {
    inset-inline-start: 16px;
}
.product-gallery-modal__nav--next {
    inset-inline-end: 16px;
}

/* Content */
.product-gallery-modal__content {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    max-width: 95vw;
    max-height: 95vh;
    padding: 16px;
    align-items: center;
}

/* Stage */
.product-gallery-modal__stage {
    background: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 80vw;
    max-height: 88vh;
    overflow: hidden;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.product-gallery-modal__image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
}

/* Modal thumbs */
.product-gallery-modal__thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 4px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-gallery-modal__thumbs::-webkit-scrollbar {
    width: 6px;
}
.product-gallery-modal__thumbs::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.product-gallery-modal__thumb {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
    flex-shrink: 0;
    opacity: 0.7;
}

.product-gallery-modal__thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-gallery-modal__thumb:hover {
    opacity: 1;
    border-color: var(--amz-orange);
}

.product-gallery-modal__thumb.is-active {
    border-color: var(--amz-orange);
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(255, 164, 28, 0.3);
}

/* Body lock when modal open */
body.gallery-modal-open {
    overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .product-gallery-simple__main {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-gallery-modal__content {
        grid-template-columns: 1fr;
        padding: 8px;
    }
    .product-gallery-modal__stage {
        max-width: 92vw;
        max-height: 70vh;
    }
    .product-gallery-modal__image {
        max-height: 65vh;
    }
    .product-gallery-modal__thumbs {
        flex-direction: row;
        max-height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        max-width: 92vw;
        padding: 6px;
    }
    .product-gallery-modal__thumb {
        width: 60px;
        height: 60px;
    }
    .product-gallery-modal__nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .product-gallery-modal__nav--prev { inset-inline-start: 8px; }
    .product-gallery-modal__nav--next { inset-inline-end: 8px; }
}

@media (max-width: 576px) {
    .product-gallery-simple__main {
        height: 300px;
    }
    .product-gallery-simple__thumb {
        width: 60px;
        height: 60px;
    }
    .product-gallery-simple__zoom {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* =========================================================
   36. PRODUCT ITEM PAGE — Layout (Amazon-style)
   ========================================================= */

.product-item-page {
    background: #fff;
    padding-block: var(--space-lg);
}

/* ---- TOP: Gallery + Buy Box (Grid) ---- */
.product-item-page__top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 992px) {
    .product-item-page__top {
        grid-template-columns: 5fr 7fr;
    }
}

/* ---- Gallery container ---- */
.product-item-page__gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Buy Box ---- */
.product-item-page__buy-box {
    display: flex;
    flex-direction: column;
}

.product-item-page__title {
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: 8px;
}

.product-item-page__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 12px;
}

.product-item-page__reviews-link {
    color: var(--amz-blue);
    font-size: 0.9rem;
}

.product-item-page__price {
    padding: 8px 0 12px;
}

.product-item-page__price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.product-item-page__price-old {
    font-size: 1.1rem;
    color: var(--color-text-mute);
    text-decoration: line-through;
}

.product-item-page__price-now {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--amz-red);
    line-height: 1;
}

.product-item-page__price-now sup {
    font-size: 1.2rem;
    font-weight: 400;
    vertical-align: top;
    margin-inline-end: 2px;
}

.product-item-page__save-badge {
    background: #cc0c39;
    color: #fff;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
}

.product-item-page__tax-note {
    font-size: 0.9rem;
    color: var(--color-text-soft);
    margin-top: 4px;
}

/* ---- Delivery / Stock ---- */
.product-item-page__delivery {
    background: #f7f7f7;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin: 12px 0;
    border: 1px solid var(--color-border);
}

.product-item-page__delivery-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.product-item-page__stock {
    font-weight: 700;
    font-size: 1.1rem;
}

.product-item-page__stock--in { color: var(--amz-green); }
.product-item-page__stock--out { color: var(--amz-red); }
.product-item-page__stock--preorder { color: var(--amz-orange); }

.product-item-page__delivery-detail {
    font-size: 0.95rem;
    margin-top: 4px;
}

.product-item-page__delivery-location {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--color-text-soft);
}

/* ---- Variations ---- */
.product-item-page__variations {
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
    margin-top: 8px;
}

.variation-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.variation-label {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
}

.amazon-field {
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    padding: 6px 10px;
    font-size: 0.9rem;
    width: 200px;
}

.amazon-field:focus {
    border-color: var(--amz-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
    outline: none;
}

/* ---- Variants ---- */
.product-item-page__variants {
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
    margin-top: 12px;
}

.product-item-page__variants-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.variants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variant-item {
    width: 80px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--t-fast);
}

.variant-item:hover {
    background: #f7f7f7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.variant-item__image {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
}

.variant-item:hover .variant-item__image {
    border-color: var(--amz-orange);
}

.variant-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.variant-item__badge {
    position: absolute;
    font-size: 0.5rem;
    padding: 1px 4px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
}

.variant-item__badge--discount {
    top: -4px;
    inset-inline-end: -4px;
    background: var(--amz-red);
}

.variant-item__badge--out {
    bottom: 0;
    inset-inline: 0;
    background: rgba(0, 0, 0, 0.6);
    text-align: center;
    border-radius: 0;
}

.variant-item__name {
    font-size: 0.65rem;
    margin-top: 4px;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.variant-item__price {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--amz-red);
}

/* ---- Actions ---- */
.product-item-page__actions {
    margin-top: 12px;
}

.product-item-page__actions-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px;
}

.product-item-page__qty {
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    padding: 8px 6px;
    font-weight: 600;
}

.product-item-page__actions-buttons .btn {
    width: 100%;
}

/* ---- Extra Actions ---- */
.product-item-page__extra {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
    margin-top: 12px;
}

/* ---- Meta ---- */
.product-item-page__meta {
    font-size: 0.85rem;
    color: var(--color-text-soft);
    line-height: 1.7;
}

/* ---- Badges ---- */
.product-item-page__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* ---- Tags ---- */
.product-item-page__tags {
    margin-top: 8px;
    font-size: 0.85rem;
}

.product-item-page__tags .badge {
    margin-inline-start: 4px;
}

/* =========================================================
   Tabs
   ========================================================= */
.product-item-page__tabs {
    margin-top: var(--space-xl);
}

.product-item-page__tabs .nav-tabs {
    border-bottom: 1px solid var(--color-border);
    background: #f0f2f2;
    padding: 0 12px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.product-item-page__tabs .nav-link {
    border: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 12px 20px;
    background: transparent;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    transition: all var(--t-fast);
    cursor: pointer;
}

.product-item-page__tabs .nav-link.active {
    background: #fff;
    border-bottom-color: var(--amz-orange);
    font-weight: 700;
}

.product-item-page__tabs .nav-link:hover {
    background: #e3e6e6;
}

.product-item-page__tabs .tab-content {
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: none;
    padding: 20px 24px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.product-item-page__description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
}

.product-item-page__specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.product-item-page__specs td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
}

.product-item-page__specs tr:nth-child(odd) td:first-child {
    background: #f7f7f7;
}

/* =========================================================
   Reviews
   ========================================================= */
.product-item-page__reviews {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.product-item-page__reviews-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.product-item-page__reviews-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .product-item-page__reviews-summary {
        grid-template-columns: 2fr 1fr;
    }
}

.product-item-page__reviews-bars {
    max-width: 400px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.rating-bar__track {
    flex: 1;
    height: 8px;
    background: #e7e7e7;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar__fill {
    height: 100%;
    background: var(--amz-orange);
    border-radius: 4px;
    transition: width var(--t-med);
}

.rating-bar__percent,
.rating-bar__count {
    min-width: 40px;
    color: var(--color-text-soft);
}

.product-item-page__reviews-score {
    text-align: center;
    background: #f7f7f7;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.product-item-page__reviews-score .score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--amz-blue);
    line-height: 1;
}

.product-item-page__reviews-list {
    margin-bottom: var(--space-lg);
}

.review-item {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

.review-item__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.review-item__comment {
    margin: 4px 0;
    font-size: 0.95rem;
}

.product-item-page__write-review .card {
    padding: var(--space-md);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 992px) {
    .product-item-page__top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-item-page__title {
        font-size: 1.3rem;
    }
    .product-item-page__price-now {
        font-size: 1.8rem;
    }
    .variation-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .amazon-field {
        width: 100%;
    }
    .product-item-page__tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .product-item-page__tabs .tab-content {
        padding: 12px;
    }
    .product-item-page__actions-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   37. GENERIC UI — Tables, Stat Cards, Empty States
   (يُستخدم في: الطلبات، الكاش باك، العمولات، أي قائمة عامة)
   ========================================================= */

/* ---------------------------------------------------------
   A. DATA CARD — بطاقة تحتوي على جدول أو قائمة
   --------------------------------------------------------- */
.data-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #f7f8f8;
    border-bottom: 1px solid var(--color-border);
}

.data-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--color-text);
}
.data-card__title i {
    color: var(--amz-blue);
}

.data-card__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    background: var(--amz-blue);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
}

.data-card__body {
    padding: 0;
}
.data-card__body--padded {
    padding: 16px 20px;
}

.data-card__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    background: #f7f8f8;
    border-top: 1px solid var(--color-border);
}


/* ---------------------------------------------------------
   B. DATA TABLE — جدول عام
   --------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: #f0f2f2;
}

.data-table th {
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--color-text);
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    border-bottom: 2px solid var(--color-border);
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    text-align: center;
}

/* Last row — no border */
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Hover */
.data-table tbody tr {
    transition: background var(--t-fast);
}
.data-table tbody tr:hover {
    background: #fafbfb;
}

/* Footer (totals) */
.data-table tfoot {
    background: #f7f8f8;
    border-top: 2px solid var(--color-border);
    font-weight: 700;
}
.data-table tfoot td {
    padding: 14px;
    text-align: center;
    vertical-align: middle;
}


/* ---------------------------------------------------------
   C. TABLE CELLS — أنماط موحّدة داخل الجداول
   --------------------------------------------------------- */

/* ID / Code (رقم الطلب، الكود) */
.data-table__id {
    display: inline-block;
    font-weight: 700;
    color: var(--amz-blue);
    font-size: 0.95rem;
}
.data-table__id:hover {
    color: var(--amz-blue-hov);
    text-decoration: underline;
}

.data-table__code {
    display: inline-block;
    padding: 4px 12px;
    background: #e5f3f6;
    color: var(--amz-blue);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
    direction: ltr;
}

/* Amount (positive — أخضر) */
.data-table__amount {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-weight: 700;
    color: var(--amz-green);
    font-size: 0.95rem;
}
.data-table__amount small {
    font-size: 0.7em;
    font-weight: 500;
    color: var(--color-text-soft);
}

/* Amount (negative / used — أحمر) */
.data-table__amount--negative {
    color: var(--amz-red);
}
.data-table__amount--negative small {
    color: var(--color-text-soft);
}

/* Total (بارز) */
.data-table__total {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--amz-red);
    font-weight: 700;
    font-size: 1rem;
}
.data-table__total small {
    font-size: 0.7em;
    font-weight: 500;
    color: var(--color-text-soft);
}

/* Date */
.data-table__date {
    font-size: 0.85rem;
    color: var(--color-text-soft);
    white-space: nowrap;
}

/* Qty badge */
.data-table__qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    background: #f0f2f2;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Small thumbnail inside table */
.data-table__thumb {
    display: inline-flex;
    width: 70px;
    height: 70px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #f7f7f7;
    overflow: hidden;
}
.data-table__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Stacked info (label + value) */
.data-table__stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}
.data-table__stack strong {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}
.data-table__stack span {
    font-size: 0.8rem;
    color: var(--color-text-soft);
}


/* ---------------------------------------------------------
   D. STAT CARDS — بطاقات إحصائية علوية
   --------------------------------------------------------- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    height: 100%;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 22px;
}

/* Color variants */
.stat-card__icon--blue {
    background: #e5f3f6;
    color: var(--amz-blue);
}
.stat-card__icon--red {
    background: #fde7e3;
    color: var(--amz-red);
}
.stat-card__icon--green {
    background: #e3f6ef;
    color: var(--amz-green);
}
.stat-card__icon--orange {
    background: #fff4d6;
    color: #b8860b;
}

.stat-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stat-card__label {
    font-size: 0.8rem;
    color: var(--color-text-soft);
    font-weight: 500;
}

.stat-card__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}
.stat-card__value small {
    font-size: 0.7em;
    font-weight: 500;
    color: var(--color-text-soft);
}


/* ---------------------------------------------------------
   E. EMPTY STATE — حالة فارغة موحّدة
   --------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.empty-state__icon {
    font-size: 3.5rem;
    color: var(--color-text-mute);
    margin-bottom: 16px;
    display: block;
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-soft);
    margin: 0 0 8px;
}

.empty-state__text {
    font-size: 0.9rem;
    color: var(--color-text-mute);
    margin: 0 0 16px;
}


/* ---------------------------------------------------------
   F. RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .data-card__header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
    }
    .data-card__header .btn {
        width: 100%;
    }

    .data-table {
        font-size: 0.8rem;
    }
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    .data-table__thumb {
        width: 50px;
        height: 50px;
    }

    .stat-card {
        padding: 12px 14px;
    }
    .stat-card__icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .stat-card__value {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .data-table th,
    .data-table td {
        padding: 6px 4px;
        font-size: 0.75rem;
    }
}

/* =========================================================
   BREADCRUMB — bc-bar (نسخة معزولة تماماً)
   لا تستخدم أي متغير أو كلاس من Bootstrap
   ========================================================= */

.bc-bar {
    /* أساسيات */
    display: block;
    width: 100%;
    background: #f7f8f8;
    border-bottom: 1px solid #e3e6e6;
    padding: 10px 0;
    margin: 0;

    /* عزل كامل */
    position: static;
    float: none;
    clear: both;
    contain: layout style;

    /* نصوص */
    font-size: 14px;
    line-height: 1.5;
    color: #565959;
    direction: inherit;
}

/* RTL */
[dir="rtl"] .bc-bar {
    direction: rtl;
}

/* الحاوية — مطابقة لبقية الموقع */
.bc-bar > .container {
    display: block;
    width: 100%;
    max-width: var(--container-max, 1500px);
    margin-inline: auto;
    padding-inline: var(--space-md, 16px);
    box-sizing: border-box;
}

/* القائمة */
.bc-bar .bc-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent;
    border: 0;
}

/* العنصر */
.bc-bar .bc-item {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}

/* الفاصل */
.bc-bar .bc-item + .bc-item::before {
    content: '›';
    display: inline-block;
    margin: 0 8px;
    color: #999;
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
}

[dir="rtl"] .bc-bar .bc-item + .bc-item::before {
    content: '‹';
}

/* الرابط */
.bc-bar .bc-link {
    color: #007185;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    transition: color 0.15s ease;
}

.bc-bar .bc-link:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* العنصر الحالي (بدون رابط) */
.bc-bar .bc-current {
    color: #0f1111;
    font-weight: 700;
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* =========================================================
   الجوال
   ========================================================= */
@media (max-width: 575px) {
    .bc-bar {
        padding: 8px 0;
    }
    .bc-bar > .container {
        padding-inline: 12px;
    }
    .bc-bar .bc-item {
        font-size: 12.5px;
    }
    .bc-bar .bc-link {
        max-width: 140px;
    }
    .bc-bar .bc-current {
        max-width: 160px;
    }
    .bc-bar .bc-item + .bc-item::before {
        margin: 0 5px;
        font-size: 14px;
    }
}

/* =========================================================
   Dark Mode
   ========================================================= */
html.dark .bc-bar {
    background: #1b2229;
    border-bottom-color: #2b333b;
    color: #b0b6bc;
}
html.dark .bc-bar .bc-link {
    color: #4db8c4;
}
html.dark .bc-bar .bc-link:hover {
    color: #ffa41c;
}
html.dark .bc-bar .bc-current {
    color: #e7e9ec;
}
html.dark .bc-bar .bc-item + .bc-item::before {
    color: #6a7178;
}




/* =========================================================
   MOBILE BOTTOM BAR — FIX: أزرار أفقية دائماً
   ========================================================= */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    display: grid !important;               /* ✅ إجبار الشبكة */
    grid-template-columns: repeat(5, 1fr) !important;  /* ✅ 5 أعمدة متساوية */
    grid-auto-flow: column;                 /* ✅ صف واحد فقط */
    z-index: 1025;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: var(--mobile-bar-h, 60px);
}

/* الأزرار — لا تأخذ عرضاً كاملاً ولا تتراكم عمودياً */
.mobile-bottom-bar__item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    color: var(--color-text-soft);
    font-size: 10px;
    text-align: center;
    text-decoration: none;
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
    transition: color var(--t-fast);
    min-height: 56px;
    width: 100%;            /* ✅ يملأ عموده فقط */
    min-width: 0;           /* ✅ يمنع التمدد */
    overflow: hidden;
}

.mobile-bottom-bar__item i { font-size: 18px; }

/* مهم: العنصر <a> الداخلي لا يصبح block بعرض كامل */
.mobile-bottom-bar__item > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

/* في الجوال: لا تغيّر display للعناصر إلى block */
@media (max-width: 575px) {
    .mobile-bottom-bar {
        grid-template-columns: repeat(5, 1fr) !important;
    }
    .mobile-bottom-bar__item {
        display: flex !important;
        flex-direction: column !important;
        font-size: 10px;
    }
    .mobile-bottom-bar__item i {
        font-size: 16px;
    }
}

/* في الشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .mobile-bottom-bar__item {
        font-size: 9px;
        padding: 4px 1px;
    }
    .mobile-bottom-bar__item i {
        font-size: 15px;
    }
}

/* =========================================================
   MOBILE BOTTOM BAR — Dropdown FIX (المسافة + عدم الخروج عن الشاشة)
   ========================================================= */

/* 1) لا تقصّ القائمة */
.mobile-bottom-bar__item.dropdown {
    overflow: visible !important;
}

/* 2) القائمة — fixed على مستوى الشاشة، فوق الشريط بـ 100px */
.mobile-bottom-bar .dropdown-menu {
    position: fixed !important;
    bottom: calc(var(--mobile-bar-h, 60px) + 100px) !important;  /* ✅ 100px فوق الشريط */
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;   /* ✅ توسيط أفقي */
    margin: 0 !important;
    width: calc(100vw - 24px) !important;      /* ✅ يترك 12px من كل جانب */
    max-width: 360px !important;
    min-width: 0 !important;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2000 !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
    background: #fff;
    padding: 6px 0;
    display: none;
    box-sizing: border-box;
}

/* 3) عند الفتح */
.mobile-bottom-bar .dropdown-menu.show {
    display: block !important;
}

/* 4) RTL — نفس التوسيط يعمل في الاتجاهين */
[dir="rtl"] .mobile-bottom-bar .dropdown-menu {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

/* 5) بنود القائمة — لا تخرج عن الإطار */
.mobile-bottom-bar .dropdown-menu .dropdown-item,
.mobile-bottom-bar .dropdown-menu .dropdown-item-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--color-text);
    white-space: normal;          /* ✅ يسمح بالالتفاف */
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
    text-decoration: none;
}

.mobile-bottom-bar .dropdown-menu .dropdown-item:hover {
    background: #f0f2f2;
    color: var(--amz-blue-hov);
}

.mobile-bottom-bar .dropdown-menu .dropdown-item img {
    flex-shrink: 0;
    width: 18px;
    height: 12px;
    object-fit: cover;
}

/* 6) سهم صغير يشير للأسفل (نحو الأيقونة) */
.mobile-bottom-bar .dropdown-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

/* 7) رابط الزر نفسه */
.mobile-bottom-bar__item.dropdown > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
    justify-content: center;
}

/* =========================================================
   MOBILE BOTTOM BAR — إخفاء على الشاشات الكبيرة
   ========================================================= */

/* افتراضياً مخفي */
.mobile-bottom-bar {
    display: none !important;
}

/* يظهر فقط على الجوال (≤ 575px) */
@media (max-width: 575px) {
    .mobile-bottom-bar {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        grid-auto-flow: column;
    }
}