@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;
}

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

.arzounkade-order-system-v2 {
    direction: rtl;
    background: #F5F5F5;
    min-height: 100vh;
    line-height: 1.6;
    color: #1A1A1A;
    padding-bottom: 120px;
}

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

/* ----- Wrapper چسبنده (فقط برای بخش جستجو) ----- */
.sticky-header-wrapper-v2 {
    position: relative;
    top: 0;
    z-index: 1000;
    background: transparent;
    box-shadow: none;
    transition: all 0.1s ease;
}

/* ----- هدر بالایی (ثابت) ----- */
.order-header-v2 {
    background: #800020;
    color: white;
    padding: 4px 20px;
    margin-bottom: 0;
}
.header-top-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.logo-section-v2 h1 { font-size: 13px; margin: 0; font-weight: 700; color: white; }
.contact-info-v2 {
    font-size: 11px;
    background: rgba(212, 175, 55, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    border: 2px solid #D4AF37;
    font-weight: 600;
}
.daily-price-link-btn-v2 {
    background: #D4AF37;
    color: #800020;
    border: none;
    padding: 4px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
    border: 2px solid #fff;
}
.daily-price-link-btn-v2:hover {
    transform: scale(1.05);
    background: #e6c44d;
}

/* ----- بخش جستجو (قفل‌شونده) ----- */
.sticky-search-header-v2 {
    position: relative;
    top: 0;
    z-index: 999;
    background: #800020;
    padding: 8px 20px;
    border-bottom: 2px solid #D4AF37;
    transition: all 0.1s ease;
}
.sticky-search-header-v2.is-sticky-v2 {
    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 .sticky-search-header-v2.is-sticky-v2 {
    top: 32px;
}
@media (max-width: 768px) {
    body.admin-bar .sticky-search-header-v2.is-sticky-v2 {
        top: 46px;
    }
}

.sticky-search-container-v2 {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.sticky-search-input-v2 {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #D4AF37;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    height: 48px;
}
.sticky-search-input-v2:focus {
    outline: none;
    border-color: #fff;
    transform: scale(1.01);
    transition: all 0.3s ease;
}
.clear-search-btn-v2 {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

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

/* ----- فرم مشتری ----- */
.customer-form-overlay-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,26,26,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}
.customer-form-v2 {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 3px solid #D4AF37;
}
.customer-form-v2 h2 { color: #800020; margin-bottom: 15px; font-size: 20px; font-weight: 700; }
.warning-message-v2 {
    background: linear-gradient(135deg, #fff9db, #ffe066);
    color: #e67700;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #ffd43b;
    font-weight: 600;
}
.form-input-v2 {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    background: #F5F5F5;
}
.submit-btn-v2 {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
    border: 2px solid #D4AF37;
}
.submit-btn-v2:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(128,0,32,0.4); }

/* ----- محصولات ----- */
.products-container-v2 { padding: 15px; max-width: 1400px; margin: 0 auto; }
.products-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
}
@media (max-width: 768px) { .products-grid-v2 { grid-template-columns: 1fr; } }

.product-card-v2 {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 380px;
    display: flex;
    flex-direction: column;
}
.product-card-v2.unavailable-v2 {
    opacity: 0.7;
    background: #f8f9fa;
    border: 2px dashed #dc3545;
}
.unavailable-badge-v2 {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}
.product-card-v2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #800020, #D4AF37);
}
.product-card-v2.unavailable-v2::before { background: linear-gradient(135deg, #dc3545, #ff6b6b); }
.product-card-v2:hover { border-color: #D4AF37; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }

.product-image-container-v2 {
    width: 100%;
    height: 150px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #F5F5F5;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}
.product-image-square-v2 {
    width: 150px;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #800020;
    box-shadow: 0 0 0 2px #D4AF37;
    padding: 1px;
    transition: all 0.3s ease;
}
.product-image-container-v2.zoomed-v2 .product-image-square-v2 {
    transform: scale(2);
    z-index: 1000;
    position: relative;
}

.product-title-v2 { color: #1A1A1A; font-size: 15px; margin-bottom: 4px; font-weight: 700; height: 42px; overflow: hidden; }
.price-section-v2 { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.original-price-v2 { text-decoration: line-through; color: #999; font-size: 12px; }
.sale-price-v2 { color: #800020; font-weight: 800; font-size: 15px; }
.discount-badge-v2 { background: linear-gradient(135deg, #800020, #a00028); color: white; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.min-quantity-v2 { color: #666; font-size: 12px; margin-bottom: 12px; background: #F5F5F5; padding: 5px 8px; border-radius: 6px; display: inline-block; font-weight: 600; }
.quantity-section-v2 { margin-top: auto; padding-top: 12px; border-top: 2px solid #F5F5F5; }
.quantity-controls-v2 { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; }
.quantity-btn-v2 {
    width: 40px; height: 35px; border-radius: 15%; border: 2px solid #800020;
    background: white; color: #800020; font-size: 16px; font-weight: bold;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.quantity-btn-v2:hover { background: #800020; color: white; transform: scale(1.1); }
.quantity-btn-v2:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.quantity-input-v2 { width: 40px; text-align: center; padding: 6px; border: 2px solid #D4AF37; border-radius: 8px; font-size: 14px; font-weight: 700; background: #F5F5F5; }

/* ----- سبد خرید شناور ----- */
.floating-cart-container-v2 {
    position: fixed;
    left: 15px;
    bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.floating-cart-v2 {
    background: #800020;
    color: white;
    padding: 12px 20px;
    border-radius: 35px;
    box-shadow: 0 6px 20px rgba(128,0,32,0.3);
    display: none;
    align-items: center;
    gap: 8px;
    border: 2px solid #D4AF37;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 220px;
    justify-content: center;
    font-weight: 700;
}
.cart-icon-v2 { font-size: 16px; }
.cart-text-v2 { font-weight: 700; font-size: 13px; white-space: nowrap; }

/* ----- مودال فاکتور ----- */
.invoice-modal-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,26,26,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 10px;
    backdrop-filter: blur(10px);
}
.invoice-content-v2 {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid #D4AF37;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}
.invoice-header-v2 {
    background: #800020;
    color: white;
    padding: 12px 15px;
    border-radius: 15px 15px 0 0;
    text-align: center;
    position: relative;
}
.invoice-header-v2 h2 { font-size: 16px; margin: 0; font-weight: 700; }
.close-invoice-v2 {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #D4AF37;
    color: #800020;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}
.invoice-body-v2 { padding: 15px; flex: 1; overflow-y: auto; }
.customer-edit-form-v2 {
    background: #F5F5F5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 2px solid #D4AF37;
}
.customer-edit-form-v2 h3 { font-size: 14px; margin: 0 0 8px 0; color: #800020; }

.discount-section-v2 { background: #f8f9fa; padding: 10px; border-radius: 8px; margin: 10px 0; }
.discount-section-v2 input { flex: 1; min-width: 150px; }
#discountMessageV2 { font-size: 12px; margin-top: 5px; }
.order-note-v2 { margin: 10px 0; }
.order-note-v2 textarea { width: 100%; padding: 8px; border: 2px solid #D4AF37; border-radius: 6px; min-height: 60px; resize: vertical; }
#discountSummaryV2 { display: none; background: #fff9e6; padding: 8px; border-radius: 6px; margin: 5px 0; }

.invoice-table-v2 {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.invoice-table-v2 th {
    background: #800020;
    color: white;
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border: 1px solid #D4AF37;
}
.invoice-table-v2 td {
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #F5F5F5;
    font-size: 12px;
    vertical-align: middle;
}
.invoice-table-v2 .product-name-v2 { text-align: right; font-weight: 600; }
.invoice-table-v2 .product-price-v2 { color: #800020; font-weight: 700; }
.invoice-table-v2 .product-total-v2 { color: #2ecc71; font-weight: 800; }
.invoice-table-v2 .product-discount-v2 { color: #e67700; }
.invoice-table-v2 .product-final-v2 { color: #2ecc71; font-weight: 700; }

.product-quantity-controls-v2 { display: flex; align-items: center; justify-content: center; gap: 6px; }
.quantity-btn-small-v2 {
    width: 30px; height: 30px; border-radius: 50%; border: 2px solid #800020;
    background: white; color: #800020; font-size: 12px; font-weight: bold;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.quantity-btn-small-v2:hover { background: #800020; color: white; }
.quantity-input-small-v2 {
    width: 60px; text-align: center; padding: 6px; border: 2px solid #D4AF37;
    border-radius: 6px; font-size: 12px; font-weight: 700; background: #F5F5F5;
}
.remove-btn-v2 { background: #dc3545; color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; transition: all 0.3s; }
.remove-btn-v2:hover { background: #c82333; }

.invoice-footer-v2 {
    background: #800020;
    color: white;
    padding: 12px 15px;
    text-align: center;
    border-radius: 0 0 15px 15px;
    position: sticky;
    bottom: 0;
}
.invoice-total-v2 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.btn-primary-v2 {
    background: linear-gradient(135deg, #2ecc71, #3498db);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin: 4px;
    border: 2px solid #D4AF37;
    min-width: 140px;
    transition: all 0.3s ease;
}
.btn-primary-v2:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(46,204,113,0.4); }
.btn-secondary-v2 {
    background: #666;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin: 4px;
    min-width: 140px;
    border: 2px solid #999;
    transition: all 0.3s ease;
}
.btn-secondary-v2:hover { background: #555; }
.loading-message-v2 {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin: 10px 0;
    display: none;
    font-weight: 600;
}
.success-message-v2 {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin: 10px 0;
    border: 2px solid #D4AF37;
    font-weight: 600;
}
.loading-overlay-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,26,26,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    backdrop-filter: blur(5px);
}
.customer-info-display-v2 {
    background: linear-gradient(135deg, #800020, #a00028);
    color: white;
    padding: 8px 15px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 0;
    border-radius: 0 0 12px 12px;
    font-size: 12px;
    border-bottom: 2px solid #D4AF37;
}