@font-face {
    font-family: 'Vazir';
    src: url('/wp-content/themes/shoptimizer/assets/fonts/vazirmatn.woff2') format('woff2');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

.mwp-order-system * {
    box-sizing: border-box;
    font-family: 'Vazir', Tahoma, sans-serif !important;
}

.mwp-order-system {
    direction: rtl;
    background: #F5F5F5;
    min-height: 100vh;
    line-height: 1.4;
    color: #1A1A1A;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

/* ======================================== */
/* ===== 1- لودینگ (فقط هنگام ارسال فرم) ===== */
/* ======================================== */
.mwp-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}
.mwp-loading-overlay.active {
    display: flex;
}
.mwp-loading-overlay > div {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 3px solid #D4AF37;
}
.mwp-loading-overlay h3 {
    color: #800020;
    margin: 0 0 10px 0;
}
.mwp-loading-overlay p {
    margin: 0;
    color: #666;
}

/* ----- فوتر ----- */
.mwp-footer {
    background: #800020;
    color: white;
    padding: 20px 15px;
    margin-top: 20px;
    border-top: 3px solid #D4AF37;
    width: 100%;
}
.mwp-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    text-align: center;
}
.mwp-footer-section h3 { color: #D4AF37; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.mwp-footer-section p { margin: 4px 0; font-size: 11px; }
.mwp-footer-section a { color: white; text-decoration: none; transition: color 0.3s; }
.mwp-footer-section a:hover { color: #D4AF37; }
.mwp-footer-bottom { text-align: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(212, 175, 55, 0.3); font-size: 11px; }

/* ----- هدر و جستجو (چسبنده) ----- */
.mwp-sticky-header-wrapper {
    position: relative;
    top: 0;
    z-index: 1000;
    background: #800020;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.1s ease;
    margin: 0;
    padding: 0;
    width: 100%;
}

.mwp-order-header {
    background: #800020;
    color: white;
    padding: 3px 12px;
    margin: 0;
    width: 100%;
}
.mwp-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 1400px;
    margin: 0 auto;
}
.mwp-logo-section h1 { 
    font-size: 12px; 
    margin: 0; 
    font-weight: 700; 
    color: white; 
    padding: 2px 0;
}
.mwp-contact-info {
    font-size: 9px;
    background: rgba(212, 175, 55, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #D4AF37;
    font-weight: 600;
    white-space: nowrap;
}
.mwp-daily-price-link {
    background: #D4AF37;
    color: #800020;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
    border: 1px solid #fff;
    transition: all 0.3s ease;
}
.mwp-daily-price-link:hover {
    transform: scale(1.05);
    background: #e6c44d;
}

/* ----- بخش جستجو (قفل‌شونده) ----- */
.mwp-sticky-search-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: #800020;
    padding: 5px 12px;
    border-bottom: 2px solid #D4AF37;
    margin: 0;
    width: 100%;
}
.mwp-sticky-search-header.is-sticky-mwp {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
body.admin-bar .mwp-sticky-search-header.is-sticky-mwp {
    top: 32px;
}
@media (max-width: 768px) {
    body.admin-bar .mwp-sticky-search-header.is-sticky-mwp {
        top: 46px;
    }
}

.mwp-sticky-search-container {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.mwp-sticky-search-input {
    flex: 1;
    padding: 6px 12px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    height: 34px;
    width: 100%;
}
.mwp-sticky-search-input:focus {
    outline: none;
    border-color: #fff;
}
.mwp-clear-search-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .mwp-sticky-search-container {
        flex-direction: column;
        gap: 4px;
    }
    .mwp-sticky-search-input {
        min-width: 100%;
        height: 32px;
        font-size: 12px;
        padding: 5px 8px;
    }
    .mwp-clear-search-btn {
        width: 100%;
        padding: 5px;
    }
    .mwp-order-header {
        padding: 3px 8px;
    }
    .mwp-header-top {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .mwp-logo-section h1 {
        font-size: 10px;
    }
    .mwp-contact-info {
        font-size: 8px;
        padding: 1px 5px;
    }
    .mwp-daily-price-link {
        padding: 2px 8px;
        font-size: 8px;
    }
}

/* ======================================== */
/* ===== 2- فاصله هدر و محصولات حذف شد ===== */
/* ======================================== */
.mwp-products-container { 
    padding: 0px 10px 12px 10px; 
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}
.mwp-category-section {
    margin-bottom: 10px;
}
.mwp-category-section h2 {
    color: #800020;
    font-size: 16px;
    margin: 6px 0 8px 0;
    padding-right: 10px;
    border-right: 4px solid #D4AF37;
}

.mwp-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 3px;
    width: 100%;
}

.mwp-product-card {
    background: white;
    border-radius: 10px;
    padding: 8px 6px 10px 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    max-height: 310px;
    position: relative;
    width: 100%;
    z-index: 1;
}
.mwp-product-card.mwp-unavailable {
    opacity: 0.6;
    background: #f8f9fa;
    border: 1px dashed #dc3545;
}
.mwp-unavailable-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 700;
    z-index: 2;
}
.mwp-product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #800020, #D4AF37);
}
.mwp-product-card.mwp-unavailable::before { background: linear-gradient(135deg, #dc3545, #ff6b6b); }
.mwp-product-card:hover {
    border-color: #D4AF37;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* ===== عکس محصول ===== */
.mwp-product-image-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 4px auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f8f9fa;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 0;
}
.mwp-product-image-square {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #800020;
    box-shadow: 0 0 0 2px #D4AF37;
    padding: 1px;
    transition: all 0.3s ease;
}
.mwp-product-image-container.zoomed-mwp .mwp-product-image-square {
    transform: scale(1.5);
    z-index: 10;
}

/* ===== عنوان محصول ===== */
.mwp-product-title {
    color: #1A1A1A;
    font-size: 12px;
    font-weight: 700;
    margin: 2px 0 2px 0;
    height: 32px;
    overflow: hidden;
    line-height: 1.3;
    text-align: center;
    display: block;
    flex-shrink: 0;
}

/* ===== بخش قیمت ===== */
.mwp-price-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 4px;
}
.mwp-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 10px;
}
.mwp-sale-price {
    color: #800020;
    font-weight: 800;
    font-size: 13px;
}
.mwp-discount-badge {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 700;
    display: inline-block;
}

