/* ============================================================
 * Bazeh Checkout — professional visual layer
 * ============================================================
 * Three templates chosen from the plugin admin:
 *   .bzh-co-tpl-modern   — card-based, soft shadows, pink accent
 *   .bzh-co-tpl-compact  — dense, clean dividers, neutral palette
 *   .bzh-co-tpl-minimal  — borderless, spacious, monochrome
 *
 * Every rule is scoped under `.bzh-co-active` so the layer never
 * touches checkout pages on sites where the plugin is disabled or
 * the admin has turned the feature off.
 *
 * Font: Vazir (mapped to Vazirmatn files) + Vazirmatn fallback.
 * ============================================================ */

/* ---- Brand tokens (scoped) ---- */
body.bzh-co-active {
    --bzh-co-pink: #ec4899;
    --bzh-co-pink-2: #db2777;
    --bzh-co-pink-soft: #fdf2f8;
    --bzh-co-ink: #0f172a;
    --bzh-co-muted: #6b7280;
    --bzh-co-line: #e5e7eb;
    --bzh-co-bg: #f9fafb;
    --bzh-co-card: #ffffff;
    --bzh-co-radius: 14px;
    --bzh-co-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    --bzh-co-shadow-hover: 0 10px 30px rgba(236, 72, 153, 0.18);
}

/* ---- Font: Vazir (Persian) everywhere inside the checkout ---- */
body.bzh-co-active .woocommerce-checkout,
body.bzh-co-active .woocommerce-checkout *,
body.bzh-co-active form.checkout, 
body.bzh-co-active form.checkout *,
body.bzh-co-active .woocommerce-info,
body.bzh-co-active .woocommerce-message,
body.bzh-co-active .woocommerce-error {
    font-family: 'Vazirmatn', 'Vazir', Tahoma, 'Iran Sans', system-ui, sans-serif !important;
}

/* Scope all nested rules under the plugin flag so theme / cache layers
   can't outrank us on specificity alone. */
body.bzh-co-active { background: var(--bzh-co-bg); }

/* ---- Page title ---- */
body.bzh-co-active .entry-title,
body.bzh-co-active .page-title,
body.bzh-co-active h1.wp-block-post-title {
    font-weight: 800 !important;
    font-size: 28px !important;
    color: var(--bzh-co-ink) !important;
    margin-bottom: 24px !important;
}

/* ---- Generic form field polish (shared across all templates) ---- */
body.bzh-co-active .woocommerce-checkout .form-row label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--bzh-co-ink) !important;
    margin-bottom: 6px !important;
}
body.bzh-co-active .woocommerce-checkout .form-row .required { color: var(--bzh-co-pink) !important; text-decoration: none !important; }

body.bzh-co-active .woocommerce-checkout .input-text,
body.bzh-co-active .woocommerce-checkout textarea,
body.bzh-co-active .woocommerce-checkout .select2-container .select2-selection--single {
    width: 100% !important;
    min-height: 46px !important;
    padding: 10px 14px !important;
    border: 1.5px solid var(--bzh-co-line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-size: 14px !important;
    color: var(--bzh-co-ink) !important;
    transition: border-color .18s, box-shadow .18s !important;
    box-sizing: border-box !important;
}
body.bzh-co-active .woocommerce-checkout .input-text:focus,
body.bzh-co-active .woocommerce-checkout textarea:focus,
body.bzh-co-active .woocommerce-checkout .select2-container--open .select2-selection--single {
    border-color: var(--bzh-co-pink) !important;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12) !important;
    outline: 0 !important;
}
body.bzh-co-active .woocommerce-checkout .select2-selection__rendered { line-height: 44px !important; padding-right: 14px !important; padding-left: 14px !important; }
body.bzh-co-active .woocommerce-checkout .select2-selection__arrow { height: 44px !important; }

