* { box-sizing: border-box; }
body.cart-page { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "Cairo",Tahoma,Arial,sans-serif; }
button, input, textarea { font: inherit; }
.cart-shell { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.cart-header { background: rgba(255,255,255,.88); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.cart-header .cart-shell { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.cart-brand { display: inline-flex; align-items: center; gap: 8px; width: max-content; color: var(--brand); text-decoration: none; font-size: 1.2rem; }
.cart-brand .brand-logo { width: 36px; height: 36px; border-radius: 11px; }
.continue-link { position: relative; z-index: 3; justify-self: end; color: var(--accent); text-decoration: none; font-size: .8rem; font-weight: 800; cursor: pointer; }
.checkout-steps { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.checkout-steps b { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: #fff; font-size: .72rem; }
.checkout-steps b.active { border-color: var(--accent); color: #fff; background: var(--accent); }
.checkout-steps i { width: 25px; height: 1px; background: var(--border); }
.cart-main { padding-block: 42px 70px; }
.cart-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.cart-title-row > div > span, .modal-kicker { color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .04em; }
.cart-title-row h1 { display: flex; align-items: center; gap: 9px; margin: 4px 0 2px; color: var(--brand-2); font-size: 1.75rem; }
.cart-title-row h1 b { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; }
.cart-title-row p { margin: 0; color: var(--muted); font-size: .8rem; }
.clear-cart { border: 0; background: transparent; color: #b42318; font-size: .72rem; font-weight: 800; cursor: pointer; }
.cart-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 20px; align-items: start; direction: ltr; }
.cart-stores, .cart-sidebar { direction: rtl; }
.cart-stores { display: grid; gap: 14px; }
.store-group { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.store-group-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 10px 17px; border-bottom: 1px solid #fae4ed; background: linear-gradient(90deg,#fff,#fff6fa); }
.store-group-head div { display: flex; align-items: center; gap: 10px; }
.store-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: var(--accent-soft); font-weight: 800; }
.store-group-head strong { color: var(--brand); font-size: .9rem; }
.store-group-head small { color: var(--muted); font-size: .7rem; }
.cart-item { min-height: 108px; display: grid; grid-template-columns: 84px minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 14px 17px; border-bottom: 1px solid #fae9f0; }
.cart-item:last-child { border-bottom: 0; }
.item-media { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 13px; background: #fff6fa; overflow: hidden; }
.item-media img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.item-placeholder { color: var(--accent); font-size: 1.3rem; }
.item-copy { min-width: 0; }
.item-copy h3 { margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #38232d; font-size: .88rem; }
.item-copy small { color: var(--muted); font-size: .7rem; }
.item-copy strong { display: block; margin-top: 9px; color: var(--accent); font-size: .94rem; }
.item-controls { display: flex; align-items: center; gap: 10px; }
.quantity { height: 34px; display: grid; grid-template-columns: repeat(3,30px); overflow: hidden; border: 1px solid var(--border); border-radius: 9px; }
.quantity button, .quantity span { display: grid; place-items: center; border: 0; background: #fff; color: var(--brand); font-weight: 800; }
.quantity button { cursor: pointer; }
.quantity span { border-inline: 1px solid var(--border); font-size: .7rem; }
.remove-item { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff1f2; color: #b42318; cursor: pointer; }
.summary-card, .assurance-card { border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.summary-card { padding: 21px; position: sticky; top: 20px; }
.summary-card h2 { margin: 0 0 15px; color: var(--brand); font-size: 1.08rem; }
.summary-line { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; color: var(--muted); font-size: .78rem; }
.summary-line strong { color: var(--text); }
.summary-line .free { color: #15803d; font-size: .72rem; }
.summary-total { display: flex; justify-content: space-between; gap: 15px; margin-top: 10px; padding-top: 15px; border-top: 1px solid var(--border); color: var(--brand); font-size: .9rem; font-weight: 800; }
.summary-total strong { color: var(--accent); font-size: 1.12rem; }
.checkout-btn, .submit-order { width: 100%; min-height: 47px; margin-top: 18px; border: 0; border-radius: 12px; color: #fff; background: var(--accent); box-shadow: 0 12px 24px rgba(225,29,106,.18); font-weight: 800; cursor: pointer; }
.checkout-btn:hover, .submit-order:hover { background: var(--accent-hover); }
.summary-card > small { display: block; margin-top: 9px; color: var(--muted); text-align: center; font-size: .68rem; }
.assurance-card { display: grid; gap: 13px; margin-top: 14px; padding: 17px; }
.assurance-card > div { display: flex; align-items: flex-start; gap: 9px; }
.assurance-card > div > span { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #16a34a; font-size: .65rem; }
.assurance-card p { display: grid; margin: 0; }
.assurance-card strong { color: var(--brand); font-size: .78rem; }
.assurance-card small { color: var(--muted); font-size: .68rem; }
.cart-empty, .order-success { display: none; min-height: 390px; place-items: center; align-content: center; text-align: center; border: 1px dashed #edb8cf; border-radius: 22px; background: linear-gradient(145deg,#fff,#fff1f7); }
.cart-empty.show, .order-success.show { position: relative; z-index: 5; display: grid; pointer-events: auto; }
.empty-icon, .order-success > span { width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 22px; color: #fff; background: linear-gradient(145deg,var(--accent),#f472b6); font-size: 2rem; }
.cart-empty h2, .order-success h2 { margin: 0; color: var(--brand); font-size: 1.25rem; }
.cart-empty p, .order-success p { max-width: 430px; margin: 8px 15px 18px; color: var(--muted); font-size: .75rem; }
.cart-empty a, .success-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; border-radius: 11px; padding: 10px 18px; color: #fff; background: var(--accent); text-decoration: none; font-size: .75rem; font-weight: 800; cursor: pointer; }
.success-actions { position: relative; z-index: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.success-btn.ghost { color: var(--brand); background: #fff; border: 1px solid var(--border); }
.success-btn:hover { background: var(--accent-hover); }
.success-btn.ghost:hover { background: #fff6fa; }
body.cart-is-empty .cart-layout,
body.checkout-complete .cart-layout,
body.checkout-complete .cart-title-row,
body.checkout-complete .cart-empty { display: none !important; pointer-events: none !important; }
body.checkout-complete .order-success { position: relative; z-index: 4; }
.checkout-flow { display: grid; gap: 14px; }
.checkout-panel[hidden] { display: none; }
.address-toolbar, .fulfill-group > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.address-toolbar span, .fulfill-group > header span, .pay-badge { color: var(--accent); font-size: .7rem; font-weight: 800; }
.address-toolbar p, .guest-checkout-note { margin: 6px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.7; }
.address-toolbar h2, .fulfill-group h3, .pay-card h2 { margin: 3px 0 0; color: var(--brand); font-size: 1.05rem; }
.address-list { display: grid; gap: 8px; margin-bottom: 12px; }
.address-card, .option-card, .pay-card, .fulfill-group, .address-form { border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.address-card { display: grid; gap: 3px; padding: 12px 14px; text-align: right; cursor: pointer; }
.address-card.selected, .option-card.selected { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(225,29,106,.08); }
.address-card.new { color: var(--accent); font-weight: 800; }
.address-card strong { color: var(--brand); font-size: .86rem; }
.address-card em { color: #15803d; font-style: normal; font-size: .68rem; }
.address-card span, .address-card small { color: var(--muted); font-size: .72rem; }
.address-form, .pay-card, .fulfill-group { padding: 18px; }
.address-form label, .pay-card label { display: block; margin: 11px 0 5px; color: var(--brand); font-size: .72rem; font-weight: 800; }
.address-form label small { color: var(--muted); font-weight: 500; }
.address-form input, .address-form textarea, .pay-card input { width: 100%; border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; outline: 0; color: var(--text); background: #fffafd; resize: vertical; font-size: .88rem; }
.address-form input:focus, .address-form textarea:focus, .pay-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(225,29,106,.08); }
.form-two, .form-three, .fulfill-grid { display: grid; gap: 10px; }
.form-two { grid-template-columns: 1fr 1fr; }
.form-three { grid-template-columns: 1fr 1fr 1fr; }
.check-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: .76rem; }
.ghost-btn { min-height: 40px; border: 1px solid var(--border); border-radius: 11px; background: #fff; color: var(--brand); font-weight: 800; cursor: pointer; }
.ghost-btn.full { width: 100%; margin-top: 8px; }
.fulfill-group { margin-bottom: 12px; }
.fulfill-grid { grid-template-columns: 1fr 1fr; }
.fulfill-group h4 { margin: 0 0 8px; color: var(--brand); font-size: .72rem; }
.option-list { display: grid; gap: 8px; }
.option-card { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; cursor: pointer; }
.option-card strong { display: block; color: var(--brand); font-size: .82rem; }
.option-card small { color: var(--muted); font-size: .7rem; }
.empty-options { color: var(--muted); font-size: .7rem; }
.pay-card > p { margin: 6px 0 14px; color: var(--muted); font-size: .7rem; }
.card-brands { display: flex; gap: 6px; margin-bottom: 8px; }
.card-brands b { border-radius: 999px; padding: 3px 8px; background: #fff1f6; color: var(--brand); font-size: .68rem; }
.pay-hint { display: block; margin-top: 10px; color: var(--muted); font-size: .68rem; }
.success-meta { color: var(--brand) !important; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkout-message { display: none; border-radius: 10px; padding: 9px 11px; background: #fff1f2; color: #b42318; font-size: .76rem; }
.checkout-message.show { display: block; }
.checkout-btn:disabled { cursor: wait; opacity: .7; }
@media (max-width: 780px) {
  .checkout-steps { display: none; }
  .cart-header .cart-shell { grid-template-columns: 1fr auto; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .assurance-card { margin-top: 0; }
  .summary-card { position: static; }
}
@media (max-width: 540px) {
  .cart-shell { width: min(100% - 24px,1120px); }
  .cart-main { padding-top: 30px; }
  .cart-title-row { align-items: flex-start; }
  .cart-title-row h1 { font-size: 1.35rem; }
  .cart-layout { display: block; }
  .cart-sidebar { display: block; margin-top: 14px; }
  .assurance-card { margin-top: 12px; }
  .cart-item { grid-template-columns: 66px minmax(0,1fr); gap: 10px; }
  .item-media { width: 64px; height: 64px; }
  .item-controls { grid-column: 1/-1; justify-content: space-between; padding-inline-start: 76px; }
  .form-two, .form-three, .fulfill-grid { grid-template-columns: 1fr; }
}