/* ===== حداقل خرید ===== */
.mwp-min-quantity {
    color: #666;
    font-size: 11px;
    margin: 2px 0 0 0;
    background: #f5f5f5;
    padding: 2px 10px;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    align-self: center;
    line-height: 1.5;
    flex-shrink: 0;
}

/* ===== دکمه‌های + و - ===== */
.mwp-quantity-section {
    margin: 0;
    padding: 2px 0 0 0;
    border-top: 1px solid #e0e0e0;
    background: transparent;
    width: 100%;
    flex-shrink: 0;
    display: block;
    line-height: 0;
    min-height: 0;
    height: auto;
}
.mwp-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 0;
    margin: 0;
    line-height: 1;
}
.mwp-quantity-btn {
    width: 32px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid #800020;
    background: white;
    color: #800020;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: all 0.3s ease;
}
.mwp-quantity-btn:hover {
    background: #800020;
    color: white;
}
.mwp-quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.mwp-quantity-input {
    width: 38px;
    height: 30px;
    text-align: center;
    padding: 0;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    background: #f8f9fa;
    margin: 0;
    line-height: 1;
}

/* ======================================== */
/* ===== 4- موبایل: نام محصول کامل نمایش داده شود ===== */
/* ======================================== */
@media (max-width: 768px) {
    .mwp-products-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .mwp-product-card {
        min-height: 250px;
        max-height: 280px;
        padding: 6px 10px 4px 10px;
    }
    .mwp-product-image-container {
        width: 100px;
        height: 100px;
    }
    .mwp-product-title {
        font-size: 14px;
        height: auto;
        min-height: 30px;
        max-height: 44px;
        margin: 3px 0 3px 0;
        overflow: visible;
        line-height: 1.4;
    }
    .mwp-sale-price {
        font-size: 14px;
    }
    .mwp-quantity-btn {
        width: 34px;
        height: 30px;
        font-size: 18px;
    }
    .mwp-quantity-input {
        width: 40px;
        height: 30px;
        font-size: 16px;
    }
    .mwp-min-quantity {
        font-size: 12px;
    }
    .mwp-products-container {
        padding: 0px 6px 12px 6px;
    }
    .mwp-product-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mwp-products-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .mwp-product-card {
        min-height: 230px;
        max-height: 260px;
        padding: 4px 8px 4px 8px;
    }
    .mwp-product-image-container {
        width: 85px;
        height: 85px;
        margin: 0 auto 4px auto;
    }
    .mwp-product-title {
        font-size: 13px;
        height: auto;
        min-height: 26px;
        max-height: 40px;
        margin: 2px 0 2px 0;
        overflow: visible;
        line-height: 1.3;
    }
    .mwp-sale-price {
        font-size: 14px;
    }
    .mwp-original-price {
        font-size: 9px;
    }
    .mwp-min-quantity {
        font-size: 11px;
        margin: 2px 0 0 0;
        padding: 1px 8px;
    }
    .mwp-quantity-btn {
        width: 30px;
        height: 26px;
        font-size: 16px;
    }
    .mwp-quantity-input {
        width: 36px;
        height: 26px;
        font-size: 14px;
        padding: 1px;
    }
    .mwp-discount-badge {
        font-size: 7px;
        padding: 1px 3px;
    }
    .mwp-products-container {
        padding: 0px 4px 10px 4px;
    }
    .mwp-product-card {
        width: 100%;
    }
}

