/* ============================
   Container
   ============================ */
.container { max-width: 1320px; margin: 0 auto; }

/* ============================
   Cart Layout
   ============================ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }

/* ============================
   Cart Items
   ============================ */
.cart-items { display: flex; flex-direction: column; gap: 0; background: var(--white); border-radius: var(--rl); border: 1px solid var(--gray); overflow: hidden; }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gray); background: var(--off); }
.cart-header h2 { font-size: 17px; font-weight: 900; color: var(--navy); }
.cart-count { font-size: 14px; color: var(--text3); font-weight: 600; }
.btn-clear { background: rgba(220,38,38,0.08); color: var(--red); border: 1px solid rgba(220,38,38,0.2); padding: 6px 14px; border-radius: var(--r); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .2s; font-family: 'Tajawal', sans-serif; }
.btn-clear:hover { background: var(--red); color: #fff; }
.cart-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--gray); transition: background .2s; }
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: var(--off); }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--r); background: var(--gray2); display: flex; align-items: center; justify-content: center; font-size: 32px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--gray); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.cart-item-variant { font-size: 12px; color: var(--text3); background: var(--gray2); padding: 2px 8px; border-radius: 20px; display: inline-block; margin-bottom: 6px; }
.cart-item-price { display: flex; align-items: center; gap: 8px; }
.price-now { font-size: 15px; font-weight: 900; color: var(--orange); }
.price-old { font-size: 12px; color: var(--text3); text-decoration: line-through; }
.price-save { font-size: 11px; color: var(--green); font-weight: 700; }
.cart-qty { display: flex; align-items: center; border: 1.5px solid var(--gray); border-radius: var(--r); overflow: hidden; }
.qty-btn { width: 32px; height: 32px; background: var(--off); border: none; font-size: 16px; cursor: pointer; font-weight: 700; color: var(--navy); transition: background .2s; font-family: 'Tajawal', sans-serif; }
.qty-btn:hover { background: var(--orange); color: #fff; }
.qty-input { width: 48px; height: 32px; text-align: center; border: none; border-right: 1.5px solid var(--gray); border-left: 1.5px solid var(--gray); font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 700; color: var(--navy); outline: none; }
.cart-item-total { font-size: 15px; font-weight: 900; color: var(--navy); white-space: nowrap; min-width: 80px; text-align: center; }
.btn-remove { background: none; border: none; color: var(--text3); font-size: 18px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.btn-remove:hover { background: rgba(220,38,38,0.1); color: var(--red); }
.cart-continue { padding: 16px 20px; }
.btn-continue { color: var(--orange); font-size: 13.5px; font-weight: 700; transition: color .2s; }
.btn-continue:hover { color: var(--navy); }

/* ============================
   Cart Summary
   ============================ */
.cart-summary { position: sticky; top: 80px; }
.summary-card { background: var(--white); border-radius: var(--rl); border: 1px solid var(--gray); padding: 20px; }
.summary-card h3 { font-size: 16px; font-weight: 900; color: var(--navy); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray); }
.summary-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text2); }
.summary-row.total { font-size: 17px; font-weight: 900; color: var(--navy); }
.free-shipping { color: var(--green); font-weight: 700; }
.free-shipping-hint { font-size: 12px; color: var(--orange); font-weight: 600; background: var(--orange-light); padding: 8px 12px; border-radius: var(--r); text-align: center; }
.summary-divider { height: 1px; background: var(--gray); margin: 4px 0; }

/* ============================
   Coupon
   ============================ */
.coupon-section { margin-bottom: 16px; }
.coupon-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.coupon-form { display: flex; gap: 8px; }
.coupon-input { flex: 1; padding: 9px 12px; border: 1.5px solid var(--gray); border-radius: var(--r); font-family: 'Tajawal', sans-serif; font-size: 13px; outline: none; transition: border-color .2s; }
.coupon-input:focus { border-color: var(--orange); }
.btn-coupon { background: var(--navy); color: #fff; padding: 9px 16px; border-radius: var(--r); font-size: 13px; font-weight: 700; border: none; cursor: pointer; transition: background .2s; font-family: 'Tajawal', sans-serif; white-space: nowrap; }
.btn-coupon:hover { background: var(--orange); }
.coupon-error { font-size: 12px; color: var(--red); font-weight: 600; margin-top: 6px; }

/* ============================
   Checkout Button
   ============================ */
.btn-checkout { display: block; width: 100%; background: var(--orange); color: #fff; padding: 14px; border-radius: var(--r); font-size: 16px; font-weight: 800; text-align: center; transition: all .2s; margin-bottom: 14px; }
.btn-checkout:hover { background: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,80,10,0.3); }

/* ============================
   Guarantees
   ============================ */
.summary-guarantees { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; padding: 12px; background: var(--off); border-radius: var(--r); }
.sg-item { font-size: 12.5px; color: var(--text2); font-weight: 600; }

/* ============================
   Payment Methods
   ============================ */
.payment-methods { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-badge { background: var(--gray2); color: var(--text2); padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid var(--gray); }

/* ============================
   Empty Cart
   ============================ */
.empty-cart { text-align: center; padding: 80px 20px; }
.empty-cart-icon { font-size: 72px; margin-bottom: 16px; }
.empty-cart h2 { font-size: 24px; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.empty-cart p { font-size: 15px; color: var(--text3); margin-bottom: 24px; }
.btn-shop-now { background: var(--orange); color: #fff; padding: 13px 32px; border-radius: var(--r); font-size: 15px; font-weight: 800; transition: all .2s; display: inline-block; }
.btn-shop-now:hover { background: var(--navy); }
/* ============================
   Coupon Applied State
   ============================ */
.discount-row { color: var(--green); }
.coupon-applied-code { background: rgba(22,163,74,0.1); color: var(--green); padding: 1px 8px; border-radius: 20px; font-size: 11px; font-weight: 800; margin-right: 4px; }
.discount-amount { color: var(--green); font-weight: 900; }
.coupon-success { display: flex; align-items: center; justify-content: space-between; background: rgba(22,163,74,0.08); border: 1.5px solid rgba(22,163,74,0.3); border-radius: var(--r); padding: 10px 14px; }
.coupon-success-info { display: flex; align-items: center; gap: 10px; }
.coupon-success-icon { font-size: 20px; }
.coupon-success-code { font-size: 14px; font-weight: 900; color: var(--green); }
.coupon-success-label { font-size: 12px; color: var(--text3); margin-top: 2px; }
.coupon-remove-btn { background: none; border: none; color: var(--text3); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: var(--r); transition: all .2s; }
.coupon-remove-btn:hover { background: rgba(220,38,38,0.1); color: var(--red); }
.coupon-input-error { border-color: var(--red) !important; }
/* ============================
   Responsive — موبايل
   ============================ */
@media (max-width: 768px) {

    /* Layout — عمود واحد */
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* المنتجات الأول — الملخص تحت */
    .cart-items { order: 1; }
    .cart-summary { order: 2; position: static; }

/* Cart Item */
.cart-item { gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.cart-item-img { width: 56px; height: 56px; }
.cart-item-info { min-width: 0; }
.cart-item-name { font-size: 12.5px; line-height: 1.4; }
.cart-item-total { min-width: auto; font-size: 13px; }
.cart-qty-form { order: 3; }
.cart-item-total { order: 4; }
.btn-remove { order: 5; }
    /* Summary */
    .summary-card { padding: 14px; }
    .btn-checkout { font-size: 15px; padding: 13px; }
}