/* =========================================
   Carpet Point — Luxury Cart Stylesheet
   public/css/cart-style.css
   ========================================= */

   @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Tajawal:wght@300;400;500;700&family=Noto+Sans+Arabic:wght@400;700&display=swap');

   /* خط يدعم رمز الريال السعودي ﷼ */
   .currency, .subtotal-currency, .total-currency {
     font-family: 'Noto Sans Arabic', 'Arial', sans-serif;
     font-weight: 700;
   }
   
   /* ── رمز الريال السعودي SVG ── */
   .sar-icon {
     display: inline-block;
     vertical-align: middle;
     fill: currentColor;
   }
   
   .sar-sm  { width: 13px; height: 13px; }
   .sar-md  { width: 16px; height: 16px; }
   .sar-lg  { width: 22px; height: 22px; }
   
   /* ── Variables ── */
   :root {
     --gold:        #b8965a;
     --gold-light:  #d4af72;
     --gold-pale:   #f5edd8;
     --dark:        #0e0e0e;
     --dark-2:      #1a1a1a;
     --ink:         #2c2c2c;
     --muted:       #7a7a7a;
     --border:      #e8dece;
     --bg:          #faf8f4;
     --white:       #ffffff;
     --danger:      #c0392b;
     --success:     #2e7d32;
     --radius-sm:   6px;
     --radius-md:   14px;
     --radius-lg:   22px;
     --shadow-soft: 0 4px 24px rgba(184,150,90,0.10);
     --shadow-card: 0 8px 40px rgba(0,0,0,0.07);
     --transition:  all 0.28s cubic-bezier(.4,0,.2,1);
   }
   
   /* ── Reset & Base ── */
   *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   
   body {
     font-family: 'Tajawal', sans-serif;
     background: var(--bg);
     color: var(--ink);
     direction: rtl;
     min-height: 100vh;
   }
   
   /* ── Page wrapper ── */
   .cart-page-wrapper {
     padding: 48px 0 80px;
     min-height: 80vh;
   }
   
   /* ── Page header ── */
   .cart-page-header {
     display: flex;
     align-items: center;
     gap: 16px;
     margin-bottom: 40px;
   }
   
   .cart-page-header .header-icon {
     width: 52px;
     height: 52px;
     background: linear-gradient(135deg, var(--gold), var(--gold-light));
     border-radius: var(--radius-md);
     display: flex;
     align-items: center;
     justify-content: center;
     color: #fff;
     font-size: 1.4rem;
     box-shadow: 0 6px 20px rgba(184,150,90,0.35);
     flex-shrink: 0;
   }
   
   .cart-page-header h2 {
     font-family: 'Playfair Display', serif;
     font-size: 2rem;
     font-weight: 700;
     color: var(--dark);
     line-height: 1.2;
   }
   
   .cart-page-header .cart-count-badge {
     font-family: 'Tajawal', sans-serif;
     font-size: 0.82rem;
     color: var(--muted);
     font-weight: 400;
     margin-top: 2px;
   }
   
   /* ── Divider ornament ── */
   .ornament-divider {
     display: flex;
     align-items: center;
     gap: 10px;
     margin-bottom: 32px;
   }
   .ornament-divider span {
     height: 1px;
     flex: 1;
     background: linear-gradient(90deg, var(--gold-pale), var(--gold), var(--gold-pale));
   }
   .ornament-divider i {
     color: var(--gold);
     font-size: 0.9rem;
   }
   
   /* ── Cards ── */
   .luxury-card {
     background: var(--white);
     border: 1px solid var(--border);
     border-radius: var(--radius-lg);
     box-shadow: var(--shadow-card);
     overflow: hidden;
     transition: var(--transition);
   }
   
   /* ── Cart items panel ── */
   .cart-items-panel {
     padding: 0;
   }
   
   .cart-items-panel .panel-head {
     padding: 20px 28px 18px;
     border-bottom: 1px solid var(--border);
     background: linear-gradient(135deg, #fffdf8, #fdf7ec);
     display: flex;
     align-items: center;
     gap: 10px;
   }
   
   .cart-items-panel .panel-head span {
     font-size: 0.92rem;
     font-weight: 700;
     color: var(--gold);
     text-transform: uppercase;
     letter-spacing: 1.5px;
   }
   
   /* ── Single cart row ── */
   .cart-item-row {
     display: flex;
     align-items: center;
     gap: 20px;
     padding: 22px 28px;
     border-bottom: 1px solid #f3ede3;
     transition: var(--transition);
     position: relative;
   }
   
   .cart-item-row:last-child {
     border-bottom: none;
   }
   
   .cart-item-row:hover {
     background: #fffdf9;
   }
   
   /* product image */
   .cart-item-img {
     width: 88px;
     height: 88px;
     border-radius: var(--radius-md);
     overflow: hidden;
     flex-shrink: 0;
     border: 2px solid var(--border);
     background: var(--gold-pale);
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: 0 4px 14px rgba(184,150,90,0.13);
     transition: var(--transition);
   }
   
   .cart-item-row:hover .cart-item-img {
     border-color: var(--gold);
     box-shadow: 0 6px 20px rgba(184,150,90,0.22);
   }
   
   .cart-item-img img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     transition: transform 0.4s ease;
   }
   
   .cart-item-row:hover .cart-item-img img {
     transform: scale(1.06);
   }
   
   .cart-item-img .no-img {
     font-size: 0.7rem;
     color: var(--muted);
     text-align: center;
     padding: 6px;
     line-height: 1.4;
   }
   
   /* product info */
   .cart-item-info {
     flex: 1;
     min-width: 0;
   }
   
   .cart-item-info .item-name {
     font-size: 1.05rem;
     font-weight: 700;
     color: var(--dark);
     margin-bottom: 8px;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
   }
   
   .size-badge {
     display: inline-flex;
     align-items: center;
     gap: 5px;
     background: var(--gold-pale);
     border: 1px solid #e0cba0;
     color: #7a5c20;
     font-size: 0.78rem;
     font-weight: 700;
     padding: 4px 10px;
     border-radius: 20px;
     letter-spacing: 0.5px;
   }
   
   .size-badge i {
     font-size: 0.75rem;
     color: var(--gold);
   }
   
   /* unit price */
   .cart-item-unit-price {
     text-align: center;
     min-width: 120px;
   }
   
   .cart-item-unit-price .label {
     font-size: 0.72rem;
     color: var(--muted);
     display: block;
     margin-bottom: 4px;
     letter-spacing: 0.3px;
   }
   
   .cart-item-unit-price .price-wrap {
     display: inline-flex;
     align-items: baseline;
     gap: 4px;
   }
   
   .cart-item-unit-price .price {
     font-family: 'Tajawal', sans-serif;
     font-size: 1.05rem;
     font-weight: 700;
     color: var(--ink);
     letter-spacing: 0.5px;
   }
   
   .cart-item-unit-price .currency {
     font-size: 1rem;
     color: var(--gold);
     font-family: 'Tajawal', sans-serif;
     font-weight: 700;
   }
   
   /* quantity control */
   .qty-control {
     display: flex;
     align-items: center;
     border: 1.5px solid var(--border);
     border-radius: 50px;
     overflow: hidden;
     background: var(--white);
     box-shadow: 0 2px 10px rgba(0,0,0,0.05);
     transition: var(--transition);
   }
   
   .qty-control:hover {
     border-color: var(--gold);
     box-shadow: 0 2px 14px rgba(184,150,90,0.18);
   }
   
   .qty-control .qty-btn {
     width: 36px;
     height: 36px;
     border: none;
     background: transparent;
     font-size: 1.1rem;
     font-weight: 700;
     color: var(--gold);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: var(--transition);
   }
   
   .qty-control .qty-btn:hover {
     background: var(--gold-pale);
   }
   
   .qty-control input {
     width: 38px;
     border: none;
     text-align: center;
     font-size: 0.95rem;
     font-weight: 700;
     color: var(--dark);
     background: transparent;
     outline: none;
     pointer-events: none;
     font-family: 'Tajawal', sans-serif;
   }
   
   /* subtotal */
   .cart-item-subtotal {
     text-align: end;
     min-width: 130px;
   }
   
   .cart-item-subtotal .subtotal-wrap {
     display: inline-flex;
     align-items: baseline;
     gap: 5px;
   }
   
   .cart-item-subtotal .subtotal-amount {
     font-family: 'Tajawal', sans-serif;
     font-size: 1.15rem;
     font-weight: 800;
     color: var(--gold);
     letter-spacing: 0.5px;
   }
   
   .cart-item-subtotal .subtotal-currency {
     font-size: 1rem;
     color: var(--gold);
     font-family: 'Tajawal', sans-serif;
     font-weight: 700;
   }
   
   /* remove button */
   .btn-remove {
     background: none;
     border: none;
     color: #ccc;
     font-size: 1rem;
     cursor: pointer;
     padding: 6px;
     border-radius: 50%;
     transition: var(--transition);
     display: flex;
     align-items: center;
     justify-content: center;
   }
   
   .btn-remove:hover {
     color: var(--danger);
     background: #fdecea;
   }
   
   /* ── Sidebar ── */
   .cart-sidebar {
     position: sticky;
     top: 24px;
     display: flex;
     flex-direction: column;
     gap: 20px;
   }
   
   /* coupon card */
   .coupon-card {
     padding: 24px;
   }
   
   .coupon-card .coupon-title {
     font-size: 0.92rem;
     font-weight: 700;
     color: var(--ink);
     margin-bottom: 14px;
     display: flex;
     align-items: center;
     gap: 8px;
   }
   
   .coupon-card .coupon-title i {
     color: var(--gold);
   }
   
   .coupon-input-wrap {
     display: flex;
     gap: 0;
     border: 1.5px solid var(--border);
     border-radius: 50px;
     overflow: hidden;
     transition: var(--transition);
   }
   
   .coupon-input-wrap:focus-within {
     border-color: var(--gold);
     box-shadow: 0 0 0 3px rgba(184,150,90,0.12);
   }
   
   .coupon-input-wrap input {
     flex: 1;
     border: none;
     outline: none;
     padding: 10px 16px;
     font-family: 'Tajawal', sans-serif;
     font-size: 0.9rem;
     background: transparent;
     color: var(--ink);
     direction: rtl;
   }
   
   .coupon-input-wrap input::placeholder {
     color: #bbb;
   }
   
   .coupon-input-wrap .btn-apply {
     background: linear-gradient(135deg, var(--gold), var(--gold-light));
     color: #fff;
     border: none;
     padding: 10px 20px;
     font-family: 'Tajawal', sans-serif;
     font-weight: 700;
     font-size: 0.88rem;
     cursor: pointer;
     transition: var(--transition);
     white-space: nowrap;
   }
   
   .coupon-input-wrap .btn-apply:hover {
     background: linear-gradient(135deg, #a07c40, var(--gold));
   }
   
   #coupon_message {
     font-size: 0.82rem;
     margin-top: 10px;
     padding: 6px 10px;
     border-radius: var(--radius-sm);
     display: none;
   }
   
   #coupon_message.success {
     background: #e8f5e9;
     color: var(--success);
   }
   
   #coupon_message.error {
     background: #fdecea;
     color: var(--danger);
   }
   
   /* summary card */
   .summary-card {
     padding: 28px;
   }
   
   .summary-card .summary-header {
     font-family: 'Playfair Display', serif;
     font-size: 1.3rem;
     font-weight: 700;
     color: var(--dark);
     margin-bottom: 22px;
     padding-bottom: 16px;
     border-bottom: 1px solid var(--border);
   }
   
   .summary-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 10px 0;
     font-size: 0.92rem;
     color: var(--muted);
   }
   
   .summary-row .val {
     font-weight: 600;
     color: var(--ink);
   }
   
   .summary-row .val.free {
     color: var(--success);
     font-weight: 700;
   }
   
   .summary-row.discount {
     color: var(--danger);
   }
   
   .summary-row.discount .val {
     color: var(--danger);
   }
   
   .summary-total-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-top: 18px;
     padding-top: 18px;
     border-top: 2px solid var(--gold-pale);
   }
   
   .summary-total-row .total-label {
     font-size: 1rem;
     font-weight: 700;
     color: var(--dark);
   }
   
   .summary-total-row .total-amount {
     font-family: 'Tajawal', sans-serif;
     font-size: 1.5rem;
     font-weight: 800;
     color: var(--gold);
     line-height: 1;
     letter-spacing: 0.5px;
   }
   
   .summary-total-row .total-currency {
     font-family: 'Tajawal', sans-serif;
     font-size: 1.1rem;
     color: var(--gold);
     font-weight: 700;
     margin-right: 3px;
   }
   
   /* checkout button */
   .btn-checkout-luxury {
     width: 100%;
     margin-top: 22px;
     padding: 15px;
     background: linear-gradient(135deg, var(--dark), #2c2c2c);
     color: #fff;
     border: none;
     border-radius: 50px;
     font-family: 'Tajawal', sans-serif;
     font-size: 1rem;
     font-weight: 700;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     letter-spacing: 0.5px;
     transition: var(--transition);
     box-shadow: 0 6px 24px rgba(14,14,14,0.25);
     position: relative;
     overflow: hidden;
   }
   
   .btn-checkout-luxury::before {
     content: '';
     position: absolute;
     inset: 0;
     background: linear-gradient(135deg, var(--gold), var(--gold-light));
     opacity: 0;
     transition: opacity 0.3s ease;
   }
   
   .btn-checkout-luxury:hover::before {
     opacity: 1;
   }
   
   .btn-checkout-luxury span,
   .btn-checkout-luxury i {
     position: relative;
     z-index: 1;
   }
   
   .btn-checkout-luxury:hover {
     transform: translateY(-2px);
     box-shadow: 0 10px 32px rgba(184,150,90,0.4);
   }
   
   /* secure badges */
   .secure-badges {
     display: flex;
     justify-content: center;
     gap: 16px;
     margin-top: 16px;
   }
   
   .secure-badges .badge-item {
     display: flex;
     align-items: center;
     gap: 5px;
     font-size: 0.72rem;
     color: var(--muted);
   }
   
   .secure-badges .badge-item i {
     color: var(--gold);
     font-size: 0.8rem;
   }
   
   /* ── Empty cart ── */
   .empty-cart-wrapper {
     text-align: center;
     padding: 80px 20px;
     max-width: 480px;
     margin: 0 auto;
   }
   
   .empty-cart-wrapper .empty-icon {
     width: 100px;
     height: 100px;
     background: linear-gradient(135deg, var(--gold-pale), #f0e5cc);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 28px;
     font-size: 2.5rem;
     color: var(--gold);
     box-shadow: 0 8px 32px rgba(184,150,90,0.2);
   }
   
   .empty-cart-wrapper h3 {
     font-family: 'Playfair Display', serif;
     font-size: 1.7rem;
     color: var(--dark);
     margin-bottom: 12px;
   }
   
   .empty-cart-wrapper p {
     font-size: 0.95rem;
     color: var(--muted);
     line-height: 1.7;
     margin-bottom: 28px;
   }
   
   .btn-browse {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: linear-gradient(135deg, var(--gold), var(--gold-light));
     color: #fff;
     padding: 13px 32px;
     border-radius: 50px;
     text-decoration: none;
     font-weight: 700;
     font-size: 0.95rem;
     font-family: 'Tajawal', sans-serif;
     transition: var(--transition);
     box-shadow: 0 6px 22px rgba(184,150,90,0.35);
   }
   
   .btn-browse:hover {
     transform: translateY(-2px);
     box-shadow: 0 10px 30px rgba(184,150,90,0.45);
     color: #fff;
   }
   
   /* ── Flash messages ── */
   .alert-luxury {
     border: none;
     border-radius: var(--radius-md);
     padding: 14px 20px;
     font-size: 0.9rem;
     font-weight: 600;
     display: flex;
     align-items: center;
     gap: 10px;
     margin-bottom: 24px;
     animation: slideDown 0.4s ease;
   }
   
   .alert-luxury.success {
     background: #e8f5e9;
     color: var(--success);
     border-right: 4px solid var(--success);
   }
   
   @keyframes slideDown {
     from { opacity: 0; transform: translateY(-10px); }
     to   { opacity: 1; transform: translateY(0); }
   }
   
   /* ── Animations ── */
   .cart-item-row {
     animation: fadeInUp 0.35s ease both;
   }
   
   @keyframes fadeInUp {
     from { opacity: 0; transform: translateY(16px); }
     to   { opacity: 1; transform: translateY(0); }
   }
   
   .cart-item-row:nth-child(1) { animation-delay: 0.05s; }
   .cart-item-row:nth-child(2) { animation-delay: 0.10s; }
   .cart-item-row:nth-child(3) { animation-delay: 0.15s; }
   .cart-item-row:nth-child(4) { animation-delay: 0.20s; }
   .cart-item-row:nth-child(5) { animation-delay: 0.25s; }
   
   /* ── Responsive ── */
   @media (max-width: 768px) {
     .cart-item-row {
       flex-wrap: wrap;
       gap: 14px;
     }
   
     .cart-item-unit-price,
     .cart-item-subtotal {
       min-width: auto;
     }
   
     .cart-item-img {
       width: 72px;
       height: 72px;
     }
   
     .cart-page-header h2 {
       font-size: 1.5rem;
     }
   
     .summary-card,
     .coupon-card {
       padding: 20px;
     }
   }