/* ============================================================
   هوية بصرية للمتجر: "حبر الخياط" (Tailor's Ink)
   حبر كحلي عميق + نحاس عتيق (لون خيط التطريز التقليدي) + كتان خام
   العنصر المميز: شريط "متر القماش" - إشارة مباشرة لبيع الأقمشة بالطول
   لتغيير الشكل العام: عدّل المتغيرات في :root فقط
   ============================================================ */

:root {
  /* الحبر (اللون الأساسي) */
  --color-primary: #182430;
  --color-primary-light: #263447;
  --color-primary-dark: #0e161e;

  /* النحاس العتيق (لون خيط التطريز) */
  --color-accent: #b5893f;
  --color-accent-light: #d4b06a;
  --color-accent-dark: #96702f;

  /* الكتان الخام (الخلفية) */
  --color-bg: #efe9dc;
  --color-surface: #fffdf8;

  --color-text: #201f1a;
  --color-text-muted: #736c5c;
  --color-border: #e0d8c4;
  --color-danger: #b23b30;
  --color-success: #2e6b3e;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Amiri: خط عربي تراثي للعناوين فقط (يُستخدم بحرص) | Tajawal: للنصوص والواجهة */
  --font-display: 'Amiri', 'Tajawal', serif;
  --font-main: 'Tajawal', 'Segoe UI', sans-serif;

  --shadow-card: 0 4px 18px rgba(24, 36, 48, 0.08);
  --shadow-card-hover: 0 16px 34px rgba(24, 36, 48, 0.18);
  --shadow-header: 0 2px 16px rgba(14, 22, 30, 0.22);

  --container: 1200px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  /* نسيج نسيجي خفيف جداً بالخلفية - إشارة لطبيعة المنتج دون أي صورة خارجية */
  background-color: var(--color-bg);
  background-image:
    repeating-linear-gradient(45deg, rgba(24,36,48,0.018) 0px, rgba(24,36,48,0.018) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(24,36,48,0.018) 0px, rgba(24,36,48,0.018) 1px, transparent 1px, transparent 10px);
  color: var(--color-text);
  direction: rtl;
  text-align: right;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* التركيز عند التنقل بلوحة المفاتيح - إتاحة أساسية */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-header);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  min-height: var(--header-h);
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 25px);
  font-weight: 700;
  color: var(--color-accent-light);
  white-space: nowrap;
  letter-spacing: .3px;
}

