/* =======================================
   متغيرات الألوان (Color Palette)
======================================= */
:root {
    --bg-main: #FAFAFA;
    --bg-white: #FFFFFF;
    --text-main: #111111;
    --text-muted: #777777;
    --accent-color: #dbad75; /* لون نود/بيج أنيق */
    --border-color: #EAEAEA;
    --error-color: #E74C3C;
    --success-color: #2ECC71;
}

/* =======================================
   إعدادات عامة
======================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', 'Noto Color Emoji', sans-serif;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

html, body {
    -ms-overflow-style: none;
    scrollbar-width: none; 
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none; 
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 14px; }

/* =======================================
   متغيرات إضافية — NOVA Header
======================================= */
:root {
    --nova-header-bg: #c9995b;   /* درجة أغمق من الـ accent عشان التباين يكون واضح */
    --nova-header-text: #ffffff;
}

/* =======================================
   الهيدر الجديد (NOVA Style)
======================================= */
.nova-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--nova-header-bg);
    padding-bottom: 0;
}

.nova-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px 8px;
}

.nova-logo {
    font-weight: 900; font-size: 1.9rem; letter-spacing: 6px;
    color: var(--nova-header-text); text-align: center; flex: 1;
    text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.nova-topbar-actions { display: flex; align-items: center; gap: 2px; }

.nova-icon-btn {
    background: rgba(255,255,255,0.18); border: none; color: white;
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; cursor: pointer; transition: 0.2s;
    position: relative;
}
.nova-icon-btn:hover { background: rgba(255,255,255,0.32); }

/* Search Bar */
.nova-search-wrap { padding: 0 14px 14px; }
.nova-search-bar {
    display: flex; align-items: center; gap: 10px;
    background: white; border-radius: 25px; padding: 10px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.nova-search-icon { color: var(--text-muted); font-size: 0.95rem; flex-shrink: 0; }
.nova-search-bar input {
    flex: 1; border: none; background: transparent; font-size: 0.92rem;
    font-family: inherit; color: var(--text-main); outline: none;
    direction: rtl; text-align: right;
}
.nova-search-bar input::placeholder { color: #bbb; }
.nova-search-clear {
    background: none; border: none; color: var(--text-muted); font-size: 0.85rem;
    cursor: pointer; padding: 0; line-height: 1;
}
.nova-search-clear:hover { color: var(--error-color); }

/* Wave الانتقال "Torn Paper" */
.nova-header-wave {
    display: block; line-height: 0; overflow: hidden;
    height: 38px; margin-top: -2px;
}
.nova-header-wave svg { width: 100%; height: 100%; display: block; }

/* =======================================
   نتائج البحث
======================================= */
.search-results-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45); z-index: 900; padding-top: 145px;
    backdrop-filter: blur(3px);
}
.search-results-inner {
    background: var(--bg-white); margin: 0 12px; border-radius: 14px;
    max-height: calc(100vh - 165px); overflow-y: auto;
    padding: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.search-section-title {
    font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin: 12px 0 8px;
    padding-bottom: 6px; border-bottom: 1px solid var(--border-color);
}
.search-section-title:first-child { margin-top: 0; }
.search-cat-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 8px;
    border-radius: 10px; cursor: pointer; transition: 0.15s;
}
.search-cat-item:hover { background: var(--bg-main); }
.search-cat-item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.search-cat-item span { font-size: 0.92rem; font-weight: 600; color: var(--text-main); }
.search-prod-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 8px;
    border-radius: 10px; cursor: pointer; transition: 0.15s;
}
.search-prod-item:hover { background: var(--bg-main); }
.search-prod-item img { width: 48px; height: 58px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.search-prod-info { flex: 1; }
.search-prod-info .name { font-size: 0.9rem; font-weight: 600; color: var(--text-main); margin-bottom: 2px; }
.search-prod-info .price { font-size: 0.82rem; color: var(--accent-color); font-weight: 700; }
.search-empty { text-align: center; color: var(--text-muted); font-size: 0.92rem; padding: 24px 0; }

/* =======================================
   الأقسام الأفقية (Horizontal Scroll)
======================================= */
.horiz-cats-wrapper {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.horiz-cats-track {
    display: flex; gap: 0; overflow-x: auto; padding: 14px 12px 10px;
    scrollbar-width: none; -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}
.horiz-cats-track::-webkit-scrollbar { display: none; }

.hcat-item {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
    gap: 6px; cursor: pointer; padding: 0 10px; scroll-snap-align: start;
    transition: 0.2s; min-width: 72px;
}
.hcat-item:hover .hcat-img-wrap { border-color: var(--accent-color); transform: scale(1.05); }
.hcat-item:hover .hcat-name { color: var(--accent-color); }

.hcat-img-wrap {
    width: 60px; height: 60px; border-radius: 50%;
    border: 2.5px solid var(--border-color);
    overflow: hidden; transition: 0.2s; background: var(--bg-main);
    display: flex; align-items: center; justify-content: center;
}
.hcat-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.hcat-name {
    font-size: 0.72rem; font-weight: 700; color: var(--text-main);
    text-align: center; white-space: nowrap; max-width: 72px;
    overflow: hidden; text-overflow: ellipsis; transition: 0.2s;
    line-height: 1.3;
}

.hcat-item.active .hcat-img-wrap {
    border-color: var(--nova-header-bg);
    box-shadow: 0 0 0 3px rgba(201,153,91,0.25);
}
.hcat-item.active .hcat-name { color: var(--nova-header-bg); }

/* Skeleton للأقسام الأفقية */
.hcat-skeleton {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
    gap: 6px; padding: 0 10px; min-width: 72px;
}
.hcat-skeleton::before {
    content: ''; width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 300px 100%; animation: shimmer 1.4s infinite linear;
}
.hcat-skeleton::after {
    content: ''; width: 50px; height: 9px; border-radius: 4px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 300px 100%; animation: shimmer 1.4s infinite linear;
}

/* =======================================
   السلايدر المضغوط (Card Style)
======================================= */
.compact-slider-wrap {
    padding: 18px 14px 6px; background: var(--bg-main);
}
.compact-slider-inner {
    position: relative; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.13);
    background: #1a1a1a;
    height: 200px;
}
.compact-slider-track {
    display: flex; direction: ltr; width: 100%; height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.compact-slider-track .slider-slide {
    flex: 0 0 100%; width: 100%; height: 100%;
    position: relative; display: block; text-decoration: none;
}
.compact-slider-track .slider-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Overlay النص على السلايدر المضغوط */
.compact-slider-track .slider-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
    display: flex; flex-direction: column; justify-content: center;
    align-items: flex-end; text-align: right; padding: 20px 24px; color: white;
}
.compact-slider-track .slider-slide-overlay h3 {
    font-size: 1.25rem; font-weight: 900; margin: 0 0 5px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4); line-height: 1.3;
}
.compact-slider-track .slider-slide-overlay p {
    font-size: 0.82rem; margin: 0 0 12px; opacity: 0.9; max-width: 220px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Dots للسلايدر المضغوط */
.compact-slider-inner .slider-dots {
    position: absolute; bottom: 10px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 6px; z-index: 5;
}
.compact-slider-inner .slider-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer; transition: 0.3s; border: none; padding: 0;
}
.compact-slider-inner .slider-dot.active { background: white; width: 18px; border-radius: 3px; }

