[hidden] { display: none !important; }
:root {
  --bg: #faf7f4;
  --surface: #ffffff;
  --ink: #2b2320;
  --muted: #8a7d76;
  --accent: #b76e79;
  --accent-dark: #96505c;
  --line: #ece3dd;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(60, 40, 35, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.icon { width: 1.35em; height: 1.35em; vertical-align: -0.3em; }
.confirm-check { width: 56px; height: 56px; color: #2e7d32; }

/* ===== الهيدر ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
.logo { font-size: 1.3rem; font-weight: 800; color: var(--accent-dark); text-decoration: none; }
.cart-btn {
  position: relative; background: none; border: none;
  font-size: 1.4rem; padding: 4px 8px;
  color: inherit; text-decoration: none;
}
.cart-count {
  position: absolute; top: -2px; inset-inline-start: -2px;
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}

/* ===== الهيرو ===== */
.hero {
  background: linear-gradient(135deg, #f7e8ea, #faf3ee);
  padding: 32px 20px; text-align: center;
}
.hero h1 { font-size: 1.5rem; margin-bottom: 6px; }
.hero p { color: var(--muted); font-size: 0.95rem; }

/* ===== أقسام ===== */
.chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 14px 16px 6px; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 7px 16px;
  font-size: 0.9rem; color: var(--ink);
  transition: all 0.15s;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ===== شبكة المنتجات ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 14px 16px 150px;
  max-width: 1100px; margin: 0 auto;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card-img { position: relative; aspect-ratio: 1; background: #f3ece8; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-sale, .badge-out {
  position: absolute; top: 8px; inset-inline-start: 8px;
  font-size: 0.7rem; font-weight: 700; color: #fff;
  padding: 3px 9px; border-radius: 999px;
}
.badge-sale { background: var(--accent); }
.badge-out { background: #555; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3 { font-size: 0.95rem; line-height: 1.4; }
.muted { color: var(--muted); font-size: 0.78rem; min-height: 1.2em; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; color: var(--accent-dark); }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 0.8rem; }
.card-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; }

.btn {
  border: none; border-radius: 10px; padding: 9px 12px;
  font-size: 0.85rem; font-weight: 700; flex: 1;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #cbb; cursor: not-allowed; }
.btn-ghost { background: var(--bg); color: var(--ink); border: 1px solid var(--line); flex: 0 0 auto; }
.btn-block { width: 100%; margin-top: 10px; padding: 12px; font-size: 1rem; }

.empty { text-align: center; color: var(--muted); padding: 30px 0; grid-column: 1 / -1; }

/* ===== درج السلة ===== */
#overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 60;
}
#overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0;
  width: min(88vw, 380px); background: var(--surface);
  z-index: 70; transform: translateX(-105%);
  transition: transform 0.25s; display: flex; flex-direction: column;
}
[dir="rtl"] .drawer { transform: translateX(-105%); }
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800;
}
.drawer-head button { background: none; border: none; font-size: 1.3rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 16px; }
.cart-item {
  display: grid; grid-template-columns: 52px 1fr;
  column-gap: 10px; row-gap: 4px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.cart-item img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; grid-row: span 2; }
.cart-item-info { display: flex; flex-direction: column; font-size: 0.85rem; min-width: 0; }
.cart-item-info strong { line-height: 1.45; }
.cart-item-foot { grid-column: 2; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.line-price { white-space: nowrap; flex-shrink: 0; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); font-size: 1rem;
}
.drawer-foot { padding: 14px 16px; border-top: 1px solid var(--line); }
.subtotal-row { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 10px; }
.checkout-link {
  display: block; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 800;
  padding: 13px; border-radius: 12px;
}

/* ===== المودال ===== */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.45);
  display: none; align-items: flex-end; justify-content: center;
}
.modal.open { display: flex; }
.modal-card {
  background: var(--surface); width: 100%; max-width: 480px;
  border-radius: 20px 20px 0 0; padding: 18px;
  max-height: 88vh; overflow-y: auto;
}
@media (min-width: 640px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 20px; }
}
.modal-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.modal-card label { display: block; margin-top: 10px; font-size: 0.9rem; font-weight: 700; }
.modal-card select, .modal-card input {
  width: 100%; margin-top: 4px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 0.95rem;
}
#close-modal { background: none; border: none; font-size: 1.3rem; float: left; }

