.qcc-rtl {
    direction: rtl;
    text-align: right;
}

.qcc-rtl .qcc-title, 
.qcc-rtl .qcc-section-title,
.qcc-rtl .qcc-input-group input,
.qcc-rtl .qcc-input-group select {
    text-align: right;
}

/* Bundle Centering */
.qcc-rtl .qcc-bundle-option, 
.qcc-rtl .qcc-bundle-option h3, 
.qcc-rtl .qcc-bundle-option h4, 
.qcc-rtl .qcc-bundle-savings, 
.qcc-rtl .qcc-bundle-price {
    text-align: center !important;
}

/* Inputs RTL */
.qcc-rtl .qcc-input-group .qcc-icon {
    left: auto !important;
    right: 1px !important;
    border-right: none !important;
    border-left: 1px solid #ddd !important;
    border-radius: 0 6px 6px 0 !important;
}

.qcc-rtl .qcc-input-group input,
.qcc-rtl .qcc-input-group select {
    padding-left: 12px !important;
    padding-right: 56px !important;
    font-size: 15px !important; 
}

.qcc-rtl .qcc-input-group select {
    background-position: left 15px top 50%;
}

/* 
   ==================================================================
   ORDER SUMMARY FIX
   ==================================================================
*/
.qcc-rtl .qcc-summary-product-row,
.qcc-rtl .qcc-summary-totals-block p {
    flex-direction: row !important; 
}

.qcc-rtl .qcc-summary-details-col {
    text-align: right;
    padding-right: 10px; 
    padding-left: 0;
}

.qcc-rtl .qcc-upsell-text div {
    text-align: right;
}

/* Banners & Upsells Text Alignment */
.qcc-rtl .qcc-banner-details,
.qcc-rtl .qcc-upsell-details {
    text-align: right !important;
}

/* COUPON RTL */
.qcc-rtl .qcc-coupon-wrapper {
    flex-direction: row; 
}
.qcc-rtl .qcc-coupon-icon {
    border-right: none;
    border-left: 1px solid #ccc;
}
.qcc-rtl #qcc-coupon-input {
    text-align: right;
}

/* Shipping Origin Banner (The "Region" text at bottom) */
.qcc-rtl #qcc-shipping-origin-banner {
    font-size: 14px !important;
}
.qcc-rtl #qcc-shipping-origin-banner .qcc-origin-flag {
    margin-left: 0;
    margin-right: 5px;
}

/* FAQ RTL */
.qcc-rtl .qcc-faq-header {
    font-size: 15px !important;
}
.qcc-rtl .qcc-faq-content { 
    padding-left: 0; 
    padding-right: 24px;
    font-size: 14px !important; /* Increase content too */
}

/* REVIEWS RTL ARROWS */
.qcc-rtl .qcc-rev-prev {
    right: auto; 
    left: 50px; 
}
.qcc-rtl .qcc-rev-next {
    right: auto; 
    left: 15px; 
}

/* Flip the arrow icons for RTL so they point logically */
.qcc-rtl .qcc-rev-prev i, 
.qcc-rtl .qcc-rev-next i {
    transform: rotate(180deg);
}

/* Mix & Match RTL */
.qcc-rtl .qcc-mix-match-label { margin-right: 0; margin-left: 10px; }
.qcc-rtl .qcc-sl-num { margin-right: 0; margin-left: 4px; }

/* ==================================================================
   THANK YOU PAGE RTL
   ================================================================== */
.qcc-rtl.qcc-thank-you-wrapper {
    direction: rtl;
    text-align: right;
}

.qcc-rtl .qcc-ty-header,
.qcc-rtl .qcc-ty-upsells h3,
.qcc-rtl .qcc-ty-info-grid {
    text-align: center; /* Info grid items are centered, but text inside flows RTL */
}

/* Note Box RTL */
.qcc-rtl .qcc-note-box {
    text-align: right;
    direction: rtl;
}

.qcc-rtl .qcc-ty-details-section h3 {
    text-align: right;
}

/* ✅ Fix Table Headers Alignment in RTL */
.qcc-rtl .qcc-ty-table th,
.qcc-rtl .qcc-ty-table td {
    text-align: right;
}

/* ✅ Centered Column 2 (Price/Total) for RTL Override */
.qcc-rtl .qcc-ty-table th:nth-child(2),
.qcc-rtl .qcc-ty-table td:nth-child(2) {
    text-align: center !important;
}

/* Footer totals usually align left in LTR, so right in RTL (Start of Line) */
.qcc-rtl .qcc-ty-table tfoot th {
    text-align: right !important; /* Label column (Total:) aligns to start (Right in RTL) */
}
.qcc-rtl .qcc-ty-table tfoot td {
    text-align: center !important; /* ✅ Footer Value centered in RTL too */
    direction: ltr; /* Keep currency logic strict ltr to avoid symbol jumping */
}

/* ✅ NEW: Stock Scarcity Bar RTL */
.qcc-rtl .qcc-stock-text {
    text-align: right !important;
}

/* ✅ NEW: Marquee RTL */
.qcc-rtl .qcc-marquee-content {
    padding-left: 0;
    padding-right: 100%;
    animation: qcc-marquee-scroll-rtl 15s linear infinite;
}

@keyframes qcc-marquee-scroll-rtl {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100%, 0); }
}