/* نافذة السلة والطلب كضيف — مشتركة بين المتجر (/store) وصفحة المستشار (/advisor) */
.cart-modal-backdrop, .checkout-message, .checkout-button {
  --c-ink: #14243a; --c-line: #e3e8ee; --c-red: #c0392b; --c-orange: #c62828; --c-green: #16835e;
}
body.modal-open { overflow: hidden; }
.cart-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5,19,34,.66); backdrop-filter: blur(4px); }
.cart-modal-backdrop.is-open { display: flex; animation: fade-in .16s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.cart-modal { width: min(540px,100%); max-height: min(92vh,820px); overflow-y: auto; padding: 22px; color: var(--c-ink); background: white; border-radius: 16px; box-shadow: 0 25px 80px rgba(0,0,0,.28); }
.cart-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--c-line); }
.cart-heading h2 { margin: 0; font-size: 22px; }
.close-cart { width: 38px; height: 38px; color: #68788a; background: #f4f6f8; border: 0; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1; }
.cart-items { max-height: 245px; overflow-y: auto; }
.cart-empty { padding: 15px 0; color: #8290a0; text-align: center; font-size: 14px; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--c-line); }
.cart-item-detail { display: grid; gap: 2px; min-width: 0; }
.cart-item-detail strong { overflow-wrap: anywhere; font-size: 14px; }
.cart-item-detail small, .cart-item-detail span { color: #8190a0; font-size: 12px; }
.quantity-controls { display: flex; align-items: center; gap: 9px; }
.quantity-controls button { width: 34px; height: 34px; color: #456078; background: #f5f8fa; border: 1px solid #dfe7ed; border-radius: 8px; cursor: pointer; font-size: 16px; }
.quantity-controls button:disabled { opacity: .45; cursor: not-allowed; }
.quantity-controls b { min-width: 18px; text-align: center; font-size: 14px; }
.cart-summary { margin-top: 12px; display: grid; gap: 6px; font-size: 13.5px; color: var(--c-muted, #5b6472); }
.cart-summary[hidden] { display: none; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; }
.cart-line span:last-child { white-space: nowrap; font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; gap: 10px; margin: 13px 0; padding: 12px 0; border-block: 1px solid var(--c-line); font-size: 15px; font-weight: 800; }
.cart-total strong { color: var(--c-red); white-space: nowrap; }
.guest-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #eef6ee; color: #1f5130; font-size: 13px; font-weight: 600; }
.checkout-form { display: grid; grid-template-columns: 1fr; gap: 5px; }
.checkout-form label { align-self: end; color: #53647a; font-size: 13px; font-weight: 800; }
.checkout-form label span { color: #c34a40; }
.checkout-form label small { color: #929eab; font-weight: 400; }
.checkout-form label { margin-top: 6px; }
.checkout-form input, .checkout-form textarea, .checkout-form select { width: 100%; min-height: 44px; padding: 8px 10px; color: var(--c-ink); background: #fbfcfd; border: 1px solid #d5dee6; border-radius: 8px; font-size: 14px; }
.checkout-form textarea { resize: vertical; }
.checkout-form select { appearance: auto; cursor: pointer; }
.checkout-form select:invalid { color: #8a96a3; }
.checkout-button { grid-column: 1 / -1; min-height: 48px; margin-top: 5px; color: #ffffff; background: var(--c-orange); border: 0; border-radius: 9px; cursor: pointer; font-size: 15px; font-weight: 900; }
.checkout-button:hover { background: #a61f1f; }
.checkout-button:disabled { opacity: .6; cursor: wait; }
.checkout-message { margin-top: 9px; font-size: 14px; text-align: center; }
.checkout-message.success { color: var(--c-green); }
.checkout-message.error { color: #b33f37; }
@media (max-width: 700px) {
  .cart-modal { padding: 17px; }
  .checkout-form { grid-template-columns: 1fr; gap: 5px; }
  .checkout-form label, .checkout-form input, .checkout-form textarea, .checkout-form select, .checkout-button { grid-column: 1; }
}

/* حفظ بيانات الزبون على جهازه */
.remember-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13px; color: #4b5563; }
.remember-label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.remember-label input { width: 17px; height: 17px; min-height: 0; accent-color: #c62828; }
.forget-link { padding: 0; color: #64748b; background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; font-size: 12.5px; }

/* نافذة «أُضيف إلى السلة» */
.added-sheet-backdrop { position: fixed; inset: 0; z-index: 110; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(5,19,34,.45); animation: fade-in .14s ease-out; }
.added-sheet-backdrop[hidden] { display: none; }
.added-sheet { width: min(460px, 100%); padding: 18px; color: #14243a; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: sheet-up .18s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.added-head { display: flex; align-items: center; gap: 10px; }
.added-head strong { flex: 1; font-size: 16px; }
.added-check { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: #16835e; border-radius: 50%; font-weight: 900; }
.added-check.warn { background: #b45309; }
.added-close { width: 34px; height: 34px; color: #64748b; background: none; border: 0; font-size: 24px; cursor: pointer; }
.added-product { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; background: #f6f8fa; border-radius: 10px; font-size: 14px; }
.added-product b { color: #c0392b; white-space: nowrap; }
.added-others { margin-top: 10px; }
.added-others[hidden] { display: none; }
.added-others-title { margin: 0 2px 4px; color: #5b6472; font-size: 12.5px; font-weight: 700; }
.added-list { max-height: 152px; margin: 0; padding: 0 4px; overflow-y: auto; overscroll-behavior: contain; list-style: none; border: 1px solid #edf1f5; border-radius: 10px; }
.added-list li { display: flex; align-items: center; gap: 8px; padding: 8px 4px; font-size: 13px; border-bottom: 1px solid #f0f3f6; }
.added-list li:last-child { border-bottom: 0; }
.added-row-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.added-row-qty { color: #64748b; white-space: nowrap; }
.added-list b { color: #14243a; white-space: nowrap; }
.added-summary { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 14px; color: #5b6472; font-size: 14px; }
.added-summary b { color: #14243a; font-size: 15px; }
.added-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.added-actions button { min-height: 48px; border-radius: 10px; font-size: 15px; font-weight: 800; cursor: pointer; }
.added-checkout { color: #fff; background: #c62828; border: 0; }
.added-checkout:hover { background: #a61f1f; }
.added-continue { color: #14243a; background: #fff; border: 1.5px solid #cfd8e3; }
.added-continue:hover { border-color: #14243a; }
@media (min-width: 701px) { .added-sheet-backdrop { align-items: center; } }