/* ===== نسخة تجريبية: السلة + الشكل الدافئ (اختيار أ) ===== */

/* صفوف المحل تتحول لبطاقات دافئة (وضع العرض بس، مش وضع التعديل) */
.shop-grid-head { display: none; }
.shop-grid-row:not(:has(input)) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  background: #fffdf8; border: 1px solid #eddec4; border-radius: 16px;
  padding: 10px 12px; margin-top: 8px; border-top: 1px solid #eddec4;
}
.shop-grid-row:not(:has(input)) .shop-grid-main { flex: 1 1 100%; font-weight: 800; }
.shop-grid-row:not(:has(input)) .shop-grid-spec { padding: 0; }
.shop-grid-row:not(:has(input)) .shop-grid-spec:nth-of-type(2) { margin-inline-start: auto; }
.shop-section-head { border-bottom-color: #ffb300; }

/* زرار أضف للسلة تحت السعر */
.cart-add {
  display: block; margin-top: 5px; background: #fff8ee; border: 1.5px solid #b3540a;
  color: #b3540a; border-radius: 9px; padding: 4px 10px; font-size: 11px;
  font-weight: 800; cursor: pointer; font-family: inherit;
}
.cart-add:active { background: #b3540a; color: #fff; }

/* زرار السلة في الهيدر جنب «رجوع للفواتير» */
.cart-btn {
  margin-inline-start: auto; position: relative; width: 46px; height: 40px;
  border: 2px solid #5a3c14; background: #fff8ee; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute; top: -8px; inset-inline-start: -8px; min-width: 20px; height: 20px;
  border-radius: 10px; background: #c0392b; color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.cart-badge.bump { animation: cartbump .3s; }
@keyframes cartbump { 50% { transform: scale(1.4); } }

/* سؤال الكمية */
.cart-qty-back { position: fixed; inset: 0; background: rgba(44,26,14,.35); display: none; z-index: 9000; }
.cart-qty-back.open { display: block; }
.cart-qty-box {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 300px; max-width: calc(100vw - 32px); background: #fffdf8; border: 1px solid #eddec4;
  border-radius: 18px; padding: 18px 16px 14px; text-align: center;
  box-shadow: 0 10px 34px rgba(44,26,14,.3); font-family: inherit;
}
.cart-qty-box .q-name { font-size: 15px; font-weight: 800; color: #2c1a0e; }
.cart-qty-box .q-ask { font-size: 14px; color: #7a5a3a; font-weight: 700; margin-top: 6px; }
.cart-qty-step { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.cart-qty-step button {
  width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid #5a3c14;
  background: #fff8ee; font-size: 20px; font-weight: 800; color: #5a3c14; cursor: pointer;
}
.cart-qty-step input {
  width: 64px; height: 42px; text-align: center; font-size: 19px; font-weight: 800;
  border: 1.5px solid #eddec4; border-radius: 10px; color: #2c1a0e;
}
.cart-qty-actions { display: flex; gap: 8px; margin-top: 16px; }
.cart-qty-actions .ok { flex: 1; background: #b3540a; color: #fff; border: none; border-radius: 12px; padding: 11px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; }
.cart-qty-actions .no { flex: 1; background: #fff8ee; color: #7a5a3a; border: 1.5px solid #eddec4; border-radius: 12px; padding: 11px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; }

/* السلة كفاتورة */
.cart-inv { position: fixed; inset: 0; background: #f8f1e3; display: none; overflow-y: auto; z-index: 8999; }
.cart-inv.open { display: block; }
.cart-inv-head { background: #fffdf8; border-bottom: 2px solid #ffb300; padding: 16px; text-align: center; }
.cart-inv-head .tag { display: inline-block; background: #fff4e5; color: #b3540a; border: 1px solid #f0a840; border-radius: 20px; font-size: 12px; font-weight: 800; padding: 3px 12px; margin-bottom: 6px; }
.cart-inv-head h2 { font-size: 20px; font-weight: 800; color: #2c1a0e; margin: 0; }
.cart-inv-head .d { font-size: 12px; color: #7a5a3a; margin-top: 4px; }
.cart-inv-body { padding: 12px; max-width: 520px; margin: 0 auto; }
.cart-inv-row { background: #fffdf8; border: 1px solid #eddec4; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.cart-inv-row .top { display: flex; align-items: center; }
.cart-inv-row .nm { flex: 1; font-weight: 800; font-size: 14px; color: #2c1a0e; }
.cart-inv-row .nm .sub { font-size: 11px; color: #a08d70; font-weight: 400; }
.cart-inv-row .rm { border: none; background: none; color: #c0392b; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; }
.cart-inv-row .bot { display: flex; align-items: center; margin-top: 8px; }
.cart-stepper { display: flex; align-items: center; gap: 10px; }
.cart-stepper button { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid #5a3c14; background: #fff8ee; font-size: 16px; font-weight: 800; color: #5a3c14; cursor: pointer; }
.cart-stepper .q { min-width: 22px; text-align: center; font-weight: 800; font-size: 15px; }
.cart-line-total { margin-inline-start: auto; font-weight: 800; color: #5a3c14; font-size: 14px; }
.cart-inv-total { background: #2c1a0e; color: #fff; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; font-size: 16px; font-weight: 800; margin-top: 6px; }
.cart-inv-total .t { margin-inline-start: auto; color: #ffb300; font-size: 18px; }
.cart-confirm { width: 100%; margin-top: 12px; background: #b3540a; color: #fff; border: none; border-radius: 14px; padding: 14px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; }
.cart-inv-back { display: block; text-align: center; margin-top: 12px; color: #7a5a3a; font-weight: 700; font-size: 14px; cursor: pointer; background: none; border: none; width: 100%; font-family: inherit; }
.cart-empty { text-align: center; color: #a08d70; padding: 40px 0; font-weight: 700; }

/* إشعار «من السلة» */
.cart-notif {
  position: fixed; top: -140px; left: 8px; right: 8px; max-width: 480px; margin: 0 auto;
  background: rgba(255,253,248,.98); border: 1px solid #eddec4; border-radius: 18px;
  box-shadow: 0 8px 30px rgba(44,26,14,.25); padding: 12px 14px; display: flex; gap: 10px;
  align-items: center; transition: top .45s ease; z-index: 9500;
}
.cart-notif.show { top: 10px; }
.cart-notif .nlogo { width: 40px; height: 40px; border-radius: 10px; background: #5a3c14; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-notif .napp { font-size: 11px; color: #7a5a3a; font-weight: 700; }
.cart-notif .ntitle { font-size: 14px; font-weight: 800; color: #2c1a0e; margin-top: 1px; }
.cart-notif .nbody { font-size: 12px; color: #5a3c14; margin-top: 2px; }
.cart-notif .nbody b { color: #b3540a; }
.cart-notif .now { margin-inline-start: auto; font-size: 10px; color: #a08d70; align-self: flex-start; }

/* خانة اسم العميل في فاتورة السلة */
.cart-cust {
  width: 100%; border: 1.5px solid #eddec4; border-radius: 12px; background: #fffdf8;
  padding: 11px 14px; font-size: 15px; font-weight: 700; color: #2c1a0e;
  margin-bottom: 10px; font-family: inherit; text-align: right;
}
.cart-cust::placeholder { color: #a08d70; font-weight: 400; }
.cart-cust.err { border-color: #c0392b; background: #fdecea; animation: cartshake .3s; }
@keyframes cartshake { 25% { transform: translateX(4px); } 75% { transform: translateX(-4px); } }

/* «تعديل» اتشالت من الشاشة — الدخول للتعديل بقى من اللوجو */
.cart-edit-hide { display: none !important; }
