/**
 * Editorial Saudi Luxury Cart Drawer & Standalone Cart Styles
 * Enhanced Typography: Alexandria (Arabic) & Manrope (Numerals/Accents)
 * For Teeshirtate - Saudi Streetwear & Essential Luxury
 */

/* ==========================================================================
   1. GLOBAL CART TYPOGRAPHY & NUMERALS
   ========================================================================== */

#cart-dialog,
#cart-dialog *,
.ref-cart-page-wrap,
.ref-cart-page-wrap *,
.woocommerce-cart,
.woocommerce-cart * {
    font-family: 'Alexandria', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

.ref-numeral,
.ref-cart-item-price,
.ref-totals-value,
.ref-banner-pct,
.btn-amount,
.ref-pay-badge,
.ref-cart-qty-val,
.cart-items-count,
.ref-upsell-price,
.ref-shipping-amount,
.ref-item-subtotal strong,
.total-amount,
.summary-row .row-value,
.woocommerce-cart .product-price,
.woocommerce-cart .product-subtotal,
.woocommerce-cart .order-total,
.woocommerce-cart .cart-subtotal .amount {
    font-family: 'Manrope', 'Alexandria', sans-serif !important;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* ==========================================================================
   2. STANDALONE CART PAGE (.ref-cart-page-wrap)
   ========================================================================== */

.ref-cart-page-wrap {
    background: #fbfaf7;
    min-height: 80vh;
    padding: 28px 0 80px;
    color: #121212;
}

.ref-cart-main-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar: Breadcrumbs & Stepper */
.ref-cart-top-bar {
    max-width: 1360px;
    margin: 0 auto 28px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #eae5dc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.ref-cart-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #767066;
}

.ref-cart-breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.ref-cart-breadcrumbs a:hover {
    color: #244b36;
}

.ref-bc-sep {
    color: #b8b2a8;
}

.ref-bc-current {
    color: #121212;
    font-weight: 800;
}

/* Checkout Journey Stepper */
.ref-checkout-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 7px 18px;
    border-radius: 99px;
    border: 1px solid #ebe6dd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #8c867c;
}

.step-item.is-active {
    color: #121212;
    font-weight: 800;
}

.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    background: #f0ece5;
    color: #767066;
}

.step-item.is-active .step-num {
    background: #121212;
    color: #ffffff;
}

.step-line {
    width: 24px;
    height: 1.5px;
    background: #e0dbd1;
}

/* Cart Header Row & Free Shipping Tracker */
.ref-cart-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.ref-cart-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ref-cart-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #244b36;
    text-transform: uppercase;
}

.ref-cart-page-title {
    margin: 0;
    font-size: clamp(26px, 3.8vw, 34px);
    font-weight: 900;
    color: #121212;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ref-cart-badge-count {
    font-size: 12px;
    font-weight: 800;
    background: #eef7f1;
    color: #244b36;
    border: 1px solid #cce6d5;
    padding: 3px 12px;
    border-radius: 99px;
}

/* Free Shipping Banner */
.ref-shipping-banner {
    background: #ffffff;
    border: 1.5px solid #dce8df;
    border-radius: 14px;
    padding: 14px 18px;
    width: min(440px, 100%);
    box-shadow: 0 4px 16px rgba(36, 75, 54, 0.05);
}

.shipping-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 12px;
    color: #2e3831;
}

.shipping-icon svg {
    width: 20px;
    height: 20px;
    color: #244b36;
    flex-shrink: 0;
}

.shipping-bar-track {
    height: 7px;
    background: #e9f2ec;
    border-radius: 99px;
    overflow: hidden;
}

.shipping-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #25D366, #244b36);
    border-radius: 99px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Notices */
.ref-cart-notices {
    margin-bottom: 20px;
}

.ref-cart-notices .woocommerce-message,
.ref-cart-notices .woocommerce-error,
.ref-cart-notices .woocommerce-info {
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Main Layout Grid */
.ref-cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 410px;
    gap: 32px;
    align-items: start;
    margin-bottom: 50px;
}

/* Left Column: Cart Items */
.ref-cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.ref-cart-item-card {
    background: #ffffff;
    border: 1px solid #ebe6dd;
    border-radius: 16px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.025);
    transition: transform 0.15s, box-shadow 0.15s;
}

