/* ==========================================================================
   Checkout Custom Styles - Lebasino Theme
   ========================================================================== */

/* 1. کارت‌های اصلی بخش‌های تسویه حساب */
.account-section.shadow-around {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    padding: 24px;
    transition: box-shadow 0.3s ease;
}

.account-section.shadow-around:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.checkout-section-content h3,
.woocommerce-billing-fields>h3,
.woocommerce-shipping-fields>h3,
.woocommerce-additional-fields>h3 {
    font-size: 17px;
    font-weight: 700;
    color: #242B3D;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

/* 2. بخش کد تخفیف */
.coupon-section {
    background: #f8fafc;
    border: 1px dashed rgba(var(--border-color-rgb, 78, 83, 100), 0.22);
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.25s ease;
}

.coupon-section:hover {
    background: rgba(var(--primary-color-rgb, 200, 59, 59), 0.02);
    border-color: rgba(var(--primary-color-rgb, 200, 59, 59), 0.35);
}

.coupon-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
}

.coupon-toggle .color-primary {
    color: var(--primary-color, #c83b3b);
}

.coupon-toggle .toggle-coupon-icon {
    color: #94a3b8;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.coupon-toggle.active .toggle-coupon-icon {
    transform: rotate(180deg);
    color: var(--primary-color, #c83b3b);
}

.coupon-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

.checkout-coupon {
    display: flex;
    gap: 8px;
    align-items: center;
}

.checkout-coupon input[type="text"] {
    flex: 1;
    height: 38px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    font-size: 12.5px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-coupon input[type="text"]:focus {
    border-color: var(--primary-color, #c83b3b);
    box-shadow: 0 0 0 3px rgba(200, 59, 59, 0.12);
}

.checkout-coupon button.btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12.5px;
    background: var(--primary-color, #c83b3b);
    border: none;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.checkout-coupon button.btn:hover {
    background: var(--primary-dark, #a82e2e);
}

.checkout-coupon button.btn:hover {
    background: var(--primary-dark, #a82e2e);
}

/* 3. فیلدهای مشخصات خریدار و آدرس (Form Fields) */
.woocommerce form.checkout .form-row {
    margin-bottom: 16px;
    padding: 0;
}

.woocommerce form.checkout .form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}

.woocommerce form.checkout .form-row label .required {
    color: #ef4444;
    text-decoration: none;
    font-weight: bold;
    margin-right: 2px;
}

.woocommerce form.checkout .form-row input.input-text,
.woocommerce form.checkout .form-row textarea,
.woocommerce form.checkout .form-row select,
.woocommerce form.checkout .select2-container--default .select2-selection--single {
    width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 14px;
    color: #1e293b;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.woocommerce form.checkout .form-row input.input-text:focus,
.woocommerce form.checkout .form-row textarea:focus,
.woocommerce form.checkout .form-row select:focus {
    border-color: var(--primary-color, #c83b3b);
    box-shadow: 0 0 0 3px rgba(200, 59, 59, 0.12);
    outline: none;
}

.woocommerce form.checkout textarea#billing_address_1 {
    height: 90px;
    min-height: 90px;
    resize: vertical;
}

.woocommerce form.checkout textarea#order_comments {
    min-height: 180px;
    resize: vertical;
    border-radius: 10px;
}

/* هماهنگی Select2 استان و شهر */
.woocommerce form.checkout .select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    height: 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
}

.woocommerce form.checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-right: 10px;
    padding-left: 20px;
    color: #1e293b;
}

.woocommerce form.checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    left: 10px;
    right: auto;
}

.woocommerce form.checkout .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color, #c83b3b);
    box-shadow: 0 0 0 3px rgba(200, 59, 59, 0.12);
}

/* بخش چک‌باکس حمل به آدرس دیگر */
#ship-to-different-address {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

#ship-to-different-address input[type="checkbox"] {
    margin-left: 8px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color, #c83b3b);
    cursor: pointer;
}

#ship-to-different-address span {
    color: #334155;
    font-size: 14.5px;
    font-weight: 600;
}

/* ==========================================================================
   4. بخش انتخاب روش‌های پرداخت (List Layout - کارت‌های افقی مدرن)
   ========================================================================== */
#payment.woocommerce-checkout-payment {
    background: transparent;
    padding: 0;
    border: none;
    margin: 0;
}