/* ======================================== */
/* ===== 3- عرض کامل صفحه ===== */
/* ======================================== */
@media (min-width: 769px) {
    .mwp-products-container {
        padding: 0px 15px 12px 15px;
    }
    .mwp-product-card {
        width: 100%;
    }
}

/* ======================================== */
/* ===== 5 و 6- مودال فاکتور ===== */
/* ======================================== */
.mwp-invoice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 15px;
    backdrop-filter: blur(5px);
}
.mwp-invoice-content {
    background: white;
    border-radius: 14px;
    width: 100%;
    max-width: 950px;
    max-height: 98vh;
    overflow: hidden;
    border: 3px solid #D4AF37;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    height: 98vh;
}
.mwp-invoice-header {
    background: #800020;
    color: white;
    padding: 6px 15px;
    border-radius: 14px 14px 0 0;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}
.mwp-invoice-header h2 {
    font-size: 15px;
    margin: 0;
    font-weight: 700;
}
.mwp-close-invoice {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #D4AF37;
    color: #800020;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.mwp-close-invoice:hover {
    transform: translateY(-50%) scale(1.1);
}

/* بدنه مودال - فضای بیشتر برای محتوا */
.mwp-invoice-body {
    padding: 8px 15px 8px 15px;
    flex: 1;
    overflow-y: auto;
    background: #fafafa;
    min-height: 0;
}

/* ===== بخش اطلاعات مشتری ===== */
.mwp-customer-edit-form {
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 2px solid #D4AF37;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.mwp-customer-edit-form h3 {
    font-size: 13px;
    margin: 0 0 6px 0;
    color: #800020;
}
.mwp-customer-edit-form .mwp-form-input {
    margin: 3px 0;
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    text-align: right;
    background: white;
    width: 100%;
}
.mwp-customer-edit-form .mwp-form-input:focus {
    border-color: #D4AF37;
    outline: none;
}

/* ===== بخش تخفیف ===== */
.mwp-discount-section {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 6px 0 8px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border: 1px solid #eee;
}
.mwp-discount-section input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}
.mwp-discount-section input:focus {
    border-color: #D4AF37;
    outline: none;
}
#mwpApplyDiscountBtn {
    background: #800020;
    color: white;
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #D4AF37;
}
#mwpApplyDiscountBtn:hover {
    background: #a00028;
    transform: scale(1.02);
}
#mwpDiscountMessage {
    font-size: 12px;
    margin-top: 4px;
    width: 100%;
}
#mwpDiscountSummary {
    display: none;
    background: #fff9e6;
    padding: 4px 12px;
    border-radius: 6px;
    margin: 4px 0;
    font-size: 13px;
    border: 1px solid #ffc107;
}