.ref-cart-item-card:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.045);
}

.ref-item-media {
    aspect-ratio: 4/5;
    border-radius: 10px;
    overflow: hidden;
    background: #f7f5f0;
}

.ref-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.ref-item-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ref-item-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 800;
    color: #8c867c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ref-item-stock {
    color: #244b36;
    background: #eef7f1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
}

.ref-item-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #121212;
    line-height: 1.4;
}

.ref-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.ref-item-title a:hover {
    color: #244b36;
}

.ref-item-specs dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 4px 0 6px;
    font-size: 11.5px;
    color: #555048;
}

.ref-item-specs dl.variation dt {
    font-weight: 700;
    margin-inline-end: 2px;
}

.ref-item-specs dl.variation dd {
    margin: 0;
}

.ref-item-unit-price {
    font-size: 12px;
    color: #767066;
}

.ref-item-unit-price span {
    font-weight: 750;
    color: #121212;
    margin-inline-start: 4px;
}

/* Item Controls: Stepper, Subtotal, Remove */
.ref-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f2ede4;
    margin-top: 4px;
}

.ref-qty-stepper {
    display: inline-flex;
    align-items: center;
    height: 40px;
    border: 1.5px solid #dcd7cd;
    border-radius: 8px;
    background: #faf8f5;
    overflow: hidden;
}

.ref-qty-stepper .qty-btn {
    width: 32px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #121212;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s;
}

.ref-qty-stepper .qty-btn:hover {
    background: #ede8de;
}

.ref-qty-stepper .qty-input {
    width: 36px;
    height: 100%;
    border: 0;
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: #121212;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
}

.ref-qty-stepper input::-webkit-outer-spin-button,
.ref-qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ref-item-subtotal {
    font-size: 13px;
    color: #121212;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ref-item-subtotal strong {
    font-size: 16.5px;
    font-weight: 900;
    color: #121212;
}

.ref-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #a33226;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.ref-remove-btn:hover {
    background: #fdf2f0;
    color: #d32f2f;
}

/* Bottom Controls: Coupon & Update Actions */
.ref-cart-controls-row {
    background: #ffffff;
    border: 1px solid #ebe6dd;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.coupon-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ref-coupon-input {
    min-height: 44px;
    border: 1.5px solid #ddd7cd;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 13px;
    min-width: 220px;
    background: #faf8f5;
    color: #121212;
}

.ref-coupon-input:focus {
    border-color: #244b36;
    outline: none;
}

.ref-coupon-btn {
    min-height: 44px;
    background: #121212;
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s;
}

.ref-coupon-btn:hover {
    background: #244b36;
}

.ref-cart-update-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ref-update-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    border: 1.5px solid #ddd7cd;
    border-radius: 8px;
    padding: 0 16px;
    background: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    color: #121212;
    cursor: pointer;
    transition: all 0.15s;
}

.ref-update-cart-btn:hover {
    background: #f7f5f0;
    border-color: #121212;
}

.ref-update-cart-btn svg {
    width: 16px;
    height: 16px;
}

.ref-continue-shopping {
    font-size: 12.5px;
    font-weight: 700;
    color: #555048;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.ref-continue-shopping:hover {
    color: #121212;
}

/* Trust Bar Under Cart Items */
.ref-cart-trust-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.trust-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #ebe6dd;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 11.5px;
    font-weight: 750;
    color: #2e3831;
}

.trust-pill svg {
    width: 18px;
    height: 18px;
    color: #244b36;
    flex-shrink: 0;
}

/* Right Column: Sticky Order Summary Card */
.ref-summary-card {
    position: sticky;
    top: 110px;
    background: #ffffff;
    border: 1px solid #eae5dc;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid #ebe6dd;
}

.summary-card-head h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
    color: #121212;
    letter-spacing: -0.02em;
}

.summary-badge {
    font-size: 11px;
    font-weight: 800;
    background: #f7f5f0;
    color: #767066;
    padding: 3px 10px;
    border-radius: 99px;
}

.summary-rows-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    color: #555048;
}