#payment h3.payment-title,
.payment-section h3.payment-main-heading {
    font-size: 17px;
    font-weight: 700;
    color: #242B3D;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

/* لیست متدهای پرداخت */
#payment ul.payment_methods,
#payment ul.wc_payment_methods {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* هر آیتم روش پرداخت */
#payment ul.payment_methods li.wc_payment_method {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.25s ease;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#payment ul.payment_methods li.wc_payment_method:hover {
    border-color: rgba(var(--primary-color-rgb, 200, 59, 59), 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* حالت انتخاب‌شده */
#payment ul.payment_methods li.wc_payment_method.payment_method_selected,
#payment ul.payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
    border-color: var(--primary-color, #c83b3b);
    background: rgba(var(--primary-color-rgb, 200, 59, 59), 0.015);
    box-shadow: 0 4px 16px rgba(var(--primary-color-rgb, 200, 59, 59), 0.08);
}

/* هدر کارت روش پرداخت */
#payment .payment-method-header {
    padding: 14px 18px;
    cursor: pointer;
}

#payment .payment-method-label {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

/* دکمه رادیویی سفارشی */
#payment .custom-radio-indicator {
    position: relative;
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#payment .custom-radio-indicator input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

#payment .custom-radio-indicator .radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    transition: all 0.2s ease;
    display: block;
    box-sizing: border-box;
}

#payment ul.payment_methods li.payment_method_selected .custom-radio-indicator .radio-circle,
#payment ul.payment_methods li input[type="radio"]:checked+.radio-circle {
    border-color: var(--primary-color, #c83b3b);
    background: var(--primary-color, #c83b3b);
    box-shadow: inset 0 0 0 4px #ffffff;
}

/* آیکون درگاه پرداخت */
#payment .payment-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: rgba(var(--border-color-rgb, 78, 83, 100), 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 20px;
    transition: all 0.25s ease;
}

#payment .payment-icon img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

#payment ul.payment_methods li.payment_method_selected .payment-icon {
    background: rgba(var(--primary-color-rgb, 200, 59, 59), 0.1);
    color: var(--primary-color, #c83b3b);
}

/* عنوان درگاه پرداخت */
#payment .payment-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    flex-grow: 1;
    margin: 0;
}

/* کادر توضیحات و فیلدهای درگاه */
.woocommerce-checkout #payment div.payment_box,
#payment div.payment_box,
#payment .payment_box {
    margin: 0 18px 16px 18px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 12.5px !important;
    line-height: 1.7 !important;
    color: #475569 !important;
    position: relative !important;
    box-shadow: none !important;
    animation: fadeInPaymentBox 0.25s ease !important;
    width: auto !important;
}

.woocommerce-checkout #payment div.payment_box::before,
.woocommerce-checkout #payment div.payment_box::after,
#payment div.payment_box::before,
#payment div.payment_box::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

#payment .payment_box p:last-child {
    margin-bottom: 0;
}

@keyframes fadeInPaymentBox {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   5. بخش خلاصه سفارش (Order Review Section)
   ========================================================================== */
.order-review-section {
    position: sticky;
    top: 20px;
}

/* لیست آیتم‌های محصول در خلاصه سفارش */
.woocommerce-checkout-review-order-modern .cart-item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
}

.woocommerce-checkout-review-order-modern .cart-item-card:hover {
    border-color: #cbd5e1;
}