/* Skeleton للسلايدر */
.compact-slider-inner .slider-skeleton { position: absolute; inset: 0; z-index: 2; background: #e8e8e8; overflow: hidden; }

/* أزرار التنقل للسلايدر المضغوط */
.cslider-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.22); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3); width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center;
    justify-content: center; z-index: 5; color: white; font-size: 0.85rem; transition: 0.2s;
}
.cslider-nav:hover { background: var(--nova-header-bg); border-color: var(--nova-header-bg); }
.cslider-prev { right: 10px; }
.cslider-next { left: 10px; }

/* responsive */
@media (max-width: 480px) {
    .nova-logo { font-size: 1.65rem; letter-spacing: 5px; }
    .compact-slider-inner { height: 170px; }
    .compact-slider-track .slider-slide-overlay { padding: 16px 18px; }
    .compact-slider-track .slider-slide-overlay h3 { font-size: 1.05rem; }
    .compact-slider-track .slider-slide-overlay p { display: none; }
    .hcat-img-wrap { width: 52px; height: 52px; }
    .hcat-name { font-size: 0.68rem; max-width: 62px; }
    .hcat-item { min-width: 64px; padding: 0 7px; }
}



/* =======================================
   Skeleton Loading
======================================= */
@keyframes shimmer {
    0% { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
.skeleton-shimmer {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 600px 100%; animation: shimmer 1.6s infinite linear;
}
.slider-skeleton { position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #e8e8e8; }
.product-skeleton { border-radius: 8px; overflow: hidden; position: relative; background: #e8e8e8; }
.product-skeleton .sk-img { height: 200px; position: relative; overflow: hidden; }
.product-skeleton .sk-txt { padding: 12px; }
.product-skeleton .sk-line { height: 12px; border-radius: 4px; background: #ddd; margin-bottom: 8px; }
.product-skeleton .sk-line.w70 { width: 70%; }
.product-skeleton .sk-line.w40 { width: 40%; }


.btn-primary { background-color: var(--text-main); color: var(--bg-white); border: none; padding: 12px 30px; font-size: 1rem; font-weight: bold; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.btn-primary:hover, .btn-primary:disabled { background-color: var(--accent-color); }
.btn-outline { background-color: transparent; color: var(--text-main); border: 1px solid var(--text-main); padding: 8px 20px; font-size: 0.9rem; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.btn-outline:hover { background-color: var(--text-main); color: var(--bg-white); }
.w-100 { width: 100%; }
.input-field { width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 4px; background-color: var(--bg-main); font-size: 1rem; transition: border 0.3s; font-family: inherit; }
.input-field:focus { border-color: var(--accent-color); }

/* =======================================
   العناوين والشبكات
======================================= */
.section-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 30px; text-align: center; position: relative; }
.section-title::after { content: ''; display: block; width: 50px; height: 3px; background-color: var(--accent-color); margin: 10px auto 0; }
/* categories-grid defined below */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.products-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.products-header .section-title { margin-bottom: 0; }
.products-header .section-title::after { display: none; }

/* =======================================
   النوافذ المنبثقة (Modals)
======================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box {
    background: var(--bg-white); width: 90%; max-width: 400px; padding: 40px 30px;
    border-radius: 8px; position: relative; transform: translateY(20px); transition: 0.3s ease; box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    max-height: 90vh; overflow-y: auto;
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-box::-webkit-scrollbar, #userTicketsList::-webkit-scrollbar, #notificationsList::-webkit-scrollbar, #favoritesListContainer::-webkit-scrollbar { display: none; }
.modal-box { -ms-overflow-style: none; scrollbar-width: none; }

/* =======================================
   محتوى سياسة الخصوصية والاسترجاع
======================================= */
.policy-content { max-height: 65vh; overflow-y: auto; text-align: right; padding-left: 4px; }
.policy-section { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border-color); }
.policy-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.policy-section h4 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--text-main); margin: 0 0 8px; }
.policy-section h4 i { color: var(--accent-color); font-size: 0.95rem; }
.policy-section p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.8; margin: 0; }
.policy-section p strong { color: var(--accent-color); }

.side-modal { position: absolute; right: 0; top: 0; height: 100vh; border-radius: 0; transform: translateX(100%); display: flex; flex-direction: column; }
.modal-overlay.active .side-modal { transform: translateX(0); }

.close-btn { position: absolute; top: 15px; left: 15px; background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: 0.3s; }
.close-btn:hover { color: var(--error-color); }
.modal-title { font-size: 1.4rem; margin-bottom: 25px; text-align: center; }
.switch-link { text-align: center; margin-top: 15px; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; text-decoration: underline; }

.cart-items { flex: 1; overflow-y: auto; }
.cart-footer { margin-top: 20px; border-top: 1px solid var(--border-color); padding-top: 20px; }
.cart-total { display: flex; justify-content: space-between; font-weight: bold; font-size: 1.2rem; margin-bottom: 15px; }

/* =======================================
   تصميم الكروت
======================================= */
/* الأقسام — مستطيلات بدل دوائر */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.category-card {
    cursor: pointer; border-radius: 12px; overflow: hidden;
    position: relative; aspect-ratio: 3/4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.13); }
.category-card img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.4s;
}
.category-card:hover img { transform: scale(1.06); }
.category-card span {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    color: white; font-weight: 700; font-size: 0.95rem;
    padding: 20px 10px 10px; text-align: center;
}

