/* ====== فونت و ریست ====== */
.arzv2-wrap, .arzv2-wrap *, .arzv2-history-wrap, .arzv2-history-wrap * {
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'Vazir', Tahoma, sans-serif;
}
.arzv2-wrap {
    direction: rtl;
    background: #F5F5F5;
    min-height: 100vh;
    line-height: 1.6;
    color: #1A1A1A;
    padding-bottom: 90px;
}
.arzv2-history-wrap {
    direction: rtl;
    background: #F5F5F5;
    min-height: 100vh;
    padding: 20px;
}

/* ====== Toast ====== */
.arzv2-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
    width: 400px;
}
.arzv2-toast {
    background: #1A1A1A;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 4px solid #D4AF37;
    pointer-events: auto;
    animation: arzv2SlideIn 0.3s ease;
    line-height: 1.45;
}
.arzv2-toast.success { border-right-color: #2ecc71; background: #1e7e34; }
.arzv2-toast.error { border-right-color: #dc3545; background: #a71d2a; }
.arzv2-toast.warning { border-right-color: #f39c12; background: #b9770e; }
.arzv2-toast.info { border-right-color: #3498db; background: #21618c; }
@keyframes arzv2SlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== Skeleton ====== */
.arzv2-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 15px;
}
.arzv2-skeleton-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    height: 380px;
    overflow: hidden;
    position: relative;
}
.arzv2-skeleton-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: arzv2Shimmer 1.5s infinite;
}
@keyframes arzv2Shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ====== هدر چسبنده ====== */
/* ====== هدر اصلی (غیر sticky) ====== */
.arzv2-header .arzv2-logo {
    margin: 0 !important;
}
/* حذف فاصله از داخل هدر */
.arzv2-header > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* حذف فاصله از span نمایش مشتری */
.arzv2-header #arzv2CustomerDisplay {
    margin: 0 !important;
    padding: 4px 10px !important;
}

/* حذف فاصله از wrapper داخلی هدر */
.arzv2-header > div[style*="text-align:center"] {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
	line-height: 1;
}