.woocommerce-checkout-review-order-modern .cart-item-thumb {
    width: 44px;
    height: 50px;
    min-width: 44px;
    border-radius: 7px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

.woocommerce-checkout-review-order-modern .cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.woocommerce-checkout-review-order-modern .cart-item-details {
    flex: 1;
    min-width: 0;
}

.woocommerce-checkout-review-order-modern .product-name a {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.woocommerce-checkout-review-order-modern .product-name a:hover {
    color: var(--primary-color, #c83b3b);
}

.woocommerce-checkout-review-order-modern .product-meta-row {
    margin-top: 3px;
    font-size: 12px;
}

.woocommerce-checkout-review-order-modern .product-meta {
    font-size: 11.5px;
    color: var(--text-muted, #6c757d);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.woocommerce-checkout-review-order-modern .product-meta dl.variation {
    display: inline-flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.woocommerce-checkout-review-order-modern .product-meta dl.variation dt,
.woocommerce-checkout-review-order-modern .product-meta dl.variation dd,
.woocommerce-checkout-review-order-modern .product-meta dl.variation dd p {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: 11.5px;
}

.woocommerce-checkout-review-order-modern .product-quantity-badge {
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 1px 6px;
    border-radius: 12px;
}

.woocommerce-checkout-review-order-modern .product-subtotal-price {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-color, #242B3D);
    white-space: nowrap;
}

/* سطرهای مبالغ سفارش */
.woocommerce-checkout-review-order-modern .cart-subtotal,
.woocommerce-checkout-review-order-modern .cart-fee,
.woocommerce-checkout-review-order-modern .cart-tax,
.woocommerce-checkout-review-order-modern .order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13.5px;
    color: #475569;
}

.woocommerce-checkout-review-order-modern .cart-subtotal .product-price {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-color, #242B3D);
}

.woocommerce-checkout-review-order-modern .cart-shipping-wrapper {
    width: 100%;
    padding: 4px 0;
}

.woocommerce-checkout-review-order-modern .cart-shipping-wrapper .woocommerce-shipping-totals {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-checkout-review-order-modern .cart-shipping-wrapper .shipping-method-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 13.5px !important;
}

.woocommerce-checkout-review-order-modern .cart-shipping-wrapper .shipping-title {
    color: var(--text-muted, #6c757d);
    font-size: 13.5px;
    white-space: nowrap;
}

.woocommerce-checkout-review-order-modern .cart-shipping-wrapper .shipping-cost {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color, #242B3D);
}

.woocommerce-checkout-review-order-modern .cart-shipping-wrapper .shipping-cost.free_shipping,
.woocommerce-checkout-review-order-modern .cart-shipping-wrapper .shipping-cost[class*="free_shipping"] {
    color: var(--success-color, #10b981);
}

.woocommerce-checkout-review-order-modern .lbn-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0;
}

.woocommerce-checkout-review-order-modern .order-total {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    padding-top: 10px;
}

.woocommerce-checkout-review-order-modern .order-total .font-weight-bold {
    color: var(--primary-color, #c83b3b);
    font-size: 17px;
    font-weight: 700;
}

/* 6. دکمه پرداخت نهایی */
.btn-payment {
    background: var(--primary-color, #c83b3b) !important;
    border-color: var(--primary-color, #c83b3b) !important;
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(var(--primary-color-rgb, 200, 59, 59), 0.25);
    transition: all 0.25s ease;
}

.btn-payment:hover {
    background: var(--primary-dark, #a82e2e) !important;
    border-color: var(--primary-dark, #a82e2e) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--primary-color-rgb, 200, 59, 59), 0.35);
}

.btn-payment:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   7. حالت ریسپانسیو (Responsive)
   ========================================================================== */
/* ==========================================================================
   8. استایل‌های مدرن صفحه سبد خرید (Cart Page - Lebasino Theme)
   ========================================================================== */

/* چیدمان ۲ ستونه سبد خرید */
.cart-wrapper-grid {
    margin-bottom: 40px;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* کارت هر آیتم در سبد خرید */
.woocommerce-cart-form__cart-item.cart_item.shadow-around {
    background: #ffffff;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    border-radius: var(--radius-inner, 14px);
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 90px 1fr auto auto auto 40px;
    gap: 20px;
    align-items: center;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.woocommerce-cart-form__cart-item.cart_item:hover {
    border-color: rgba(var(--primary-color-rgb, 200, 59, 59), 0.35);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb, 200, 59, 59), 0.06);
    transform: translateY(-1px);
}

/* تصویر محصول */
.cart-items-container .product-thumbnail {
    width: 90px;
    height: 105px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

.cart-items-container .product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.woocommerce-cart-form__cart-item.cart_item:hover .product-thumbnail img {
    transform: scale(1.05);
}

/* عنوان و متادیتا */
.cart-items-container .product-name {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-items-container .product-name a.product-title-link,
.cart-items-container .product-name a {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color, #242B3D);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.cart-items-container .product-name a:hover {
    color: var(--primary-color, #c83b3b);
}

.cart-items-container .product-item-meta {
    font-size: 12px;
    color: var(--text-muted, #6c757d);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cart-items-container .product-item-meta p {
    margin: 0;
    background: rgba(var(--border-color-rgb, 78, 83, 100), 0.07);
    padding: 2px 10px;
    border-radius: 20px;
}

/* ستون قیمت واحد */
.cart-items-container .product-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 95px;
}

.cart-items-container .product-price .price-label {
    font-size: 11.5px;
    color: var(--text-muted, #6c757d);
    margin-bottom: 2px;
}

.cart-items-container .product-price .amount {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}

/* استپر تعداد (.qty-wrapper) */
.cart-items-container .qty-wrapper {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.2);
    border-radius: 10px;
    padding: 2px;
    transition: border-color 0.2s ease;
}

.cart-items-container .qty-wrapper:focus-within {
    border-color: var(--primary-color, #c83b3b);
}

.cart-items-container .qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cart-items-container .qty-btn:hover:not(:disabled) {
    background: var(--primary-color, #c83b3b);
    color: #ffffff;
}

.cart-items-container .qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cart-items-container .qty-input {
    width: 38px;
    height: 32px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color, #242B3D);
    outline: none;
}

/* ستون جمع جزء */
.cart-items-container .product-subtotal {
    min-width: 110px;
    text-align: left;
}

.cart-items-container .product-subtotal .amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-color, #242B3D);
}

/* دکمه حذف کالا */
.cart-items-container .product-remove {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items-container .product-remove a.remove {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
}

.cart-items-container .product-remove a.remove:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    transform: scale(1.08);
}

/* نوار عملیات سبد خرید (.cart-actions-bar) */
.cart-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: var(--radius-inner, 14px);
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.cart-actions-bar .clear-cart-button {
    background: #f8fafc !important;
    border: 1px solid rgba(239, 68, 68, 0.28) !important;
    color: #ef4444 !important;
    padding: 9px 18px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    outline: none !important;
}

.cart-actions-bar .clear-cart-button i {
    font-size: 13.5px;
    transition: transform 0.2s ease;
}

.cart-actions-bar .clear-cart-button:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28) !important;
    transform: translateY(-1px);
}

.cart-actions-bar .clear-cart-button:hover i {
    transform: scale(1.15);
}

.cart-actions-bar .clear-cart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2) !important;
}

.cart-actions-bar .btn-continue-shopping {
    background: rgba(var(--primary-color-rgb, 200, 59, 59), 0.06);
    border: 1px solid rgba(var(--primary-color-rgb, 200, 59, 59), 0.22);
    color: var(--primary-color, #c83b3b);
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-actions-bar .btn-continue-shopping i {
    transition: transform 0.2s ease;
}

.cart-actions-bar .btn-continue-shopping:hover {
    background: var(--primary-color, #c83b3b);
    color: #ffffff;
    border-color: var(--primary-color, #c83b3b);
    box-shadow: 0 4px 14px rgba(var(--primary-color-rgb, 200, 59, 59), 0.25);
    transform: translateY(-1px);
}

.cart-actions-bar .btn-continue-shopping:hover i {
    transform: translateX(-3px);
}

/* محصولات مکمل پیشنهادی (Cross-Sells) */
.cross-sells-container {
    background: #ffffff;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    border-radius: var(--radius-main, 18px);
    padding: 24px;
}

.cross-sells-heading {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-color, #242B3D);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
}

.cross-sells-heading i {
    color: var(--primary-color, #c83b3b);
}

.cross-sell-grid-item .product-card {
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    border-radius: 14px;
    padding: 12px;
    transition: all 0.25s ease;
    background: #ffffff;
    height: 100%;
}

.cross-sell-grid-item .product-card:hover {
    border-color: rgba(var(--primary-color-rgb, 200, 59, 59), 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ==========================================================================
   9. سایدبار فاکتور سبد خرید (.cart_totals)
   ========================================================================== */
.cart-summary-sidebar .cart_totals {
    background: #ffffff;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    border-radius: var(--radius-main, 18px);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.cart-totals-heading {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-color, #242B3D);
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* نوار پیشرفت ارسال رایگان */
.free-shipping-progress {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.free-shipping-progress .progress-header {
    font-size: 12.5px;
    font-weight: 600;
    color: #166534;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.free-shipping-progress .progress-percent-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
}

.free-shipping-progress .progress-bar-track {
    height: 6px;
    background: #dcfce7;
    border-radius: 10px;
    overflow: hidden;
}

.free-shipping-progress .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 10px;
    transition: width 0.35s ease;
}

/* کادر کد تخفیف در سایدبار */
.coupon-totals-wrapper {
    background: rgba(var(--border-color-rgb, 78, 83, 100), 0.05);
    border: 1px dashed rgba(var(--border-color-rgb, 78, 83, 100), 0.25);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 18px;
}

.coupon-totals-wrapper .coupon-header-text {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coupon-totals-wrapper .coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-totals-wrapper .coupon-input-group input.input-text {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.25);
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease;
}

.coupon-totals-wrapper .coupon-input-group input.input-text:focus {
    border-color: var(--primary-color, #c83b3b);
}

.coupon-totals-wrapper .coupon-input-group button.btn-apply-coupon {
    height: 38px;
    padding: 0 16px;
    background: #334155;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.coupon-totals-wrapper .coupon-input-group button.btn-apply-coupon:hover {
    background: #0f172a;
}

/* سطرهای مبالغ در سایدبار */
.cart_totals .cart-subtotal,
.cart_totals .cart-discount,
.cart_totals .fee,
.cart_totals .tax-rate,
.cart_totals .tax-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13.5px;
    color: var(--text-muted, #6c757d);
}

.cart_totals .cart-subtotal span:last-child {
    font-weight: 700;
    color: var(--text-color, #242B3D);
}

.cart_totals .cart-discount .discount-val {
    color: var(--success-color, #10b981);
    font-weight: 700;
}

/* بخش حمل و نقل و ماشین حساب */
.cart_totals .woocommerce-shipping-totals {
    padding: 12px 0;
    border-top: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
    border-bottom: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
    margin: 12px 0;
}

.cart_totals .shipping-method-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.cart_totals .shipping-method-header-row .shipping-title {
    color: var(--text-muted, #6c757d);
    font-size: 13.5px;
}

.cart_totals .shipping-method-header-row .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.cart_totals .shipping-method-header-row .woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
}

.cart_totals .shipping-method-header-row .shipping-cost {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color, #242B3D);
    cursor: pointer;
}

.cart_totals .shipping-method-header-row .shipping-cost.free_shipping,
.cart_totals .shipping-method-header-row .shipping-cost[class*="free_shipping"],
.cart_totals .shipping-method-header-row .shipping-cost.free_shipping3 {
    color: var(--success-color, #10b981);
}

/* باکس مقصد و دکمه تغییر آدرس */
.cart_totals .shipping-destination-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 9px;
    border: 1px dashed rgba(var(--border-color-rgb, 78, 83, 100), 0.18);
}

.cart_totals .shipping-destination-box .destination-text {
    font-size: 11.5px;
    color: var(--text-muted, #6c757d);
    line-height: 1.5;
    flex: 1;
}

.cart_totals .shipping-destination-box .destination-address {
    color: #334155;
    font-weight: 600;
}

.cart_totals .shipping-destination-box .shipping-calculator-button {
    color: var(--primary-color, #c83b3b);
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid rgba(var(--primary-color-rgb, 200, 59, 59), 0.22);
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cart_totals .shipping-destination-box .shipping-calculator-button:hover {
    background: var(--primary-color, #c83b3b);
    color: #ffffff;
    border-color: var(--primary-color, #c83b3b);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(var(--primary-color-rgb, 200, 59, 59), 0.25);
}

.cart_totals .shipping-calculator-form {
    background: #f8fafc;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.15);
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
    animation: fadeInCalc 0.25s ease;
}

.cart_totals .shipping-calculator-form p {
    margin-bottom: 10px;
}

.cart_totals .shipping-calculator-form label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 3px;
}

.cart_totals .shipping-calculator-form select,
.cart_totals .shipping-calculator-form input.input-text {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.2);
    border-radius: 7px;
    background: #ffffff;
    font-size: 12.5px;
    color: #1e293b;
    outline: none;
}

.cart_totals .shipping-calculator-form button[type="submit"] {
    background: var(--primary-color, #c83b3b);
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart_totals .shipping-calculator-form button[type="submit"]:hover {
    background: var(--primary-dark, #a82e2e);
}

/* وضعیت در حال آپدیت سبد خرید */
.cart-updating-overlay {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

/* مبلغ کل و دکمه پرداخت */
.cart_totals .order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 18px 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-color, #242B3D);
}

.cart_totals .order-total .total-amount {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary-color, #c83b3b);
}

.cart_totals .wc-proceed-to-checkout a.checkout-button {
    width: 100%;
    height: 52px;
    background: var(--primary-color, #c83b3b) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(var(--primary-color-rgb, 200, 59, 59), 0.28);
    transition: all 0.25s ease;
}

.cart_totals .wc-proceed-to-checkout a.checkout-button:hover {
    background: var(--primary-dark, #a82e2e) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(var(--primary-color-rgb, 200, 59, 59), 0.38);
}

/* ریست متن‌های پیش‌فرض قبل از قیمت و ساب‌توتال */
.cart-items-container .product-price:before,
.cart-items-container .product-subtotal:before,
.cart-items-container .product-quantity:before {
    content: none !important;
    display: none !important;
}

/* نشان‌های اعتمادساز (Trust Badges) */
.cart_totals .trust-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    text-align: center;
}

.cart_totals .trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cart_totals .trust-item i {
    font-size: 18px;
    color: var(--primary-color, #c83b3b);
}

.cart_totals .trust-item img.trust-icon-img {
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
}

.cart_totals .trust-item span,
.cart_totals .trust-item .trust-title {
    font-size: 10px;
    color: var(--text-muted, #6c757d);
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 480px) {
    .cart_totals .trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 8px;
    }
}

/* ==========================================================================
   10. ریسپانسیو سبد خرید (Cart Responsive)
   ========================================================================== */
@media (max-width: 991px) {
    .cart-summary-sidebar {
        margin-top: 24px;
    }
}

@media (max-width: 640px) {
    .woocommerce-cart-form__cart-item.cart_item.shadow-around {
        grid-template-columns: 75px 1fr;
        gap: 12px;
        padding: 14px;
    }

    .cart-items-container .product-thumbnail {
        width: 75px;
        height: 90px;
    }

    .cart-items-container .product-price {
        display: none;
    }

    .cart-items-container .product-quantity {
        grid-column: 2;
        justify-self: start;
    }

    .cart-items-container .product-subtotal {
        grid-column: 2;
        justify-self: end;
        margin-top: -36px;
    }

    .cart-items-container .product-remove {
        position: absolute;
        top: 8px;
        left: 8px;
    }

    .cart-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-actions-bar .clear-cart-button,
    .cart-actions-bar .btn-continue-shopping {
        justify-content: center;
    }
}

/* ==========================================================================
   11. صفحه تشکر از خرید و رسید چاپی سفارش (Thank You & Invoice)
   ========================================================================== */
.thankyou-page-wrapper {
    padding: 10px 0 40px;
}

/* ── کارت هدر تبریک و موفقیت پرداخت ── */
.thankyou-page-wrapper .success-hero-card {
    background: #ffffff;
    border-radius: var(--radius-main, 18px);
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 35px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.thankyou-page-wrapper .success-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #10b981, #34d399, #059669);
}

.thankyou-page-wrapper .success-badge-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.05);
    animation: pulseGlowSuccess 2.2s infinite ease-in-out;
}

.thankyou-page-wrapper .success-badge-icon svg {
    width: 40px;
    height: 40px;
    stroke: #10b981;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes pulseGlowSuccess {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.05);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 16px rgba(16, 185, 129, 0.09);
    }
}

/* ── استایل‌های متغیر بر اساس وضعیت سفارش (Failed, Pending, Refunded) ── */
.thankyou-page-wrapper.thankyou-status-failed .success-hero-card::before {
    background: linear-gradient(90deg, #ef4444, #f87171, #dc2626);
}
.thankyou-page-wrapper.thankyou-status-failed .success-badge-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.05);
}

.thankyou-page-wrapper.thankyou-status-pending .success-hero-card::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #d97706);
}
.thankyou-page-wrapper.thankyou-status-pending .success-badge-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.05);
}

.thankyou-page-wrapper.thankyou-status-refunded .success-hero-card::before {
    background: linear-gradient(90deg, #6366f1, #818cf8, #4f46e5);
}
.thankyou-page-wrapper.thankyou-status-refunded .success-badge-icon {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0.05);
}

/* بج‌های وضعیت سفارش در سایدبار */
.thankyou-page-wrapper .status-pill-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.thankyou-page-wrapper .status-pill-badge.badge-status-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.thankyou-page-wrapper .status-pill-badge.badge-status-failed {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.thankyou-page-wrapper .status-pill-badge.badge-status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.thankyou-page-wrapper .status-pill-badge.badge-status-refunded {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

/* دکمه پرداخت مجدد / آنلاین */
.thankyou-page-wrapper .btn-pay-now-action {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.thankyou-page-wrapper.thankyou-status-failed .btn-pay-now-action {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.thankyou-page-wrapper .btn-pay-now-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* رنگ تگ وضعیت و واترمارک فاکتور */
.invoice-watermark.watermark-failed {
    color: rgba(239, 68, 68, 0.09) !important;
    border-color: rgba(239, 68, 68, 0.14) !important;
}
.invoice-watermark.watermark-pending {
    color: rgba(245, 158, 11, 0.09) !important;
    border-color: rgba(245, 158, 11, 0.14) !important;
}
.invoice-watermark.watermark-refunded {
    color: rgba(99, 102, 241, 0.09) !important;
    border-color: rgba(99, 102, 241, 0.14) !important;
}

.invoice-status-tag.status-tag-failed {
    color: #ef4444 !important;
    font-weight: bold;
}
.invoice-status-tag.status-tag-pending {
    color: #d97706 !important;
    font-weight: bold;
}
.invoice-status-tag.status-tag-success {
    color: #10b981 !important;
    font-weight: bold;
}

.thankyou-page-wrapper .success-hero-card h1 {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.thankyou-page-wrapper .success-hero-card p.subtitle {
    font-size: 14.5px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: 1.7;
}

/* نوار اطلاعات ۴ گانه هدر */
.thankyou-page-wrapper .order-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: #f8fafc;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
    border-radius: var(--radius-inner, 14px);
    padding: 16px 20px;
    text-align: right;
}

.thankyou-page-wrapper .overview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.thankyou-page-wrapper .overview-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
}

.thankyou-page-wrapper .overview-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: #ffffff;
    color: var(--primary-color, #c83b3b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.thankyou-page-wrapper .overview-content {
    display: flex;
    flex-direction: column;
}

.thankyou-page-wrapper .overview-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.thankyou-page-wrapper .overview-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.thankyou-page-wrapper .overview-value.highlight-price {
    color: var(--primary-color, #c83b3b);
    font-size: 15px;
}

.thankyou-page-wrapper .copy-badge-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    margin-right: 4px;
    transition: color 0.2s;
}
.thankyou-page-wrapper .copy-badge-btn:hover {
    color: var(--primary-color, #c83b3b);
}

/* ── چیدمان دو ستونه ── */
.thankyou-page-wrapper .thankyou-columns-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    align-items: start;
}

.thankyou-page-wrapper .section-card {
    background: #ffffff;
    border-radius: var(--radius-main, 18px);
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 25px;
}

.thankyou-page-wrapper .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

.thankyou-page-wrapper .section-title {
    font-size: 16px;
    font-weight: 600 !important;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    position: static;
}

.thankyou-page-wrapper .section-header .section-title:after,
.thankyou-page-wrapper .section-header .section-title::after,
.thankyou-page-wrapper .section-title:after,
.thankyou-page-wrapper .section-title::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

.thankyou-page-wrapper .item-count-badge {
    font-size: 12px;
    background: rgba(var(--primary-color-rgb, 200, 59, 59), 0.08);
    color: var(--primary-color, #c83b3b);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

/* لیست کارت‌های اقلام سفارش */
.thankyou-page-wrapper .order-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thankyou-page-wrapper .order-item-row {
    display: grid;
    grid-template-columns: 70px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: var(--radius-inner, 14px);
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.08);
    transition: all 0.2s ease;
}

.thankyou-page-wrapper .order-item-row:hover {
    border-color: rgba(var(--primary-color-rgb, 200, 59, 59), 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    background: #ffffff;
}

.thankyou-page-wrapper .item-thumbnail {
    width: 70px;
    height: 80px;
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
}

.thankyou-page-wrapper .item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thankyou-page-wrapper .item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thankyou-page-wrapper .item-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
}

.thankyou-page-wrapper .item-name:hover {
    color: var(--primary-color, #c83b3b);
}

.thankyou-page-wrapper .item-meta {
    font-size: 12px;
    color: var(--text-muted, #6c757d);
}

.thankyou-page-wrapper .wc-item-meta-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.thankyou-page-wrapper .wc-item-meta-list li,
.thankyou-page-wrapper .wc-item-meta-list div {
    background: rgba(var(--border-color-rgb, 78, 83, 100), 0.06);
    padding: 1px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.thankyou-page-wrapper .item-quantity-pill {
    font-size: 12px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
    color: #475569;
    white-space: nowrap;
}

.thankyou-page-wrapper .item-price {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    text-align: left;
    min-width: 110px;
}

/* ── کارت‌های آدرس مشتری ── */
.thankyou-page-wrapper .addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.thankyou-page-wrapper .address-box {
    background: #f8fafc;
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    border-radius: var(--radius-inner, 14px);
    padding: 16px;
    position: relative;
}

.thankyou-page-wrapper .address-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
}

.thankyou-page-wrapper .address-details {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.thankyou-page-wrapper .address-item-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.thankyou-page-wrapper .address-item-line i {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 5px;
}

/* ── سایدبار فاکتور و دکمه‌های عملیات ── */
.thankyou-page-wrapper .thankyou-sidebar {
    position: sticky;
    top: 80px;
}

.thankyou-page-wrapper .summary-card {
    background: #ffffff;
    border-radius: var(--radius-main, 18px);
    border: 1px solid rgba(var(--border-color-rgb, 78, 83, 100), 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 18px;
}

.thankyou-page-wrapper .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13.5px;
    color: #475569;
}

.thankyou-page-wrapper .summary-row .label {
    color: var(--text-muted, #6c757d);
}

.thankyou-page-wrapper .summary-row .value {
    font-weight: 700;
    color: #1e293b;
}

.thankyou-page-wrapper .summary-divider {
    height: 1px;
    background: rgba(var(--border-color-rgb, 78, 83, 100), 0.1);
    margin: 12px 0;
}

.thankyou-page-wrapper .summary-row.total-row {
    padding-top: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.thankyou-page-wrapper .summary-row.total-row .total-price {
    color: var(--primary-color, #c83b3b);
    font-size: 18px;
    font-weight: 900;
}

/* دکمه‌های اقدام سریع */
.thankyou-page-wrapper .actions-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thankyou-page-wrapper .btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-btn, 10px);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.thankyou-page-wrapper .btn-primary-action {
    background: var(--primary-color, #c83b3b);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(var(--primary-color-rgb, 200, 59, 59), 0.25);
}

.thankyou-page-wrapper .btn-primary-action:hover {
    background: var(--primary-dark, #a52a2a);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--primary-color-rgb, 200, 59, 59), 0.32);
}

.thankyou-page-wrapper .btn-ghost-action {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.thankyou-page-wrapper .btn-ghost-action:hover {
    background: #f1f5f9;
    border-color: var(--primary-color, #c83b3b);
    color: var(--primary-color, #c83b3b);
}

.thankyou-page-wrapper .btn-secondary-action {
    background: rgba(var(--primary-color-rgb, 200, 59, 59), 0.06);
    border: 1px solid rgba(var(--primary-color-rgb, 200, 59, 59), 0.2);
    color: var(--primary-color, #c83b3b) !important;
}

.thankyou-page-wrapper .btn-secondary-action:hover {
    background: var(--primary-color, #c83b3b);
    color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════
   بخش فاکتور چاپی و استایل‌های استاندارد A4 (Printable Invoice)
   ══════════════════════════════════════════════════════════════ */
.printable-invoice-container {
    display: none;
}

.invoice-paper {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 24px;
}

/* واترمارک فاکتور */
.invoice-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-22deg);
    font-size: 46px;
    font-weight: 900;
    color: rgba(200, 59, 59, 0.09);
    letter-spacing: 4px;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    white-space: nowrap;
    border: 4px dashed rgba(200, 59, 59, 0.14);
    padding: 10px 30px;
    border-radius: 16px;
}

.invoice-inner-content {
    position: relative;
    z-index: 1;
}

.invoice-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1e293b;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.invoice-parties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
    background: #f8fafc;
    font-size: 12px;
    line-height: 1.8;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 12.5px;
}

.invoice-table th, .invoice-table td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: center;
}

.invoice-table th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 800;
}

.invoice-totals-box {
    width: 320px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
}

.invoice-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-totals-row.final-total {
    background: #f1f5f9;
    font-weight: 800;
    font-size: 14.5px;
    color: #0f172a;
    border-bottom: none;
}

.invoice-footer-signatures {
    display: flex;
    justify-content: space-between;
    padding-top: 25px;
    margin-top: 15px;
    border-top: 1px dashed #94a3b8;
    font-size: 12px;
    color: #475569;
}

/* ── مودال پیش‌نمایش چاپ روی صفحه ── */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-modal-content {
    background: #ffffff;
    border-radius: var(--radius-main, 18px);
    max-width: 880px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
}

.modal-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #e2e8f0;
}

.modal-close-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}
.modal-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* ── استایل پرینت کاغذ A4 (Print Stylesheet) ── */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm 10mm 10mm 10mm;
    }

    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10.5pt !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* پنهان کردن تمام المان‌های قالب سایت در زمان چاپ */
    header, footer, nav, aside,
    .site-header, .site-footer, .header-area, .footer-area,
    .breadcrumb-nav, .breadcrumb-area, .page-header,
    .top-bar, .mobile-nav, .mobile-bottom-nav,
    .success-hero-card, .thankyou-columns-grid,
    .order-failed-card, .preview-modal-overlay,
    .modal, .modal-backdrop,
    #wpadminbar, .admin-bar,
    .screen-reader-text,
    .back-to-top {
        display: none !important;
        visibility: hidden !important;
    }

    /* نمایش کانتینر اصلی ووکامرس و فاکتور */
    .thankyou-page-wrapper,
    .woocommerce-order,
    .woocommerce {
        display: block !important;
        visibility: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        width: 100% !important;
    }

    .printable-invoice-container {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        position: relative !important;
    }

    .printable-invoice-container * {
        visibility: visible !important;
    }

    .invoice-paper {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        border: 2px solid #222 !important;
        border-radius: 8px !important;
        padding: 16px 20px !important;
        box-shadow: none !important;
        background: #ffffff !important;
        page-break-inside: avoid;
        box-sizing: border-box !important;
        position: relative !important;
    }

    .invoice-watermark {
        display: block !important;
        visibility: visible !important;
        color: rgba(0, 0, 0, 0.05) !important;
        border-color: rgba(0, 0, 0, 0.05) !important;
        position: absolute !important;
    }

    .invoice-inner-content {
        display: block !important;
        visibility: visible !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .invoice-header-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 2px solid #222 !important;
        padding-bottom: 10px !important;
        margin-bottom: 12px !important;
    }

    .invoice-parties-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        border: 1px solid #666 !important;
        border-radius: 6px !important;
        padding: 10px !important;
        margin-bottom: 14px !important;
        font-size: 9.5pt !important;
        background: #fbfbfb !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .invoice-table {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 14px !important;
        font-size: 10pt !important;
    }

    .invoice-table thead {
        display: table-header-group !important;
    }

    .invoice-table tbody {
        display: table-row-group !important;
    }

    .invoice-table tr {
        display: table-row !important;
    }

    .invoice-table th, .invoice-table td {
        display: table-cell !important;
        border: 1px solid #444 !important;
        padding: 6px 8px !important;
    }

    .invoice-table th {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
        font-weight: 800 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .invoice-totals-box {
        display: block !important;
        width: 280px !important;
        margin-right: auto !important;
        border: 1px solid #444 !important;
        border-radius: 6px !important;
        margin-bottom: 15px !important;
    }

    .invoice-totals-row {
        display: flex !important;
        justify-content: space-between !important;
        padding: 5px 10px !important;
        border-bottom: 1px solid #ddd !important;
        font-size: 9.5pt !important;
    }

    .invoice-totals-row.final-total {
        background: #f0f0f0 !important;
        font-weight: 900 !important;
        font-size: 10.5pt !important;
        border-bottom: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .invoice-footer-signatures {
        display: flex !important;
        justify-content: space-between !important;
        padding-top: 20px !important;
        margin-top: 15px !important;
        border-top: 1px dashed #666 !important;
        font-size: 9.5pt !important;
    }
}

/* ── ریسپانسیو صفحه تشکر از خرید ── */
@media (max-width: 991px) {
    .thankyou-page-wrapper .thankyou-columns-grid {
        grid-template-columns: 1fr;
    }
    .thankyou-page-wrapper .order-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .thankyou-page-wrapper .overview-item:nth-child(2)::after {
        display: none;
    }
    .thankyou-page-wrapper .thankyou-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .thankyou-page-wrapper .order-overview-grid {
        grid-template-columns: 1fr;
    }
    .thankyou-page-wrapper .overview-item::after {
        display: none !important;
    }
    .thankyou-page-wrapper .addresses-grid {
        grid-template-columns: 1fr;
    }
    .thankyou-page-wrapper .order-item-row {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }
    .thankyou-page-wrapper .item-price {
        grid-column: 2;
        text-align: right;
    }
}