/* =========================================================
   استایل‌های اختصاصی صفحه سفارش‌گیری (تم دارک شیشه‌ای)
========================================================= */

/* کانتینرهای اصلی */
.container {
    max-width: 1200px !important;
    margin: 0 auto 20px auto !important;
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    padding: 30px 40px !important;
    color: var(--text-primary);
    box-sizing: border-box;
}

h2, h3 { color: var(--text-primary) !important; }
h3 { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 10px; margin-top: 25px; }
label { color: var(--text-secondary) !important; display: block; margin-bottom: 6px; font-size: 13px;}

/* فیلدها و گرید بالا */
.row-flex { display: flex; flex-wrap: wrap; gap: 20px; }
.row-flex .flex-item { flex: 1; min-width: 220px; display: flex; flex-direction: column; justify-content: flex-end; }

#mainContainer.container {
    padding: 10px 24px 14px !important;
}
#mainContainer > .index-desktop-brand {
    text-align: center;
    margin: 0 0 2px !important;
    line-height: 0;
}
#mainContainer > .index-desktop-brand .logo {
    max-width: 72px;
    margin: 0;
}
#mainContainer > h2 {
    margin: 4px 0 8px !important;
    padding: 0;
    font-size: 1.2rem;
    text-align: center;
}

/* فیلدهای بالای سفارش‌گیری همه در یک ردیف کنار هم */
.customer-fields-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end;
    gap: 8px;
}
.customer-fields-row .flex-item {
    min-width: 0;
    flex: 1 1 0;
}
.customer-fields-row .flex-item input { width: 100%; box-sizing: border-box; }
.customer-fields-row .customer-level-field {
    flex: 0 0 108px;
    max-width: 120px;
}
.customer-fields-row .customer-code-field {
    flex: 0 0 92px;
    max-width: 100px;
}
#customerCode {
    text-align: center;
    letter-spacing: 2px;
    font-weight: 700;
}
.customer-fields-row .buttons-container { flex: 0 0 auto; }
#selectedCustomerLevel {
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: rgba(56, 189, 248, 0.28) !important;
    color: #7dd3fc !important;
    font-weight: 700;
    cursor: default;
}
.customer-fields-row .phone-suggest-wrap {
    position: relative;
    overflow: visible;
    z-index: 50;
}
.customer-fields-row #phoneSuggestions {
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 4px;
    max-height: 220px;
    border-radius: 10px;
    box-sizing: border-box;
    z-index: 80;
}

#mainContainer {
    position: relative;
    z-index: 50;
    overflow: visible !important;
}
#graphicalView,
.graphical-container {
    position: relative;
    z-index: 1;
}
.add-item-row { display: flex; gap: 15px; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap;}
.add-item-row > div { flex: 1; min-width: 150px; display: flex; flex-direction: column; justify-content: flex-end;}

/* دکمه‌های کادر بالا */
.buttons-container { flex-direction: row !important; gap: 10px; align-items: flex-end; }
.buttons-container button { padding: 12px 20px !important; font-size: 14px !important; flex: 1; height: 46px;}

/* بخش فرمان صوتی */
.voice-section { text-align: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); }
#voiceOrderBtn { background: rgba(239, 68, 68, 0.2) !important; color: #f87171 !important; border: 1px solid rgba(239, 68, 68, 0.3) !important; padding: 15px !important; width: 60px !important; height: 60px !important; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center;}
#voiceOrderBtn.listening { background: #ef4444 !important; color: white !important; animation: pulse 1.5s infinite; }
#voiceStatus { margin-top: 10px; font-weight: bold; color: var(--text-secondary); min-height: 24px; }

/* هوش مصنوعی پیشنهادات */
#ai-recommendation { display: flex; justify-content: center; align-items: center; gap: 15px; padding: 12px; margin: 20px 0; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 12px; color: #38bdf8; font-weight: bold;}
#add-recommendation-btn { background: #38bdf8 !important; color: #0f172a !important; padding: 6px 12px !important; margin: 0; min-width: auto !important;}