.summary-row .row-value {
    font-weight: 800;
    color: #121212;
}

.summary-row.is-discount {
    color: #c62828;
}

.summary-row.is-discount .row-value {
    color: #c62828;
    font-weight: 800;
}

.free-shipping-tag {
    font-size: 11px;
    font-weight: 900;
    background: #eef7f1;
    color: #244b36;
    border: 1px solid #cce6d5;
    padding: 2px 8px;
    border-radius: 4px;
}

.is-vat-note {
    font-size: 11px;
    color: #8c867c;
    margin-top: -4px;
}

.summary-divider {
    height: 1px;
    background: #ebe6dd;
    margin: 4px 0;
}

.summary-row.is-total {
    font-size: 15px;
    align-items: baseline;
    padding-top: 4px;
}

.total-label-wrap strong {
    font-size: 16px;
    font-weight: 900;
    color: #121212;
    display: block;
}

.total-label-wrap small {
    font-size: 11px;
    color: #8c867c;
}

.total-amount {
    font-size: 25px;
    font-weight: 900;
    color: #121212;
}

/* Tabby & Tamara Split Payment Banner */
.ref-split-payments {
    background: #faf8f5;
    border: 1px solid #ebe6dd;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.split-pay-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #433e38;
}

.split-pay-item p {
    margin: 0;
    line-height: 1.4;
}

.split-badge {
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.tabby-pill {
    background: #3effb2;
    color: #0d281e;
}

.tamara-pill {
    background: #ffd3b6;
    color: #5d2500;
}

/* Checkout CTA Button */
.summary-cta-wrap {
    margin-top: 4px;
}

.ref-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    background: #121212;
    color: #ffffff !important;
    border: 1.5px solid #121212;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.ref-checkout-btn:hover {
    background: #244b36;
    border-color: #244b36;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(36, 75, 54, 0.25);
}

.ref-checkout-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.ref-checkout-btn:hover svg {
    transform: translateX(-4px);
}

/* Payment Trust Badges */
.summary-payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pay-icon-chip {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f7f5f0;
    border: 1px solid #ebe6dd;
    color: #555048;
}

/* WhatsApp Assist Link */
.summary-whatsapp-assist {
    text-align: center;
    border-top: 1px solid #ebe6dd;
    padding-top: 14px;
    font-size: 12px;
}

.summary-whatsapp-assist a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #128c7e;
    font-weight: 750;
    text-decoration: none;
    transition: color 0.15s;
}

.summary-whatsapp-assist a:hover {
    color: #075e54;
    text-decoration: underline;
}

.assist-wa-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ==========================================================================
   3. CURATED CROSS-SELLS / RECOMMENDATIONS
   ========================================================================== */

.ref-cart-recommendations {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #ebe6dd;
}

.rec-head {
    margin-bottom: 24px;
}

.rec-eyebrow {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #8c867c;
    display: block;
    margin-bottom: 4px;
}

.rec-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #121212;
    letter-spacing: -0.02em;
}

.ref-rec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ref-rec-card {
    background: #ffffff;
    border: 1px solid #ebe6dd;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ref-rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.rec-card-media {
    aspect-ratio: 4/5;
    background: #f7f5f0;
    overflow: hidden;
}

.rec-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.rec-card-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    justify-content: space-between;
}

.rec-card-info h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #121212;
    line-height: 1.4;
}

.rec-card-info h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.rec-card-info h3 a:hover {
    color: #244b36;
}

.rec-card-price {
    font-size: 14.5px;
    font-weight: 800;
    color: #244b36;
}

.rec-view-btn {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: #f7f5f0;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    color: #121212;
    text-decoration: none;
    transition: background 0.15s;
    margin-top: 6px;
}

.rec-view-btn:hover {
    background: #121212;
    color: #ffffff;
}

/* ==========================================================================
   4. EMPTY CART STATE (.ref-cart-empty-box)
   ========================================================================== */

.ref-cart-empty-box {
    background: #ffffff;
    border: 1px solid #ebe6dd;
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    max-width: 650px;
    margin: 40px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ref-empty-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f7f5f0;
    border: 1.5px solid #ebe6dd;
    display: grid;
    place-items: center;
    color: #244b36;
    margin-bottom: 4px;
}

