منبع مقاله: مشاهده مقاله اصلی
معرفی قابلیت
در این آموزش نحوه تبدیل صفحه پیشفرض تسویه حساب ووکامرس به یک صفحه اختصاصی و سفارشی بررسی میشود. هدف این روش، ایجاد یک تجربه خرید بهتر برای کاربران و طراحی یک صفحه پرداخت حرفهایتر نسبت به فرم پیشفرض ووکامرس است.
با این تغییر میتوان ساختار صفحه تسویه حساب را مطابق نیاز فروشگاه تغییر داد و بخشهای مختلف فرم پرداخت را به شکل دلخواه مدیریت کرد.
نحوه عملکرد
ووکامرس به صورت پیشفرض صفحه تسویه حساب را با بخشهایی مانند اطلاعات مشتری، آدرس، روش پرداخت و خلاصه سفارش نمایش میدهد.
در این روش با استفاده از امکانات ووکامرس و کدنویسی سفارشی، ساختار این صفحه تغییر داده شده و فرم تسویه حساب در یک صفحه اختصاصی قرار میگیرد تا کنترل بیشتری روی ظاهر و نحوه نمایش بخشهای مختلف وجود داشته باشد.
نحوه استفاده با شورتکد
شورتکد ساخته شده را میتوان در هر برگه، نوشته یا بخش دلخواه وردپرس قرار داد
[luxury_ajax_checkout]نحوه اجرا
برای پیادهسازی این قابلیت مراحل کلی شامل موارد زیر است:
- ایجاد صفحه اختصاصی برای تسویه حساب
- انتقال فرم پرداخت ووکامرس به صفحه جدید
- کنترل بخشهای نمایش داده شده در فرم
- تغییر ساختار و چیدمان اطلاعات مشتری
- شخصیسازی ظاهر صفحه پرداخت
این تغییرات معمولاً با استفاده از شورتکدهای ووکامرس و کدهای سفارشی انجام میشوند تا بدون نیاز به افزونههای اضافی بتوان یک صفحه پرداخت اختصاصی ایجاد کرد.
نحوه استفاده
پس از ایجاد صفحه اختصاصی، فرم تسویه حساب ووکامرس در آن نمایش داده میشود و کاربران هنگام خرید به جای صفحه پیشفرض، وارد صفحه طراحیشده خواهند شد.
این روش امکان ایجاد صفحات پرداخت متفاوت برای فروشگاههای مختلف را فراهم میکند و میتوان بخشهای مختلف آن را مطابق نیاز کسبوکار تنظیم کرد.
مزایا
- ایجاد تجربه خرید حرفهایتر
- کنترل کامل روی ظاهر صفحه پرداخت
- امکان حذف یا تغییر بخشهای اضافی
- بهبود رابط کاربری هنگام ثبت سفارش
- کاهش وابستگی به افزونههای شخصیسازی تسویه حساب
این قابلیت برای فروشگاههایی که به دنبال طراحی یک فرآیند خرید اختصاصی و سادهتر برای مشتریان هستند، بسیار کاربردی است.
/** * Luxury Reload WooCommerce Checkout Shortcode - Stable UI Version - Compact Order Review - Mobile Pro * Shortcode: [luxury_ajax_checkout] * Optional: [luxury_ajax_checkout hide_chrome="no"] * * Paste this code in Code Snippets WITHOUT PHP opening tag. */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Luxury_Reload_Woo_Checkout_Shortcode_Fixed_V5' ) ) { final class Luxury_Reload_Woo_Checkout_Shortcode_Fixed_V5 { const SHORTCODE = 'luxury_ajax_checkout'; public static function init() { add_shortcode( self::SHORTCODE, array( __CLASS__, 'render_shortcode' ) ); } private static function ensure_cart() { if ( ! function_exists( 'WC' ) || ! class_exists( 'WooCommerce' ) ) { return false; } if ( function_exists( 'wc_load_cart' ) && ( is_null( WC()->cart ) || is_null( WC()->session ) ) ) { wc_load_cart(); } return WC()->cart; } private static function calculate_cart() { $cart = self::ensure_cart(); if ( ! $cart ) { return false; } if ( $cart->needs_shipping() && WC()->shipping() ) { $cart->calculate_shipping(); } $cart->calculate_totals(); return true; } private static function enqueue_wc_assets() { $scripts = array( 'wc-checkout', 'wc-country-select', 'wc-address-i18n', 'selectWoo', ); foreach ( $scripts as $script ) { if ( wp_script_is( $script, 'registered' ) || wp_script_is( $script, 'enqueued' ) ) { wp_enqueue_script( $script ); } } $styles = array( 'select2', 'woocommerce-general', 'woocommerce-layout', 'woocommerce-smallscreen', ); foreach ( $styles as $style ) { if ( wp_style_is( $style, 'registered' ) || wp_style_is( $style, 'enqueued' ) ) { wp_enqueue_style( $style ); } } } private static function clean_woo_notices() { if ( ! function_exists( 'wc_get_notices' ) || ! function_exists( 'wc_set_notices' ) ) { return; } $notices = wc_get_notices(); if ( empty( $notices ) || ! is_array( $notices ) ) { return; } $clean = array(); $seen = array(); foreach ( $notices as $type => $items ) { if ( empty( $items ) || ! is_array( $items ) ) { continue; } foreach ( $items as $notice ) { $message = ''; if ( is_array( $notice ) && isset( $notice['notice'] ) ) { $message = wp_strip_all_tags( (string) $notice['notice'] ); } elseif ( is_string( $notice ) ) { $message = wp_strip_all_tags( $notice ); } $message = trim( preg_replace( '/\s+/u', ' ', $message ) ); if ( '' === $message ) { continue; } $lower_message = function_exists( 'mb_strtolower' ) ? mb_strtolower( $message, 'UTF-8' ) : strtolower( $message ); $is_shipping_debug = false !== strpos( $message, 'منطقه منطبق با مشتری' ) || false !== strpos( $lower_message, 'matched customer zone' ) || false !== strpos( $lower_message, 'customer matched zone' ); if ( $is_shipping_debug ) { continue; } $key = $type . ':' . md5( $message ); if ( isset( $seen[ $key ] ) ) { continue; } $seen[ $key ] = true; if ( ! isset( $clean[ $type ] ) ) { $clean[ $type ] = array(); } $clean[ $type ][] = $notice; } } wc_set_notices( $clean ); } private static function is_checkout_endpoint() { if ( function_exists( 'is_wc_endpoint_url' ) ) { return is_wc_endpoint_url( 'order-pay' ) || is_wc_endpoint_url( 'order-received' ); } return false; } public static function render_shortcode( $atts = array() ) { $atts = shortcode_atts( array( 'hide_chrome' => 'no', 'title' => 'تسویه حساب', 'subtitle' => 'اطلاعات ارسال، روش پرداخت و جزئیات سفارش را با دقت بررسی کنید.', ), $atts, self::SHORTCODE ); if ( ! function_exists( 'WC' ) || ! class_exists( 'WooCommerce' ) ) { return '<div class="lux-checkout-error">برای استفاده از این شورتکد باید WooCommerce فعال باشد.</div>'; } self::enqueue_wc_assets(); self::ensure_cart(); self::calculate_cart(); self::clean_woo_notices(); $instance_id = 'lux-checkout-' . wp_rand( 10000, 99999 ); $hide_chrome = in_array( strtolower( (string) $atts['hide_chrome'] ), array( 'yes', 'true', '1', 'on' ), true ); ob_start(); ?> <div id="<?php echo esc_attr( $instance_id ); ?>" class="lux-checkout-wrap" data-hide-chrome="<?php echo $hide_chrome ? '1' : '0'; ?>" dir="rtl" > <?php echo self::render_assets( $instance_id, $hide_chrome ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <main class="lux-checkout-shell"> <section class="lux-checkout-hero lux-glass"> <div class="lux-checkout-hero-copy"> <span class="lux-kicker"> <span class="material-symbols-outlined">lock</span> پرداخت امن </span> <h1><?php echo esc_html( $atts['title'] ); ?></h1> <p><?php echo esc_html( $atts['subtitle'] ); ?></p> </div> <div class="lux-checkout-steps" aria-label="مراحل تسویه حساب"> <div class="lux-step is-active"> <span>۱</span> <strong>اطلاعات</strong> </div> <div class="lux-step is-active"> <span>۲</span> <strong>ارسال</strong> </div> <div class="lux-step is-active"> <span>۳</span> <strong>پرداخت</strong> </div> </div> </section> <?php if ( WC()->cart && WC()->cart->is_empty() && ! self::is_checkout_endpoint() ) { self::render_empty_checkout(); } else { echo '<section class="lux-checkout-card">'; echo do_shortcode( '<div class="woocommerce"><div class="woocommerce-notices-wrapper"></div></div>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '</section>'; } ?> </main> </div> <?php return ob_get_clean(); } private static function render_empty_checkout() { $shop_url = function_exists( 'wc_get_page_permalink' ) ? wc_get_page_permalink( 'shop' ) : home_url( '/' ); $cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/' ); ?> <section class="lux-empty"> <div class="lux-empty-card lux-glass"> <div class="lux-empty-icon"> <span class="material-symbols-outlined">shopping_bag</span> </div> <h2>سبد خرید شما خالی است</h2> <p>برای ادامه پرداخت، ابتدا یک محصول به سبد خرید اضافه کنید.</p> <div class="lux-empty-actions"> <a class="lux-btn" href="<?php echo esc_url( $shop_url ); ?>"> بازگشت به فروشگاه </a> <a class="lux-btn lux-btn-ghost" href="<?php echo esc_url( $cart_url ); ?>"> مشاهده سبد خرید </a> </div> </div> </section> <?php } private static function render_assets( $instance_id, $hide_chrome ) { ob_start(); ?> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap" rel="stylesheet"> <style> .lux-checkout-wrap, .lux-checkout-wrap * { box-sizing: border-box; } .lux-checkout-wrap { --lux-primary: var(--e-global-color-primary, var(--wp--preset--color--primary, #2a7951)); --lux-secondary: var(--e-global-color-secondary, var(--wp--preset--color--secondary, #9bcf8f)); --lux-surface: var(--wp--preset--color--base, #ffffff); --lux-surface-soft: color-mix(in srgb, var(--lux-surface) 94%, var(--lux-primary) 6%); --lux-surface-low: color-mix(in srgb, var(--lux-surface) 88%, var(--lux-primary) 12%); --lux-text: var(--e-global-color-text, var(--wp--preset--color--contrast, #0b1c30)); --lux-muted: color-mix(in srgb, var(--lux-text) 62%, transparent); --lux-outline: color-mix(in srgb, var(--lux-text) 14%, transparent); --lux-danger: #ba1a1a; --lux-danger-bg: #ffdad6; --lux-success: #16794c; --lux-warning: #8a5a00; width: 100%; max-width: 100%; margin: 0; padding: 0; background: transparent !important; color: var(--lux-text); font-family: "Vazirmatn", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; direction: rtl; position: relative; isolation: isolate; overflow-x: clip; } .lux-checkout-wrap button, .lux-checkout-wrap input, .lux-checkout-wrap textarea, .lux-checkout-wrap select { font-family: inherit; } .lux-checkout-shell { width: min(1280px, 100%); margin: 0 auto; padding: 34px 0 52px; } .lux-glass { background: color-mix(in srgb, var(--lux-surface) 84%, transparent); border: 1px solid color-mix(in srgb, var(--lux-text) 10%, transparent); box-shadow: 0 18px 55px rgba(11, 28, 48, .07); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); } .lux-checkout-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 22px; padding: 28px 30px; border-radius: 28px; overflow: hidden; position: relative; animation: luxCheckoutSlideUp .6s cubic-bezier(.22, 1, .36, 1) both; } .lux-checkout-hero::before { content: ""; position: absolute; inset: -45% auto auto -20%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--lux-secondary) 42%, transparent), transparent 68%); pointer-events: none; } .lux-checkout-hero-copy { position: relative; z-index: 1; min-width: 0; } .lux-kicker { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; margin-bottom: 12px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--lux-primary) 10%, transparent); color: var(--lux-primary); font-size: 13px; font-weight: 900; } .lux-kicker .material-symbols-outlined { font-size: 20px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; } .lux-checkout-hero h1 { margin: 0 0 8px; color: var(--lux-text); font-size: clamp(30px, 4vw, 48px); line-height: 1.25; font-weight: 950; letter-spacing: -.04em; } .lux-checkout-hero p { max-width: 680px; margin: 0; color: var(--lux-muted); font-size: 16px; line-height: 1.9; } .lux-checkout-steps { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 20px; background: color-mix(in srgb, var(--lux-surface) 72%, transparent); border: 1px solid var(--lux-outline); flex: 0 0 auto; } .lux-step { min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; border-radius: 16px; color: var(--lux-muted); background: transparent; } .lux-step span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--lux-surface-low); color: var(--lux-primary); font-family: "JetBrains Mono", "Vazirmatn", monospace; font-weight: 900; } .lux-step strong { font-size: 12px; font-weight: 900; } .lux-step.is-active { color: var(--lux-text); background: color-mix(in srgb, var(--lux-primary) 8%, transparent); } .lux-step.is-active span { color: #fff; background: linear-gradient(135deg, var(--lux-primary), var(--lux-secondary)); box-shadow: 0 10px 22px color-mix(in srgb, var(--lux-primary) 22%, transparent); } .lux-checkout-card { animation: luxCheckoutSlideUp .68s cubic-bezier(.22, 1, .36, 1) both; } .lux-checkout-wrap .woocommerce { margin: 0 !important; padding: 0 !important; color: var(--lux-text); font-family: inherit; } .lux-checkout-wrap .woocommerce-notices-wrapper, .lux-checkout-wrap .woocommerce-NoticeGroup, .lux-checkout-wrap .woocommerce-form-coupon-toggle, .lux-checkout-wrap .woocommerce-form-login-toggle { width: 100% !important; max-width: 100% !important; margin: 0 0 14px !important; } .lux-checkout-wrap .woocommerce-notices-wrapper:empty, .lux-checkout-wrap .woocommerce-NoticeGroup:empty { display: none !important; } .lux-checkout-wrap .lux-hidden-debug-notice, .lux-checkout-wrap .lux-hidden-duplicate-notice { display: none !important; } .lux-checkout-wrap .woocommerce form.checkout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .72fr); gap: 0 28px; align-items: start; } .lux-checkout-wrap .woocommerce .col2-set { grid-column: 1; grid-row: 1 / span 3; width: 100% !important; float: none !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 0 !important; padding: 0 !important; } .lux-checkout-wrap .woocommerce .col2-set::before, .lux-checkout-wrap .woocommerce .col2-set::after { display: none !important; content: none !important; } .lux-checkout-wrap .woocommerce .col2-set .col-1, .lux-checkout-wrap .woocommerce .col2-set .col-2 { width: 100% !important; float: none !important; margin: 0 !important; padding: 28px !important; border-radius: 24px; background: color-mix(in srgb, var(--lux-surface) 86%, transparent); border: 1px solid color-mix(in srgb, var(--lux-text) 10%, transparent); box-shadow: 0 18px 55px rgba(11, 28, 48, .07); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); min-width: 0; } .lux-checkout-wrap .woocommerce #order_review_heading { grid-column: 2; grid-row: 1; margin: 0 !important; padding: 24px 26px 0 !important; border-radius: 24px 24px 0 0; background: color-mix(in srgb, var(--lux-surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--lux-primary) 13%, transparent); border-bottom: 0; color: var(--lux-text); font-size: 23px; line-height: 1.4; font-weight: 950; text-align: right; display: flex; align-items: center; gap: 10px; box-shadow: 0 18px 55px rgba(11, 28, 48, .07); } .lux-checkout-wrap .woocommerce #order_review_heading::before { content: ""; width: 12px; height: 30px; border-radius: 999px; background: linear-gradient(180deg, var(--lux-primary), var(--lux-secondary)); flex: 0 0 auto; } .lux-checkout-wrap .woocommerce #order_review { grid-column: 2; grid-row: 2; position: sticky; top: 26px; margin: 0 !important; padding: 16px 22px 22px !important; border-radius: 0 0 24px 24px; background: color-mix(in srgb, var(--lux-surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--lux-primary) 13%, transparent); border-top: 0; box-shadow: 0 18px 55px rgba(11, 28, 48, .07); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); min-width: 0; } .lux-checkout-wrap .woocommerce-billing-fields h3, .lux-checkout-wrap .woocommerce-shipping-fields h3:not(#ship-to-different-address), .lux-checkout-wrap .woocommerce-additional-fields h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 20px !important; color: var(--lux-text); font-size: 22px; line-height: 1.45; font-weight: 950; text-align: right; } .lux-checkout-wrap .woocommerce-billing-fields h3::before, .lux-checkout-wrap .woocommerce-shipping-fields h3:not(#ship-to-different-address)::before, .lux-checkout-wrap .woocommerce-additional-fields h3::before { content: ""; width: 12px; height: 28px; border-radius: 999px; background: linear-gradient(180deg, var(--lux-primary), var(--lux-secondary)); flex: 0 0 auto; } .lux-checkout-wrap .woocommerce form .form-row { margin: 0 0 16px !important; padding: 0 !important; position: relative; } .lux-checkout-wrap .woocommerce form .form-row-first, .lux-checkout-wrap .woocommerce form .form-row-last { width: calc(50% - 6px) !important; overflow: visible; } .lux-checkout-wrap .woocommerce form .form-row-first { float: right !important; clear: right !important; } .lux-checkout-wrap .woocommerce form .form-row-last { float: left !important; clear: none !important; } .lux-checkout-wrap .woocommerce form .form-row-wide { clear: both; } .lux-checkout-wrap .woocommerce form .form-row label { display: block; margin: 0 0 8px; color: var(--lux-text); font-size: 13px; line-height: 1.7; font-weight: 900; text-align: right; } .lux-checkout-wrap .woocommerce form .form-row label .required { color: var(--lux-danger); text-decoration: none; } .lux-checkout-wrap .woocommerce form .form-row .input-text, .lux-checkout-wrap .woocommerce form .form-row input[type="text"], .lux-checkout-wrap .woocommerce form .form-row input[type="email"], .lux-checkout-wrap .woocommerce form .form-row input[type="tel"], .lux-checkout-wrap .woocommerce form .form-row input[type="password"], .lux-checkout-wrap .woocommerce form .form-row textarea, .lux-checkout-wrap .woocommerce form .form-row select { width: 100% !important; min-height: 52px; margin: 0 !important; padding: 12px 15px !important; border-radius: 14px !important; border: 1px solid var(--lux-outline) !important; outline: 0 !important; background: color-mix(in srgb, var(--lux-surface) 92%, transparent) !important; color: var(--lux-text) !important; box-shadow: none !important; font-size: 14px !important; line-height: 1.7 !important; text-align: right; transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, transform .25s ease; } .lux-checkout-wrap .woocommerce form .form-row textarea { min-height: 120px; resize: vertical; } .lux-checkout-wrap .woocommerce form .form-row .input-text:focus, .lux-checkout-wrap .woocommerce form .form-row input:focus, .lux-checkout-wrap .woocommerce form .form-row textarea:focus, .lux-checkout-wrap .woocommerce form .form-row select:focus { border-color: color-mix(in srgb, var(--lux-primary) 58%, transparent) !important; background: var(--lux-surface) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lux-primary) 10%, transparent) !important; transform: translateY(-1px); } .lux-checkout-wrap .woocommerce form .form-row.woocommerce-invalid .input-text, .lux-checkout-wrap .woocommerce form .form-row.woocommerce-invalid select, .lux-checkout-wrap .woocommerce form .form-row.woocommerce-invalid textarea { border-color: var(--lux-danger) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lux-danger) 10%, transparent) !important; } .lux-checkout-wrap .woocommerce form .form-row.woocommerce-validated .input-text, .lux-checkout-wrap .woocommerce form .form-row.woocommerce-validated select, .lux-checkout-wrap .woocommerce form .form-row.woocommerce-validated textarea { border-color: color-mix(in srgb, var(--lux-success) 46%, transparent) !important; } .lux-checkout-wrap .woocommerce form .form-row .woocommerce-input-wrapper { display: block; width: 100%; } .lux-checkout-wrap .select2-container { width: 100% !important; min-height: 52px; direction: rtl; } .lux-checkout-wrap .select2-container .select2-selection--single { height: 52px !important; border-radius: 14px !important; border: 1px solid var(--lux-outline) !important; background: color-mix(in srgb, var(--lux-surface) 92%, transparent) !important; display: flex !important; align-items: center !important; outline: 0 !important; } .lux-checkout-wrap .select2-container .select2-selection--single .select2-selection__rendered { width: 100%; padding: 0 15px 0 34px !important; color: var(--lux-text) !important; line-height: 52px !important; text-align: right; } .lux-checkout-wrap .select2-container .select2-selection--single .select2-selection__arrow { height: 52px !important; left: 8px !important; right: auto !important; } .lux-checkout-wrap .select2-container--open .select2-selection--single { border-color: color-mix(in srgb, var(--lux-primary) 58%, transparent) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lux-primary) 10%, transparent) !important; } .select2-dropdown { direction: rtl; text-align: right; font-family: "Vazirmatn", system-ui, sans-serif; border-radius: 14px !important; border-color: color-mix(in srgb, #0b1c30 14%, transparent) !important; overflow: hidden; } .lux-checkout-wrap .woocommerce-account-fields, .lux-checkout-wrap .woocommerce-shipping-fields, .lux-checkout-wrap .woocommerce-additional-fields { margin-top: 10px; } .lux-checkout-wrap #ship-to-different-address { margin: 0 0 20px !important; padding: 0 !important; border: 0 !important; background: transparent !important; font-size: 15px; line-height: 1.7; } .lux-checkout-wrap #ship-to-different-address::before { display: none !important; content: none !important; } .lux-checkout-wrap #ship-to-different-address label { width: 100%; min-height: 52px; display: flex !important; align-items: center; justify-content: space-between; gap: 12px; margin: 0 !important; padding: 12px 16px; border-radius: 16px; background: var(--lux-surface-soft); border: 1px solid var(--lux-outline); cursor: pointer; font-size: 14px; font-weight: 900; color: var(--lux-text); } .lux-checkout-wrap #ship-to-different-address input[type="checkbox"] { order: 2; margin: 0 !important; flex: 0 0 auto; } .lux-checkout-wrap #ship-to-different-address span { order: 1; flex: 1 1 auto; text-align: right; } .lux-checkout-wrap input[type="checkbox"], .lux-checkout-wrap input[type="radio"] { width: 18px; height: 18px; accent-color: var(--lux-primary); } .lux-checkout-wrap .woocommerce-checkout-review-order-table { width: 100%; margin: 0 0 18px !important; border: 0 !important; border-collapse: separate !important; border-spacing: 0 8px !important; background: transparent !important; table-layout: fixed; } .lux-checkout-wrap .woocommerce-checkout-review-order-table thead { display: none; } .lux-checkout-wrap .woocommerce-checkout-review-order-table th, .lux-checkout-wrap .woocommerce-checkout-review-order-table td { border: 0 !important; padding: 10px 10px !important; background: var(--lux-surface-soft); color: var(--lux-text); font-size: 13px; line-height: 1.65; vertical-align: middle; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tr th:first-child, .lux-checkout-wrap .woocommerce-checkout-review-order-table tr td:first-child { border-radius: 0 14px 14px 0; text-align: right; width: 64%; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tr th:last-child, .lux-checkout-wrap .woocommerce-checkout-review-order-table tr td:last-child { border-radius: 14px 0 0 14px; text-align: left; width: 36%; font-family: "JetBrains Mono", "Vazirmatn", monospace; font-weight: 800; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item td { padding-top: 9px !important; padding-bottom: 9px !important; background: color-mix(in srgb, var(--lux-surface) 91%, var(--lux-primary) 9%); font-size: 12.5px; line-height: 1.55; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-name { font-weight: 800; word-break: normal; overflow-wrap: anywhere; letter-spacing: -.01em; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total { white-space: nowrap; font-size: 12.5px; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total bdi { font-size: 12.5px; font-weight: 900; white-space: nowrap; } .lux-checkout-wrap .woocommerce-checkout-review-order-table .product-name { font-weight: 800; word-break: break-word; } .lux-checkout-wrap .woocommerce-checkout-review-order-table .product-total { white-space: nowrap; } .lux-checkout-wrap .woocommerce-checkout-review-order-table .product-quantity { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; min-height: 20px; margin-right: 5px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--lux-primary) 12%, transparent); color: var(--lux-primary); font-family: "JetBrains Mono", "Vazirmatn", monospace; font-size: 11px; line-height: 1.4; font-weight: 900; vertical-align: middle; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot th, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot td { background: color-mix(in srgb, var(--lux-surface) 92%, var(--lux-primary) 8%); font-size: 13px; line-height: 1.65; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot bdi { font-size: 13px; font-weight: 900; white-space: nowrap; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total { display: grid !important; grid-template-columns: 1fr; gap: 5px; margin-top: 2px; padding: 14px 15px !important; border-radius: 18px !important; background: linear-gradient(135deg, color-mix(in srgb, var(--lux-primary) 13%, var(--lux-surface)), color-mix(in srgb, var(--lux-secondary) 18%, var(--lux-surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lux-primary) 12%, transparent); width: 100%; box-sizing: border-box; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total th, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td { display: block !important; width: 100% !important; padding: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--lux-text); text-align: right !important; font-weight: 950; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total th { color: var(--lux-muted); font-size: 13px; line-height: 1.45; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { display: inline-block; color: var(--lux-primary); font-size: clamp(20px, 2.15vw, 25px); line-height: 1.25; font-weight: 950; white-space: nowrap; } .lux-checkout-wrap #shipping_method { margin: 0 !important; padding: 0 !important; list-style: none !important; text-align: right; } .lux-checkout-wrap #shipping_method li { display: flex; align-items: flex-start; justify-content: flex-start; gap: 8px; margin: 0 0 8px !important; padding: 0 !important; line-height: 1.7; } .lux-checkout-wrap #shipping_method li input { margin: 4px 0 0 6px !important; flex: 0 0 auto; } .lux-checkout-wrap #shipping_method li label { margin: 0 !important; color: var(--lux-text); font-size: 13px; font-weight: 800; line-height: 1.8; } .lux-checkout-wrap .woocommerce #payment { background: transparent !important; border-radius: 0 !important; } .lux-checkout-wrap .woocommerce #payment ul.payment_methods { margin: 0 0 18px !important; padding: 0 !important; border: 0 !important; list-style: none !important; } .lux-checkout-wrap .woocommerce #payment ul.payment_methods li { margin: 0 0 10px !important; padding: 14px !important; border-radius: 16px; border: 1px solid var(--lux-outline); background: color-mix(in srgb, var(--lux-surface) 92%, transparent); color: var(--lux-text); line-height: 1.8; } .lux-checkout-wrap .woocommerce #payment ul.payment_methods li label { cursor: pointer; font-weight: 900; } .lux-checkout-wrap .woocommerce #payment div.payment_box { margin: 12px 0 0 !important; padding: 13px 14px !important; border-radius: 14px !important; background: var(--lux-surface-soft) !important; color: var(--lux-muted) !important; font-size: 13px; line-height: 1.9; } .lux-checkout-wrap .woocommerce #payment div.payment_box::before { display: none !important; } .lux-checkout-wrap .woocommerce #payment .place-order { margin: 0 !important; padding: 0 !important; } .lux-checkout-wrap .woocommerce #payment .woocommerce-privacy-policy-text, .lux-checkout-wrap .woocommerce #payment .woocommerce-terms-and-conditions-wrapper { margin: 0 0 14px; color: var(--lux-muted); font-size: 13px; line-height: 1.9; } .lux-checkout-wrap .woocommerce #payment .woocommerce-privacy-policy-text a, .lux-checkout-wrap .woocommerce #payment .woocommerce-terms-and-conditions-wrapper a { color: var(--lux-primary); font-weight: 800; text-decoration: none; } .lux-checkout-wrap .woocommerce #payment #place_order, .lux-checkout-wrap .lux-btn, .lux-checkout-wrap .woocommerce button.button, .lux-checkout-wrap .woocommerce a.button, .lux-checkout-wrap .woocommerce input.button { width: 100%; min-height: 58px; display: inline-flex !important; align-items: center; justify-content: center; gap: 10px; margin: 0 !important; padding: 14px 18px !important; border: 0 !important; border-radius: 16px !important; background: linear-gradient(90deg, var(--lux-primary), var(--lux-secondary)) !important; color: #fff !important; font-size: 17px !important; line-height: 1.4 !important; font-weight: 950 !important; text-decoration: none !important; cursor: pointer; position: relative; overflow: hidden; box-shadow: 0 18px 35px color-mix(in srgb, var(--lux-primary) 26%, transparent); transition: transform .22s ease, box-shadow .25s ease, filter .25s ease; } .lux-checkout-wrap .woocommerce #payment #place_order:hover, .lux-checkout-wrap .lux-btn:hover, .lux-checkout-wrap .woocommerce button.button:hover, .lux-checkout-wrap .woocommerce a.button:hover, .lux-checkout-wrap .woocommerce input.button:hover { transform: translateY(-3px); box-shadow: 0 24px 46px color-mix(in srgb, var(--lux-primary) 34%, transparent); filter: saturate(1.08); } .lux-checkout-wrap .lux-btn-ghost { background: var(--lux-surface-soft) !important; color: var(--lux-primary) !important; box-shadow: none !important; border: 1px solid var(--lux-outline) !important; } .lux-checkout-wrap .woocommerce-info, .lux-checkout-wrap .woocommerce-message, .lux-checkout-wrap .woocommerce-error { min-height: auto !important; margin: 0 0 12px !important; padding: 13px 18px !important; border-radius: 16px !important; border: 1px solid var(--lux-outline) !important; background: color-mix(in srgb, var(--lux-surface) 92%, var(--lux-primary) 8%) !important; color: var(--lux-text) !important; font-size: 14px !important; line-height: 1.9 !important; list-style: none !important; box-shadow: 0 12px 32px rgba(11, 28, 48, .05); text-align: right; } .lux-checkout-wrap .woocommerce-error { background: var(--lux-danger-bg) !important; color: var(--lux-danger) !important; } .lux-checkout-wrap .woocommerce-info::before, .lux-checkout-wrap .woocommerce-message::before, .lux-checkout-wrap .woocommerce-error::before { display: none !important; } .lux-checkout-wrap .woocommerce-info a, .lux-checkout-wrap .woocommerce-message a, .lux-checkout-wrap .woocommerce-error a { color: var(--lux-primary); font-weight: 900; text-decoration: none; } .lux-checkout-wrap form.checkout_coupon, .lux-checkout-wrap form.login { margin: 0 0 22px !important; padding: 22px !important; border-radius: 22px !important; border: 1px dashed var(--lux-outline) !important; background: color-mix(in srgb, var(--lux-surface) 86%, transparent) !important; box-shadow: 0 14px 38px rgba(11, 28, 48, .05); } .lux-checkout-wrap form.checkout_coupon p, .lux-checkout-wrap form.login p { color: var(--lux-muted); line-height: 1.9; } .lux-checkout-wrap form.checkout_coupon .form-row { margin-bottom: 12px !important; } .lux-checkout-wrap form.checkout_coupon .button, .lux-checkout-wrap form.login .button { width: auto !important; min-width: 150px; padding-left: 22px !important; padding-right: 22px !important; } .lux-checkout-wrap .woocommerce .blockUI.blockOverlay { border-radius: 24px; background: rgba(255,255,255,.35) !important; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); } .lux-empty { min-height: 48vh; display: flex; align-items: center; justify-content: center; text-align: center; } .lux-empty-card { max-width: 590px; width: 100%; padding: 42px 28px; border-radius: 28px; animation: luxCheckoutSlideUp .62s cubic-bezier(.22, 1, .36, 1) both; } .lux-empty-icon { width: 86px; height: 86px; border-radius: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; background: linear-gradient(135deg, var(--lux-primary), var(--lux-secondary)); color: #fff; box-shadow: 0 18px 40px color-mix(in srgb, var(--lux-primary) 25%, transparent); } .lux-empty-icon .material-symbols-outlined { font-size: 44px; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 48; } .lux-empty h2 { margin: 0 0 10px; font-size: 28px; font-weight: 950; } .lux-empty p { margin: 0 0 24px; color: var(--lux-muted); line-height: 1.9; } .lux-empty-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .lux-checkout-wrap .material-symbols-outlined { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; vertical-align: middle; } @keyframes luxCheckoutSlideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } } @media (max-width: 1180px) { .lux-checkout-wrap .woocommerce form.checkout { grid-template-columns: 1fr; gap: 24px !important; } .lux-checkout-wrap .woocommerce .col2-set, .lux-checkout-wrap .woocommerce #order_review_heading, .lux-checkout-wrap .woocommerce #order_review { grid-column: 1; grid-row: auto; } .lux-checkout-wrap .woocommerce #order_review { position: relative; top: auto; } } @media (max-width: 860px) { .lux-checkout-shell { padding: 24px 0 42px; } .lux-checkout-hero { flex-direction: column; align-items: flex-start; padding: 24px; } .lux-checkout-steps { width: 100%; justify-content: space-between; } .lux-step { min-width: 0; flex: 1 1 0; } .lux-checkout-wrap .woocommerce .col2-set { grid-template-columns: 1fr; } .lux-checkout-wrap .woocommerce form .form-row-first, .lux-checkout-wrap .woocommerce form .form-row-last { width: 100% !important; float: none !important; clear: both !important; } } @media (max-width: 560px) { .lux-checkout-hero h1 { font-size: 30px; } .lux-checkout-hero p { font-size: 14px; } .lux-checkout-steps { gap: 6px; padding: 7px; } .lux-step { padding: 10px 5px; } .lux-step span { width: 30px; height: 30px; } .lux-step strong { font-size: 11px; } .lux-checkout-wrap .woocommerce .col2-set .col-1, .lux-checkout-wrap .woocommerce .col2-set .col-2, .lux-checkout-wrap .woocommerce #order_review, .lux-checkout-wrap .woocommerce #order_review_heading { padding-left: 18px !important; padding-right: 18px !important; } .lux-checkout-wrap .woocommerce #order_review_heading { margin-top: 20px; } .lux-checkout-wrap .woocommerce-checkout-review-order-table th, .lux-checkout-wrap .woocommerce-checkout-review-order-table td { padding: 9px 8px !important; font-size: 12.5px; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item td, .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total, .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total bdi { font-size: 12px; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total { padding: 13px 14px !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { font-size: 20px; } .lux-empty-actions { grid-template-columns: 1fr; } } /* ============================== Mobile Pro Responsive Layer ============================== */ .lux-checkout-wrap { --lux-mobile-page-pad: 14px; --lux-bottom-safe: env(safe-area-inset-bottom, 0px); } .lux-checkout-wrap .woocommerce, .lux-checkout-wrap .woocommerce form.checkout, .lux-checkout-wrap .woocommerce .col2-set, .lux-checkout-wrap .woocommerce #order_review, .lux-checkout-wrap .woocommerce #order_review_heading, .lux-checkout-wrap .woocommerce-checkout-review-order-table { max-width: 100% !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table, .lux-checkout-wrap .woocommerce-checkout-review-order-table * { max-width: 100%; } @media (max-width: 760px) { body:has(.lux-checkout-wrap) { overflow-x: hidden; } .lux-checkout-wrap { overflow-x: hidden !important; } .lux-checkout-shell { width: 100%; padding: 14px var(--lux-mobile-page-pad) calc(88px + var(--lux-bottom-safe)); } .lux-checkout-hero { margin: 0 0 14px; padding: 18px 16px; border-radius: 22px; gap: 14px; box-shadow: 0 12px 34px rgba(11, 28, 48, .06); } .lux-checkout-hero::before { width: 260px; height: 260px; inset: -95px auto auto -90px; } .lux-kicker { min-height: 30px; margin-bottom: 8px; padding: 5px 11px; font-size: 11.5px; } .lux-kicker .material-symbols-outlined { font-size: 18px; } .lux-checkout-hero h1 { margin-bottom: 6px; font-size: 26px; line-height: 1.25; letter-spacing: -.03em; } .lux-checkout-hero p { font-size: 13px; line-height: 1.85; } .lux-checkout-steps { width: 100%; gap: 6px; padding: 6px; border-radius: 18px; } .lux-step { min-width: 0; flex: 1 1 0; gap: 5px; padding: 9px 4px; border-radius: 13px; } .lux-step span { width: 28px; height: 28px; font-size: 12px; } .lux-step strong { font-size: 10.5px; line-height: 1.4; } .lux-checkout-wrap .woocommerce-notices-wrapper, .lux-checkout-wrap .woocommerce-NoticeGroup, .lux-checkout-wrap .woocommerce-form-coupon-toggle, .lux-checkout-wrap .woocommerce-form-login-toggle { margin-bottom: 10px !important; } .lux-checkout-wrap .woocommerce-info, .lux-checkout-wrap .woocommerce-message, .lux-checkout-wrap .woocommerce-error { padding: 11px 13px !important; border-radius: 14px !important; font-size: 12.5px !important; line-height: 1.85 !important; } .lux-checkout-wrap .woocommerce form.checkout { display: flex !important; flex-direction: column !important; gap: 14px !important; width: 100% !important; } .lux-checkout-wrap .woocommerce .col2-set { order: 1; display: flex !important; flex-direction: column !important; gap: 14px !important; width: 100% !important; } .lux-checkout-wrap .woocommerce .col2-set .col-1, .lux-checkout-wrap .woocommerce .col2-set .col-2 { width: 100% !important; padding: 18px 16px !important; border-radius: 22px !important; box-shadow: 0 12px 34px rgba(11, 28, 48, .06); } .lux-checkout-wrap .woocommerce-billing-fields h3, .lux-checkout-wrap .woocommerce-shipping-fields h3:not(#ship-to-different-address), .lux-checkout-wrap .woocommerce-additional-fields h3 { margin-bottom: 15px !important; font-size: 19px; line-height: 1.45; } .lux-checkout-wrap .woocommerce-billing-fields h3::before, .lux-checkout-wrap .woocommerce-shipping-fields h3:not(#ship-to-different-address)::before, .lux-checkout-wrap .woocommerce-additional-fields h3::before, .lux-checkout-wrap .woocommerce #order_review_heading::before { width: 9px; height: 24px; } .lux-checkout-wrap .woocommerce form .form-row { margin-bottom: 13px !important; } .lux-checkout-wrap .woocommerce form .form-row-first, .lux-checkout-wrap .woocommerce form .form-row-last { width: 100% !important; float: none !important; clear: both !important; } .lux-checkout-wrap .woocommerce form .form-row label { margin-bottom: 6px; font-size: 12.5px; line-height: 1.65; } .lux-checkout-wrap .woocommerce form .form-row .input-text, .lux-checkout-wrap .woocommerce form .form-row input[type="text"], .lux-checkout-wrap .woocommerce form .form-row input[type="email"], .lux-checkout-wrap .woocommerce form .form-row input[type="tel"], .lux-checkout-wrap .woocommerce form .form-row input[type="password"], .lux-checkout-wrap .woocommerce form .form-row textarea, .lux-checkout-wrap .woocommerce form .form-row select { min-height: 48px; padding: 11px 13px !important; border-radius: 13px !important; font-size: 13.5px !important; } .lux-checkout-wrap .woocommerce form .form-row textarea { min-height: 100px; } .lux-checkout-wrap .select2-container, .lux-checkout-wrap .select2-container .select2-selection--single, .lux-checkout-wrap .select2-container .select2-selection--single .select2-selection__arrow { min-height: 48px; height: 48px !important; } .lux-checkout-wrap .select2-container .select2-selection--single .select2-selection__rendered { line-height: 48px !important; padding-right: 13px !important; font-size: 13.5px; } .lux-checkout-wrap #ship-to-different-address label { min-height: 48px; padding: 11px 13px; border-radius: 15px; font-size: 12.5px; } .lux-checkout-wrap .woocommerce #order_review_heading { order: 2; width: 100% !important; margin: 2px 0 0 !important; padding: 18px 18px 8px !important; border-radius: 22px 22px 0 0; font-size: 20px; line-height: 1.45; box-shadow: 0 12px 34px rgba(11, 28, 48, .06); } .lux-checkout-wrap .woocommerce #order_review { order: 3; position: relative !important; top: auto !important; width: 100% !important; overflow: visible !important; padding: 10px 14px 16px !important; border-radius: 0 0 22px 22px; box-shadow: 0 12px 34px rgba(11, 28, 48, .06); margin-top: 0 !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table { display: block !important; width: 100% !important; margin-bottom: 14px !important; border-spacing: 0 !important; table-layout: auto !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot { display: block !important; width: 100% !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 6px; width: 100% !important; margin: 0 0 8px !important; padding: 11px 12px !important; border-radius: 16px !important; background: color-mix(in srgb, var(--lux-surface) 91%, var(--lux-primary) 9%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lux-primary) 8%, transparent); } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item td { display: block !important; width: 100% !important; padding: 0 !important; border-radius: 0 !important; background: transparent !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-name { font-size: 12px !important; line-height: 1.7 !important; font-weight: 850; overflow-wrap: anywhere; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total { margin-top: 2px; color: var(--lux-primary); text-align: right !important; white-space: normal !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-total bdi { font-size: 13px !important; line-height: 1.45 !important; font-weight: 950; white-space: nowrap !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table .product-quantity { min-width: 22px; min-height: 19px; margin-right: 4px; padding: 0 6px; font-size: 10.5px; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 4px; width: 100% !important; margin: 0 0 8px !important; padding: 10px 12px !important; border-radius: 15px !important; background: color-mix(in srgb, var(--lux-surface) 92%, var(--lux-primary) 8%); } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr th, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr td { display: block !important; width: 100% !important; padding: 0 !important; border-radius: 0 !important; background: transparent !important; text-align: right !important; font-size: 12.5px; line-height: 1.65; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr td { color: var(--lux-text); font-family: "JetBrains Mono", "Vazirmatn", monospace; font-weight: 900; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot bdi { font-size: 13px; line-height: 1.5; white-space: nowrap; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important; width: 100% !important; margin: 10px 0 0 !important; padding: 15px 14px !important; border-radius: 18px !important; background: linear-gradient(135deg, color-mix(in srgb, var(--lux-primary) 13%, var(--lux-surface)), color-mix(in srgb, var(--lux-secondary) 18%, var(--lux-surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lux-primary) 12%, transparent); } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total th { color: var(--lux-muted); font-size: 12.5px; line-height: 1.45; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { display: inline-block; max-width: 100%; color: var(--lux-primary); font-size: 20px !important; line-height: 1.3; font-weight: 950; white-space: nowrap; } .lux-checkout-wrap #shipping_method li { align-items: flex-start; margin-bottom: 7px !important; padding: 8px 9px !important; border-radius: 12px; background: color-mix(in srgb, var(--lux-surface) 82%, transparent); } .lux-checkout-wrap #shipping_method li label { font-size: 12px; line-height: 1.75; } .lux-checkout-wrap .woocommerce #payment ul.payment_methods { margin-bottom: 12px !important; } .lux-checkout-wrap .woocommerce #payment ul.payment_methods li { margin-bottom: 8px !important; padding: 12px !important; border-radius: 15px; font-size: 12.5px; line-height: 1.8; } .lux-checkout-wrap .woocommerce #payment div.payment_box { margin-top: 10px !important; padding: 11px 12px !important; border-radius: 13px !important; font-size: 12px; line-height: 1.8; } .lux-checkout-wrap .woocommerce #payment .woocommerce-privacy-policy-text, .lux-checkout-wrap .woocommerce #payment .woocommerce-terms-and-conditions-wrapper { font-size: 11.5px; line-height: 1.9; } .lux-checkout-wrap .woocommerce #payment .place-order { position: sticky; bottom: calc(10px + var(--lux-bottom-safe)); z-index: 50; margin: 0 -4px -4px !important; padding: 10px !important; border-radius: 22px; background: color-mix(in srgb, var(--lux-surface) 82%, transparent); box-shadow: 0 18px 45px rgba(11, 28, 48, .16); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); } .lux-checkout-wrap .woocommerce #payment #place_order, .lux-checkout-wrap .lux-btn, .lux-checkout-wrap .woocommerce button.button, .lux-checkout-wrap .woocommerce a.button, .lux-checkout-wrap .woocommerce input.button { min-height: 54px; border-radius: 16px !important; font-size: 15px !important; } .lux-checkout-wrap form.checkout_coupon, .lux-checkout-wrap form.login { padding: 16px !important; border-radius: 18px !important; } .lux-empty-card { padding: 30px 18px; border-radius: 22px; } .lux-empty-icon { width: 72px; height: 72px; border-radius: 24px; } .lux-empty h2 { font-size: 23px; } .lux-empty p { font-size: 13px; } .lux-empty-actions { grid-template-columns: 1fr; } } @media (max-width: 390px) { .lux-checkout-wrap { --lux-mobile-page-pad: 10px; } .lux-checkout-hero { padding: 16px 14px; border-radius: 20px; } .lux-checkout-hero h1 { font-size: 24px; } .lux-checkout-steps { gap: 4px; } .lux-step strong { font-size: 10px; } .lux-checkout-wrap .woocommerce .col2-set .col-1, .lux-checkout-wrap .woocommerce .col2-set .col-2 { padding: 16px 13px !important; } .lux-checkout-wrap .woocommerce #order_review_heading { padding: 16px 15px 7px !important; font-size: 19px; } .lux-checkout-wrap .woocommerce #order_review { padding: 9px 11px 14px !important; } .lux-checkout-wrap .woocommerce form .form-row .input-text, .lux-checkout-wrap .woocommerce form .form-row input[type="text"], .lux-checkout-wrap .woocommerce form .form-row input[type="email"], .lux-checkout-wrap .woocommerce form .form-row input[type="tel"], .lux-checkout-wrap .woocommerce form .form-row input[type="password"], .lux-checkout-wrap .woocommerce form .form-row textarea, .lux-checkout-wrap .woocommerce form .form-row select { min-height: 46px; font-size: 13px !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item { padding: 10px 10px !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tbody .cart_item .product-name { font-size: 11.5px !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { font-size: 18px !important; } } /* ============================== Final Price Box Overflow Fix - V6 Keeps the order total inside its card on large and small screens. ============================== */ @media (min-width: 1181px) { .lux-checkout-wrap .woocommerce form.checkout { grid-template-columns: minmax(0, 1.42fr) minmax(390px, .82fr); } } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; overflow: hidden !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total th, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; overflow: hidden !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td { text-align: right !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { max-width: 100% !important; min-width: 0 !important; font-size: clamp(16px, 1.65vw, 22px) !important; line-height: 1.35 !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; text-align: right !important; } @media (max-width: 760px) { .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total { padding: 14px 12px !important; } .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { font-size: clamp(15px, 4.4vw, 18px) !important; line-height: 1.35 !important; } } @media (max-width: 390px) { .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td strong, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td .amount, .lux-checkout-wrap .woocommerce-checkout-review-order-table tfoot tr.order-total td bdi { font-size: 15px !important; } } </style> <script> (function() { var root = document.getElementById(<?php echo wp_json_encode( $instance_id ); ?>); if (!root || root.dataset.luxReady === '1') return; root.dataset.luxReady = '1'; var hideChromeEnabled = <?php echo $hide_chrome ? 'true' : 'false'; ?>; function hideChrome() { if (!hideChromeEnabled) return; document.body.classList.add('lux-checkout-page-active'); var selectors = [ '#masthead', '.site-header', 'header.wp-block-template-part', '.wp-site-blocks > header', '.elementor-location-header', '.elementor-header', '#colophon', '.site-footer', 'footer.wp-block-template-part', '.wp-site-blocks > footer', '.elementor-location-footer', '.elementor-footer' ]; document.querySelectorAll(selectors.join(',')).forEach(function(el) { if (!root.contains(el)) { el.setAttribute('data-lux-hidden-chrome', '1'); el.style.setProperty('display', 'none', 'important'); } }); } function enhanceFields() { var fields = root.querySelectorAll('.form-row input, .form-row textarea, .form-row select'); fields.forEach(function(field) { if (field.dataset.luxEnhanced === '1') return; var row = field.closest('.form-row'); if (!row) return; field.dataset.luxEnhanced = '1'; function sync() { if (field.value && String(field.value).trim() !== '') { row.classList.add('lux-has-value'); } else { row.classList.remove('lux-has-value'); } } field.addEventListener('focus', function() { row.classList.add('lux-is-focused'); }); field.addEventListener('blur', function() { row.classList.remove('lux-is-focused'); sync(); }); field.addEventListener('change', sync); field.addEventListener('input', sync); sync(); }); } function cleanupWooNotices() { var seen = {}; var notices = root.querySelectorAll('.woocommerce-info, .woocommerce-message, .woocommerce-error'); notices.forEach(function(notice) { var text = (notice.textContent || '').replace(/\s+/g, ' ').trim(); var normalized = text.toLowerCase(); if (!text) return; if ( text.indexOf('منطقه منطبق با مشتری') !== -1 || normalized.indexOf('matched customer zone') !== -1 || normalized.indexOf('customer matched zone') !== -1 ) { notice.classList.add('lux-hidden-debug-notice'); return; } if (seen[text]) { notice.classList.add('lux-hidden-duplicate-notice'); return; } seen[text] = true; }); } function fixOrderReviewTitle() { var title = root.querySelector('#order_review_heading'); if (!title) return; title.textContent = (title.textContent || 'سفارش شما').replace(/\s+/g, ' ').trim(); } function refreshUI() { hideChrome(); enhanceFields(); cleanupWooNotices(); fixOrderReviewTitle(); } function observeCheckoutUpdates() { if (!window.MutationObserver) return; var target = root.querySelector('.woocommerce') || root; var observer = new MutationObserver(function() { refreshUI(); }); observer.observe(target, { childList: true, subtree: true }); } document.addEventListener('DOMContentLoaded', function() { refreshUI(); observeCheckoutUpdates(); }); refreshUI(); if (window.jQuery) { window.jQuery(document.body).on('updated_checkout country_to_state_changed checkout_error applied_coupon removed_coupon', function() { refreshUI(); }); } })(); </script> <?php return ob_get_clean(); } } Luxury_Reload_Woo_Checkout_Shortcode_Fixed_V5::init(); }