/* کادر شیشه‌ای جمع کل */
.edit-totals-box { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 20px; margin-top: 20px; }
.edit-totals-box .total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; color: var(--text-secondary); }
.edit-totals-box .final-total { border-top: 1px dashed rgba(255, 255, 255, 0.2); padding-top: 15px; margin-top: 10px; font-size: 18px !important; color: #4ade80 !important; }
.strikethrough-white { color: var(--text-secondary) !important; text-decoration: line-through; }
.loyalty-credit-hint {
    color: #4ade80;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
#graphicalLoyaltyCreditHint {
    width: 100%;
    text-align: left;
    font-size: 12px;
}


/* =========================================================
   اصلاح دقیق دکمه‌های عملیات سبد خرید (ویرایش و حذف)
========================================================= */

#orderListTable .actions {
    white-space: nowrap;
    width: 1%;
    min-width: 148px;
}
#orderListTable th:nth-child(4),
#orderListTable td:nth-child(4) {
    width: 88px;
    max-width: 100px;
    white-space: nowrap;
}
#orderListTable th.col-cart-actions {
    width: 148px;
    min-width: 148px;
}

/* با اضافه کردن button.edit-btn و button.delete-btn قدرت این کد را از orders.css بیشتر کردیم */
#orderListTable .actions button.edit-btn,
#orderListTable .actions button.delete-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px !important;
    font-size: 11px !important;
    padding: 0 10px !important;
    height: 28px !important;
    width: auto !important;
    min-width: 52px !important;
    line-height: normal !important;
    border-radius: 6px !important;
}

/* استایل دکمه ویرایش (زرد شیشه‌ای) */
#orderListTable .actions button.edit-btn {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #facc15 !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

/* استایل دکمه حذف (قرمز شیشه‌ای) */
#orderListTable .actions button.delete-btn {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important; /* ❌ حاشیه زرد به قرمز اصلاح شد */
}

/* هاور دکمه‌های عملیات سبد خرید */
#orderListTable .actions button.edit-btn:hover,
#orderListTable .actions button.delete-btn:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.2) !important;
}
/* پیام‌های توست (نوتیفیکیشن) */
#toast-notification { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); background: rgba(16, 185, 129, 0.9); backdrop-filter: blur(10px); color: white; padding: 15px 30px; border-radius: 12px; box-shadow: 0 8px 25px rgba(0,0,0,0.3); font-size: 15px; font-weight: bold; z-index: 2000; transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); border: 1px solid rgba(255,255,255,0.2); }
#toast-notification.show { top: 25px; }

/* =========================================================
   ویو گرافیکی (Graphical View) - ضدگلوله در برابر orders.css
========================================================= */
.view-switcher { position: fixed; top: 20px; left: 20px; display: flex; align-items: center; gap: 10px; z-index: 1100; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(10px); padding: 8px 12px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: var(--glass-shadow); }
.switch-label { font-weight: bold; color: var(--text-primary); user-select: none; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.2); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #3b82f6; }
input:checked + .slider:before { transform: translateX(20px); }

.graphical-container { display: flex; gap: 16px; padding-top: 10px; max-width: 1400px; margin: 0 auto; min-height: calc(100dvh - 80px); height: auto; }

@media (max-width: 1100px) {
    .graphical-container {
        flex-direction: column;
        min-height: 0;
        height: auto;
        gap: 12px;
    }

    /* جلوگیری از پرش اسکرول هنگام تغییر ارتفاع نوار مرورگر تبلت */
    .category-sidebar,
    #productGrid {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #mainContainer > .index-desktop-brand {
        display: none;
    }

    #mainContainer > h2 {
        font-size: 1.15rem;
        margin-top: 4px;
    }
}

.sidebar-column {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.product-panel {
    flex-grow: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-search-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 8px;
}

.product-search-label {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-secondary);
}