/* ===== صفحة إتمام الطلب ===== */
.checkout-wrap {
  max-width: 1000px; margin: 0 auto;
  padding: 16px 16px 60px;
  display: grid; gap: 18px;
}
@media (min-width: 820px) {
  .checkout-wrap { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.panel {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.panel h2 { font-size: 1.05rem; margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); border-color: var(--accent);
}
.form-errors { color: #b3261e; font-size: 0.88rem; margin-bottom: 10px; }

.pay-option {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin-bottom: 8px; cursor: pointer;
}
.pay-option input { accent-color: var(--accent); width: 18px; height: 18px; }
.pay-option .soon {
  margin-inline-start: auto; font-size: 0.75rem;
  background: var(--bg); color: var(--muted);
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.pay-option.disabled { opacity: 0.55; cursor: not-allowed; }

.sum-row, .totals-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 0; font-size: 0.92rem;
}
.sum-row span:last-child, .totals-row span:last-child { white-space: nowrap; }
.sum-name { min-width: 0; }
.sum-price { white-space: nowrap; flex-shrink: 0; }
.sum-row { border-bottom: 1px dashed var(--line); }
.totals-row.grand { font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; }
.ship-days { color: var(--muted); font-size: 0.82rem; }
#place-order { width: 100%; padding: 14px; font-size: 1.05rem; border-radius: 12px; }

#empty-state { display: none; text-align: center; padding: 60px 20px; }
#empty-state a { color: var(--accent-dark); font-weight: 700; }

/* ===== تأكيد الطلب ===== */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.confirm-overlay.open { display: flex; }
.confirm-card {
  background: var(--surface); border-radius: 20px;
  padding: 26px 20px; max-width: 420px; width: 100%; text-align: center;
}
.confirm-card h2 { margin: 8px 0; }
.confirm-card .order-no { font-weight: 800; color: var(--accent-dark); font-size: 1.1rem; }
.confirm-card p { font-size: 0.9rem; color: var(--muted); margin: 10px 0; }
.confirm-card .btn { margin-top: 10px; }
.wa-link { display: inline-block; margin-top: 8px; color: var(--accent-dark); font-weight: 700; }

/* ===== الفوتر ===== */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  text-align: center; padding: 18px; color: var(--muted); font-size: 0.85rem;
}

/* ===== صفحة المنتج ===== */
.card-link { text-decoration: none; color: inherit; display: block; }
.product-page { max-width: 640px; margin: 0 auto; padding: 14px 16px 90px; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.product-hero { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.product-hero > img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* معرض صور المنتج: سحب + ثمبنيلز + زوم هوفر */
.pdp-gallery { position: relative; background: #fff; }
.pdp-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pdp-strip::-webkit-scrollbar { display: none; }
.pdp-slide { flex: 0 0 100%; scroll-snap-align: center; overflow: hidden; }
.pdp-slide img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .18s ease; transform-origin: center center; }
@media (hover: hover) and (pointer: fine) {
  .pdp-slide:hover img { transform: scale(2.2); cursor: zoom-in; }
}
.pdp-thumbs { display: flex; gap: 8px; padding: 8px 12px 12px; overflow-x: auto; }
.pdp-thumbs button { flex: 0 0 auto; width: 56px; height: 56px; border: 2px solid var(--line); border-radius: 10px; padding: 0; background: #fff; overflow: hidden; cursor: pointer; }
.pdp-thumbs button.active { border-color: var(--accent); }
.pdp-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-single .pdp-strip { scroll-snap-type: none; }

/* ديسكتوب: الثمبنيلز عمود جنب الصورة الأساسية زي نون وأمازون */
@media (min-width: 641px) {
  .pdp-gallery { display: flex; gap: 10px; padding: 12px; align-items: flex-start; }
  .pdp-thumbs { order: -1; flex-direction: column; padding: 0; overflow-y: auto; max-height: 480px; }
  .pdp-strip { flex: 1; border-radius: var(--radius); }
}
.product-desc { white-space: normal; line-height: 1.9; }
.product-info { padding: 16px; }
.product-info h1 { font-size: 1.2rem; line-height: 1.5; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.product-price-row .price { font-size: 1.4rem; }
.badge-sale-inline { background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.product-desc { color: var(--muted); font-size: 0.92rem; margin: 10px 0 16px; }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; font-size: 0.92rem; }
.qty-row input, .qty-row select { width: 90px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 1rem; }
.qty-row select { width: auto; flex: 1; }
.stock-note { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.product-cat { color: var(--muted); font-size: 0.8rem; font-weight: 700; margin-bottom: 2px; }
.stock-line { font-size: 0.92rem; font-weight: 700; margin: 6px 0 2px; }
.stock-ok { color: #2e7d32; }
.stock-low { color: #b3540a; }
.stock-out { color: #b3261e; }
.delivery-line { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
.rel-title { font-size: 1.05rem; margin: 20px 0 10px; }
.rel-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.rel-row::-webkit-scrollbar { display: none; }
.rel-card { flex: 0 0 128px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); text-decoration: none; color: inherit; overflow: hidden; display: flex; flex-direction: column; }
.rel-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.rel-name { font-size: 0.75rem; line-height: 1.4; padding: 8px 8px 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.rel-card .price { font-size: 0.82rem; padding: 0 8px 8px; }
.product-brand-line { font-size: 0.82rem; margin-bottom: 2px; }
.product-brand { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.product-cat, .product-cat-sep { color: var(--muted); font-weight: 400; }
.strip-title { padding: 10px 16px 0; font-size: 1rem; }
.brand-strip .chips { padding-top: 8px; }
.chip-link { text-decoration: none; }
.chip-count { opacity: 0.65; font-size: 0.78rem; }
.brand-page { max-width: 1100px; margin: 0 auto; padding: 14px 0 0; }
.brand-page .back-link { margin-inline-start: 16px; }
.brand-head { padding: 0 16px 4px; }
.brand-head h1 { font-size: 1.4rem; }
.brand-page .grid { padding-top: 8px; }

/* ===== القائمة الجانبية ===== */
.nav-burger { background: none; border: none; padding: 4px 6px; color: inherit; cursor: pointer; display: flex; align-items: center; }
.nav-burger .icon { width: 22px; height: 22px; }
.side-overlay { position: fixed; top: 60px; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 90; }
.side-overlay.open { opacity: 1; pointer-events: auto; }
.side-nav { position: fixed; top: 60px; right: 0; bottom: 0; width: 240px; background: #fff; z-index: 95; transform: translateX(100%); transition: transform 0.25s; box-shadow: -4px 0 18px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.side-nav.open { transform: translateX(0); }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line, #e8e2da); font-weight: 800; }
.side-close { background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--muted, #8a8178); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; font-size: 0.95rem; color: inherit; text-decoration: none; border-bottom: 1px solid #f3efe9; }
.side-link svg { width: 20px; height: 20px; color: #a4566d; flex-shrink: 0; }
.side-link:active { background: #faf6f2; }
.side-track { color: #a4566d; }
@media (min-width: 900px) { .side-nav { width: 300px; } }

/* ===== نسخ رقم الطلب ===== */
.order-no-box { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid #e3d3da; border-radius: 12px; background: #fdf8fa; padding: 12px 16px; margin: 10px 0; }
.order-no-box .order-no { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.5px; color: #a4566d; margin: 0; cursor: pointer; }
.copy-btn { background: none; border: 1px solid var(--line, #e8e2da); border-radius: 9px; padding: 7px; cursor: pointer; color: #a4566d; display: flex; align-items: center; }
.copy-btn:active { background: #f6e9ee; }
.copy-btn svg { width: 17px; height: 17px; }
.copy-toast { display: inline-block; color: #2e7d4f; font-size: 0.8rem; font-weight: 800; margin-top: 4px; transition: opacity 0.4s; }
.copy-toast[hidden] { display: none; }
.copy-toast.fade { opacity: 0; }
.keep-note { font-size: 0.85rem; color: var(--muted, #8a8178); }

/* ===== زرار التقييم الحقيقي ===== */
.rate-btn { display: inline-flex; align-items: center; gap: 6px; background: #a4566d; border: 1px solid #a4566d; color: #fff; border-radius: 9px; padding: 8px 14px; font-family: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.rate-btn svg { width: 14px; height: 14px; }
.rate-btn:active { background: #8a4459; transform: scale(0.96); }

/* ===== تقييم من صفحة التتبع ===== */
.track-items { margin-top: 14px; }
.track-items-title { font-size: 1rem; margin-bottom: 10px; }
.track-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line, #e8e2da); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.track-item-img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #f0ebe4; flex-shrink: 0; }
.track-item-noimg { display: flex; align-items: center; justify-content: center; color: #c9c0b4; font-size: 0.6rem; text-align: center; }
.track-item-info { flex: 1; min-width: 0; }
.track-item-info strong { font-size: 0.85rem; display: block; }
.track-item-info .muted { font-size: 0.75rem; }
.track-reviewed { font-size: 0.78rem; font-weight: 800; color: #2e7d4f; white-space: nowrap; }
.track-thanks { background: #eaf5ee; color: #2e7d4f; font-size: 0.85rem; font-weight: 700; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.rate-form { background: #fff; border: 1px solid #a4566d; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.rate-form h3 { font-size: 0.92rem; margin-bottom: 10px; }
.rate-stars { display: flex; gap: 6px; margin-bottom: 10px; }
.rate-stars button { background: none; border: none; font-size: 1.7rem; color: #ddd; cursor: pointer; padding: 0 2px; line-height: 1; }
.rate-stars button.on { color: #e8a33d; }
.rate-form textarea { width: 100%; min-height: 70px; padding: 10px 12px; border: 1px solid var(--line, #e8e2da); border-radius: 10px; font-family: inherit; font-size: 0.9rem; margin-bottom: 8px; }
.rate-form .btn { width: 100%; }

/* ===== بحث الهيدر + صفحة النتايج ===== */
.header-search { flex: 1; margin: 0 10px; }
.header-search input { width: 100%; padding: 8px 12px; border: 1px solid var(--line, #e8e2da); border-radius: 20px; font-family: inherit; font-size: 0.85rem; background: #faf8f5; }
.header-search input:focus { outline: none; border-color: #a4566d; }
.search-meta { font-size: 0.9rem; margin: 4px 0 12px; color: var(--muted, #8a8178); }
.search-meta strong { color: inherit; font-weight: 800; color: #3a333c; }
.search-empty { text-align: center; padding: 40px 0; }
.search-empty p { color: var(--muted, #8a8178); margin-bottom: 14px; }
.search-empty .btn { display: inline-block; text-decoration: none; }

/* ===== تتبع الطلب ===== */
.track-main { max-width: 480px; margin: 0 auto; padding-inline: 16px; box-sizing: border-box; }
.track-title { font-size: 1.3rem; margin-bottom: 4px; }
.track-form { background: #fff; border: 1px solid var(--line, #e8e2da); border-radius: 14px; padding: 16px; margin: 14px 0; }
.track-form label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 12px; }
.track-form input { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line, #e8e2da); border-radius: 10px; font-family: inherit; font-size: 0.95rem; }
.track-form .btn { width: 100%; }
.track-msg { font-size: 0.88rem; min-height: 1.2em; margin-bottom: 8px; }
.track-msg.err { color: #b23b3b; }
.track-card { background: #fff; border: 1px solid var(--line, #e8e2da); border-radius: 14px; padding: 16px; }
.track-head { display: flex; justify-content: space-between; align-items: center; }
.track-status { font-size: 0.8rem; font-weight: 800; border-radius: 20px; padding: 3px 12px; background: #f0ebe4; }
.track-status.status-new { color: #b06a1e; } .track-status.status-confirmed { color: #1e6ab0; }
.track-status.status-preparing { color: #6a3fb0; } .track-status.status-shipped { color: #6a3fb0; }
.track-status.status-delivered { color: #2e7d4f; } .track-status.status-canceled { color: #b23b3b; }
.track-sub { margin-top: 6px; font-size: 0.8rem; }
.track-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.track-steps li { display: flex; gap: 10px; padding-bottom: 16px; position: relative; }
.track-steps li::before { content: ""; position: absolute; right: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--line, #e8e2da); }
.track-steps li:last-child::before { display: none; }
.track-steps .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line, #e8e2da); background: #fff; flex-shrink: 0; margin-top: 3px; }
.track-steps li.done .dot { background: #a4566d; border-color: #a4566d; }
.track-steps li.next { opacity: 0.45; }
.track-steps li strong { font-size: 0.92rem; display: block; }
.track-time { font-size: 0.75rem; color: var(--muted, #8a8178); }
.track-canceled { margin-top: 12px; color: #b23b3b; font-size: 0.9rem; font-weight: 700; }
.track-link { display: inline-block; margin-top: 10px; color: #a4566d; font-weight: 700; font-size: 0.88rem; }
.stars { display: inline-flex; gap: 1px; vertical-align: -3px; }
.card-rating { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.rating-block { margin-top: 20px; }
.rating-summary { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 10px; }
.review-item { border-top: 1px solid var(--line); padding: 10px 0; }
.review-head { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.review-date { margin-inline-start: auto; font-size: 0.78rem; }
.review-text { font-size: 0.88rem; margin-top: 4px; }
.review-gate-note { color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.review-form { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.review-form label { display: block; margin-bottom: 10px; font-size: 0.88rem; font-weight: 700; }
.review-form select, .review-form textarea { width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 0.95rem; }

/* زرار السلة العائم في الموبايل */
.fab-cart {
  position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 55;
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 13px 22px;
  font-size: 1rem; font-weight: 800; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
}
@media (min-width: 640px) { .fab-cart { display: none; } }

.track-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 14px 0; }
.track-actions .link-btn { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid #a4566d; color: #a4566d; border-radius: 10px; padding: 9px 14px; font-family: inherit; font-size: 0.85rem; font-weight: 800; cursor: pointer; }
.track-actions .link-btn svg { width: 16px; height: 16px; }
.track-actions .link-btn:active { background: #f6e9ee; transform: scale(0.97); }
.track-actions .again-link { color: var(--muted, #8a7d76); font-size: 0.82rem; font-weight: 700; text-decoration: underline; }
.track-actions .copy-toast { margin: 0; }

.track-item .rate-btn { flex-shrink: 0; min-height: 38px; padding: 8px 12px; font-size: 0.78rem; line-height: 1.2; }
.track-item .track-reviewed { flex-shrink: 0; }
.track-item-info { overflow-wrap: anywhere; }

/* مخزون: ملاحظات الكمية */
.store-flash { position: fixed; left: 16px; right: 16px; bottom: 150px; max-width: 360px; margin: 0 auto; background: #3a333c; color: #fff; font-size: 0.88rem; font-weight: 700; text-align: center; padding: 11px 16px; border-radius: 12px; z-index: 300; box-shadow: 0 6px 20px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.store-flash.show { opacity: 1; }
.cap-note { display: block; color: #9a6a1e; font-size: 0.74rem; font-weight: 700; margin-top: 3px; }
.cap-note.over { color: #b3261e; }
.qty-note { color: #b3261e; font-size: 0.82rem; font-weight: 700; margin: -6px 0 10px; }
.qty-ctrl button:disabled { opacity: 0.35; cursor: not-allowed; }
.stock-issue { background: #fdf2f2; border: 1px solid #f0c8c8; color: #b3261e; border-radius: 10px; padding: 10px 12px; font-size: 0.86rem; font-weight: 700; line-height: 1.7; }
.stock-issue .issue-title { font-weight: 800; margin-bottom: 4px; }
.stock-issue button { margin-top: 8px; background: #b3261e; color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; font-family: inherit; font-weight: 800; cursor: pointer; }

.preview-bar { background: #fff4d6; border: 1px solid #ecd48a; color: #6b5200; border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 0.85rem; margin-bottom: 12px; }

/* ============================================================
   اللغات: English/LTR — خط، زرار التبديل، وعكس الاتجاهات
   ============================================================ */
html[lang="en"] body { font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif; }

/* زرار اللغة في الهيدر */
.lang-toggle { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 0.8rem; font-weight: 800; color: inherit; font-family: inherit; }
.lang-toggle:active { background: var(--line); }
/* زرار اللغة في القائمة الجانبية (شكل side-link) */
.side-link.lang-switch { background: none; border: none; border-bottom: 1px solid #f3efe9; width: 100%; font-family: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; text-align: start; }

/* LTR: السلة بتفتح من اليمين، القائمة الجانبية من الشمال، والخط الفاصل في التتبع على الشمال */
[dir="ltr"] .drawer { transform: translateX(105%); }
[dir="ltr"] .drawer.open { transform: translateX(0); }
[dir="ltr"] .side-nav { right: auto; left: 0; transform: translateX(-100%); box-shadow: 4px 0 18px rgba(0,0,0,0.1); }
[dir="ltr"] #close-modal { float: right; }
[dir="ltr"] .track-steps li::before { right: auto; left: 5px; }

/* رقم الموبايل: الأرقام LTR دايمًا، والمحاذاة يمين في الصفحة العربية */
html[dir="rtl"] #phone { text-align: right; }

/* تفاصيل المنتج: مميزات + مواصفات */
.product-details { margin-top: 20px; }
.pd-highlights { margin: 0 0 14px; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.pd-specs { margin: 0; display: grid; grid-template-columns: minmax(110px, 40%) 1fr; border: 1px solid var(--line, #e8e2da); border-radius: 10px; overflow: hidden; font-size: 0.9rem; }
.pd-specs dt, .pd-specs dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line, #e8e2da); }
.pd-specs dt { background: #faf7f3; font-weight: 700; color: var(--muted, #8a8178); border-inline-end: 1px solid var(--line, #e8e2da); }
.pd-specs dt:last-of-type, .pd-specs dd:last-of-type { border-bottom: none; }