.ref-empty-icon-wrap svg {
    width: 36px;
    height: 36px;
    stroke-width: 1.5;
}

.ref-empty-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #8c867c;
    text-transform: uppercase;
}

.ref-empty-title {
    margin: 0;
    font-size: clamp(24px, 3.5vw, 30px);
    font-weight: 900;
    color: #121212;
    letter-spacing: -0.02em;
}

.ref-empty-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: #6a645b;
    max-width: 480px;
}

.ref-empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ref-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    background: #121212;
    color: #ffffff !important;
    padding: 0 26px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.ref-btn-primary:hover {
    background: #244b36;
    transform: translateY(-2px);
}

.ref-btn-primary svg {
    width: 18px;
    height: 18px;
}

.ref-btn-secondary {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    background: #f7f5f0;
    color: #121212 !important;
    border: 1.5px solid #ddd7cd;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s;
}

.ref-btn-secondary:hover {
    background: #ede8de;
    border-color: #121212;
}

.ref-empty-shortcuts {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0ece5;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.shortcuts-title {
    font-size: 12px;
    font-weight: 700;
    color: #8c867c;
}

.shortcuts-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.shortcuts-chips a {
    padding: 6px 14px;
    border-radius: 99px;
    background: #faf8f5;
    border: 1px solid #ebe6dd;
    font-size: 12px;
    font-weight: 750;
    color: #433e38;
    text-decoration: none;
    transition: all 0.15s;
}

.shortcuts-chips a:hover {
    background: #121212;
    color: #ffffff;
    border-color: #121212;
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
    .ref-cart-layout-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .ref-summary-card {
        position: static;
    }
    .ref-rec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .ref-cart-page-wrap {
        padding: 16px 0 60px;
    }
    .ref-cart-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    .ref-checkout-stepper {
        width: 100%;
        justify-content: space-between;
    }
    .ref-cart-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .ref-shipping-banner {
        width: 100%;
    }
    .ref-cart-item-card {
        grid-template-columns: 80px 1fr;
        gap: 14px;
        padding: 14px 16px;
    }
    .ref-item-title {
        font-size: 14px;
    }
    .ref-cart-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    .coupon-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    .ref-coupon-input {
        min-width: 0;
        width: 100%;
    }
    .ref-coupon-btn {
        width: 100%;
    }
    .ref-cart-update-wrap {
        justify-content: space-between;
    }
    .ref-cart-trust-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ref-rec-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .ref-empty-actions {
        flex-direction: column;
        width: 100%;
    }
    .ref-btn-primary,
    .ref-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Cart drawer ------------------------------------------------------------ */
#cart-dialog.ref-cart-dialog {
    width: min(430px, calc(100vw - 24px));
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    margin: 12px 12px 12px auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e8e2d9;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(24, 19, 13, .28);
}

.rtl #cart-dialog.ref-cart-dialog { margin: 12px auto 12px 12px; }
#cart-dialog.ref-cart-dialog[open] { display: flex; flex-direction: column; }
#cart-dialog.ref-cart-dialog::backdrop { background: rgba(24, 21, 17, .56); backdrop-filter: blur(4px); }

#cart-dialog .ref-cart-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 17px;
    border-bottom: 1px solid #eee9e2;
    background: #fff;
    flex: 0 0 auto;
}

#cart-dialog .ref-cart-dialog-close {
    order: 2;
    width: 38px;
    height: 38px;
    padding: 9px;
    border: 1px solid #e5dfd6;
    border-radius: 50%;
    background: #f8f6f2;
}

#cart-dialog .ref-cart-title-wrap { order: 1; min-width: 0; }
#cart-dialog .ref-cart-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: #171512;
    font-size: 22px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -.035em;
}
#cart-dialog .ref-cart-header-icon { display: grid; place-items: center; color: #52664e; }
#cart-dialog .ref-cart-header-icon svg { width: 21px; height: 21px; }
#cart-dialog .ref-cart-header-count {
    padding: 3px 8px;
    border-radius: 99px;
    background: #f1f4ef;
    color: #52664e;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0;
}