#productSearchInput {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-family: 'Vazir', Tahoma, sans-serif;
    font-size: 14px;
}

#productSearchInput:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

#productSearchInput::placeholder {
    color: rgba(248, 250, 252, 0.45);
}

.product-search-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 28px 12px;
    margin: 0;
}

.popular-sidebar-section {
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.25);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.popular-main-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 152, 0, 0.35) !important;
    background: rgba(255, 152, 0, 0.15) !important;
    color: #fbbf24 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    cursor: pointer !important;
    min-height: auto !important;
    height: auto !important;
}

.popular-main-btn.active {
    background: rgba(255, 152, 0, 0.35) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.popular-mode-toggle {
    display: flex;
    gap: 6px;
    font-size: 11px;
}

.popular-mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    color: var(--text-secondary);
}

.popular-mode-option:has(input:checked) {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.popular-mode-option input {
    width: auto;
    margin: 0;
}

.popular-add-btn {
    width: 100% !important;
    padding: 8px !important;
    font-size: 12px !important;
    background: rgba(16, 185, 129, 0.15) !important;
    color: #4ade80 !important;
    border: 1px dashed rgba(16, 185, 129, 0.4) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    min-height: auto !important;
    height: auto !important;
}

.popular-add-btn:hover {
    background: rgba(16, 185, 129, 0.3) !important;
}

.product-card.popular-card {
    position: relative;
}

.popular-remove-btn {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(239, 68, 68, 0.85) !important;
    color: white !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 2;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.popular-remove-btn:hover {
    background: #dc2626 !important;
    transform: none !important;
}

.popular-empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 14px;
}

.add-popular-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-popular-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 13px;
}

.add-popular-item.selected {
    background: rgba(255, 152, 0, 0.12);
    border-color: rgba(255, 152, 0, 0.35);
}

.add-popular-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #f59e0b;
}

.add-popular-item-body {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.add-popular-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.add-popular-item-price {
    color: #4ade80;
    font-size: 12px;
    flex-shrink: 0;
}

.add-popular-order {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f59e0b;
    color: #0f172a;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-popular-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.add-popular-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.popular-confirm-btn {
    padding: 10px 18px !important;
    font-size: 13px !important;
    background: rgba(16, 185, 129, 0.25) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    min-height: auto !important;
    height: auto !important;
}

.popular-confirm-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
}

.popular-confirm-btn:not(:disabled):hover {
    background: #10b981 !important;
    color: white !important;
}

.add-popular-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