.product-card { background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; cursor: pointer; transition: 0.3s; text-align: center; position: relative; }
.product-card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); transform: translateY(-5px); border-color: var(--accent-color); }
.product-card img { width: 100%; height: 200px; object-fit: cover; background-color: var(--bg-main); }
.product-card-info { padding: 10px 12px 12px; }
.product-card-title { font-size: 0.9rem; color: var(--text-main); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-price { color: var(--accent-color); font-weight: bold; font-size: 1rem; }
.product-card-price-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.product-card-old-price { color: var(--text-muted); text-decoration: line-through; font-size: 0.82rem; }
.product-discount-tag {
    position: absolute; top: 10px; right: 10px; z-index: 5;
    background: var(--error-color); color: #fff; font-weight: 800; font-size: 0.75rem;
    padding: 4px 9px; border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* السعر بعد الخصم داخل نافذة تفاصيل المنتج */
.modal-old-price { color: var(--text-muted); text-decoration: line-through; font-size: 1rem; margin-right: 8px; }
.modal-discount-badge { background: var(--error-color); color: #fff; font-weight: 800; font-size: 0.78rem; padding: 3px 9px; border-radius: 20px; margin-right: 8px; display: inline-block; }
.modal-new-price { color: var(--accent-color); font-weight: 800; }

/* زر المفضلة */
.fav-heart-btn {
    position: absolute; top: 10px; left: 10px; font-size: 1.2rem; color: var(--border-color);
    background: rgba(0,0,0,0.5); width: 35px; height: 35px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; z-index: 5; border: none;
}
.fav-heart-btn:hover { color: var(--bg-white); }
.fav-heart-btn.active { color: var(--error-color); animation: heartPop 0.4s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* نافذة تفاصيل المنتج */
.product-quick-view { display: flex; flex-wrap: wrap; gap: 20px; }
.product-gallery { flex: 1; min-width: 250px; }
.product-gallery .main-img { width: 100%; height: 350px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-main); }
.thumbnails { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; justify-content: center; }
.thumbnails img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid transparent; opacity: 0.6; transition: 0.3s; }
.thumbnails img:hover, .thumbnails img.active { opacity: 1; border-color: var(--accent-color); }
.product-details { flex: 1; min-width: 250px; text-align: right; }
.product-details .price { font-size: 1.5rem; color: var(--accent-color); font-weight: bold; margin-bottom: 15px; }
.product-details .desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.stock-badge { display: inline-block; padding: 5px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: bold; margin-bottom: 15px; }
.stock-in { background: rgba(46, 204, 113, 0.1); color: var(--success-color); }
.stock-out { background: rgba(231, 76, 60, 0.1); color: var(--error-color); }

.options-group { margin-bottom: 15px; }
.options-group h4 { margin-bottom: 8px; font-size: 1rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { background: var(--bg-main); border: 1px solid var(--border-color); padding: 8px 15px; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.chip-btn.active { background: var(--text-main); color: var(--bg-white); border-color: var(--text-main); }

/* عناصر السلة والمفضلة */
.cart-item, .fav-item-row { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.cart-item img, .fav-item-row img { width: 60px; height: 80px; object-fit: cover; border-radius: 4px; }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: bold; font-size: 0.95rem; margin-bottom: 5px; }
.cart-item-price { color: var(--accent-color); font-size: 0.9rem; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-btn { background: var(--bg-main); border: none; width: 25px; height: 25px; border-radius: 4px; cursor: pointer; }
.remove-btn { color: var(--error-color); background: none; border: none; cursor: pointer; font-size: 1.1rem; }

/* =======================================
   التذاكر والإشعارات والتايم لاين
======================================= */
.notif-item { background: var(--bg-main); border-right: 4px solid var(--border-color); padding: 12px 15px; border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: 0.3s; text-align: right; }
.notif-item.unread { background: rgba(212, 184, 149, 0.1); border-right: 4px solid var(--accent-color); }
.notif-item:hover { background: rgba(212, 184, 149, 0.2); }
.notif-title { margin: 0 0 5px 0; font-size: 1rem; color: var(--text-main); }
.notif-msg { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.notif-time { display: block; font-size: 0.7rem; color: #999; margin-top: 5px; }

.ticket-item { background: var(--bg-main); border: 1px solid var(--border-color); padding: 15px; border-radius: 8px; margin-bottom: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.ticket-item:hover { border-color: var(--accent-color); }
.ticket-info h4 { margin: 0 0 5px 0; color: var(--text-main); }
.ticket-info p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.ticket-status { padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
.status-open { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.status-answered { background: rgba(46, 204, 113, 0.1); color: var(--success-color); }
.status-closed { background: rgba(231, 76, 60, 0.1); color: var(--error-color); }

.chat-box { background: var(--bg-main); border-radius: 8px; border: 1px solid var(--border-color); height: 350px; overflow-y: auto; padding: 15px; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 80%; padding: 10px 15px; border-radius: 12px; font-size: 0.95rem; line-height: 1.4; word-wrap: break-word; }
.msg-user { background: var(--accent-color); color: var(--bg-white); align-self: flex-start; border-bottom-right-radius: 0; }
.msg-admin { background: var(--bg-white); color: var(--text-main); border: 1px solid var(--border-color); align-self: flex-end; border-bottom-left-radius: 0; }
.msg-time { display: block; font-size: 0.7rem; opacity: 0.8; margin-top: 5px; text-align: left; }
.msg-admin .msg-time { text-align: right; }

.order-timeline { position: relative; display: flex; justify-content: space-between; margin: 30px 0 10px 0; direction: rtl; }
.progress-bar-bg { position: absolute; top: 20px; left: 0; right: 0; height: 4px; background: var(--border-color); z-index: 1; border-radius: 2px; }
.progress-bar-fill { position: absolute; top: 20px; right: 0; height: 4px; background: var(--accent-color); z-index: 2; width: 0%; transition: width 0.8s ease; border-radius: 2px; }
.progress-bar-fill.danger { background: var(--error-color); }
.timeline-step { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; width: 33.33%; }
.timeline-icon { width: 45px; height: 45px; border-radius: 50%; background: var(--bg-white); border: 2px solid var(--border-color); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: 0.5s; }
.timeline-text { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); transition: 0.5s; font-weight: bold; }
.timeline-step.active .timeline-icon { border-color: var(--accent-color); color: var(--bg-white); background: var(--accent-color); }
.timeline-step.active .timeline-text { color: var(--text-main); }
.timeline-step.cancelled .timeline-icon { border-color: var(--error-color); color: var(--bg-white); background: var(--error-color); }
.timeline-step.cancelled .timeline-text { color: var(--error-color); }

.transfer-btn-wrapper { position: absolute; top: 15px; left: 15px; z-index: 10; }
.transfer-circle-btn { width: 35px; height: 35px; background: var(--bg-white); border: 1px solid var(--accent-color); color: var(--accent-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer; transition: 0.3s; }
.transfer-circle-btn:hover { background: var(--accent-color); color: var(--bg-white); transform: scale(1.1); }
.transfer-tooltip { position: absolute; top: 45px; left: 0; background: var(--text-main); color: var(--bg-white); padding: 6px 10px; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.3s; transform: translateY(-5px); }
.transfer-btn-wrapper:hover .transfer-tooltip { opacity: 1; transform: translateY(0); }

/* =======================================
   إتمام الطلب
======================================= */
.input-label { display: block; text-align: right; margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; color: var(--text-main); }
.order-summary-box { background-color: var(--bg-main); padding: 15px; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 20px; text-align: right; }
.summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; }
select.input-field { appearance: none; cursor: pointer; background-image: url('data:image/svg+xml;utf8,<svg fill="%23111" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position-x: 10px; background-position-y: 50%; }

/* =======================================
   القائمة الجانبية
======================================= */
.sidebar-menu {
    position: fixed; top: 0; right: -300px; width: 280px; height: 100vh;
    background-color: var(--bg-white); box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    z-index: 2500; transition: right 0.4s ease; display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-menu::-webkit-scrollbar { display: none; }
.sidebar-menu.active { right: 0; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); }
.sidebar-links { padding: 0 20px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.sidebar-links a { text-decoration: none; color: var(--text-main); font-size: 1.05rem; font-weight: 500; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; transition: 0.3s; }
.sidebar-links a:hover { background-color: var(--bg-main); color: var(--accent-color); transform: translateX(5px); }
.sidebar-links a i { width: 25px; text-align: center; color: var(--accent-color); }

/* Toast */
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 999999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.custom-toast { background: var(--text-main); color: var(--bg-white); padding: 12px 20px; border-radius: 8px; font-weight: bold; display: flex; align-items: center; gap: 10px; transform: translateY(50px) scale(0.9); opacity: 0; transition: all 0.4s; }
.custom-toast.show { transform: translateY(0) scale(1); opacity: 1; }
.custom-toast.success i { color: var(--success-color); }
.custom-toast.error i { color: var(--error-color); }
.custom-toast.warning i { color: #f39c12; }

/* WhatsApp */
.floating-whatsapp { position: fixed; bottom: 80px; right: 20px; background-color: #25D366; color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 1000; transition: 0.3s; text-decoration: none; }

/* ===== بوت المساعدة العائم ===== */
.chatbot-bubble {
    position: fixed; bottom: 145px; right: 20px; width: 56px; height: 56px; border-radius: 50%;
    background: var(--accent-color); border: none; cursor: pointer; z-index: 1000;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2); display: flex; justify-content: center; align-items: center;
    overflow: hidden; padding: 0; transition: 0.25s; animation: chatbotPulse 2.5s infinite;
}
.chatbot-bubble:hover { transform: scale(1.08); }
.chatbot-bubble img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
@keyframes chatbotPulse {
    0% { box-shadow: 0 4px 14px rgba(0,0,0,0.2), 0 0 0 0 rgba(212,184,149,0.5); }
    70% { box-shadow: 0 4px 14px rgba(0,0,0,0.2), 0 0 0 12px rgba(212,184,149,0); }
    100% { box-shadow: 0 4px 14px rgba(0,0,0,0.2), 0 0 0 0 rgba(212,184,149,0); }
}

.chatbot-window {
    position: fixed; bottom: 150px; right: 20px; width: 340px; max-width: calc(100vw - 40px);
    height: 480px; max-height: calc(100vh - 190px); background: var(--bg-white); border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25); z-index: 1001; display: flex; flex-direction: column;
    overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(15px) scale(0.97);
    transition: 0.25s ease; border: 1px solid var(--border-color);
}
.chatbot-window.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chatbot-header {
    background: var(--text-main); color: white; padding: 14px 16px; display: flex;
    justify-content: space-between; align-items: center; flex-shrink: 0;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; }
.chatbot-header-info img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: white; }
.chatbot-header-info h4 { margin: 0; font-size: 0.95rem; }
.chatbot-status { font-size: 0.72rem; color: #b9f6ca; display: flex; align-items: center; gap: 4px; }
.chatbot-status i { font-size: 0.5rem; }
.chatbot-close-btn { background: rgba(255,255,255,0.15); border: none; color: white; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chatbot-close-btn:hover { background: rgba(255,255,255,0.3); }

.chatbot-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-main); }

.chatbot-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; }
.chatbot-msg-bot { background: var(--bg-white); border: 1px solid var(--border-color); align-self: flex-start; border-bottom-right-radius: 4px; }
.chatbot-msg-user { background: var(--accent-color); color: white; align-self: flex-end; border-bottom-left-radius: 4px; }

.chatbot-options { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.chatbot-option-btn {
    background: var(--bg-white); border: 1px solid var(--accent-color); color: var(--text-main);
    padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; cursor: pointer; text-align: right;
    transition: 0.2s; font-family: inherit; width: 100%;
}
.chatbot-option-btn:hover { background: var(--accent-color); color: white; }

.chatbot-whatsapp-btn {
    background: #25D366; color: white; border: none; padding: 10px 14px; border-radius: 10px;
    font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 8px; width: 100%; text-decoration: none; font-family: inherit; font-weight: bold;
}
.chatbot-whatsapp-btn:hover { background: #1faa53; }

@media (max-width: 480px) {
    .chatbot-window { width: calc(100vw - 24px); right: 12px; bottom: 145px; height: 65vh; }
    .chatbot-bubble { bottom: 140px; right: 16px; }
}
.floating-whatsapp:hover { transform: scale(1.1); }

/* =======================================
   الشريط السفلي الثابت (Bottom Nav)
======================================= */
body { padding-bottom: 64px; }
.bottom-nav {
    position: fixed; bottom: 0; right: 0; left: 0; height: 60px; background: var(--bg-white);
    border-top: 1px solid var(--border-color); box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
    z-index: 999;
}
.bottom-nav-btn {
    flex: 1; background: none; border: none; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; color: var(--text-muted); font-family: inherit; cursor: pointer;
    height: 100%; position: relative; transition: 0.2s; font-size: 0.68rem;
}
.bottom-nav-btn i { font-size: 1.15rem; transition: 0.2s; }
.bottom-nav-btn:hover, .bottom-nav-btn:active { color: var(--accent-color); }
.bottom-nav-btn span { line-height: 1; }

.bottom-nav-home { }
.bottom-nav-home i { font-size: 1.15rem; }
.bottom-nav-home span { display: block; }
.bottom-nav-home:hover { color: var(--accent-color); transform: none; }

.bottom-nav-badge {
    position: absolute; top: 2px; left: 50%; margin-right: -18px; background: var(--error-color); color: white;
    font-size: 0.62rem; font-weight: bold; width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}

@media (min-width: 769px) {
    .bottom-nav { max-width: 480px; right: 50%; transform: translateX(50%); border-radius: 18px 18px 0 0; bottom: 0; }
}

/* =======================================
   زر عرض الصورة الكاملة في المنتج
======================================= */
.main-img-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.img-zoom-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.55);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 5;
    backdrop-filter: blur(4px);
}
.img-zoom-btn:hover { background: var(--accent-color); transform: scale(1.1); }

/* =======================================
   Lightbox عرض الصورة بالحجم الكامل
======================================= */
.lightbox-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 92vw;
    max-height: 92vh;
}
.lightbox-img {
    max-width: 88vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    user-select: none;
}
.lightbox-close-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lightbox-close-btn:hover { background: var(--error-color); }
.lightbox-nav-btn {
    position: absolute;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    z-index: 9999;
}
.lightbox-nav-btn:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { right: -60px; }
.lightbox-next { left: -60px; }
.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}
@media (max-width: 600px) {
    .lightbox-prev { right: 5px; }
    .lightbox-next { left: 5px; }
    .lightbox-nav-btn { background: rgba(0,0,0,0.4); }
}

/* =======================================
   خريطة الشيكاوت
======================================= */
.map-section { margin-bottom: 15px; }
.map-search-bar { display: flex; align-items: stretch; margin-bottom: 10px; }
.map-search-btn { padding: 12px 16px; margin: 0; border-radius: 0 4px 4px 0; font-size: 0.95rem; }
.checkout-map {
    width: 100%;
    height: 240px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 1;
}
.map-selected-addr {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(212,184,149,0.12);
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--text-main);
    text-align: right;
    direction: rtl;
}
.map-selected-addr i { margin-top: 2px; flex-shrink: 0; }
/* =======================================
   ✅ نافذة تأكيد الطلب (Success Modal)
======================================= */
.success-checkmark {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}
.checkmark-svg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #fff;
    stroke-miterlimit: 10;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: var(--success-color);
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--success-color);
    stroke-width: 4;
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}
@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px transparent; }
}

/* =======================================
   📋 الطلبات السابقة
======================================= */
.prev-order-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.prev-order-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(212, 184, 149, 0.2);
    transform: translateY(-2px);
}

.order-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.order-detail-row i {
    margin-top: 3px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.order-detail-row strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.order-detail-row span {
    color: var(--text-main);
}
/* =======================================
   قسم الأكثر مبيعاً
======================================= */
.featured-section { background: var(--bg-white); border-radius: 16px; padding: 30px 20px !important; margin: 0 20px 30px !important; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.featured-section .section-title { margin-bottom: 20px; }

/* شبكة الكارت المضغوط — 3 أعمدة أو 4 */
.compact-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }

/* كارت مضغوط — أصغر حجماً من الكارت الأساسي */
.compact-card .product-card-img-wrap img { aspect-ratio: 3/4; }
.compact-card .product-card-info { padding: 7px 8px 9px; gap: 4px; }
.compact-card .product-card-title { font-size: 0.78rem; -webkit-line-clamp: 2; }
.compact-card .product-card-price { font-size: 0.88rem; }
.compact-card .product-card-old-price { font-size: 0.7rem; }
.compact-card .fav-heart-btn { width: 26px; height: 26px; font-size: 0.8rem; top: 6px; left: 6px; }
.compact-card .product-discount-tag { font-size: 0.68rem; padding: 3px 7px; }
.compact-skeleton { max-height: 200px; }
.compact-skeleton .sk-img { height: 130px !important; }

.trending-section { margin-top: 0; }

@media (max-width: 480px) {
    .compact-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .compact-card .product-card-title { font-size: 0.72rem; }
    .compact-card .product-card-price { font-size: 0.82rem; }
}
@media (max-width: 360px) {
    .compact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =======================================
   Bottom Nav 4 tabs
======================================= */
.bottom-nav { display: flex; justify-content: space-around; align-items: center; }

/* sk-line needs overflow hidden for shimmer */
.product-skeleton .sk-line { position: relative; overflow: hidden; }
.product-skeleton .sk-img { position: relative; overflow: hidden; background: #e8e8e8; }

/* =======================================
   📱 MOBILE RESPONSIVE — شامل
======================================= */

/* ---------- Tablet (max 768px) ---------- */
@media (max-width: 768px) {
    /* Navbar */
    .nova-header .nova-topbar { padding: 10px 12px 6px; }
    .brand-logo { font-size: 1.7rem; letter-spacing: 4px; }
    .icon-btn { font-size: 1.15rem; margin-left: 10px; }

    /* Slider Hero */
    .hero-slider { height: 44vh; min-height: 240px; }
    .slider-slide-overlay { padding: 28px 28px; }
    .slider-slide-overlay h3 { font-size: 1.5rem; }
    .slider-slide-overlay p { font-size: 0.88rem; max-width: 260px; }
    .slider-cta-btn { padding: 8px 20px; font-size: 0.88rem; }
    .slider-nav { width: 36px; height: 36px; font-size: 0.9rem; }
    .slider-prev { right: 12px; }
    .slider-next { left: 12px; }

    /* Grids */
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card img { height: 170px; }

    /* Featured */
    .featured-section { margin: 0 10px 20px !important; padding: 20px 14px !important; }

    /* Container */
    .container { padding: 20px 12px; }
}

/* ---------- Mobile (max 480px) ---------- */
@media (max-width: 480px) {
    /* Announcement */
    .announcement-bar { font-size: 0.78rem; padding: 7px 36px 7px 12px; }

    /* Navbar */
    .nova-logo { font-size: 1.6rem; }
    .brand-logo { font-size: 1.5rem; letter-spacing: 3px; }
    .icon-btn { font-size: 1.1rem; margin-left: 8px; }
    .cart-badge { width: 16px; height: 16px; font-size: 0.6rem; top: -4px; right: -6px; }

    /* Slider Hero */
    .hero-slider { height: 42vh; min-height: 210px; }
    .slider-slide-overlay { padding: 18px 18px; align-items: flex-end; text-align: right; }
    .slider-slide-overlay h3 { font-size: 1.15rem; margin-bottom: 6px; }
    .slider-slide-overlay p { font-size: 0.78rem; max-width: 200px; margin-bottom: 12px; }
    .slider-cta-btn { padding: 7px 16px; font-size: 0.82rem; }
    .slider-nav { width: 30px; height: 30px; font-size: 0.78rem; }
    .slider-prev { right: 8px; }
    .slider-next { left: 8px; }
    .slider-dots { bottom: 10px; }
    .slider-dot { width: 6px; height: 6px; }
    .slider-dot.active { width: 18px; }

    /* Section titles */
    .section-title { font-size: 1.15rem; margin-bottom: 16px; }

    /* Categories */
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .category-card { border-radius: 10px; }
    .category-card span { font-size: 0.78rem; padding: 14px 6px 7px; }

    /* Products grid — 2 cols always */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card { border-radius: 8px; }
    .product-card img { height: 150px; }
    .product-card-info { padding: 8px 10px 10px; }
    .product-card-title { font-size: 0.82rem; }
    .product-card-price { font-size: 0.9rem; }
    .fav-heart-btn { width: 28px; height: 28px; font-size: 0.9rem; top: 7px; left: 7px; }

    /* Featured section */
    .featured-section { margin: 0 8px 16px !important; padding: 16px 10px !important; border-radius: 12px; }
    .featured-section .section-title { margin-bottom: 14px; }

    /* Container */
    .container { padding: 16px 10px; }

    /* Products header */
    .products-header { margin-bottom: 16px; }
    .products-header .section-title { font-size: 1.05rem; }
    .btn-outline { padding: 6px 14px; font-size: 0.82rem; }

    /* Bottom nav */
    .bottom-nav { padding: 8px 0 10px; }
    .bottom-nav-btn { font-size: 0.7rem; }
    .bottom-nav-btn i { font-size: 1.25rem; }
    .bottom-nav-home { width: auto; height: auto; }
    .bottom-nav-home i { font-size: 1.25rem; }

    /* Modal */
    .modal-box { padding: 28px 18px; width: 94%; }
    .modal-title { font-size: 1.2rem; margin-bottom: 18px; }

    /* Product quick view on mobile — stack vertically */
    .product-quick-view { flex-direction: column; gap: 14px; }
    .product-gallery .main-img { height: 260px; }
    .product-gallery { min-width: unset; }
    .product-details { min-width: unset; }
    .product-details .price { font-size: 1.25rem; }

    /* Skeleton */
    .product-skeleton .sk-img { height: 150px; }
    .cat-skeleton { border-radius: 10px; }

    /* Sidebar */
    .sidebar-menu { width: 260px; }
}

/* ---------- Very small (max 360px) ---------- */
@media (max-width: 360px) {
    .brand-logo { font-size: 1.3rem; letter-spacing: 2px; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-card img { height: 130px; }
    .hero-slider { height: 38vh; min-height: 190px; }
    .slider-slide-overlay h3 { font-size: 1rem; }
    .slider-slide-overlay p { display: none; }
}

/* =======================================
   كروت الـ Showcase (الأكثر مبيعاً / العروض الرائجة)
======================================= */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.showcase-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background: #e8e0f0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    transition: transform 0.22s, box-shadow 0.22s;
    -webkit-tap-highlight-color: transparent;
}
.showcase-card:active { transform: scale(0.97); }

.showcase-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.showcase-card:hover img { transform: scale(1.04); }

/* overlay نصي تحت الصورة */
.showcase-card-label {
    position: absolute;
    bottom: 0; right: 0; left: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.52) 0%, transparent 100%);
    color: #fff;
    text-align: center;
    padding: 22px 8px 10px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    pointer-events: none;
}

/* skeleton للـ showcase */
.showcase-skeleton {
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    background: var(--border-color);
    overflow: hidden;
    position: relative;
}

/* زر اكتشف المزيد / عرض أقل */
#showcaseLoadMoreBtn,
#showcaseShowLessBtn {
    padding: 10px 28px;
    font-size: 0.9rem;
}

@media (max-width: 360px) {
    .showcase-card-label { font-size: 0.78rem; }
}
/* =======================================
   Pagination — تقسيم صفحات المنتجات
   ======================================= */
#productsPagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 32px 0 20px;
    flex-wrap: wrap;
    direction: rtl;
}
.pag-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pag-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.pag-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 700;
}
.pag-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.pag-dots {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0 4px;
    user-select: none;
}
/* =======================================
   🔀 شريط الفلترة والترتيب
======================================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    direction: rtl;
}
.filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-chip:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.filter-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}
.filter-chip-range { margin-right: auto; }

/* لوحة نطاق السعر */
.price-range-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.price-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 110px;
}
.price-input-wrap label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}
.price-range-input {
    flex: 1;
    margin-bottom: 0 !important;
    padding: 8px 10px !important;
    font-size: 0.9rem;
    min-width: 0;
}
.price-currency {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.price-range-dash {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}
.price-range-count {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    text-align: right;
    direction: rtl;
    min-height: 1.2em;
}

/* =======================================
   📦 تايم لاين تتبع الطلب V2
======================================= */
.track-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.track-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
}
.track-info-row i {
    font-size: 1rem;
    width: 20px;
    flex-shrink: 0;
}
.track-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 1px;
}
.track-info-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