#cart-dialog .ref-cart-dialog-body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; }
#cart-dialog .widget_shopping_cart_content,
#cart-dialog .ref-cart-content-wrap { height: 100%; min-height: 0; }
#cart-dialog .ref-cart-content-wrap { display: flex; flex-direction: column; }

#cart-dialog .ref-cart-shipping-banner {
    margin: 14px 18px 5px;
    padding: 11px 13px;
    border: 1px solid #dfe7dc;
    border-radius: 11px;
    background: #f4f7f2;
    flex: 0 0 auto;
}
#cart-dialog .ref-cart-banner-text { display: flex; align-items: center; gap: 7px; font-size: 10px; line-height: 1.6; }
#cart-dialog .ref-banner-msg { flex: 1; min-width: 0; }
#cart-dialog .ref-banner-pct { color: #52664e; font-size: 10px; font-weight: 800; direction: ltr; }
#cart-dialog .ref-cart-banner-track { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 9px; background: #dfe5dc; }
#cart-dialog .ref-cart-banner-fill { height: 100%; border-radius: inherit; background: #52664e; }

#cart-dialog .ref-cart-items-list {
    flex: 1 1 auto;
    min-height: 110px;
    margin: 0;
    padding: 3px 18px;
    overflow: auto;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: #cbc4ba transparent;
}
#cart-dialog .ref-cart-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 13px;
    min-height: 0;
    padding: 14px 0;
    border-bottom: 1px solid #eee9e2;
    font-size: 11px;
    position: relative;
}
#cart-dialog .ref-cart-item-thumb { grid-column: 1; overflow: hidden; border-radius: 10px; background: #f4f2ed; }
#cart-dialog .ref-cart-item-thumb a { display: block; height: 100%; }
#cart-dialog .ref-cart-item-thumb img { float: none; width: 72px; height: 88px; margin: 0; object-fit: contain; mix-blend-mode: multiply; }
#cart-dialog .ref-cart-item-main { grid-column: 2; min-width: 0; display: flex; flex-direction: column; }
#cart-dialog .ref-cart-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
#cart-dialog .ref-cart-item-title { margin: 0; font-size: 12px; font-weight: 800; line-height: 1.65; }
#cart-dialog .ref-cart-item-title a { color: inherit; }
#cart-dialog .ref-cart-item-remove {
    position: static;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 5px;
    border: 1px solid #e4ded5;
    border-radius: 50%;
    background: #faf9f7;
    color: #7b746b !important;
    flex: 0 0 auto;
    font-size: 0;
}
#cart-dialog .ref-cart-item-remove svg { width: 14px; height: 14px; }
#cart-dialog .ref-cart-item-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; color: #746e66; font-size: 9px; line-height: 1.55; }
#cart-dialog .ref-meta-chip { display: inline-flex; align-items: center; gap: 3px; }
#cart-dialog .ref-swatch-dot { width: 8px; height: 8px; border: 1px solid #bbb; border-radius: 50%; }
#cart-dialog .ref-cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 7px; }
#cart-dialog .ref-cart-item-price { font-size: 11px; font-weight: 800; }
#cart-dialog .ref-cart-qty-stepper { display: inline-flex; align-items: center; height: 28px; overflow: hidden; border: 1px solid #ddd7ce; border-radius: 8px; background: #faf9f6; direction: ltr; }
#cart-dialog .ref-cart-qty-btn { display: grid; place-items: center; width: 27px; height: 100%; padding: 0; font-size: 14px; }
#cart-dialog .ref-cart-qty-val { min-width: 22px; text-align: center; font-size: 10px; font-weight: 800; }

#cart-dialog .ref-cart-upsell-box { margin: 7px 18px 9px; padding: 11px; border: 1px solid #e8e2d9; border-radius: 12px; background: #faf8f4; flex: 0 0 auto; }
#cart-dialog .ref-cart-upsell-header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 9px; }
#cart-dialog .ref-cart-upsell-title { display: flex; gap: 5px; font-weight: 800; }
#cart-dialog .ref-cart-upsell-tag { color: #52664e; }
#cart-dialog .ref-cart-upsell-product { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
#cart-dialog .ref-upsell-thumb { width: 46px; height: 52px; margin: 0; border-radius: 7px; object-fit: cover; }
#cart-dialog .ref-upsell-details { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#cart-dialog .ref-upsell-name { font-size: 9px; line-height: 1.5; }
#cart-dialog .ref-upsell-spec { color: #7b746b; font-size: 8px; line-height: 1.4; }
#cart-dialog .ref-upsell-price { font-size: 9px; font-weight: 800; }
#cart-dialog .ref-upsell-btn { padding: 7px 9px; border-radius: 7px; background: #fff; border: 1px solid #dcd5cb; font-size: 9px; white-space: nowrap; }