/* نوار کناری دسته‌بندی‌ها */
.category-sidebar {
    flex: 1 1 auto;
    min-height: 0;
    display: grid !important; /* تبدیل به گرید */
    grid-template-columns: repeat(2, 1fr) !important; /* دو ستون مساوی */
    align-content: start; /* شروع از بالا */
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    box-sizing: border-box; /* برای محاسبه درست پدینگ */
}
.category-btn { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 5px !important; padding: 10px !important; border: 1px solid rgba(255,255,255,0.05) !important; border-radius: 16px !important; cursor: pointer !important; background: rgba(255,255,255,0.02) !important; color: var(--text-primary) !important; text-align: center !important; height: 95px !important; min-width: auto !important; }
.category-btn:hover { background: rgba(255,255,255,0.08) !important; transform: none !important;}
.category-btn.active { background: rgba(56, 189, 248, 0.15) !important; border-color: #38bdf8 !important; transform: scale(1.05) !important; }
.category-btn span { font-size: 13px; font-weight: bold; }

/* گرید محصولات */
.product-grid { flex-grow: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-content: flex-start; overflow-y: auto; padding: 5px 8px; min-width: 0; min-height: 0; }
.product-card { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 15px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; justify-content: space-between; }
.product-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.product-name { font-weight: bold; margin-bottom: 15px; min-height: 40px; font-size: 14px; color: var(--text-primary); }
.product-price { font-size: 14px; color: #4ade80; font-weight: bold; margin-bottom: 12px; }

/* تنظیم تعداد در گرافیکی */
.quantity-selector { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; background: rgba(0,0,0,0.2); border-radius: 50px; padding: 2px 5px; }
.quantity-selector button { width: 30px !important; height: 30px !important; min-width: 30px !important; border-radius: 50% !important; border: none !important; background: rgba(255,255,255,0.1) !important; color: white !important; font-size: 18px !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; margin: 0 !important;}
.quantity-selector button:hover { background: #38bdf8 !important; color: #0f172a !important; transform: none !important;}
.quantity-selector .quantity-value { font-size: 16px; font-weight: bold; color: var(--text-primary); }

.add-to-cart-btn { background: rgba(16, 185, 129, 0.2) !important; color: #4ade80 !important; border: 1px solid rgba(16, 185, 129, 0.4) !important; width: 100% !important; margin-top: auto; padding: 10px !important; }
.add-to-cart-btn:hover { background: #10b981 !important; color: white !important; }

/* سبد خرید گرافیکی */
.cart-summary { flex: 0 0 240px; width: 240px; max-width: 240px; align-self: flex-start; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(16px); padding: 14px 12px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: var(--glass-shadow); display: flex; flex-direction: column; min-width: 0; max-height: calc(100dvh - 90px); overflow-y: auto; }
#cart-items-list { flex-grow: 0; overflow: visible; margin-bottom: 0; padding-right: 5px; }
.cart-checkout { flex: 0 0 auto; margin-top: 8px; }
.cart-discount-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; padding:8px 10px; border:1px solid rgba(255,255,255,0.1); border-radius:8px; background:rgba(0,0,0,0.15); flex-wrap:wrap; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,0.1); }
.cart-item-name { font-weight: bold; color: var(--text-primary); }
.cart-item-details { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-secondary); text-align: left; }
.cart-item-actions button { background: rgba(239, 68, 68, 0.2) !important; color: #f87171 !important; border: none !important; width: 24px !important; height: 24px !important; min-width: 24px !important; border-radius: 50% !important; padding: 0 !important; margin-left: 10px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
#graphical-total-price { font-size: 18px; font-weight: bold; margin-top: 8px; padding-top: 15px; border-top: 2px solid rgba(255,255,255,0.1); color: #4ade80; text-align: center; }
#graphical-submit-btn { width: 100%; margin-top: 10px; }

/* ریسپانسیو */
/* ریسپانسیو */
@media (max-width: 1100px) {
    .graphical-container {
        flex-direction: column;
        height: auto;
        padding-top: 0;
    }

    .sidebar-column {
        flex: none;
        width: 100% !important;
    }

    .popular-sidebar-section {
        margin-bottom: 0;
    }

    /* تنظیمات جدید برای ۲ سطر موازی با اسکرول افقی */
    .category-sidebar {
        display: grid !important;
        grid-template-rows: repeat(2, 1fr) !important; /* ایجاد دقیقاً ۲ سطر موازی */
        grid-auto-flow: column !important; /* چیدمان کارت‌ها اول در سطرها و بعد ستون بعدی */
        grid-auto-columns: 110px !important; /* عرض هر کارت دسته‌بندی تو موبایل */
        gap: 10px !important;
        overflow-x: auto !important; /* فعال کردن اسکرول افقی */
        overflow-y: hidden !important; /* بستن اسکرول عمودی */
        width: 100% !important;
        height: auto !important; /* ارتفاع به صورت خودکار بر اساس ۲ کارت تنظیم میشه */
        padding: 15px 10px !important;
        box-sizing: border-box !important;
    }

    .category-btn {
        width: 100% !important;
        height: 85px !important; /* ارتفاع کارت‌ها رو فیکس کردیم که تو ۲ سطر منظم بشن */
        margin: 0 !important;
    }

    .product-panel {
        width: 100%;
        flex: none;
        min-height: 0;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .cart-summary {
        flex-basis: auto;
        width: auto;
        max-width: none;
        max-height: none;
        align-self: stretch;
        margin-top: 20px;
    }

    .container {
        padding: 20px !important;
    }
}
/* =========================================================
   اصلاح اسکرول و ثابت کردن هدر در مودال سفارشات باز
========================================================= */
#viewOrdersModal .modal-content {
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding-top: 20px !important;
}

/* چسباندن هدر جدول به بالا هنگام اسکرول */
#viewOrdersModal .daily-table thead th {
    position: sticky !important;
    top: -20px !important; /* جبران فاصله پدینگ مودال */
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); /* یه سایه ظریف برای جدا شدن از محتوا */
}

/* اصلاح اسکرول برای مودال مشتری جدید (در صورت طولانی شدن) */
#addCustomerModal .modal-content {
    max-height: 85vh !important;
    overflow-y: auto !important;
}