/* ---- Section headings (Billing / Shipping / Additional / Your order) ---- */
body.bzh-co-active #customer_details h3,
body.bzh-co-active h3#order_review_heading,
body.bzh-co-active .woocommerce-additional-fields h3 {
    font-weight: 800 !important;
    font-size: 18px !important;
    color: var(--bzh-co-ink) !important;
    margin: 0 0 18px !important;
    padding: 0 0 12px !important;
    border-bottom: 2px solid var(--bzh-co-line) !important;
    position: relative !important;
}
body.bzh-co-active #customer_details h3::after,
body.bzh-co-active h3#order_review_heading::after,
body.bzh-co-active .woocommerce-additional-fields h3::after {
    content: '' !important;
    position: absolute !important; bottom: -2px !important; right: 0 !important;
    width: 56px !important; height: 3px !important;
    background: linear-gradient(90deg, var(--bzh-co-pink), var(--bzh-co-pink-2)) !important;
    border-radius: 2px !important;
}

/* ---- Order review table ---- */
body.bzh-co-active .woocommerce-checkout-review-order-table {
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    font-size: 14px !important;
}
body.bzh-co-active .woocommerce-checkout-review-order-table th,
body.bzh-co-active .woocommerce-checkout-review-order-table td {
    border: 0 !important;
    border-bottom: 1px dashed var(--bzh-co-line) !important;
    padding: 14px 18px !important;
    color: var(--bzh-co-ink) !important;
}
body.bzh-co-active .woocommerce-checkout-review-order-table thead th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--bzh-co-muted) !important;
    letter-spacing: 0.03em !important;
    border-bottom: 1px dashed var(--bzh-co-line) !important;
}
body.bzh-co-active .woocommerce-checkout-review-order-table .product-total,
body.bzh-co-active .woocommerce-checkout-review-order-table td.product-total {
    text-align: end !important;
    white-space: nowrap !important;
}
body.bzh-co-active .woocommerce-checkout-review-order-table tfoot th,
body.bzh-co-active .woocommerce-checkout-review-order-table tfoot td {
    border-bottom: 0 !important;
    padding-top: 16px !important;
    font-size: 15px !important;
}

/*
 * Line items: product block uses full width; subtotal price sits on its own
 * row below (all viewports). Head + foot stay readable via flex rows.
 * Table display is switched to block on sections so we are no longer bound
 * by the two-column table cell model.
 */