.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a {
  font-weight: 600;
  font-size: 15px;
  opacity: .88;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  transition: color .18s ease, opacity .18s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s ease;
}
.main-nav a:hover { color: var(--color-accent-light); opacity: 1; }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  position: relative;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  transition: background .18s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.cart-badge {
  position: absolute; top: 2px; left: 2px;
  background: var(--color-accent); color: var(--color-primary-dark);
  font-size: 11px; font-weight: 800; border-radius: 50%;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 80% -20%, rgba(181, 137, 63, .2), transparent 60%),
    linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-light));
  color: #fff;
  padding: clamp(56px, 12vw, 96px) 20px clamp(30px, 6vw, 46px);
  text-align: center;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(30px, 7vw, 50px);
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.3;
  text-wrap: balance;
}
.hero p {
  color: #d9dde1;
  font-size: clamp(15px, 3.4vw, 18px);
  max-width: 640px;
  margin: 0 auto 30px;
  text-wrap: pretty;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--color-accent-dark);
  box-shadow: 0 10px 22px rgba(181, 137, 63, .35);
}
.btn:active { transform: translateY(0); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; box-shadow: none; }
.btn-outline:hover { background: #fff; color: var(--color-primary); }
.btn-secondary { background: var(--color-primary); color: #fff; box-shadow: none; }
.btn-secondary:hover { background: var(--color-primary-light); }
.btn-block { width: 100%; }
.btn-danger { background: var(--color-danger); color: #fff; box-shadow: none; }

/* ============================================================
   Section titles
   ============================================================ */
.section { padding: clamp(36px, 8vw, 56px) 0; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}
.section-title h2 {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 700;
  margin: 0;
  border-right: 4px solid var(--color-accent);
  padding-right: 12px;
  line-height: 1.3;
}
.section-title a { color: var(--color-primary); font-weight: 700; font-size: 14px; white-space: nowrap; }
.section-title a:hover { color: var(--color-accent-dark); }

/* ============================================================
   Category Cards
   ============================================================ */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 190px;
  background: var(--color-primary);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.category-card img { width: 100%; height: 100%; object-fit: cover; opacity: .5; transition: transform .4s ease, opacity .3s ease; }
.category-card:hover img { transform: scale(1.08); opacity: .6; }
.category-card .cat-label {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 18px;
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; color: #fff;
  background: linear-gradient(to top, rgba(14, 22, 30, .82), rgba(14, 22, 30, .15) 55%, transparent 80%);
}

/* ============================================================
   Product Cards
   ============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(224, 216, 196, .8);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.product-thumb { aspect-ratio: 1 / 1; overflow: hidden; background: #eee; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-info { padding: 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-info .cat-tag { font-size: 12px; color: var(--color-text-muted); }
.product-info h3 { font-family: var(--font-main); font-size: 16px; font-weight: 700; margin: 0; line-height: 1.4; }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.price-current {
  font-weight: 800; color: var(--color-primary); font-size: 17px;
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
}
.price-old { text-decoration: line-through; color: var(--color-text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.badge-sale {
  background: var(--color-danger); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-pill);
  position: absolute; top: 10px; right: 10px; z-index: 2;
  box-shadow: 0 2px 8px rgba(178, 59, 48, .4);
}

/* ============================================================
   Forms
   ============================================================ */
.form-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: clamp(22px, 5vw, 32px);
  box-shadow: var(--shadow-card);
  max-width: 480px;
  margin: 40px auto;
}
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 16px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(181, 137, 63, .2);
}
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fceceb; color: var(--color-danger); }
.alert-success { background: #e9f3ea; color: var(--color-success); }

/* ============================================================
   Table
   ============================================================ */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--color-border); text-align: right; font-size: 14px; }