/* التايم لاين الرأسي */
.order-timeline-v2 {
    display: flex;
    flex-direction: column;
    gap: 0;
    direction: rtl;
    margin-bottom: 8px;
}
.tlv2-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    opacity: 0.45;
    transition: opacity 0.4s;
}
.tlv2-item.tlv2-active,
.tlv2-item.tlv2-done,
.tlv2-item.tlv2-cancelled { opacity: 1; }

.tlv2-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.tlv2-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2.5px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.4s;
    z-index: 1;
    position: relative;
}
.tlv2-line {
    width: 2px;
    flex: 1;
    min-height: 32px;
    background: var(--border-color);
    margin: 4px 0;
    transition: background 0.4s;
}

/* حالة: الخطوة الحالية (مضاءة) */
.tlv2-item.tlv2-active .tlv2-dot {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(212,184,149,0.2);
    animation: tlPulse 1.8s infinite;
}
@keyframes tlPulse {
    0%   { box-shadow: 0 0 0 0 rgba(212,184,149,0.5); }
    70%  { box-shadow: 0 0 0 9px rgba(212,184,149,0); }
    100% { box-shadow: 0 0 0 0 rgba(212,184,149,0); }
}
.tlv2-item.tlv2-active .tlv2-title { color: var(--accent-color); }