body.bzh-co-active table.woocommerce-checkout-review-order-table {
    display: block !important;
    width: 100% !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table thead,
body.bzh-co-active table.woocommerce-checkout-review-order-table tbody,
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot {
    display: block !important;
    width: 100% !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table thead {
    direction: rtl !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table thead tr {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table thead th {
    display: block !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table thead th.product-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: start !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table thead th.product-total {
    flex: 0 0 auto !important;
    text-align: end !important;
    margin-inline-start: 12px !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-bottom: 0 !important;
    padding-bottom: 10px !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-bottom: 1px dashed var(--bzh-co-line) !important;
    text-align: end !important;
    padding-top: 0 !important;
    font-weight: 800 !important;
    white-space: normal !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot {
    direction: rtl !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot tr {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 8px 12px !important;
    box-sizing: border-box !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot th {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: start !important;
    font-weight: 700 !important;
    float: none !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot td {
    display: block !important;
    flex: 0 0 auto !important;
    text-align: end !important;
    float: none !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot tr.cart-discount th,
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot tr.fee th {
    text-align: start !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot .woocommerce-remove-coupon {
    margin-inline-start: 6px !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table tfoot tr.order-total {
    flex-wrap: nowrap !important;
}

/* Summary column: force RTL so discount / coupon copy hugs the visual right edge */
body.bzh-co-active #order_review {
    direction: rtl !important;
    text-align: start !important;
}

/* ---- Order review: product thumbnail next to name ---- *
 * Markup from Bazeh_Checkout::inject_thumbnail() wraps WC’s $name HTML:
 *   <td class="product-name">
 *     <span class="bzh-co-item-thumb">…</span>
 *     <span class="bzh-co-item-text">… link, quantity, variation …</span>
 *   </td>
 *
 * Outer <td> is flex (thumb | text column). Inner .bzh-co-item-text is a
 * column flex so the title never shares a horizontal band with td.product-total.
 */
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name {
    line-height: 1.7 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-inline: 18px !important;
    vertical-align: middle !important;
    text-align: start !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb,
body.bzh-co-active #order_review table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    margin-inline-end: 12px !important;
    gap: 5px !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-media,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-media,
body.bzh-co-active #order_review table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-media {
    display: block !important;
    width: 56px !important;
    height: 56px !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: var(--bzh-co-bg, #f9fafb) !important;
    border: 1px solid var(--bzh-co-line, #e5e7eb) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    line-height: 0 !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-badge,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-badge,
body.bzh-co-active #order_review table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-badge {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-badge .bzh-gb-badge--pill,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-badge .bzh-gb-badge--pill {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    font-size: 9.5px !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
}
/* Legacy GB wrap (older markup) — keep visible if cached HTML */
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-gb-cart-thumb-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 56px !important;
    max-width: 56px !important;
    overflow: visible !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb .bzh-gb-cart-thumb-media,
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-media {
    width: 56px !important;
    height: 56px !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-gb-cart-thumb-badge {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2px !important;
    overflow: visible !important;
}
/* Beat aggressive theme rules (e.g. `.woocommerce img { height:auto!important }`)
   with extra selector specificity. Inline `style` on the <img> is the final
   safety net — see Bazeh_Checkout::inject_thumbnail(). */
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb img,
body.bzh-co-active table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name .bzh-co-item-thumb-media img,
body.bzh-co-active table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name .bzh-gb-cart-thumb-media img,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-media img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    float: none !important;
    vertical-align: top !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-text {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    flex: 1 1 auto !important;
    align-items: stretch !important;
    min-width: 0 !important;
    gap: 8px !important;
    font-weight: 700 !important;
    color: var(--bzh-co-ink, #0f172a) !important;
    line-height: 1.7 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-text a {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}
body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .product-quantity {
    display: inline-block !important;
    vertical-align: middle !important;
    align-self: flex-start !important;
    margin-inline-start: 0 !important;
    margin-top: 0 !important;
    width: fit-content !important;
    max-width: 100% !important;
    padding: 3px 10px !important;
    background: var(--bzh-co-pink-soft, #fdf2f8) !important;
    color: var(--bzh-co-pink-2, #db2777) !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
}

@media (max-width: 600px) {
    body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: auto !important;
        max-height: none !important;
        margin-inline-end: 10px !important;
    }
    body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-media,
    body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb .bzh-gb-cart-thumb-media {
        width: 48px !important;
        height: 48px !important;
        border-radius: 8px !important;
    }
    body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-thumb-badge .bzh-gb-badge--pill {
        font-size: 8.5px !important;
        padding: 3px 6px !important;
    }
    body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name .bzh-co-item-text {
        font-size: 13px !important;
    }
}
body.bzh-co-active .woocommerce-checkout-review-order-table .order-total th,
body.bzh-co-active .woocommerce-checkout-review-order-table .order-total td {
    font-weight: 800 !important;
    font-size: 18px !important;
    color: var(--bzh-co-pink-2) !important;
    border-top: 2px solid var(--bzh-co-line) !important;
    padding-top: 16px !important;
}

/* ---- Payment methods ---- */
body.bzh-co-active #payment { background: transparent !important; border: 0 !important; padding: 0 !important; }
body.bzh-co-active #payment ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 16px !important;
    border: 0 !important;
    display: grid !important;
    gap: 10px !important;
}
body.bzh-co-active #payment ul.payment_methods li {
    background: #fff !important;
    border: 1.5px solid var(--bzh-co-line) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    transition: border-color .18s, box-shadow .18s !important;
}
body.bzh-co-active #payment ul.payment_methods li:has(input:checked) {
    border-color: var(--bzh-co-pink) !important;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12) !important;
    background: var(--bzh-co-pink-soft) !important;
}
body.bzh-co-active #payment ul.payment_methods label { font-weight: 700 !important; cursor: pointer !important; }
body.bzh-co-active #payment .payment_box {
    background: transparent !important;
    border: 0 !important;
    padding: 10px 2px 0 !important;
    color: var(--bzh-co-muted) !important;
    font-size: 13px !important;
    line-height: 1.9 !important;
}
body.bzh-co-active #payment .payment_box::before { display: none !important; }

/* ---- Place-order button ---- */
body.bzh-co-active #place_order,
body.bzh-co-active .woocommerce #payment #place_order {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    font-family: 'Vazirmatn', 'Vazir', Tahoma, system-ui, sans-serif !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--bzh-co-pink), var(--bzh-co-pink-2)) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 10px 24px rgba(236, 72, 153, 0.35),
        0 0 32px rgba(236, 72, 153, 0.28) !important;
    cursor: pointer !important;
    transition: transform .18s, box-shadow .18s, filter .18s !important;
    letter-spacing: .2px !important;
    animation: bzh-co-place-order-glow 2.4s ease-in-out infinite !important;
}
body.bzh-co-active #place_order:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.05) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.28) inset,
        0 16px 36px rgba(236, 72, 153, 0.5),
        0 0 48px rgba(236, 72, 153, 0.4) !important;
}

@keyframes bzh-co-place-order-glow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.2) inset,
            0 10px 24px rgba(236, 72, 153, 0.35),
            0 0 32px rgba(236, 72, 153, 0.28);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.25) inset,
            0 12px 28px rgba(236, 72, 153, 0.48),
            0 0 44px rgba(244, 114, 182, 0.45);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.bzh-co-active #place_order,
    body.bzh-co-active .woocommerce #payment #place_order {
        animation: none !important;
    }
}

/* ---- Coupon toggle ---- */
body.bzh-co-active .woocommerce-form-coupon-toggle .woocommerce-info {
    background: var(--bzh-co-pink-soft) !important;
    border: 1px dashed var(--bzh-co-pink) !important;
    border-radius: 12px !important;
    color: var(--bzh-co-ink) !important;
    padding: 14px 18px !important;
    direction: rtl !important;
    text-align: start !important;
}
body.bzh-co-active .woocommerce-form-coupon-toggle .woocommerce-info::before { display: none !important; }
body.bzh-co-active .woocommerce-form-coupon-toggle .showcoupon { color: var(--bzh-co-pink-2) !important; font-weight: 800 !important; }
body.bzh-co-active form.checkout_coupon {
    border: 1.5px solid var(--bzh-co-line) !important;
    background: #fff !important;
    border-radius: 12px !important;
    padding: 18px !important;
    margin-bottom: 24px !important;
    direction: rtl !important;
    text-align: right !important;
}
body.bzh-co-active form.checkout_coupon input.input-text,
body.bzh-co-active form.checkout_coupon #coupon_code {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================================
 * Template: MODERN (default)
 * ============================================================ */
body.bzh-co-tpl-modern #customer_details,
body.bzh-co-tpl-modern #order_review,
body.bzh-co-tpl-modern .woocommerce-additional-fields {
    background: var(--bzh-co-card) !important;
    border: 1px solid var(--bzh-co-line) !important;
    border-radius: var(--bzh-co-radius) !important;
    box-shadow: var(--bzh-co-shadow) !important;
    padding: 28px !important;
}
body.bzh-co-tpl-modern #customer_details { margin-bottom: 20px !important; }
body.bzh-co-tpl-modern .woocommerce-checkout-review-order { position: sticky !important; top: 96px !important; }
body.bzh-co-tpl-modern h3#order_review_heading { margin-top: 0 !important; }
/* Inner gutter so the order table + payment never touch the card rim */
body.bzh-co-tpl-modern #order_review .woocommerce-checkout-review-order-table {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid var(--bzh-co-line) !important;
    margin-top: 4px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset !important;
}
body.bzh-co-tpl-modern #order_review #payment {
    margin-top: 8px !important;
    padding-top: 4px !important;
}

/* ============================================================
 * Template: COMPACT
 * ============================================================ */
body.bzh-co-tpl-compact #customer_details,
body.bzh-co-tpl-compact #order_review,
body.bzh-co-tpl-compact .woocommerce-additional-fields {
    background: var(--bzh-co-card) !important;
    border: 1px solid var(--bzh-co-line) !important;
    border-radius: 10px !important;
    padding: 18px 20px !important;
    box-shadow: none !important;
}
body.bzh-co-tpl-compact .woocommerce-checkout .form-row { margin-bottom: 12px !important; }
body.bzh-co-tpl-compact .woocommerce-checkout .input-text,
body.bzh-co-tpl-compact .woocommerce-checkout textarea { min-height: 40px !important; padding: 8px 12px !important; font-size: 13px !important; }
body.bzh-co-tpl-compact #customer_details h3,
body.bzh-co-tpl-compact h3#order_review_heading { font-size: 16px !important; margin-bottom: 14px !important; padding-bottom: 10px !important; }
body.bzh-co-tpl-compact #place_order { padding: 12px 16px !important; font-size: 15px !important; }
body.bzh-co-tpl-compact #order_review .woocommerce-checkout-review-order-table {
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid var(--bzh-co-line) !important;
    margin-top: 4px !important;
    margin-bottom: 6px !important;
}

/* ============================================================
 * Template: MINIMAL
 * ============================================================ */
body.bzh-co-tpl-minimal { background: #fff !important; }
body.bzh-co-tpl-minimal #customer_details,
body.bzh-co-tpl-minimal #order_review,
body.bzh-co-tpl-minimal .woocommerce-additional-fields {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 10px 0 30px !important;
}
body.bzh-co-tpl-minimal #customer_details h3,
body.bzh-co-tpl-minimal h3#order_review_heading {
    border-bottom: 0 !important;
    padding-bottom: 4px !important;
    font-size: 15px !important;
    text-transform: none !important;
    letter-spacing: .3px !important;
    color: var(--bzh-co-muted) !important;
    font-weight: 600 !important;
}
body.bzh-co-tpl-minimal #customer_details h3::after,
body.bzh-co-tpl-minimal h3#order_review_heading::after { display: none !important; }
body.bzh-co-tpl-minimal .woocommerce-checkout .input-text,
body.bzh-co-tpl-minimal .woocommerce-checkout textarea {
    border: 0 !important;
    border-bottom: 1.5px solid var(--bzh-co-line) !important;
    border-radius: 0 !important;
    padding-left: 0 !important; padding-right: 0 !important;
    background: transparent !important;
}
body.bzh-co-tpl-minimal .woocommerce-checkout .input-text:focus,
body.bzh-co-tpl-minimal .woocommerce-checkout textarea:focus {
    border-bottom-color: var(--bzh-co-pink) !important;
    box-shadow: none !important;
}
body.bzh-co-tpl-minimal #payment ul.payment_methods li {
    border-radius: 6px !important;
    border-width: 1px !important;
}
body.bzh-co-tpl-minimal #place_order {
    border-radius: 8px !important;
    background: var(--bzh-co-ink) !important;
    box-shadow: none !important;
}
body.bzh-co-tpl-minimal #place_order:hover { background: var(--bzh-co-pink-2) !important; box-shadow: 0 10px 24px rgba(236, 72, 153, 0.30) !important; }

/* ============================================================
 * Admin preview scoping — restrict sticky + background so
 * the preview cards render neatly side-by-side in the settings
 * page without inheriting the full-page visual chrome.
 * ============================================================ */
.bzh-co-admin-preview { background: var(--bzh-co-bg, #f9fafb); padding: 16px; border-radius: 12px; }
.bzh-co-admin-preview .bzh-co-demo-title { font-size: 15px; font-weight: 800; margin: 0 0 12px; color: #0f172a; }
.bzh-co-admin-preview .bzh-co-demo {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px;
}
@media (max-width: 900px) { .bzh-co-admin-preview .bzh-co-demo { grid-template-columns: 1fr; } }
.bzh-co-admin-preview .bzh-co-demo .bzh-co-block {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.bzh-co-admin-preview .bzh-co-demo .bzh-co-block h4 {
    font-size: 14px; font-weight: 800; color: #0f172a;
    margin: 0 0 10px; padding: 0 0 8px;
    border-bottom: 2px solid #e5e7eb; position: relative;
}
.bzh-co-admin-preview .bzh-co-demo .bzh-co-block h4::after {
    content: ''; position: absolute; bottom: -2px; right: 0; width: 40px; height: 3px;
    background: linear-gradient(90deg, #ec4899, #db2777); border-radius: 2px;
}
.bzh-co-admin-preview .bzh-co-demo input {
    width: 100%; padding: 8px 12px; margin-bottom: 8px;
    border: 1.5px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: 12px;
    box-sizing: border-box;
}
.bzh-co-admin-preview .bzh-co-demo .bzh-co-row { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed #e5e7eb; font-size:13px; }
.bzh-co-admin-preview .bzh-co-demo .bzh-co-row:last-child { border-bottom: 0; font-weight: 800; font-size: 15px; color: #db2777; padding-top: 12px; border-top: 2px solid #e5e7eb; }
.bzh-co-admin-preview .bzh-co-demo .bzh-co-pay {
    border: 1.5px solid #ec4899; background: #fdf2f8; border-radius: 10px;
    padding: 10px 12px; font-size: 12px; font-weight: 700; color: #0f172a;
}
.bzh-co-admin-preview .bzh-co-demo .bzh-co-place {
    width: 100%; padding: 11px; margin-top: 10px; border: 0; border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #db2777); color: #fff;
    font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer;
    box-shadow: 0 8px 18px rgba(236, 72, 153, 0.28);
}

/* Compact preview tweaks */
.bzh-co-admin-preview.is-compact .bzh-co-block { padding: 12px 14px; border-radius: 8px; }
.bzh-co-admin-preview.is-compact .bzh-co-block h4 { font-size: 13px; margin-bottom: 8px; padding-bottom: 6px; }
.bzh-co-admin-preview.is-compact input { padding: 6px 10px; }
.bzh-co-admin-preview.is-compact .bzh-co-place { padding: 9px; font-size: 12px; }

/* Minimal preview tweaks */
.bzh-co-admin-preview.is-minimal { background: #fff; }
.bzh-co-admin-preview.is-minimal .bzh-co-block { border: 0; box-shadow: none; padding: 4px 0 12px; }
.bzh-co-admin-preview.is-minimal .bzh-co-block h4 { border-bottom: 0; color: #6b7280; font-weight: 600; font-size: 12px; }
.bzh-co-admin-preview.is-minimal .bzh-co-block h4::after { display: none; }
.bzh-co-admin-preview.is-minimal input {
    border: 0; border-bottom: 1.5px solid #e5e7eb; border-radius: 0; padding-left: 0; padding-right: 0; background: transparent;
}
.bzh-co-admin-preview.is-minimal .bzh-co-place {
    background: #0f172a; border-radius: 8px; box-shadow: none;
}

/* ---- Responsive stack ---- */
@media (max-width: 900px) {
    body.bzh-co-active .woocommerce-checkout #customer_details,
    body.bzh-co-active .woocommerce-checkout #order_review,
    body.bzh-co-active .woocommerce-checkout #order_review_heading {
        width: 100% !important;
        float: none !important;
    }
    body.bzh-co-tpl-modern #customer_details,
    body.bzh-co-tpl-modern #order_review { padding: 20px !important; }
    body.bzh-co-tpl-modern .woocommerce-checkout-review-order { position: static !important; }
    body.bzh-co-active .woocommerce-checkout-review-order-table th,
    body.bzh-co-active .woocommerce-checkout-review-order-table td {
        padding: 12px 14px !important;
    }
    body.bzh-co-active table.woocommerce-checkout-review-order-table td.product-name {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        padding-inline: 14px !important;
    }
}
@media (min-width: 901px) and (max-width: 1200px) {
    body.bzh-co-active .woocommerce-checkout-review-order-table th,
    body.bzh-co-active .woocommerce-checkout-review-order-table td {
        padding: 13px 16px !important;
    }
}

/* ============================================================
 * Elementor WooCommerce Checkout widget + order-pay
 * Theme/widget often wins specificity over `body.bzh-co-active .woocommerce-checkout *`
 * because the form is not wrapped in an extra .woocommerce-checkout ancestor.
 * ============================================================ */

body.bzh-co-active .elementor-widget-woocommerce-checkout-page,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page *,
body.bzh-co-active .elementor-widget-wc-checkout-page,
body.bzh-co-active .elementor-widget-wc-checkout-page *,
body.bzh-co-active .e-checkout-layout-two-column,
body.bzh-co-active .e-checkout-layout-two-column *,
body.bzh-co-active form.checkout.woocommerce-checkout,
body.bzh-co-active form.checkout.woocommerce-checkout *,
body.bzh-co-active #order_review.woocommerce-checkout,
body.bzh-co-active #order_review.checkout,
body.bzh-co-active #order_review.checkout * {
    font-family: 'Vazirmatn', 'Vazir', Tahoma, 'Iran Sans', system-ui, sans-serif !important;
}

/* Pay button: every known WC + Elementor hook */
body.bzh-co-active .elementor-widget-woocommerce-checkout-page #place_order,
body.bzh-co-active .elementor-widget-wc-checkout-page #place_order,
body.bzh-co-active .e-checkout-layout-two-column #place_order,
body.bzh-co-active #order_review #place_order,
body.bzh-co-active #order_review button#place_order,
body.bzh-co-active form#order_review #place_order,
body.bzh-co-active .woocommerce-checkout #place_order,
body.bzh-co-active .woocommerce #payment #place_order,
body.bzh-co-active button[name="woocommerce_checkout_place_order"],
body.bzh-co-active #payment button[type="submit"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    padding: 14px 20px !important;
    font-family: 'Vazirmatn', 'Vazir', Tahoma, system-ui, sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--bzh-co-pink), var(--bzh-co-pink-2)) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 10px 24px rgba(236, 72, 153, 0.35),
        0 0 32px rgba(236, 72, 153, 0.28) !important;
    cursor: pointer !important;
    animation: bzh-co-place-order-glow 2.4s ease-in-out infinite !important;
}

body.bzh-co-active .elementor-widget-woocommerce-checkout-page #place_order:hover,
body.bzh-co-active #order_review #place_order:hover,
body.bzh-co-active button[name="woocommerce_checkout_place_order"]:hover {
    filter: brightness(1.05) !important;
    transform: translateY(-2px) !important;
}

/* Payment box must not collapse on pay-for-order */
body.bzh-co-active #order_review #payment,
body.bzh-co-active .elementor-widget-woocommerce-checkout-page #payment {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

/* Fallback when skin body tag missed but WC checkout body class exists (rare) */
body.woocommerce-checkout:not(.bzh-co-active) #order_review.checkout,
body.woocommerce-checkout:not(.bzh-co-active) #order_review.checkout *,
body.woocommerce-checkout:not(.bzh-co-active) .elementor-widget-woocommerce-checkout-page,
body.woocommerce-checkout:not(.bzh-co-active) .elementor-widget-woocommerce-checkout-page * {
    font-family: 'Vazirmatn', 'Vazir', Tahoma, system-ui, sans-serif !important;
}

body.woocommerce-checkout:not(.bzh-co-active) #order_review #place_order,
body.woocommerce-checkout:not(.bzh-co-active) button[name="woocommerce_checkout_place_order"] {
    display: block !important;
    visibility: visible !important;
    min-height: 48px !important;
    font-family: 'Vazirmatn', 'Vazir', Tahoma, system-ui, sans-serif !important;
    font-weight: 800 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #ec4899, #db2777) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35) !important;
}

/* Group-buy checkout notice — card above form (not WC .woocommerce-info) */
body.bzh-co-active .bzh-gb-checkout-banner,
body.woocommerce-checkout .bzh-gb-checkout-banner {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    max-width: 100% !important;
    margin: 0 0 22px !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(13, 148, 136, 0.28) !important;
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.95) 0%, #fff 55%, rgba(236, 253, 245, 0.9) 100%) !important;
    box-shadow: 0 4px 18px rgba(13, 148, 136, 0.1) !important;
    box-sizing: border-box !important;
    list-style: none !important;
}
body.bzh-co-active .bzh-gb-checkout-banner::before,
body.bzh-co-active .bzh-gb-checkout-banner::after,
body.woocommerce-checkout .bzh-gb-checkout-banner::before,
body.woocommerce-checkout .bzh-gb-checkout-banner::after {
    display: none !important;
    content: none !important;
}
body.bzh-co-active .bzh-gb-checkout-banner__icon,
body.woocommerce-checkout .bzh-gb-checkout-banner__icon {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    color: #0d9488 !important;
    background: rgba(13, 148, 136, 0.12) !important;
}
body.bzh-co-active .bzh-gb-checkout-banner__body,
body.woocommerce-checkout .bzh-gb-checkout-banner__body {
    flex: 1 !important;
    min-width: 0 !important;
}
body.bzh-co-active .bzh-gb-checkout-banner__title,
body.woocommerce-checkout .bzh-gb-checkout-banner__title {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 6px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--bzh-co-ink, #0f172a) !important;
    line-height: 1.4 !important;
}
body.bzh-co-active .bzh-gb-checkout-banner__text,
body.woocommerce-checkout .bzh-gb-checkout-banner__text {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    color: var(--bzh-co-muted, #475569) !important;
    font-weight: 400 !important;
}