#cart-dialog .ref-cart-totals-summary { padding: 10px 18px 7px; border-top: 1px solid #eee9e2; background: #fbfaf7; flex: 0 0 auto; }
#cart-dialog .ref-totals-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 10px; line-height: 1.55; }
#cart-dialog .ref-totals-value { font-weight: 800; white-space: nowrap; }
#cart-dialog .ref-totals-row.is-grand-total { margin-top: 3px; padding-top: 6px; border-top: 1px solid #e8e2d9; font-size: 12px; }
#cart-dialog .ref-saving-badge { display: none; }
#cart-dialog .ref-shipping-free { color: #52664e; }
#cart-dialog .ref-totals-vat { margin-top: 2px; color: #8b847b; font-size: 8px; text-align: end; }

#cart-dialog .ref-cart-actions { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 6px 18px 5px; background: #fbfaf7; flex: 0 0 auto; }
#cart-dialog .ref-cart-checkout-btn { width: 100%; min-height: 45px; padding: 9px 14px; border-radius: 9px; background: #52664e; border-color: #52664e; justify-content: space-between; }
#cart-dialog .btn-main-action { display: inline-flex; align-items: center; gap: 8px; }
#cart-dialog .btn-amount { white-space: nowrap; font-weight: 800; }
#cart-dialog .ref-cart-view-link { padding: 4px; color: #504a43; font-size: 9px; text-align: center; text-decoration: underline; text-underline-offset: 3px; }
#cart-dialog .ref-cart-payment-methods { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; padding: 3px 18px; background: #fbfaf7; flex: 0 0 auto; }
#cart-dialog .ref-pay-badge { color: #777169; font-size: 7px; font-weight: 800; }
#cart-dialog .ref-cart-security-badge { display: flex; justify-content: center; gap: 5px; padding: 4px 18px 10px; background: #fbfaf7; color: #716b63; font-size: 8px; line-height: 1.5; text-align: center; flex: 0 0 auto; }

#cart-dialog .ref-cart-empty-state { height: 100%; display: grid; place-items: center; align-content: center; gap: 12px; padding: 35px; text-align: center; }
#cart-dialog .ref-empty-bag-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: #f4f2ed; color: #52664e; }
#cart-dialog .ref-empty-title { font-size: 20px; }
#cart-dialog .ref-empty-desc { max-width: 310px; font-size: 11px; }
#cart-dialog .ref-empty-shop-btn { min-height: 46px; border-radius: 9px; background: #52664e; border-color: #52664e; }

@media (max-width: 600px) {
    #cart-dialog.ref-cart-dialog,
    .rtl #cart-dialog.ref-cart-dialog { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
    #cart-dialog .ref-cart-dialog-header { padding: 16px 16px 14px; }
    #cart-dialog .ref-cart-title { font-size: 19px; }
    #cart-dialog .ref-cart-header-icon { display: none; }
    #cart-dialog .ref-cart-shipping-banner { margin-inline: 14px; }
    #cart-dialog .ref-cart-items-list { padding-inline: 14px; }
    #cart-dialog .ref-cart-upsell-box { margin-inline: 14px; }
    #cart-dialog .ref-cart-totals-summary,
    #cart-dialog .ref-cart-actions { padding-inline: 14px; }
    #cart-dialog .ref-cart-payment-methods,
    #cart-dialog .ref-cart-security-badge { padding-inline: 14px; }
}

@media (max-height: 720px) {
    #cart-dialog .ref-cart-upsell-box { display: none; }
    #cart-dialog .ref-cart-item { padding-block: 10px; }
    #cart-dialog .ref-cart-item-thumb img { height: 76px; }
}
