/* ==================================================
   تصميم صفحة إتمام الطلب (Fast Checkout)
   ================================================== */
.fcdz-checkout-wrapper {
    max-width: 1250px; /* توسيع عرض الاستمارة بناءً على طلب المستخدم */
    margin: 40px auto;
    padding: 0 20px;
    direction: rtl;
}

.fcdz-checkout-header {
    background: #1f1f2e; 
    color: #fff;
    padding: 15px 25px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.fcdz-checkout-header h2 {
    margin: 0;
    font-size: 22px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcdz-checkout-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr; /* إعطاء مساحة أكبر بكثير لحقول الاستمارة (العمود الأيمن) */
    gap: 30px;
    align-items: start;
}

/* تصميم البطاقات العامة */
.fcdz-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px; /* توسيع حشو البطاقات */
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #eaeaea;
}

.fcdz-card h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color, #00b4ff);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 15px;
}

/* ترتيب الحقول جنباً إلى جنب في صفحة الدفع */
.fcdz-checkout-right .fcdz-form-row {
    display: flex;
    gap: 15px;
}

/* ==================================================
   ملخص الطلب - المنتجات
   ================================================== */
.fcdz-summary-card {
    background: #fbfbfb;
}


/* الأسعار النهائية */
.fcdz-total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--fcdz-secondary, #555);
}