.arzv2-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto !important;
}
.arzv2-logo { font-size: 16px; margin: 0; font-weight: 800; color: white; }
.arzv2-contact {
    font-size: 12px;
    background: rgba(212, 175, 55, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
    border: 2px solid #D4AF37;
    font-weight: 600;
    color: white;
}
.arzv2-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
	margin: 0 !important;
}
.arzv2-btn-gold {
    background: #D4AF37;
    color: #5D1A2E;
    border: 2px solid #fff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    white-space: nowrap;
}
.arzv2-btn-gold:hover { background: #e6c44d; transform: translateY(-1px); }

/* ====== جستجو ====== */
.arzv2-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.arzv2-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 3px solid #D4AF37;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.2s;
}
.arzv2-search-input:focus { outline: none; border-color: #fff; }
.arzv2-clear-search {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    display: none;
}

/* ====== بدنه اصلی ====== */
.arzv2-body {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
}

/* ====== سایدبار دسته‌بندی (دسکتاپ) ====== */
.arzv2-sidebar {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 140px;
}
.arzv2-sidebar h3 {
    font-size: 15px;
    color: #5D1A2E;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F5F5F5;
}
.arzv2-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.arzv2-cat-item {
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #1A1A1A;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.arzv2-cat-item:hover { background: #F5F5F5; }
.arzv2-cat-item.active { background: #5D1A2E; color: white; }
.arzv2-cat-item .count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.arzv2-cat-item.active .count { background: rgba(255,255,255,0.2); }

/* ====== نوار ابزار (مرتب‌سازی + view) ====== */
.arzv2-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.arzv2-sort-group, .arzv2-view-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.arzv2-sort-label { font-size: 12px; color: #666; font-weight: 600; }
.arzv2-chip {
    background: #F5F5F5;
    border: 2px solid transparent;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #1A1A1A;
}
.arzv2-chip:hover { background: #eee; }
.arzv2-chip.active { background: #5D1A2E; color: white; border-color: #D4AF37; }
.arzv2-view-btn {
    background: white;
    border: 2px solid #ddd;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}
.arzv2-view-btn.active { background: #5D1A2E; color: white; border-color: #D4AF37; }

/* ====== Breadcrumb ====== */
.arzv2-breadcrumb {
    font-size: 12px;
    color: #666;
    padding: 8px 15px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 12px;
}
.arzv2-breadcrumb a { color: #5D1A2E; text-decoration: none; font-weight: 600; }
.arzv2-breadcrumb a:hover { text-decoration: underline; }
.arzv2-breadcrumb .sep { margin: 0 6px; color: #999; }

/* ====== Grid محصولات ====== */
.arzv2-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}
.arzv2-products-grid.list-view { grid-template-columns: 1fr; }

/* ====== کارت محصول ====== */
.arzv2-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
}
.arzv2-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(135deg, #5D1A2E, #D4AF37);
}
.arzv2-card:hover {
    border-color: #D4AF37;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.arzv2-card.unavailable {
    opacity: 0.75;
    background: #f8f9fa;
    border: 2px dashed #dc3545;
}
.arzv2-card.unavailable::before { background: linear-gradient(135deg, #dc3545, #ff6b6b); }
.arzv2-card .badge-unavailable {
    position: absolute;
    top: 10px; left: 10px;
    background: #dc3545; color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}
.arzv2-img-box {
    width: 70%;                      /* ← ۳۰٪ کم شد */
    aspect-ratio: 1 / 1;             /* ← مربعی */
    height: auto;
    margin: 0 auto 10px auto;        /* ← وسط‌چین + فاصله پایین کمتر */
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #5D1A2E;       /* ← کادر شرابی */
    box-shadow: 0 0 0 2px #D4AF37;   /* ← حلقه طلایی دور کادر */
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.arzv2-img-box:hover {
    box-shadow: 0 0 0 2px #D4AF37, 0 6px 20px rgba(128,0,32,0.3);
}
.arzv2-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;               /* ← عکس کل کادر رو پر کنه */
    object-position: center;
    display: block;
    background: #F5F5F5;
    padding: 3px;                    /* ← کمی فاصله بین عکس و کادر */
}
.arzv2-title {
    color: #5D1A2E;
    font-size: 14px;
    margin: 0 0 6px;
    font-weight: 800;
    line-height: 1.45;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.arzv2-price-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.arzv2-old-price { text-decoration: line-through; color: #999; font-size: 12px; }
.arzv2-sale-price { color: #5D1A2E; font-weight: 800; font-size: 15px; }
.arzv2-discount {
    background: linear-gradient(135deg, #5D1A2E, #a00028);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}
.arzv2-min-qty {
    color: #666;
    font-size: 12px;
    margin-bottom: 10px;
    background: #F5F5F5;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
}
.arzv2-qty-section {
    margin-top: auto;
    padding-top: 10px;
    border-top: 2px solid #F5F5F5;
}
.arzv2-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.arzv2-qty-btn {
    width: 40px; height: 36px;
    border-radius: 10px;
    border: 2px solid #5D1A2E;
    background: white;
    color: #5D1A2E;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.arzv2-qty-btn:hover:not(:disabled) { background: #5D1A2E; color: white; }
.arzv2-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.arzv2-qty-input {
    width: 50px;
    text-align: center;
    padding: 8px 6px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    background: #F5F5F5;
}
.arzv2-section-title {
    font-size: 18px;
    margin: 0 0 15px;
    padding-right: 10px;
    border-right: 4px solid #D4AF37;
}
.arzv2-section-title.available { color: #5D1A2E; }
.arzv2-section-title.unavailable { color: #dc3545; border-right-color: #dc3545; }

/* ====== نمای لیستی ====== */
.arzv2-products-grid.list-view .arzv2-card {
    flex-direction: row;
    min-height: 130px;
    align-items: center;
    gap: 15px;
}
/* عنوان محصول در نمای لیستی (دسکتاپ) */
.arzv2-products-grid.list-view .arzv2-title {
    font-size: 16px;
    font-weight: 800;
    min-height: 44px;
    color: #2C2C2C;
}
.arzv2-products-grid.list-view .arzv2-img-box {
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid #5D1A2E;
    box-shadow: 0 0 0 2px #D4AF37;
}
.arzv2-products-grid.list-view .arzv2-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.arzv2-products-grid.list-view .arzv2-qty-section {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

/* ====== Bottom Navigation (موبایل) ====== */
.arzv2-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 2px solid #D4AF37;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 6px 0;
}
.arzv2-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}
.arzv2-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    text-decoration: none;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    position: relative;
    transition: color 0.2s;
}
.arzv2-nav-item .icon { font-size: 20px; line-height: 1; }
.arzv2-nav-item.active { color: #5D1A2E; }
.arzv2-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 3px;
    background: #5D1A2E;
    border-radius: 0 0 4px 4px;
}
.arzv2-nav-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 8px);
    background: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ====== Sticky Bottom Bar (سبد) ====== */
/* ====== Sticky Bottom Bar (سبد) - نمایش در دسکتاپ و موبایل ====== */
.arzv2-sticky-cart-bar {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    width: auto;
    min-width: 380px;
    max-width: 500px;
    background: linear-gradient(135deg, #5D1A2E, #a00028);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(128,0,32,0.5);
    z-index: 9998;
    border: 2px solid #D4AF37;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.arzv2-sticky-cart-bar.show {
    display: flex;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* موبایل: پایین چسبیده به لبه‌ها */
@media (max-width: 768px) {
    .arzv2-sticky-cart-bar {
        left: 10px;
        right: 10px;
        bottom: 70px;
        transform: translateY(200%);
        width: auto;
        min-width: auto;
        max-width: none;
        border-radius: 14px;
        padding: 12px 18px;
        box-shadow: 0 8px 25px rgba(128,0,32,0.4);
        z-index: 998;
    }
    .arzv2-sticky-cart-bar.show {
        transform: translateY(0);
    }
}
.arzv2-sticky-cart-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    font-weight: 600;
}
.arzv2-sticky-cart-total { font-size: 15px; font-weight: 800; }
.arzv2-sticky-cart-btn {
    background: #D4AF37;
    color: #5D1A2E;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.arzv2-sticky-cart-btn:hover { transform: scale(1.05); }

/* ====== Bottom Sheet / Modal ====== */
.arzv2-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,26,0.85);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(6px);
}
.arzv2-overlay.show { display: flex; }
.arzv2-overlay.center { align-items: center; }
.arzv2-sheet {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 700px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    animation: arzv2SheetUp 0.3s ease;
}
@keyframes arzv2SheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.arzv2-overlay.center .arzv2-sheet {
    border-radius: 16px;
    margin: 10px;
    max-height: 90vh;
    animation: arzv2FadeIn 0.25s ease;
}
@keyframes arzv2FadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.arzv2-sheet-handle {
    width: 50px;
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    margin: 10px auto 5px;
}
.arzv2-sheet-header {
    background: #5D1A2E;
    color: white;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #D4AF37;
}
.arzv2-sheet-header h2 { font-size: 16px; margin: 0; font-weight: 700; }
.arzv2-sheet-close {
    background: #D4AF37;
    color: #5D1A2E;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.arzv2-sheet-body { padding: 15px; flex: 1; overflow-y: auto; }
.arzv2-sheet-footer {
    background: #5D1A2E;
    color: white;
    padding: 12px 15px;
    border-top: 2px solid #D4AF37;
    position: sticky;
    bottom: 0;
}
.arzv2-invoice-total { font-size: 18px; font-weight: 800; margin-bottom: 10px; text-align: center; }
.arzv2-sheet-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ====== فرم ورودی ====== */
.arzv2-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 13px;
    background: #F5F5F5;
    margin-bottom: 8px;
    font-family: inherit;
}
.arzv2-input:focus { outline: none; background: white; border-color: #5D1A2E; }
.arzv2-input.error { border-color: #dc3545; background: #ffe6e6; }
.arzv2-textarea {
    width: 100%;
    padding: 4px 8px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 12px;
    min-height: 22px;
	max-height: 60px;
    resize: vertical;
    font-family: inherit;
	line-height: 1.3;
}
.arzv2-btn {
    background: linear-gradient(135deg, #5D1A2E, #a00028);
    color: white;
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #D4AF37;
    transition: all 0.2s;
    font-family: inherit;
}
.arzv2-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(128,0,32,0.4); }
.arzv2-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.arzv2-btn-block { width: 100%; }
.arzv2-btn-success { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.arzv2-btn-secondary { background: #666; border-color: #999; }
.arzv2-btn-secondary:hover { background: #555; }
.arzv2-btn-gold-sm {
    background: #D4AF37;
    color: #5D1A2E;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

/* ====== فرم مشتری (Overlay) ====== */
.arzv2-customer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,26,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    backdrop-filter: blur(10px);
    padding: 15px;
}
.arzv2-customer-box {
    background: white;
    padding: 32px 24px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 3px solid #D4AF37;
}
.arzv2-customer-box h2 { 
    color: #5D1A2E; 
    margin: 0 0 12px; 
    font-size: 18px; 
    font-weight: 700;
    line-height: 1.25;
}
.arzv2-warning {
    background: linear-gradient(135deg, #fff9db, #ffe066);
    color: #e67700;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #ffd43b;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.45;
}

/* ====== فاکتور ====== */
.arzv2-invoice-section {
    background: #F5F5F5;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 2px solid #D4AF37;
}
.arzv2-invoice-section h3 {
    font-size: 14px;
    margin: 0 0 10px;
    color: #5D1A2E;
    display: flex;
    align-items: center;
    gap: 6px;
}
.arzv2-discount-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.arzv2-discount-row .arzv2-input { margin-bottom: 0; flex: 1; min-width: 130px; }
.arzv2-discount-msg { font-size: 12px; margin-top: 6px; font-weight: 600; display: none; }
.arzv2-discount-msg.ok { color: #2ecc71; }
.arzv2-discount-msg.err { color: #dc3545; }
.arzv2-discount-summary {
    background: #fff9e6;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #5D1A2E;
    display: none;
    border-right: 3px solid #D4AF37;
}

/* ====== آیتم‌های فاکتور (موبایل - کارتی) ====== */
.arzv2-invoice-items { display: flex; flex-direction: column; gap: 10px; }
.arzv2-invoice-item {
    background: white;
    border-radius: 10px;
    padding: 12px;
    border: 2px solid #F5F5F5;
    display: flex;
    gap: 10px;
    align-items: center;
}
.arzv2-invoice-item .thumb {
    width: 55px; height: 55px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #eee;
    background: #f8f8f8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.arzv2-invoice-item .info { flex: 1; min-width: 0; }
.arzv2-invoice-item .name {
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.arzv2-invoice-item .price-line {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}
.arzv2-invoice-item .price-line strong { color: #5D1A2E; }
.arzv2-invoice-item .qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}
.arzv2-invoice-item .qty-btns { display: flex; gap: 6px; align-items: center; }
.arzv2-invoice-item .qty-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid #5D1A2E;
    background: white;
    color: #5D1A2E;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.arzv2-invoice-item .qty-btn:hover { background: #5D1A2E; color: white; }
.arzv2-invoice-item .qty-val {
    min-width: 30px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
}
.arzv2-invoice-item .row-total {
    font-size: 13px;
    font-weight: 800;
    color: #2ecc71;
    white-space: nowrap;
}
.arzv2-invoice-item .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

/* ====== موفقیت ====== */
.arzv2-success-box {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 25px 20px;
    border-radius: 14px;
    text-align: center;
    border: 3px solid #D4AF37;
}
.arzv2-success-box h3 { margin: 0 0 10px; font-size: 18px; }
.arzv2-success-box p { margin: 6px 0; font-size: 14px; }

/* ====== تاریخچه سفارش ====== */
.arzv2-history-search {
    max-width: 500px;
    margin: 0 auto 20px;
    text-align: center;
}
.arzv2-history-search h2 { color: #5D1A2E; margin-bottom: 12px; font-size: 18px; }
.arzv2-history-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.arzv2-history-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border-right: 4px solid #D4AF37;
}
.arzv2-history-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.arzv2-history-id { font-weight: 800; color: #5D1A2E; font-size: 14px; }
.arzv2-history-date { font-size: 12px; color: #666; }
.arzv2-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.arzv2-history-items {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 12px;
}
.arzv2-history-item-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #eee;
}
.arzv2-history-item-row:last-child { border-bottom: none; }
.arzv2-history-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 2px solid #F5F5F5;
}
.arzv2-history-total { font-size: 14px; font-weight: 800; color: #2ecc71; }
.arzv2-empty-history {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: white;
    border-radius: 12px;
}
.arzv2-empty-history .icon { font-size: 50px; margin-bottom: 10px; }
/* ============================================================ */
/* ====== حذف فاصله و مخفی کردن هدر قالب (فقط توی app2) ====== */
/* ============================================================ */

/* حذف فاصله از هدر قالب Shoptimizer/Astra */
body.page .site-header,
body.page header.site-header,
body.page .ast-header-break-point {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* مخفی کردن کامل هدر قالب فقط توی صفحه app2 (ID: 77862) */
body.page-id-76043 .site-header,
body.page-id-76043 header.site-header,
body.page-id-76043 .ast-mobile-header-wrap,
body.page-id-76043 .ast-desktop-header,
body.page-id-76043 #masthead,
body.page-id-76043 .site-branding {
    display: none !important;
}

/* حذف فاصله بالای محتوا توی صفحه app2 */
body.page-id-76043 .site-content,
body.page-id-76043 .content-area,
body.page-id-76043 main.site-main,
body.page-id-76043 #content,
body.page-id-76043 #primary {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* حذف فاصله از عنوان صفحه */
body.page-id-76043 .entry-header,
body.page-id-76043 .page-header,
body.page-id-76043 .entry-title,
body.page-id-76043 .page-title {
    display: none !important;
}

/* حذف فاصله از entry-content */
body.page-id-76043 .entry-content,
body.page-id-76043 .page-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ====== فوتر ====== */
.arzv2-footer {
    background: #5D1A2E;
    color: white;
    padding: 25px 20px;
    margin-top: 40px;
    border-top: 4px solid #D4AF37;
}
.arzv2-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    text-align: center;
}
.arzv2-footer h3 { color: #D4AF37; margin: 0 0 12px; font-size: 15px; }
.arzv2-footer p { margin: 6px 0; font-size: 13px; }
.arzv2-footer a { color: white; text-decoration: none; }
.arzv2-footer a:hover { color: #D4AF37; }
.arzv2-footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    font-size: 12px;
}
/* ============================================================ */
/* ====== هدر و سرچ (تمیز و نهایی) ====== */
/* ============================================================ */
/* ============================================================ */
/* ====== هدر و سرچ (نسخه نهایی) ====== */
/* ============================================================ */

/* هدر (غیر sticky) */
.arzv2-header,
#arzv2MainHeader {
    background: #5D1A2E !important;
    padding: 12px 20px 0 20px !important;
    margin: 0 !important;
    color: white;
    position: relative;
    z-index: 1;
    line-height: 1.3;
    border: none !important;
}
/* ====== فاصله بین هدر و سرچ ====== */
.arzv2-header {
    padding-bottom: 8px !important;
}

.arzv2-search-bar {
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.arzv2-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto !important;
    padding: 0 !important;
}
/* ====== تب‌های هدر ====== */
.arzv2-header-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 12px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.arzv2-tab-item {
    flex: 1;
    max-width: 220px;
    text-align: center;
    padding: 10px 16px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px 8px 0 0;
    background: rgba(255,255,255,0.08);
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}
.arzv2-tab-item:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}
.arzv2-tab-item.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border-bottom-color: #D4AF37;
}
@media (max-width: 768px) {
    .arzv2-tab-item { font-size: 12px; padding: 8px 10px; }
}

.arzv2-header .arzv2-logo,
.arzv2-header h1.arzv2-logo {
    font-size: 16px;
    font-weight: 800;
    color: white;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3;
}

.arzv2-header .arzv2-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 !important;
    padding: 0 !important;
}

.arzv2-header .arzv2-contact {
    font-size: 12px;
    background: rgba(212, 175, 55, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
    border: 2px solid #D4AF37;
    font-weight: 600;
    color: white;
    margin: 0 !important;
}

.arzv2-header > div[style*="text-align:center"] {
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    line-height: 1;
}

.arzv2-header #arzv2CustomerDisplay {
    margin: 0 !important;
    padding: 4px 10px !important;
}

/* ============================================================ */
/* ====== نوار سرچ (تعریف واحد و نهایی) ====== */
/* ============================================================ */

/* حالت عادی */
.arzv2-search-bar {
    display: block;
    background: #5D1A2E;
    padding: 10px 20px 12px 20px;  /* ← padding-top رو از 8px به 10px تغییر بده */
    margin: 0;
    border: none;
	border-top: 1px solid rgba(255,255,255,0.1);  /* ← اضافه کن */
    border-bottom: 2px solid #D4AF37;
    position: relative;
    z-index: 999;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
}

/* حالت sticky (چسبیده به بالا) */
.arzv2-search-bar.is-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: rgba(128, 0, 32, 0.98) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    border-bottom: 2px solid #D4AF37 !important;
}

/* وقتی ادمین‌بار فعاله */
body.admin-bar .arzv2-search-bar.is-sticky {
    top: 32px !important;
}

@media (max-width: 782px) {
    body.admin-bar .arzv2-search-bar.is-sticky {
        top: 46px !important;
    }
}

/* محتوای داخلی نوار سرچ */
.arzv2-search-bar .arzv2-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* حذف فاصله از wrap */
.arzv2-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* حذف فاصله از قالب */
body.page-id-76043 {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page-id-76043 #page,
body.page-id-76043 #content,
body.page-id-76043 .site-content,
body.page-id-76043 .content-area,
body.page-id-76043 main.site-main,
body.page-id-76043 #primary,
body.page-id-76043 .ast-container,
body.page-id-76043 article,
body.page-id-76043 .entry-content,
body.page-id-76043 .page-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* مخفی کردن هدر قالب */
body.page-id-76043 .site-header,
body.page-id-76043 header.site-header,
body.page-id-76043 #masthead,
body.page-id-76043 .ast-mobile-header-wrap,
body.page-id-76043 .ast-desktop-header,
body.page-id-76043 .site-branding {
    display: none !important;
}

/* مخفی کردن عنوان صفحه */
body.page-id-76043 .entry-header,
body.page-id-76043 .page-header,
body.page-id-76043 .entry-title,
body.page-id-76043 .page-title {
    display: none !important;
}

/* حذف فاصله از محتوای قالب قبل از shortcode */
.entry-content > .arzv2-wrap,
.page-content > .arzv2-wrap,
.site-content .arzv2-wrap,
main .arzv2-wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* حذف فاصله از entry-header قالب */
.arzv2-wrap ~ .entry-header,
.arzv2-wrap ~ .page-header,
.entry-header + .arzv2-wrap,
.page-header + .arzv2-wrap {
    margin: 0 !important;
    padding: 0 !important;
}

/* اگه عنوان صفحه قبل از shortcode هست، مخفی کن */
body.page .entry-header,
body.page .page-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* حذف فاصله بین هدر سایت و محتوا */
.site-content,
.content-area,
main.site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
/* ====== ریسپانسیو ====== */
@media (max-width: 900px) {
    .arzv2-body { 
        grid-template-columns: minmax(0, 1fr); 
        padding: 10px; 
    }
    .arzv2-sidebar { display: none; }
    /* گرید موبایل جاش اومده */
}

@media (max-width: 768px) {
    .arzv2-header-top { justify-content: center; text-align: center; }
    .arzv2-logo { font-size: 13px; }
    .arzv2-contact { font-size: 12px; }
    .arzv2-search-input { padding: 12px 14px; font-size: 15px; }
    .arzv2-products-grid { grid-template-columns: 1fr; gap: 12px; }
    .arzv2-card { min-height: auto; padding: 12px; }
    .arzv2-bottom-nav { display: block; }
    .arzv2-sticky-cart-bar { display: flex; }
    .arzv2-wrap { padding-bottom: 160px; }
    .arzv2-footer { padding-bottom: 100px; }

    /* کارت افقی موبایل */
	 /* ====== Grid view در موبایل: کارت عمودی و کوچیک ====== */
    .arzv2-products-grid:not(.list-view) {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-card {
        flex-direction: column !important;
        padding: 12px !important;
        min-height: auto !important;
        gap: 6px !important;
    }
    
	.arzv2-products-grid:not(.list-view) .arzv2-img-box {
        width: 70% !important;           /* ← ۷۰٪ */
        max-width: 180px !important;     /* ← حداکثر ۱۸۰px */
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        margin: 0 auto 10px auto !important;
        flex-shrink: 0 !important;
    }
    
    
    .arzv2-products-grid:not(.list-view) .arzv2-price-row {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-sale-price {
        font-size: 15px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-old-price {
        font-size: 12px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-discount {
        font-size: 12px !important;
        padding: 2px 8px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-min-qty {
        font-size: 12px !important;
        padding: 4px 8px !important;
        margin-bottom: 8px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-qty-controls {
        gap: 8px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-qty-btn {
        width: 40px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    
    .arzv2-products-grid:not(.list-view) .arzv2-qty-input {
        width: 50px !important;
        padding: 6px 4px !important;
        font-size: 14px !important;
    }
    
    /* ====== List view در موبایل: کارت افقی ====== */
    .arzv2-products-grid.list-view {
        grid-template-columns: 1fr !important;
    }
    
    .arzv2-products-grid.list-view .arzv2-card {
        flex-direction: row !important;
        gap: 12px !important;
        align-items: stretch !important;
        padding: 12px !important;
        min-height: auto !important;
    }
    
	.arzv2-products-grid.list-view .arzv2-img-box {
		width: 90px !important;
		height: 90px !important;
		aspect-ratio: 1 / 1 !important;
		margin: 0 !important;
		flex-shrink: 0 !important;
		border: 2px solid #5D1A2E !important;
		box-shadow: 0 0 0 2px #D4AF37 !important;
	}
    
    .arzv2-products-grid.list-view .arzv2-card-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        min-width: 0 !important;
    }
    /* عنوان محصول در موبایل — همه حالت‌ها */
    .arzv2-title {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #5D1A2E !important;
        line-height: 1.45 !important;
        min-height: 40px !important;
    }
    
    /* موبایل — نمای شبکه‌ای */
    .arzv2-products-grid:not(.list-view) .arzv2-title {
        min-height: auto !important;
        margin-bottom: 6px !important;
    }
    
    /* موبایل — نمای لیستی */
    .arzv2-products-grid.list-view .arzv2-title {
        min-height: 40px !important;
    }	
    
    .arzv2-products-grid.list-view .arzv2-qty-section {
        margin-top: auto !important;
        padding-top: 6px !important;
        border-top: 1px solid #f0f0f0 !important;
    }


    .arzv2-qty-btn { width: 34px; height: 32px; font-size: 14px; }
    .arzv2-qty-input { width: 42px; padding: 6px 4px; font-size: 13px; }
    .arzv2-toolbar { padding: 8px 10px; }
    .arzv2-sort-group { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
    .arzv2-sort-group::-webkit-scrollbar { display: none; }
    .arzv2-chip { font-size: 12px; padding: 5px 10px; }
    .arzv2-breadcrumb { font-size: 12px; padding: 6px 10px; }
}
/* ============================================================ */
/* ====== وقتی مودال بازه، Sticky Bar و Search Bar مخفی ====== */
/* ============================================================ */
body.arzv2-modal-open .arzv2-search-bar,
body.arzv2-modal-open .arzv2-search-bar.is-sticky,
body.arzv2-modal-open .arzv2-sticky-cart-bar,
body.arzv2-modal-open .arzv2-bottom-nav,
body.arzv2-modal-open .arzv2-sidebar,
body.arzv2-modal-open .arzv2-toolbar,
body.arzv2-modal-open .arzv2-breadcrumb,
body.arzv2-modal-open .arzv2-mobile-cats-grid {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
}
/* ============================================================ */
/* ====== مودال تأیید حذف ====== */
/* ============================================================ */

.arzv2-confirm-overlay {
    z-index: 999999 !important;
}

.arzv2-confirm-box {
    background: white;
    border-radius: 16px;
    padding: 25px 20px;
    width: 100%;
    max-width: 380px;
    margin: 20px;
    text-align: center;
    border: 3px solid #D4AF37;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: arzv2ConfirmIn 0.25s ease;
}

@keyframes arzv2ConfirmIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.arzv2-confirm-icon {
    font-size: 45px;
    margin-bottom: 10px;
    line-height: 1;
}

.arzv2-confirm-title {
    color: #5D1A2E;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px;
}

.arzv2-confirm-text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.arzv2-confirm-text strong {
    color: #5D1A2E;
    font-weight: 700;
}

.arzv2-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.arzv2-confirm-actions .arzv2-btn {
    flex: 1;
    min-width: 130px;
    padding: 12px 16px;
    font-size: 13px;
}

.arzv2-btn-danger {
    background: linear-gradient(135deg, #dc3545, #a71d2a) !important;
    border-color: #dc3545 !important;
}

.arzv2-btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #8b1a1a) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4) !important;
}
/* ============================================================ */
/* ====== Toast نمایش همه محصولات ====== */
/* ============================================================ */

.arzv2-all-products-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 9999;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid #fff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

.arzv2-all-products-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.arzv2-all-products-toast:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(39, 174, 96, 0.6);
}

.arzv2-all-products-toast:active {
    transform: translateX(-50%) translateY(0) scale(0.98);
}

.arzv2-toast-icon {
    font-size: 18px;
    line-height: 1;
}

.arzv2-toast-text {
    line-height: 1;
}

/* موبایل: فاصله از پایین بیشتر (برای Bottom Nav) */
@media (max-width: 768px) {
    .arzv2-all-products-toast {
        bottom: 150px;
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* وقتی مودال فاکتور بازه، Toast هم مخفی بشه */
    body.arzv2-modal-open .arzv2-all-products-toast {
        opacity: 0 !important;
        pointer-events: none !important;
    }
}
/* ====== زیردسته‌ها در سایدبار ====== */
.arzv2-cat-item.arzv2-cat-child {
    background: #fafafa;
    border-right: 3px solid #e0e0e0;
    margin-right: 10px;
    border-radius: 0 8px 8px 0;
}
.arzv2-cat-item.arzv2-cat-child:hover {
    background: #f0f0f0;
    border-right-color: #D4AF37;
}
.arzv2-cat-item.arzv2-cat-child.active {
    background: #5D1A2E;
    color: white;
    border-right-color: #D4AF37;
}
.arzv2-cat-item.arzv2-cat-parent {
    font-weight: 700;
    margin-top: 4px;
}
/* ============================================================ */
/* ====== جلوگیری از اسکرول افقی و بیرون‌زدگی در موبایل ====== */
/* ============================================================ */

/* جلوگیری از اسکرول افقی کل صفحه */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* wrap اصلی */
.arzv2-wrap {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* body اصلی */
.arzv2-body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* main داخل body */
.arzv2-body > main {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* grid محصولات */
.arzv2-products-grid {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* کارت محصول */
.arzv2-card {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* محتوای کارت */
.arzv2-card-content {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* عنوان محصول - متن طولانی رو بشکنه */
.arzv2-title {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* ============================================================ */
/* ====== فاکتور: جلوگیری از بیرون‌زدگی ====== */
/* ============================================================ */

.arzv2-sheet {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.arzv2-sheet-body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.arzv2-invoice-section {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.arzv2-invoice-items {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.arzv2-invoice-item {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.arzv2-invoice-item .info {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.arzv2-invoice-item .name {
    max-width: 100% !important;
    word-wrap: break-word !important;
}

/* ============================================================ */
/* ====== Sticky Bar: جلوگیری از بیرون‌زدگی در موبایل ====== */
/* ============================================================ */

@media (max-width: 768px) {
    .arzv2-sticky-cart-bar {
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        box-sizing: border-box !important;
    }
    
    .arzv2-sticky-cart-bar.show {
        transform: translateY(0) !important;
    }
    
    /* کارت محصول در موبایل */
    .arzv2-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    /* سایدبار در موبایل مخفی */
    .arzv2-sidebar {
        max-width: 100% !important;
    }
    
    /* toolbar */
    .arzv2-toolbar {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .arzv2-sort-group {
        max-width: 100% !important;
    }
    
    /* نوتیفیکیشن */
    .arzv2-wrap > div[style*="margin:12px 20px"] {
        margin-left: 10px !important;
        margin-right: 10px !important;
        max-width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
    }
    
    /* حداقل مبلغ */
    main > div[style*="background:#fff9e6"] {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ============================================================ */
/* ====== دسکتاپ: محدود کردن عرض ====== */
/* ============================================================ */

@media (min-width: 901px) {
    .arzv2-products-grid {
        max-width: 100% !important;
    }
}
/* ============================================================ */
/* ====== نمای لیستی: چیدمان جدید (عکس + محتوا + کنترل سمت راست) ====== */
/* ============================================================ */

/* کارت لیستی: عکس سمت راست، محتوا وسط، کنترل‌ها سمت چپ... 
   ولی چون RTL هستیم، عکس راست و کنترل‌ها چپ دیده میشن.
   برای اینکه کنترل‌ها بیان زیر عکس، از flex-direction: column استفاده می‌کنیم 
   توی یه ستون کنار عکس */

/* دسکتاپ - نمای لیستی */
.arzv2-products-grid.list-view .arzv2-card {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 12px !important;
}

/* عکس محصول - ثابت بمونه */
.arzv2-products-grid.list-view .arzv2-img-box {
    width: 100px !important;
    height: 100px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* محتوای وسط */
.arzv2-products-grid.list-view .arzv2-card-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
    justify-content: center !important;
}

/* بخش کنترل تعداد: بره سمت راست کارت (یعنی آخرین آیتم flex، توی RTL میشه سمت چپ)
   برای اینکه بیاد زیر عکس یا کنارش، یه ستون جدا می‌سازیم */

/* ====== تنظیمات دکمه‌های +/- توی نمای لیستی ====== */

/* دسکتاپ */
.arzv2-products-grid.list-view .arzv2-qty-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    /* فاصله از محتوای وسط */
    margin-left: auto !important;
    padding-right: 0 !important;
}

.arzv2-products-grid.list-view .arzv2-qty-controls {
    gap: 12px !important;
}

.arzv2-products-grid.list-view .arzv2-qty-btn {
    width: 44px !important;
    height: 42px !important;
    font-size: 20px !important;
    border-radius: 10px !important;
}

.arzv2-products-grid.list-view .arzv2-qty-input {
    width: 60px !important;
    padding: 8px 4px !important;
    font-size: 16px !important;
}

/* موبایل - نمای لیستی */
@media (max-width: 768px) {
    .arzv2-products-grid.list-view .arzv2-card {
        gap: 10px !important;
        padding: 10px !important;
    }
    
    .arzv2-products-grid.list-view .arzv2-img-box {
        width: 80px !important;
        height: 80px !important;
    }
    
    .arzv2-products-grid.list-view .arzv2-qty-section {
        align-self: center !important;
    }
    
    .arzv2-products-grid.list-view .arzv2-qty-controls {
        gap: 8px !important;
    }
    
    .arzv2-products-grid.list-view .arzv2-qty-btn {
        width: 38px !important;
        height: 36px !important;
        font-size: 18px !important;
        border-radius: 9px !important;
    }
    
    .arzv2-products-grid.list-view .arzv2-qty-input {
        width: 50px !important;
        padding: 6px 3px !important;
        font-size: 15px !important;
    }
}
/* ============================================================ */
/* ====== دکمه‌ی «افزودن» سبز (حالت اول کارت) ====== */
/* ============================================================ */

.arzv2-add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 12px rgba(46, 204, 113, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.arzv2-add-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

.arzv2-add-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.4);
}

.arzv2-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* آیکون + بزرگ‌تر و بولدتر */
.arzv2-add-btn .arzv2-add-icon {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding-bottom: 2px;
}

/* متن افزودن */
.arzv2-add-btn .arzv2-add-text {
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* ============================================================ */
/* ====== انیمیشن تبدیل بین دو حالت ====== */
/* ============================================================ */

/* حالت دوم (کنترل تعداد) وقتی ظاهر میشه */
.arzv2-qty-controls.arzv2-show-controls {
    animation: arzv2FadeScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes arzv2FadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================ */
/* ====== نمایش صحیح توی نمای Grid و List ====== */
/* ============================================================ */

/* نمای Grid دسکتاپ */
.arzv2-products-grid:not(.list-view) .arzv2-add-btn {
    margin-top: auto;
    min-height: 42px;
}

/* نمای List دسکتاپ */
.arzv2-products-grid.list-view .arzv2-add-btn {
    min-width: 140px;
    max-width: 200px;
    min-height: 44px;
}

/* نمای Grid موبایل */
@media (max-width: 768px) {
    .arzv2-products-grid:not(.list-view) .arzv2-add-btn {
        min-height: 40px;
        font-size: 13px;
        padding: 9px 14px;
    }
    
    .arzv2-add-btn .arzv2-add-icon {
        font-size: 18px;
        width: 20px;
        height: 20px;
    }
    
    .arzv2-add-btn .arzv2-add-text {
        font-size: 13px;
    }
}

/* نمای List موبایل */
@media (max-width: 768px) {
    .arzv2-products-grid.list-view .arzv2-add-btn {
        min-width: 110px;
        max-width: 130px;
        min-height: 38px;
        font-size: 12px;
        padding: 8px 10px;
        gap: 5px;
    }
    
    .arzv2-products-grid.list-view .arzv2-add-btn .arzv2-add-icon {
        font-size: 16px;
        width: 18px;
        height: 18px;
    }
    
    .arzv2-products-grid.list-view .arzv2-add-btn .arzv2-add-text {
        font-size: 12px;
    }
}
.arzv2-add-btn.arzv2-clicked {
    animation: arzv2Pulse 0.3s ease;
}

@keyframes arzv2Pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(46, 204, 113, 0.2); }
    100% { transform: scale(1); }
}
/* ============================================================ */
/* ====== گرید دسته‌بندی موبایل و تبلت (شبه‌آجری) ====== */
/* ============================================================ */

/* مخفی کردن توی دسکتاپ — فقط موبایل و تبلت */
/* ============================================================ */
/* ====== نوار دسته‌بندی اسکرولی (فقط موبایل و تبلت) ====== */
/* ============================================================ */

/* توی دسکتاپ کاملاً مخفی */
.arzv2-cats-scroll {
    display: none;
}

/* نمایش فقط توی موبایل و تبلت */
@media (max-width: 1024px) {
    .arzv2-cats-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px 12px;
        margin-bottom: 12px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .arzv2-cats-scroll::-webkit-scrollbar {
        display: none;
    }
}

/* ====== چیپ دسته‌بندی ====== */
.arzv2-cat-chip {
    flex-shrink: 0;
    white-space: nowrap;
    
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 16px;
    
    color: #1A1A1A;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(93, 26, 46, 0.06);
    
    -webkit-tap-highlight-color: transparent;
}

/* چیپ دسته اصلی */
.arzv2-cat-chip-parent {
    background: linear-gradient(135deg, #ffffff, #fdf9f5);
    border-color: #D4AF37;
    color: #5D1A2E;
}

/* چیپ زیردسته */
.arzv2-cat-chip-child {
    background: #fafafa;
    border-color: #e0e0e0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
}

/* ====== hover ====== */
@media (hover: hover) {
    .arzv2-cat-chip:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(93, 26, 46, 0.15);
        border-color: #D4AF37;
    }
    .arzv2-cat-chip-child:hover {
        background: #f5f5f5;
    }
}

/* ====== حالت فعال (کلیک‌شده) ====== */
.arzv2-cat-chip.active {
    background: linear-gradient(135deg, #5D1A2E, #a00028);
    color: white;
    border-color: #D4AF37;
    box-shadow: 0 4px 14px rgba(93, 26, 46, 0.3);
    transform: translateY(-1px);
}

.arzv2-cat-chip-child.active {
    background: linear-gradient(135deg, #5D1A2E, #a00028);
    color: white;
    border-color: #D4AF37;
    font-weight: 700;
}

/* ====== حالت کلیک (tap) ====== */
.arzv2-cat-chip:active {
    transform: scale(0.97);
}

/* ====== focus برای دسترسی‌پذیری ====== */
.arzv2-cat-chip:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* ====== وقتی مودال بازه، نوار مخفی بشه ====== */
body.arzv2-modal-open .arzv2-cats-scroll {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .arzv2-cat-chip {
        padding: 7px 14px;
        font-size: 12px;
    }
    .arzv2-cat-chip-child {
        padding: 6px 12px;
        font-size: 11px;
    }
    .arzv2-cats-scroll {
        padding: 8px 10px;
        gap: 6px;
    }
}
/* ============================================================ */
/* ====== فرم مشتری: فاصله‌گذاری بهتر ====== */
/* ============================================================ */

/* فاصله‌ی مناسب بین input های فرم مشتری */
.arzv2-customer-box .arzv2-input {
    margin-bottom: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
}

/* فاصله‌ی بین آخرین input و دکمه */
.arzv2-customer-box .arzv2-btn {
    margin-top: 8px;
    padding: 14px 20px;
    font-size: 14px;
    line-height: 1.45;
}
/* ============================================================ */
/* ====== نوار نوتیفیکیشن (قابل بستن + چند خطی + لینک) ====== */
/* ============================================================ */

.arzv2-notification-bar {
    position: relative;
    background: linear-gradient(135deg, #800020, #a00028);
    color: #ffffff;
    padding: 14px 48px 14px 20px;
    margin: 12px 20px;
    border-radius: 10px;
    border: 2px solid #D4AF37;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.65;
    box-shadow: 0 3px 12px rgba(128, 0, 32, 0.2);
    animation: arzv2NotifSlideIn 0.4s ease;
}

@keyframes arzv2NotifSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.arzv2-notification-bar.arzv2-notif-hidden {
    display: none !important;
}

/* محتوا: وسط‌چین + حفظ فاصله‌های خط */
.arzv2-notification-content {
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0;
}

/* لینک‌های داخل نوتیفیکیشن */
.arzv2-notification-content a {
    color: #FFD700;
    text-decoration: underline;
    font-weight: 700;
    transition: color 0.2s;
}

.arzv2-notification-content a:hover {
    color: #FFF59D;
    text-decoration: underline;
}

/* استایل برجسته‌سازی */
.arzv2-notification-content strong,
.arzv2-notification-content b {
    color: #FFD700;
    font-weight: 800;
}

.arzv2-notification-content em,
.arzv2-notification-content i {
    font-style: italic;
    color: #FFF9C4;
}

/* دکمه بستن */
.arzv2-notification-close {
    position: absolute;
    top: 50%;
    left: 12px;              /* RTL: سمت چپ */
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
    padding: 0;
}

.arzv2-notification-close:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: translateY(-50%) scale(1.1) rotate(90deg);
}

.arzv2-notification-close:active {
    transform: translateY(-50%) scale(0.95);
}

/* موبایل */
@media (max-width: 768px) {
    .arzv2-notification-bar {
        margin: 10px 12px;
        padding: 12px 44px 12px 14px;
        font-size: 12px;
        line-height: 1.55;
        border-radius: 8px;
    }
    .arzv2-notification-close {
        width: 26px;
        height: 26px;
        font-size: 13px;
        left: 10px;
    }
}
/* ============================================================ */
/* ====== کادر قیمت روز (برای محصولات استعلامی) ====== */
/* ============================================================ */
/* ============================================================ */
/* ====== کادر قیمت روز (هم‌ارتفاع با price-row عادی) ====== */
/* ============================================================ */

.arzv2-quote-box {
    /* ارتفاع ثابت و هم‌سطح با price-row عادی */
    min-height: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 4px 8px;
    margin: 0 0 8px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.12);
    box-sizing: border-box;
    overflow: hidden;
}

.arzv2-quote-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.arzv2-quote-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.arzv2-quote-label {
    font-size: 12px;
    font-weight: 800;
    color: #0d47a1;
    letter-spacing: 0.2px;
    line-height: 1.15;
    white-space: nowrap;
}

.arzv2-quote-text {
    font-size: 9px;
    font-weight: 600;
    color: #1565c0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* موبایل — سایز کمی کوچیک‌تر ولی همون ارتفاع */
@media (max-width: 768px) {
    .arzv2-quote-box {
        min-height: 44px;
        height: 44px;
        padding: 3px 6px;
        gap: 5px;
    }
    .arzv2-quote-icon {
        font-size: 14px;
    }
    .arzv2-quote-label {
        font-size: 11px;
    }
    .arzv2-quote-text {
        font-size: 8.5px;
    }
}
/* ============================================================ */
/* ====== فاکتور: آیتم استعلامی ====== */
/* ============================================================ */

.arzv2-invoice-item-quote {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border: 2px solid #90caf9 !important;
}

.arzv2-quote-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0;
}

.arzv2-quote-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    align-self: flex-start;
    letter-spacing: 0.3px;
}

.arzv2-quote-note {
    font-size: 11px;
    color: #1565c0;
    font-weight: 600;
}

.arzv2-row-total-quote {
    color: #1976d2 !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

/* ============================================================ */
/* ====== کادر زرد هشدار اقلام استعلامی ====== */
/* ============================================================ */

.arzv2-quote-warning {
    background: linear-gradient(135deg, #fff9db, #ffe066);
    border: 2px solid #ffc107;
    border-right: 5px solid #f39c12;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    color: #7a4f00;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.15);
}

.arzv2-quote-warning strong {
    color: #5d3800;
}

/* موبایل */
@media (max-width: 768px) {
    .arzv2-quote-warning {
        padding: 10px 12px;
        font-size: 11px;
    }
    .arzv2-quote-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
    .arzv2-quote-note {
        font-size: 10px;
    }
}