/* ===== توضیحات سفارش ===== */
.mwp-order-note {
    margin: 6px 0 8px 0;
}
.mwp-order-note label {
    font-weight: 700;
    font-size: 13px;
    color: #1A1A1A;
}
.mwp-order-note textarea {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    min-height: 45px;
    resize: vertical;
    font-size: 13px;
    font-family: 'Vazir', Tahoma, sans-serif !important;
    margin-top: 3px;
    background: white;
}
.mwp-order-note textarea:focus {
    border-color: #D4AF37;
    outline: none;
}

/* ===== عنوان محصولات انتخاب شده ===== */
.mwp-invoice-body > h3 {
    color: #800020;
    margin: 8px 0 6px 0;
    font-size: 15px;
    font-weight: 700;
    padding-right: 10px;
    border-right: 4px solid #D4AF37;
}

/* ===== جدول محصولات ===== */
.mwp-invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 10px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    font-size: 12px;
}
.mwp-invoice-table th {
    background: #800020;
    color: white;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid #D4AF37;
}
.mwp-invoice-table td {
    padding: 6px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    vertical-align: middle;
}
.mwp-invoice-table tr:last-child td {
    border-bottom: none;
}
.mwp-invoice-table .mwp-product-name {
    text-align: right;
    font-weight: 600;
    font-size: 12px;
    min-width: 120px;
}
.mwp-invoice-table .mwp-product-price {
    color: #800020;
    font-weight: 700;
    font-size: 12px;
}
.mwp-invoice-table .mwp-product-total {
    color: #2ecc71;
    font-weight: 800;
    font-size: 12px;
}
.mwp-invoice-table .mwp-product-discount {
    color: #e67700;
    font-size: 12px;
}
.mwp-invoice-table .mwp-product-final {
    color: #2ecc71;
    font-weight: 700;
    font-size: 12px;
}

/* ===== کنترل‌های تعداد در جدول ===== */
.mwp-product-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.mwp-quantity-btn-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #800020;
    background: white;
    color: #800020;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.mwp-quantity-btn-small:hover {
    background: #800020;
    color: white;
}
.mwp-quantity-input-small {
    width: 50px;
    text-align: center;
    padding: 4px;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: #f8f9fa;
}
.mwp-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    font-weight: 600;
}
.mwp-remove-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* ===== فوتر مودال (جمع و دکمه‌ها) ===== */
.mwp-invoice-footer {
    background: #800020 !important;
    color: white !important;
    padding: 3px 10px !important;
    text-align: center !important;
    border-radius: 0 0 12px 12px !important;
    position: sticky !important;
    bottom: 0 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    display: block !important;
    z-index: 10 !important;
}
.mwp-invoice-total {
    font-size: 14px !important;     /* از 17px به 14px */
    font-weight: 800;
    margin-bottom: 2px !important;  /* از 4px به 2px */
    color: #D4AF37;
}

/* ===== 6- دکمه‌ها کنار هم ===== */
.mwp-invoice-footer .mwp-btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: nowrap;
}
.mwp-btn-primary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #D4AF37;
    min-width: 140px;
    transition: all 0.3s ease;
}
.mwp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46,204,113,0.4);
}
.mwp-btn-secondary {
    background: #6c757d;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-width: 140px;
    border: 2px solid #999;
    transition: all 0.3s ease;
}
.mwp-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ===== پیام‌های وضعیت ===== */
.mwp-loading-message {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    margin: 8px 0;
    display: none;
    font-weight: 600;
    font-size: 13px;
}
.mwp-success-message {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    margin: 8px 0;
    border: 2px solid #D4AF37;
    font-weight: 600;
    font-size: 14px;
}
.mwp-success-message h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
}

/* ----- نوتیفیکیشن ----- */
.mwp-notification-banner {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 8px 12px;
    margin: 0 12px 6px 12px;
    border-radius: 8px;
    border: 2px solid #D4AF37;
    position: relative;
    box-shadow: 0 2px 10px rgba(128,0,32,0.3);
}
.mwp-notification-content { text-align: center; font-size: 11px; font-weight: 600; }
.mwp-close-notification {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #D4AF37;
    color: #800020;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 10px;
}