.fcdz-grand-total {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-color, #00b4ff);
    border-top: 2px dashed #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

/* ==================================================
   مؤشر التقدم نحو الشحن المجاني (Dynamic Progress)
   ================================================== */
.fcdz-fship-progress {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1.5px dashed #86efac;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin: 12px 0;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.fcdz-fship-progress strong {
    font-weight: 900;
}

.fcdz-fship-progress.completed {
    background: #dcfce7;
    border-style: solid;
    border-color: #4ade80;
}

/* طريقة الدفع والزر النهائي */
.fcdz-payment-method {
    background: #e6f7eb;
    color: #27ae60;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    margin: 25px 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #c3e6cb;
}

.fcdz-submit-btn {
    width: 100%;
    background: var(--primary-color, #00b4ff);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* [تحسين] تفعيل GPU acceleration للـ hover animation */
    will-change: transform;
    contain: layout style;
}

.fcdz-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0.95;
}

/* ==================================================
   خيارات الشحن الاحترافية
   ================================================== */
.fcdz-shipping-options-pro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fcdz-shipping-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fcdz-shipping-card.active {
    border-color: var(--fcdz-primary, #00b4ff);
    box-shadow: 0 0 0 1px var(--fcdz-primary, #00b4ff);
    background-color: #fafafa;
}

.fcdz-shipping-radio-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.fcdz-shipping-radio-title input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: 0.2s;
    background-color: #fff;
}
.fcdz-shipping-radio-title input[type="radio"]:checked {
    border-color: var(--fcdz-primary, #00b4ff);
    background-color: var(--fcdz-primary, #00b4ff);
}
.fcdz-shipping-radio-title input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
}

.fcdz-shipping-card-price {
    font-weight: bold;
    color: var(--fcdz-secondary, #888);
    font-size: 15px;
}

.fcdz-shipping-card.active .fcdz-shipping-card-price {
    color: var(--fcdz-primary, #00b4ff);
}

/* ============================================================
   نظام التنبيهات (Toast) والتحقق من الحقول
   ============================================================ */
.form-toast { 
    position: fixed; 
    top: 20px; 
    left: 50%; 
    transform: translate(-50%, -20px); 
    width: calc(100% - 40px); 
    max-width: 400px; 
    padding: 15px 20px; 
    border-radius: 12px; 
    color: #fff; 
    font-weight: 600; 
    font-size: 15px; 
    z-index: 999999; 
    opacity: 0; 
    transition: transform .4s ease, opacity .4s ease; 
    box-shadow: 0 8px 25px rgba(0,0,0,.2); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    direction: rtl; 
    box-sizing: border-box;
    /* [تحسين] تفعيل GPU acceleration للرسائل لتسريع الـ rendering */
    will-change: transform, opacity;
}
.form-toast.show { opacity: 1; transform: translate(-50%, 0); }
.form-toast.error { background: linear-gradient(135deg, #ff4757, #ff3344); }
.form-toast.warning { background: linear-gradient(135deg, #ffa502, #ff7f00); }
.form-toast.success { background: linear-gradient(135deg, #2ed573, #17c964); }
.form-toast svg { width: 24px; height: 24px; flex-shrink: 0; }
.form-toast .toast-close { margin-right: auto; background: rgba(255,255,255,.2); border: none; color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; line-height: 1; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.field-error { animation: shake .5s ease; border-color: #ff4757 !important; box-shadow: 0 0 0 3px rgba(255,71,87,.25) !important; }
.fcdz-custom-dropdown.field-error .fcdz-dropdown-header { border-color: #ff4757 !important; box-shadow: 0 0 0 3px rgba(255,71,87,.25) !important; }
.field-success { border-color: #2ed573 !important; box-shadow: 0 0 0 3px rgba(46,213,115,.25) !important; }

/* ========================================================
   تجاوب الشاشات الصغيرة (الهواتف)
   ======================================================== */
@media (max-width: 768px) {
    .fcdz-checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .fcdz-checkout-right .fcdz-form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .fcdz-checkout-right {
        order: 1 !important; /* إجبار الاستمارة على الظهور أولاً في الهاتف */
    }
    .fcdz-checkout-left {
        order: 2 !important; /* إجبار ملخص الطلب على الظهور في الأسفل */
    }
}
/* ==================================================
   تصميم القوائم المنسدلة الذكية (Searchable Dropdowns) المشتركة
   ================================================== */
.fcdz-custom-dropdown {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.fcdz-custom-dropdown.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.fcdz-custom-dropdown.disabled .fcdz-dropdown-header {
    background-color: #f9f9f9;
}

.fcdz-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s border-color, 0.3s box-shadow;
}

.fcdz-dropdown-header .dashicons {
    display: none !important;
}

.fcdz-dropdown-header::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.3s ease;
}

.fcdz-custom-dropdown.open .fcdz-dropdown-header::after {
    transform: rotate(180deg);
}

.fcdz-dropdown-header:hover, .fcdz-custom-dropdown.open .fcdz-dropdown-header {
    border-color: var(--fcdz-primary, #00b4ff);
}

.fcdz-custom-dropdown.open .fcdz-dropdown-header {
    box-shadow: 0 0 0 1px var(--fcdz-primary, #00b4ff);
}

.fcdz-selected-text {
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* إخفاء جسم القائمة وعرضه فقط عند النقر (سبب المشكلة كان غياب هذا السطر) */
.fcdz-dropdown-body {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    overflow: hidden;
}

.fcdz-custom-dropdown.open .fcdz-dropdown-body {
    display: block;
    animation: fadeInDown 0.2s ease;
    /* [تحسين] عزل الـ dropdown عن باقي الصفحة - يمنع Layout Thrashing */
    contain: layout style;
}

.fcdz-search-container {
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #fdfdfd;
    position: relative;
    direction: rtl;
}

.fcdz-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fcdz-secondary, #94a3b8);
    font-size: 16px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.fcdz-search-container input {
    width: 100%;
    padding: 10px 44px 10px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    background: #fff !important;
    direction: rtl !important;
    text-align: right !important;
}

.fcdz-search-container input:focus {
    border-color: var(--fcdz-primary, #00b4ff) !important;
}

.fcdz-options-list {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    max-height: 220px;
    overflow-y: auto;
}

.fcdz-options-list li {
    padding: 12px 15px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #444;
}

.fcdz-options-list li:last-child {
    border-bottom: none;
}

.fcdz-options-list li:hover {
    background: #f4f4f4;
}

.fcdz-options-list li.selected {
    background: var(--fcdz-primary, #00b4ff);
    color: #fff;
}

.fcdz-options-list li .wilaya-num {
    background: #eef2f5;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.fcdz-options-list li.selected .wilaya-num {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.fcdz-no-results {
    padding: 15px;
    text-align: center;
    color: var(--fcdz-secondary, #888);
    font-size: 13px;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   شريط ندرة المخزون (Stock Scarcity Bar)
   ================================================== */
.fcdz-stock-bar-wrap {
    direction: rtl;
    margin: 4px 0 18px 0;
    padding: 12px 14px;
    background: #fafafa;
    border: 1.5px dashed var(--fcdz-stock-color, #27ae60);
    border-radius: 10px;
    box-sizing: border-box;
    animation: fcdzStockFadeIn 0.4s ease;
}
.fcdz-stock-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 9px;
    line-height: 1.4;
}
.fcdz-stock-bar-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}
.fcdz-stock-num {
    color: var(--fcdz-stock-color, #27ae60);
    font-weight: 900;
    font-size: 14.5px;
}
.fcdz-stock-bar-track {
    width: 100%;
    height: 7px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.fcdz-stock-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--fcdz-stock-color, #27ae60);
    transition: width 0.6s ease;
}
.fcdz-stock-bar-critical .fcdz-stock-bar-fill {
    animation: fcdzStockPulse 1.3s infinite ease-in-out;
}
@keyframes fcdzStockPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes fcdzStockFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .fcdz-stock-bar-wrap { padding: 10px 12px; }
    .fcdz-stock-bar-label { font-size: 12.5px; }
}

.fcdz-custom-dropdown.open {
    z-index: 9999999 !important;
}

/* ==================================================
   القوائم المنسدلة في الجوال (Full-Screen Dropdown)
   ================================================== */
@media (max-width: 768px) {
    .fcdz-custom-dropdown.open {
        z-index: 9999999 !important;
    }
    .fcdz-custom-dropdown .fcdz-dropdown-body {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        z-index: 9999999 !important;
        display: flex;
        flex-direction: column;
        background: #ffffff !important;
    }
    .fcdz-custom-dropdown.open .fcdz-dropdown-body {
        display: flex !important;
        animation: fadeInDown 0.2s ease;
        z-index: 9999999 !important;
        transform: translateZ(0);
        will-change: transform, opacity;
    }
    .fcdz-custom-dropdown .fcdz-search-container {
        padding: 15px !important;
        background: #f8f9fa !important;
        border-bottom: 1px solid #ddd !important;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .fcdz-mobile-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #e74c3c !important;
        border-radius: 8px;
        cursor: pointer;
        color: #fff !important;
        font-size: 24px;
        font-weight: bold;
        line-height: 1;
        box-shadow: 0 3px 6px rgba(231, 76, 60, 0.3);
        flex-shrink: 0;
    }
    .fcdz-custom-dropdown .fcdz-options-list {
        flex: 1;
        overflow-y: auto;
        max-height: none !important;
        padding-bottom: 20px;
    }
    body.fcdz-modal-open {
        overflow: hidden !important;
    }
}
.fcdz-mobile-close-btn {
    display: none;
}
/* ==========================================================================
   Premium WooCommerce Product Card Redesign (NioCOD)
   ========================================================================== */
.woocommerce ul.products li.product {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    border: 1px solid #f1f5f9 !important;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08), 0 5px 10px rgba(0,0,0,0.04) !important;
}
/* Image Wrapper */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    text-decoration: none !important;
}
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
    width: 100% !important;
    height: 220px !important; /* Fixed height to prevent squishing */
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    transition: transform 0.5s ease !important;
    position: static !important;
    display: block !important;
}
.woocommerce ul.products li.product:hover a img {
    transform: scale(1.05) !important;
}
/* Title & Content */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 15px 15px 10px 15px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    height: 42px !important;
    text-align: right !important;
}
/* Price */
.woocommerce ul.products li.product .price {
    color: #0ea5e9 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    margin: 0 15px 15px 15px !important;
    text-align: right !important;
}
.woocommerce ul.products li.product .price del {
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-left: 8px !important;
}
/* Badges */
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product .fcdz-onsale {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    box-shadow: 0 4px 10px rgba(16,185,129,0.3) !important;
    z-index: 9 !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1 !important;
}
/* Button */
.woocommerce ul.products li.product .button {
    margin: 0 15px 15px 15px !important;
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    text-align: center !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(14,165,233,0.2) !important;
    display: block !important;
    width: calc(100% - 30px) !important;
}
.woocommerce ul.products li.product .button:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    box-shadow: 0 6px 15px rgba(14,165,233,0.4) !important;
    transform: translateY(-2px) !important;
}
/* Astra specific fixes */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
    padding: 0 !important;
    background: transparent !important;
}
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 16px 16px 0 0 !important;
}


@media (max-width: 768px) {
    .woocommerce ul.products li.product a img,
    .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
        height: 180px !important;
    }
    .woocommerce ul.products li.product .button {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 13px !important;
        height: 38px !important;
        margin: 10px 10px 8px 10px !important;
    }
    .woocommerce ul.products li.product .price {
        font-size: 14px !important;
        margin: 0 10px 12px 10px !important;
    }
}


/* Smart Offers CSS */
        .woocommerce-variation-add-to-cart, .single_variation_wrap, form.cart { display: none !important; }
        
        
        .fcdz-quantity-row, .fcdz-inline-qty { display: none !important; }
        
        
        .fcdz-smart-ui-container { margin: 20px 0; direction: rtl; font-family: inherit; width: 100%; --ui-primary: var(--fcdz-primary, #00b4ff); }
        
        .fcdz-offer-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; margin-bottom: 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; background: #fff; position: relative; overflow: hidden; }
        .fcdz-offer-card:hover { border-color: var(--ui-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        .fcdz-offer-card.active { border-color: var(--ui-primary); border-width: 2px; background: #fdfdfd; box-shadow: 0 4px 12px rgba(0,0,0,0.08); padding: 14px; }
        
        .fcdz-offer-title { font-weight: 700; font-size: 16px; color: #1f2937; }
        .fcdz-offer-price { font-weight: 900; font-size: 18px; color: #1f2937; display: flex; flex-direction: column; align-items: flex-end; }
        .fcdz-offer-old-price { font-size: 13px; color: #9ca3af; text-decoration: none; font-weight: normal; margin-bottom: -3px; position: relative; display: inline-block; }
        .fcdz-offer-old-price::after { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background-color: currentColor; transform: translateY(-50%); pointer-events: none; margin-top: 0px; }
        .fcdz-badges-wrapper { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
        .fcdz-badge { background: #dcfce7; color: #166534; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid #bbf7d0; }
        .fcdz-badge svg { width: 14px; height: 14px; fill: currentColor; }
        .fcdz-badge-plus { font-weight: bold; color: #9ca3af; font-size: 14px; }
        .fcdz-pieces-wrap { margin-top: 25px; border-top: 1px solid #e5e7eb; padding-top: 20px; display: none; }
        .fcdz-pieces-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: #475569; margin-bottom: 20px; font-weight:bold; }
        .fcdz-piece-box { border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 15px; background: #fff; transition: all 0.3s ease; }
        .fcdz-piece-box.active { border-color: var(--ui-primary); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
        .fcdz-piece-box.completed { border-color: #10b981; background: #f0fdf4; }
        
        .fcdz-piece-header { padding: 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
        .fcdz-piece-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: #334155; }
        .fcdz-piece-num { background: #e2e8f0; color: #475569; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; }
        .active .fcdz-piece-num { background: var(--ui-primary); color: #fff; }
        .completed .fcdz-piece-num { background: #10b981; color: #fff; }
        .fcdz-piece-status { font-size: 13px; font-weight: 600; color: #94a3b8; display: flex; align-items: center; gap: 5px; text-align: left; }
        .completed .fcdz-piece-status { color: #059669; }

        .fcdz-piece-body { padding: 0 20px 20px 20px; display: none; }
        .active .fcdz-piece-body { display: block; animation: fadeIn 0.3s ease; }
        
        .single-piece-mode .fcdz-pieces-title { display: none !important; }
        .single-piece-mode .fcdz-piece-header { display: none !important; }
        .single-piece-mode .fcdz-piece-box { border: none !important; box-shadow: none !important; margin: 0 !important; background: transparent !important; padding: 0 !important; }
        .single-piece-mode .fcdz-pieces-wrap { border-top: none !important; margin-top: 5px !important; padding-top: 5px !important; }
        .single-piece-mode .fcdz-piece-body { padding: 0 !important; display: block !important; }
        
        .fcdz-var-group { margin-bottom: 15px; }
        .fcdz-var-title { font-size: 14px; font-weight: 700; color: #334155; margin-bottom: 10px; display: block; }
        .fcdz-var-title span { color: #ef4444; }
        .fcdz-var-options { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
        
        .fcdz-error-border { border: 1px solid #ef4444 !important; background-color: #fef2f2 !important; border-radius: 8px !important; padding: 10px !important; transition: 0.3s ease !important; margin-top: -10px; margin-bottom: -10px;}
        
        .fcdz-color-opt { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; outline: 2px solid transparent; outline-offset: 2px; position: relative; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; }
        .fcdz-color-opt:hover { transform: scale(1.1); }
        .fcdz-color-opt.selected { outline-color: var(--ui-primary); }
        .fcdz-color-opt.selected::after { content: "✓"; color: #fff; font-size: 18px; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
        .fcdz-color-label { text-align: center; font-size: 12px; color: var(--ui-primary); margin-top: 5px; font-weight: 600; display: none; }
        .fcdz-color-opt.selected + .fcdz-color-label { display: block; }
        
        .fcdz-text-opt { padding: 8px 18px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; color: #475569; transition: 0.2s; min-width: 45px; text-align: center; }
        .fcdz-text-opt:hover { border-color: #94a3b8; background: #f8fafc; }
        .fcdz-text-opt.selected { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
    
@keyframes fcdzPulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); color: #2ecc71; } 100% { transform: scale(1); } } .fcdz-pulse { animation: fcdzPulse 0.4s ease-out; display: inline-block; }

/* Free Shipping Progress Bar */
.fcdz-fship-progress { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; font-size: 13px; color: #334155; }
.fcdz-fship-bar { width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.fcdz-fship-fill { height: 100%; background: var(--fcdz-primary, #16a34a); transition: width 0.4s ease, background 0.4s ease; }
.fcdz-fship-text { text-align: center; font-weight: 500; }
.fcdz-fship-progress.completed .fcdz-fship-text { color: #16a34a; font-weight: 600; }
/* Dropdown keyboard navigation */
.fcdz-options-list li.highlighted { background: var(--fcdz-primary-light, #f0fdf4); color: var(--fcdz-primary, #16a34a); }

/* =========================================
   Trust Badges - Form Footer
   ========================================= */
.fcdz-form-trust-badges-wrapper {
    margin-top: 15px;
    width: 100%;
}
.fcdz-form-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
}
.fcdz-form-badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 calc(50% - 15px); /* 2 items per row on mobile */
    min-width: 110px;
    justify-content: center;
}
.fcdz-form-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fcdz-primary, #0ea5e9);
}
.fcdz-form-badge-icon svg {
    width: 24px !important;
    height: 24px !important;
    fill: currentColor;
    max-width: 24px;
}
.fcdz-form-badge-text {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-align: right;
    line-height: 1.2;
}

/* Desktop override */
@media (min-width: 480px) {
    .fcdz-form-trust-badges {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 15px 10px;
    }
    .fcdz-form-badge-item {
        flex: 1;
    }
}