th { background: var(--color-primary); color: #fff; white-space: nowrap; }
.status-pill { padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; display: inline-block; }
.status-pending { background: #fbedcf; color: #7a5b13; }
.status-processing { background: #d9e6f5; color: #234e82; }
.status-shipped { background: #e5dcf5; color: #55348a; }
.status-completed { background: #dcefdd; color: #276635; }
.status-cancelled { background: #f7dbd8; color: #96271c; }
.status-paid { background: #dcefdd; color: #276635; }
.status-unpaid { background: #fbedcf; color: #7a5b13; }
.status-failed { background: #f7dbd8; color: #96271c; }
.status-refunded { background: #e5dcf5; color: #55348a; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--color-primary); color: #c8cdd2; padding: clamp(36px, 7vw, 52px) 0 22px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.footer-grid h4 { font-family: var(--font-display); color: #fff; margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.footer-grid a { color: #c8cdd2; transition: color .15s ease; }
.footer-grid a:hover { color: var(--color-accent-light); }
.footer-bottom { text-align: center; padding-top: 22px; margin-top: 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }

/* ============================================================
   Cashback widget
   ============================================================ */
.cashback-box {
  background: linear-gradient(120deg, var(--color-accent), var(--color-accent-light));
  color: #37280f;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
}
.cashback-box .amount { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ============================================================
   Admin Panel
   ============================================================ */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: var(--color-primary); color: #fff; padding: 20px 0; flex-shrink: 0; }
.admin-sidebar .brand { font-family: var(--font-display); padding: 0 20px 20px; font-weight: 700; font-size: 19px; color: var(--color-accent-light); }
.admin-sidebar a { display: block; padding: 12px 20px; color: #d9d9d9; font-weight: 600; border-right: 3px solid transparent; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.06); color: #fff; border-right-color: var(--color-accent); }
.admin-content { flex: 1; padding: 30px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: #fff; border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.stat-card .label { color: var(--color-text-muted); font-size: 13px; }
.admin-table-wrap { background: #fff; border-radius: var(--radius-md); overflow: auto; box-shadow: var(--shadow-card); }
.thumb-sm { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.action-links a { margin-left: 10px; font-weight: 700; font-size: 13px; }

/* ============================================================
   الاستجابة (Responsive)
   ============================================================ */

@media (max-width: 992px) {
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 14px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .topbar { flex-wrap: wrap; padding: 0 16px; row-gap: 0; }
  .header-actions { order: 2; }
  .logo { order: 1; }

  .main-nav {
    order: 3; width: 100%; gap: 20px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 10px 2px 12px; margin: 0 -2px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { flex: 0 0 auto; font-size: 14px; padding: 4px 0; }
  .main-nav a::after { display: none; }

  .container { padding: 0 16px; }

  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .category-card { height: 150px; border-radius: var(--radius-md); }
  .category-card .cat-label { font-size: 15px; padding: 14px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-info { padding: 12px; gap: 5px; }
  .product-info h3 { font-size: 14px; }
  .price-current { font-size: 15px; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }

  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 10px; gap: 6px; -webkit-overflow-scrolling: touch; }
  .admin-sidebar .brand { display: none; }
  .admin-sidebar a { border-right: none; border-radius: var(--radius-sm); white-space: nowrap; padding: 10px 14px; }
  .admin-sidebar a:hover, .admin-sidebar a.active { border-right: none; }
  .admin-content { padding: 20px 16px; }
}

@media (max-width: 420px) {
  .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

/* ============================================================
   التصنيفات كستوري (سناب شات / انستغرام) - قابلة للسحب يمين ويسار
   ============================================================ */
.category-stories {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  cursor: grab;
}
.category-stories::-webkit-scrollbar { display: none; }
.story-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 84px;
  text-align: center;
  scroll-snap-align: start;
}
/* حلقة متدرّجة حول الصورة - نفس أسلوب ستوري انستغرام */
.story-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--color-accent), var(--color-accent-light), var(--color-accent-dark), var(--color-accent));
  padding: 3px;
  transition: transform .2s ease;
}
.story-item:hover .story-ring,
.story-item:active .story-ring { transform: scale(1.06); }
.story-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
  border: 2.5px solid var(--color-bg);
  display: block;
}
.story-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   كاروسيل أحدث المنتجات - بطاقات مضغوطة بمقاس ثابت
   ============================================================ */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 12px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 auto;
  width: 210px;           /* مقاس ثابت مضغوط - لا يتمدد أبداً */
  max-width: 210px;
  scroll-snap-align: start;
}
.carousel-nav { display: flex; gap: 8px; }
.carousel-arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
  line-height: 1;
  padding: 0 0 3px;
}
.carousel-arrow:hover { background: var(--color-primary); color: #fff; }

/* بطاقة المنتج داخل الكاروسيل: صورة مربعة مقيدة بإطار */
.carousel-slide .product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f2efe8;
  border-bottom: 1px solid var(--color-border);
}
.carousel-slide .product-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.carousel-slide .product-info { padding: 12px 14px; gap: 4px; }
.carousel-slide .product-info h3 { font-size: 14.5px; }
.price-from { font-size: 11.5px; color: var(--color-text-muted); }

/* ============================================================
   شارات الثقة
   ============================================================ */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.trust-badge-icon { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.trust-badge strong { display: block; font-size: 14px; margin-bottom: 2px; }
.trust-badge span { font-size: 12.5px; color: var(--color-text-muted); display: block; }

/* ============================================================
   صفحة المنتج
   ============================================================ */
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

/* الصورة: إطار احترافي بمقاس مضبوط ولا تتجاوزه أبداً */
.product-main-image {
  aspect-ratio: 1 / 1;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f2efe8;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  position: relative;
}
.product-main-image::after {
  /* إطار داخلي رفيع يمنح إحساس "لوحة عرض" للمنتج */
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(181, 137, 63, .3);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }

.product-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.product-thumb-item {
  width: 62px; height: 62px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s ease, opacity .15s ease;
  opacity: .75;
}
.product-thumb-item.active { border-color: var(--color-accent); opacity: 1; }
.product-thumb-item:hover { opacity: 1; }

.product-details-panel { min-width: 0; }
.product-title { margin: 6px 0 10px; font-size: 26px; line-height: 1.35; }
.product-price-row { margin-bottom: 14px; }
.product-price-row .price-current { font-size: 26px; }
.product-description {
  color: var(--color-text-muted);
  line-height: 1.85;
  font-size: 14.5px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.option-block { margin-bottom: 20px; }
.option-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; }

/* القائمة المنسدلة للمقاسات - بسهم مخصص أنيق */
.select-wrap { position: relative; max-width: 380px; }
.select-wrap::after {
  content: "▾";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent-dark);
  font-size: 15px;
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 13px 16px;
  padding-left: 42px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(181, 137, 63, .18);
}

/* الألوان */
.color-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.color-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.color-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.color-chip-swatch {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: block;
  border: 2.5px solid var(--color-border);
  box-shadow: inset 0 0 0 2.5px var(--color-surface);
  transition: border-color .15s ease, transform .15s ease;
  position: relative;
}
.color-chip-swatch.selected {
  border-color: var(--color-accent);
  transform: scale(1.1);
}
.color-chip-label { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }

/* عداد الكمية */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  width: fit-content;
  height: 46px;
}
.qty-btn {
  width: 46px;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  transition: background .15s ease;
  line-height: 1;
}
.qty-btn:hover { background: var(--color-bg); }
.qty-btn:active { background: var(--color-border); }
.qty-stepper input {
  width: 56px;
  border: none;
  border-right: 1.5px solid var(--color-border);
  border-left: 1.5px solid var(--color-border);
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-inner-spin-button,
.qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper-sm { height: 38px; }
.qty-stepper-sm .qty-btn { width: 38px; font-size: 17px; }
.qty-stepper-sm input { width: 44px; font-size: 14px; }

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  max-width: 380px;
}

/* ============================================================
   إشعار الإضافة للسلة (Toast)
   ============================================================ */
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: -160px;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 999;
  width: min(440px, calc(100vw - 32px));
  transition: bottom .35s cubic-bezier(.2,.8,.3,1.1);
}
.cart-toast.show { bottom: 20px; }
.cart-toast-icon { font-size: 22px; flex: 0 0 auto; }
.cart-toast-body { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; flex: 1; min-width: 130px; }
.cart-toast-body strong { font-size: 13.5px; }
.cart-toast-actions { display: flex; gap: 8px; }
.cart-toast-actions .btn { padding: 8px 14px; font-size: 12.5px; width: auto; }

/* ============================================================
   سلة المشتريات - متجاوبة بالكامل
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
.cart-table { width: 100%; }
.cart-product-cell { display: flex; align-items: center; gap: 10px; }
.cart-product-cell img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); flex: 0 0 auto; }
.cart-specs-cell { font-size: 13px; color: var(--color-text-muted); }
.cart-color-spec { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cart-color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--color-border); }
.cart-line-total { font-weight: 700; font-variant-numeric: tabular-nums; }

.cart-summary-box {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14.5px; }
.cart-summary-total { font-weight: 800; font-size: 18px; margin: 10px 0 14px; }

/* ============================================================
   صفحات السياسات
   ============================================================ */
.policy-page h3 { margin-top: 26px; margin-bottom: 8px; font-size: 17px; }
.policy-page h3:first-child { margin-top: 0; }
.policy-page p { line-height: 1.9; }
.policy-page ul { padding-right: 20px; line-height: 1.9; }
.policy-page li { margin-bottom: 6px; }

/* ============================================================
   الاستجابة للجوال - صفحة المنتج والسلة والكاروسيل
   ============================================================ */
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 22px; }
  .product-main-image { max-width: 100%; }
  .product-actions { max-width: none; }
  .select-wrap { max-width: none; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary-box { position: static; }
}

@media (max-width: 700px) {
  /* السلة: من جدول إلى بطاقات */
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .cart-table td {
    border: none;
    padding: 7px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
  }
  .cart-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 12.5px;
    flex: 0 0 auto;
    margin-left: 10px;
  }
  .cart-product-cell { justify-content: flex-start !important; }

  .carousel-slide { width: 180px; max-width: 180px; }
}

@media (max-width: 480px) {
  .story-ring { width: 68px; height: 68px; }
  .story-item { width: 76px; }
  .product-title { font-size: 21px; }
  .product-price-row .price-current { font-size: 22px; }
  .carousel-slide { width: 165px; max-width: 165px; }
  .carousel-slide .product-info h3 { font-size: 13px; }
  .cart-toast-actions { width: 100%; }
  .cart-toast-actions .btn { flex: 1; }
}