/* ----- فرم مشتری ----- */
.mwp-customer-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 15px;
}
.mwp-customer-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    border: 3px solid #D4AF37;
}
.mwp-customer-form h2 {
    color: #800020;
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 700;
}
.mwp-warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #ffc107;
    font-size: 11px;
    font-weight: 600;
}
.mwp-form-input {
    width: 100%;
    padding: 8px 10px;
    margin: 5px 0;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    background: #f8f9fa;
}
.mwp-submit-btn {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    border: 2px solid #D4AF37;
}
.mwp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(128,0,32,0.4);
}

/* ----- سبد خرید شناور ----- */
.mwp-floating-cart-container {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 1000;
}
.mwp-floating-cart {
    background: #800020;
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(128,0,32,0.3);
    display: none;
    align-items: center;
    gap: 6px;
    border: 2px solid #D4AF37;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 12px;
}
.mwp-floating-cart:hover {
    transform: scale(1.05);
}
.mwp-btn-primary,
.mwp-btn-secondary {
    padding: 3px 10px !important;   /* از 6px 20px به 3px 10px */
    font-size: 11px !important;     /* از 13px به 11px */
    min-width: 70px !important;     /* از 100px به 70px */
}
.mwp-invoice-footer div {
    display: flex !important;
    gap: 5px !important;           /* فاصله بین دکمه‌ها */
    justify-content: center !important;
    align-items: center !important;
}

/* ===== واکنش‌گرایی مودال ===== */
@media (max-width: 768px) {
    .mwp-invoice-content {
        max-width: 100%;
        margin: 8px;
        border-radius: 12px;
        height: 95vh;
    }
    .mwp-invoice-header {
        padding: 8px 15px;
    }
    .mwp-invoice-header h2 {
        font-size: 15px;
    }
    .mwp-close-invoice {
        width: 28px;
        height: 28px;
        font-size: 14px;
        left: 10px;
    }
    .mwp-invoice-body {
        padding: 8px 12px 10px 12px;
        max-height: none;
        height: auto;
        flex: 1;
    }
    .mwp-customer-edit-form {
        padding: 8px 10px;
    }
    .mwp-customer-edit-form .mwp-form-input {
        font-size: 12px;
        padding: 5px 8px;
    }
    .mwp-discount-section {
        padding: 6px 8px;
        flex-direction: column;
    }
    .mwp-discount-section input {
        min-width: 100%;
    }
    #mwpApplyDiscountBtn {
        width: 100%;
    }
    
    .mwp-invoice-table {
        font-size: 10px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .mwp-invoice-table th {
        padding: 4px 4px;
        font-size: 9px;
    }
    .mwp-invoice-table td {
        padding: 4px 4px;
        font-size: 9px;
    }
    .mwp-product-name {
        min-width: 80px;
    }
    .mwp-quantity-input-small {
        width: 36px;
        font-size: 9px;
    }
    .mwp-quantity-btn-small {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    .mwp-remove-btn {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .mwp-invoice-footer {
        padding: 8px 14px;
    }
    .mwp-invoice-total {
        font-size: 17px;
    }
    .mwp-btn-primary, .mwp-btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 100px;
    }
    .mwp-invoice-footer .mwp-btn-group {
        gap: 10px;
        flex-wrap: nowrap;
    }
    .mwp-order-note textarea {
        min-height: 35px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .mwp-invoice-body {
        padding: 6px 8px 8px 8px;
    }
    .mwp-invoice-table {
        font-size: 9px;
    }
    .mwp-invoice-table th {
        padding: 3px 3px;
        font-size: 8px;
    }
    .mwp-invoice-table td {
        padding: 3px 3px;
        font-size: 8px;
    }
    .mwp-product-name {
        min-width: 60px;
    }
    .mwp-quantity-input-small {
        width: 28px;
        font-size: 8px;
        padding: 1px;
    }
    .mwp-quantity-btn-small {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
    .mwp-btn-primary, .mwp-btn-secondary {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 80px;
    }
    .mwp-invoice-total {
        font-size: 15px;
    }
    .mwp-invoice-content {
        max-height: 98vh;
        height: 98vh;
    }
}