/* حالة: تمت (done) */
.tlv2-item.tlv2-done .tlv2-dot {
    border-color: var(--success-color);
    background: var(--success-color);
    color: #fff;
}
.tlv2-item.tlv2-done .tlv2-line { background: var(--success-color); }

/* حالة: ملغي */
.tlv2-item.tlv2-cancelled .tlv2-dot {
    border-color: var(--error-color);
    background: var(--error-color);
    color: #fff;
}
.tlv2-item.tlv2-cancelled .tlv2-line { background: var(--error-color); }
.tlv2-item.tlv2-cancelled .tlv2-title { color: var(--error-color); }

/* محتوى الخطوة */
.tlv2-content {
    padding: 8px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
}
.tlv2-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.4s;
}
.tlv2-datetime {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    min-height: 1em;
    direction: rtl;
}
.tlv2-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}
/* =======================================
   ⭐ نظام التقييمات والمراجعات
   ======================================= */
.review-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
}
.review-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.review-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
}
.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.review-stars {
    color: #f39c12;
    font-size: 0.8rem;
    margin-top: 3px;
}
.review-text {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.6;
}
/* نجوم في صفحة تفاصيل المنتج */
.modal-rating-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #f39c12;
}
.modal-rating-summary span {
    color: var(--text-muted);
    font-size: 0.8rem;
}