/* دکمه‌های کوچک مدیریت تعداد در سبد خرید */
.cart-qty-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none !important;
    padding: 0 !important;
    font-size: 16px !important;
    cursor: pointer;
}

.cart-qty-btn:hover {
    background: #3b82f6 !important;
}
/* =========================================================
   16. یکپارچه‌سازی ظاهر لیست‌های کشویی (Select Box)
========================================================= */

/* حذف ظاهر پیش‌فرض مرورگر */
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;

    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    /*padding: 10px 35px 10px 15px !important; !* فضای کافی برای فلش *!*/
    border-radius: 8px !important;
    font-family: 'Vazir', Tahoma, sans-serif !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 10px center !important;
    background-size: 16px !important;
    transition: all 0.3s ease !important;
}

select:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

/* استایل‌دهی به گزینه‌های داخل لیست */
select option {
    background-color: #1e293b !important;
    color: white !important;
    padding: 10px;
}

/* =========================================================
   یکپارچه‌سازی دکمه‌های اصلی با تم شیشه‌ای و فلت (مینیمال)
========================================================= */

/* دکمه سفارشات باز (رنگ خنثی و شیشه‌ای) */
#viewOrdersBtn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

/* دکمه افزودن مشتری (رنگ آبی/فیروزه‌ای شیشه‌ای هماهنگ با تم) */
#addCustomerBtn {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

/* دکمه اضافه کردن به لیست (آبی ملایم) */
#addItemBtn {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    height: 42px !important; /* هم‌ترازی ارتفاع با اینپوت‌های مجاور */
    cursor: pointer !important;
}

/* دکمه‌های ثبت نهایی سفارش در هر دو حالت عادی و گرافیکی (سبز شیشه‌ای و موفقیت) */
#submitBtn,
#graphical-submit-btn {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.05) !important;
}

/* =========================================================
   افکت‌های هاور (Hover) برای تعامل‌پذیری بهتر دکمه‌ها
========================================================= */

#viewOrdersBtn:hover,
#addCustomerBtn:hover,
#addItemBtn:hover,
#submitBtn:hover,
#graphical-submit-btn:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.2) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

/* تغییر بک‌گراند زمان هاور برای القای حس کلیک بدون استفاده از گرادیانت‌های سنگین */
#viewOrdersBtn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
#addCustomerBtn:hover {
    background: rgba(56, 189, 248, 0.25) !important;
}
#addItemBtn:hover {
    background: rgba(59, 130, 246, 0.25) !important;
}
#submitBtn:hover,
#graphical-submit-btn:hover {
    background: rgba(16, 185, 129, 0.25) !important;
}

/* آیپد در عرض دسکتاپ: اسکرول صفحه، نه اسکرول داخلی ستون‌ها */
@media (min-width: 768px) and (hover: none) and (pointer: coarse) {
    .graphical-container {
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .sidebar-column,
    .cart-summary {
        flex: none !important;
        width: 100% !important;
        max-height: none !important;
    }

    .product-grid,
    #cart-items-list {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    .cart-summary {
        max-height: none !important;
    }
}

