/* ═══════════════════════════════════════
   AWTAD SIWA — Premium Desert Heritage
   ═══════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --cream:    #F5F0E0;
  --parch:    #EDE5C8;
  --sand:     #D4C49A;
  --sand-lt:  #E8DFB8;
  --gold:     #B8892A;
  --gold-lt:  #D4A843;
  --forest:   #233519;
  --leaf:     #3A5228;
  --text:     #1A2710;
  --text-2:   #4A5C38;
  --white:    #FEFCF4;
  --r:        14px;
  --r-lg:     20px;
  --r-xl:     28px;
  --sh:       0 4px 24px rgba(26,39,16,.10);
  --sh-lg:    0 12px 50px rgba(26,39,16,.18);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* منع السكرول الأفقي */
}

body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 110px;
  overflow-x: hidden; /* منع السكرول الأفقي */
  /* Subtle grain texture */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
}

a { color: var(--gold); text-decoration: none; }
img { display: block; }
button, input, select { font-family: inherit; font-size: inherit; }
code { font-family: 'Courier New', monospace; font-size: .85em; background: var(--parch); padding: 2px 5px; border-radius: 4px; }


/* ════════ Top Bar ════════ */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  border-bottom: 1px solid var(--sand);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.brand-logo-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--sand);
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-en {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px; font-weight: 600; letter-spacing: 2px;
  color: var(--forest); line-height: 1;
}
.brand-ar { font-size: 11px; color: var(--text-2); opacity: .8; line-height: 1; }

.topbar-nav { display: flex; align-items: center; gap: 18px; }
.nav-link {
  font-size: 14px; font-weight: 600; color: var(--text-2);
  text-decoration: none; padding: 6px 0;
  position: relative;
  transition: color .2s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; right: 0; left: 0;
  height: 1.5px; background: var(--gold);
  transform: scaleX(0); transition: transform .25s ease;
  transform-origin: right;
}
.nav-link:hover { color: var(--gold); }
.nav-link:hover::after { transform: scaleX(1); }

.cart-btn {
  position: relative; background: none; border: 1.5px solid var(--sand);
  border-radius: 12px; width: 44px; height: 44px;
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  transition: border-color .2s, background .2s;
}
.cart-btn:hover { border-color: var(--gold); background: var(--parch); }
.cart-btn-badge {
  position: absolute; top: -6px; left: -6px;
  background: var(--gold); color: white;
  font-size: 10px; font-weight: 900;
  min-width: 18px; height: 18px;
  border-radius: 999px; display: grid; place-items: center;
  padding: 0 4px;
  border: 2px solid var(--cream);
}


/* ════════ Hero ════════ */
.hero {
  position: relative; overflow: hidden;  /* يقص الكرات الزخرفية */
  background: linear-gradient(135deg, var(--forest) 0%, #2E4820 60%, #1A2E12 100%);
  color: white;
  padding: 80px 20px 70px;
  display: flex; align-items: center; justify-content: center;
  min-height: 420px;
  text-align: center;
}

.hero-bg-word {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: min(28vw, 280px); font-weight: 300; letter-spacing: .05em;
  color: rgba(255,255,255,.04);
  white-space: nowrap; pointer-events: none; user-select: none;
  line-height: 1;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}

.hero-tag {
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  color: var(--gold-lt); text-transform: uppercase;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(212,168,67,.35);
  padding: 6px 16px; border-radius: 999px;
  display: inline-block;
}

.hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(32px, 6vw, 58px); font-weight: 900;
  line-height: 1.2; color: white;
}
.hero-title em {
  font-style: normal;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300; font-style: italic;
  color: var(--gold-lt); font-size: .95em;
  display: block;
}

.hero-sub {
  font-size: 16px; opacity: .75; max-width: 420px;
  font-weight: 300; line-height: 1.7;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Ornamental circles */
.hero-ornament { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,137,42,.25) 0%, transparent 70%);
}
.orb-1 { width: 500px; height: 500px; top: -200px; right: -150px; }
.orb-2 { width: 350px; height: 350px; bottom: -150px; left: -80px; background: radial-gradient(circle, rgba(58,82,40,.4) 0%, transparent 70%); }
.hero-palm {
  position: absolute; bottom: 10px; left: 40px;
  font-size: 80px; opacity: .08; transform: rotate(-10deg);
  filter: grayscale(1);
}


/* ════════ Section Divider ════════ */
.divider-strip {
  display: flex; align-items: center; gap: 0;
  background: var(--forest); height: 38px;
  overflow: hidden;
}
.divider-strip span { flex: 1; height: 1px; background: rgba(212,196,154,.25); }
.divider-gem {
  flex: none !important; height: auto !important;
  color: var(--gold-lt); font-size: 14px;
  padding: 0 20px; background: transparent;
  display: block;
}


/* ════════ Buttons ════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; cursor: pointer; padding: 11px 22px;
  border-radius: var(--r); font-weight: 700; font-size: 14px;
  font-family: 'Cairo', sans-serif;
  transition: all .2s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(184,137,42,.35);
}
.btn-gold:hover {
  box-shadow: 0 6px 22px rgba(184,137,42,.50);
  filter: brightness(1.08);
}

.btn-ghost {
  background: rgba(255,255,255,.1);
  color: white;
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.btn-ghost-bar {
  background: rgba(255,255,255,.12);
  color: white;
  border: 1.5px solid rgba(255,255,255,.25);
}
.btn-ghost-bar:hover { background: rgba(255,255,255,.2); }

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--sand);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: var(--parch); }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.full { width: 100%; }


/* ════════ Page Body Layout ════════ */
.page-body {
  max-width: 1160px; margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 252px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .page-body { grid-template-columns: 1fr; }
  .sidebar { position: static; top: auto; }
}


/* ════════ Sidebar ════════ */
.sidebar {
  background: var(--white);
  border: 1px solid var(--sand-lt);
  border-radius: var(--r-lg);
  padding: 18px;
  position: sticky; top: 74px;
  box-shadow: var(--sh);
}

.sidebar-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--parch);
}
.sidebar-heading {
  font-size: 13px; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase; color: var(--forest);
}
.count-chip {
  background: var(--forest); color: var(--gold-lt);
  font-size: 12px; font-weight: 900;
  padding: 3px 10px; border-radius: 999px;
  min-width: 28px; text-align: center;
}

.field { margin-bottom: 14px; }
.field-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-2); opacity: .7; margin-bottom: 6px;
}
.search-box {
  position: relative;
  display: flex; align-items: center;
}
.search-box svg {
  position: absolute; right: 11px; color: var(--text-2); opacity: .5; pointer-events: none;
}
.search-box .input { padding-right: 34px; }

.input, select.input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--parch);
  border-radius: var(--r);
  background: var(--cream);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-size: 14px;
}
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,137,42,.12);
}

.price-row { display: flex; align-items: center; gap: 8px; }
.price-row .input { flex: 1; text-align: center; }
.price-dash { color: var(--text-2); opacity: .5; flex-shrink: 0; font-size: 13px; }

.sidebar-actions { display: flex; gap: 8px; margin-top: 18px; }
.sidebar-actions .btn { flex: 1; }

.sidebar-note {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--sand);
  font-size: 11px; color: var(--text-2); opacity: .7;
  line-height: 1.7;
}


/* ════════ Products Area ════════ */
.products-main {
  min-width: 0;        /* أساسي: يمنع grid child من تجاوز حجمه */
  overflow: hidden;    /* يقص أي overflow داخلي */
}
.products-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px; gap: 12px;
}
.products-title {
  font-size: 13px; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase; color: var(--forest);
}
.products-hint { font-size: 12px; color: var(--text-2); opacity: .6; }

.sliders { display: flex; flex-direction: column; gap: 20px; }


/* ════════ Empty State ════════ */
.empty-state {
  text-align: center; padding: 48px 20px;
  background: var(--white);
  border: 1.5px dashed var(--sand);
  border-radius: var(--r-lg);
  color: var(--text-2);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state .empty-hint { font-size: 12px; opacity: .6; margin-top: 6px; }


/* ════════ Category Section ════════ */
.cat-section {
  background: var(--white);
  border: 1px solid var(--sand-lt);
  border-radius: var(--r-lg);
  overflow: hidden;           /* يقص الكروت الخارجة */
  box-shadow: var(--sh);
  animation: slideUp .45s ease both;
  contain: layout;            /* يمنع تأثير المحتوى على الخارج */
}

.cat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--parch) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--sand-lt);
  gap: 12px; flex-wrap: wrap;
}
.cat-head-left { display: flex; align-items: center; gap: 12px; }
.cat-head h3 {
  font-size: 18px; font-weight: 700; color: var(--forest); margin: 0;
}
.cat-count {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  background: var(--forest); color: var(--gold-lt);
  padding: 3px 10px; border-radius: 999px;
}

/* Dots */
.dots {
  display: flex; gap: 6px; align-items: center;
}
.dot {
  width: 7px; height: 7px; border-radius: 999px;
  border: none; padding: 0; cursor: pointer;
  background: var(--sand);
  transition: background .2s, width .25s cubic-bezier(.2,.8,.2,1);
}
.dot.active { background: var(--gold); width: 22px; }


/* ════════ Carousel ════════ */
.carousel {
  position: relative;
  direction: ltr;
  padding: 14px 50px; /* مسافة للأسهم يمين وشمال */
}
.track-viewport {
  overflow: hidden;
  border-radius: 10px;
}
.track {
  display: flex;
  gap: 14px;
  will-change: transform;
  transition: transform .40s cubic-bezier(.22,.8,.22,1);
}
.slide {
  flex: 0 0 240px; max-width: 240px;
  direction: rtl;
  animation: slideUp .45s ease both;
  animation-delay: var(--d, 0ms);
}

/* ── Nav Buttons ── */
.navbtn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1.5px solid var(--sand);
  background: var(--white);
  cursor: pointer; z-index: 5;
  display: grid; place-items: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.10);
  transition: all .2s ease;
  color: var(--forest);
}
.navbtn svg { width: 16px; height: 16px; }
.navbtn:hover {
  transform: translateY(-50%) scale(1.08);
  border-color: var(--gold);
  box-shadow: 0 5px 18px rgba(184,137,42,.25);
}
.navbtn:active { transform: translateY(-50%) scale(.95); }
.navbtn[disabled] { opacity: .25; cursor: not-allowed; pointer-events: none; }
.navbtn.prev { left: 6px; }
.navbtn.next { right: 6px; }

/* ── Mobile Carousel ── */
@media (max-width: 600px) {
  .carousel {
    padding: 12px 40px;
  }
  .navbtn { width: 32px; height: 32px; }
  .navbtn svg { width: 13px; height: 13px; }
  /* العرض = عرض الشاشة - padding الصفحة (40px) - padding الكاروسيل (80px) - gap */
  .slide {
    flex: 0 0 calc(100vw - 160px);
    max-width: calc(100vw - 160px);
  }
}


/* ════════ Product Card ════════ */
.card {
  background: var(--white);
  border: 1px solid var(--sand-lt);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 100%;
  transition: transform .28s ease, box-shadow .28s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(26,39,16,.15);
}

.card .img {
  height: 180px;
  background: var(--parch);
  overflow: hidden; position: relative;
  flex-shrink: 0;
}
.card .img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.22,.8,.22,1);
}
.card:hover .img img { transform: scale(1.07); }
.card .img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(26,39,16,.08) 100%);
  pointer-events: none;
}

.card .body {
  padding: 12px 14px 8px;
  flex: 1;
  min-width: 0; /* مهم: يمنع overflow النص */
}
.card h3 {
  font-size: 14px; font-weight: 700;
  color: var(--forest); line-height: 1.35;
  margin-bottom: 8px;
  /* منع النص من الخروج */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; flex-wrap: wrap;
}
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  background: color-mix(in srgb, var(--gold-lt) 15%, var(--cream));
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold-lt) 30%, var(--sand));
  padding: 2px 8px; border-radius: 999px;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 80px;
}
.price {
  font-size: 14px; font-weight: 900;
  color: var(--forest);
  white-space: nowrap;
}
.unit-label {
  font-size: 11px; color: var(--text-2); opacity: .65;
  margin-top: 5px;
  background: var(--cream); padding: 2px 8px; border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.card .actions {
  padding: 10px 14px 12px;
  display: flex; gap: 8px; align-items: center;
  border-top: 1px solid var(--parch);
  flex-wrap: nowrap; /* منع الـ wrap غير المتوقع */
}
.card .actions .qty { flex-shrink: 0; }
.card .actions .btn { flex: 1; text-align: center; font-size: 13px; padding: 8px 10px; }


/* ════════ Qty Controls ════════ */
.qty {
  display: flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--parch);
  border-radius: 10px; padding: 4px 6px;
  background: var(--cream);
  transition: border-color .2s;
}
.qty:focus-within { border-color: var(--gold); }
.qty button {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--sand); background: var(--white);
  cursor: pointer; font-weight: 900; font-size: 15px; line-height: 1;
  color: var(--forest);
  transition: background .15s, transform .1s;
}
.qty button:hover { background: var(--parch); }
.qty button:active { transform: scale(.9); }
.qty .num {
  min-width: 22px; text-align: center;
  font-weight: 900; color: var(--forest); font-size: 14px;
}


/* ════════ Footer ════════ */
.footer {
  background: var(--forest); color: rgba(255,255,255,.55);
  padding: 22px 20px; text-align: center;
  font-size: 12px; letter-spacing: .5px;
  display: flex; justify-content: center; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px; letter-spacing: 3px; color: var(--gold-lt);
}
.footer-gem { color: var(--gold); font-size: 10px; }


/* ════════ Overlay ════════ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,5,.55);
  display: none; align-items: center; justify-content: center;
  padding: 16px; z-index: 500;
  backdrop-filter: blur(3px);
}


/* ════════ Modal Base ════════ */
.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--sand-lt);
  width: 100%; max-width: 860px;
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--sh-lg);
  animation: popIn .25s ease;
}
.modal-x {
  position: absolute; top: 14px; left: 14px;
  width: 34px; height: 34px; border-radius: 10px;
  border: 1.5px solid var(--sand); background: var(--cream);
  cursor: pointer; font-size: 13px; color: var(--text);
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
  z-index: 2;
}
.modal-x:hover { background: var(--parch); border-color: var(--gold); }
.modal-header {
  position: relative;
  padding: 16px 20px;
  background: var(--parch);
  border-bottom: 1px solid var(--sand-lt);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 {
  font-size: 16px; font-weight: 700; color: var(--forest);
}

/* Product Modal */
.modal-product { position: relative; max-width: 800px; }
.product-modal-grid {
  display: grid; grid-template-columns: 280px 1fr;
  overflow-y: auto; flex: 1;
}
@media (max-width: 660px) { .product-modal-grid { grid-template-columns: 1fr; } }

.product-modal-img {
  background: var(--parch);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  border-left: 1px solid var(--sand-lt);
}
.product-modal-img img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; border-radius: var(--r);
  border: 1px solid var(--sand-lt);
}
.product-modal-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.modal-price { font-size: 18px; font-weight: 900; color: var(--forest); }
.modal-unit { font-size: 12px; color: var(--text-2); opacity: .7; }

.product-modal-body { padding: 22px 20px; overflow-y: auto; }
.modal-name { font-size: 20px; font-weight: 900; color: var(--forest); margin-bottom: 16px; line-height: 1.3; }

.specs-heading {
  font-size: 11px; font-weight: 900; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-2); opacity: .7;
  margin-bottom: 10px;
}
.specs-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  margin-bottom: 20px;
}
.specs-table tr { border-bottom: 1px solid var(--parch); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 9px 6px; }
.specs-table td:first-child { color: var(--text-2); opacity: .7; width: 45%; }
.specs-table td:last-child { font-weight: 600; color: var(--forest); }

.modal-btns { display: flex; gap: 10px; flex-wrap: wrap; }


/* Cart Modal */
.modal-cart { max-width: 800px; }
.cart-modal-body {
  display: grid; grid-template-columns: 1fr 260px;
  flex: 1; overflow: hidden;
}
@media (max-width: 660px) { .cart-modal-body { grid-template-columns: 1fr; } }
.cart-items {
  padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.cart-sidebar {
  padding: 16px; background: var(--parch);
  border-right: 1px solid var(--sand-lt);
  display: flex; flex-direction: column; gap: 0;
}

.cart-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--white); border: 1px solid var(--parch);
  border-radius: var(--r); padding: 12px;
  transition: box-shadow .2s;
}
.cart-item:hover { box-shadow: var(--sh); }
.cart-item img {
  width: 62px; height: 62px; border-radius: 10px;
  object-fit: cover; border: 1px solid var(--sand-lt); flex-shrink: 0;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name { font-size: 14px; font-weight: 700; color: var(--forest); }
.cart-item .sub  { font-size: 11px; color: var(--text-2); opacity: .7; margin-top: 2px; }
.cart-item .right { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.cart-item .lineprice { font-size: 13px; font-weight: 900; color: var(--gold); }
.cart-item .remove {
  background: none; border: 1px dashed var(--sand); border-radius: 8px;
  padding: 4px 8px; font-size: 11px; cursor: pointer; color: var(--text-2);
  transition: all .15s;
}
.cart-item .remove:hover { border-color: #d44; color: #d44; background: #fff0f0; }

.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px dashed var(--sand);
  font-size: 14px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row.muted { font-size: 12px; opacity: .65; }
.summary-total { font-size: 20px; font-weight: 900; color: var(--forest); }
.summary-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.empty-cart {
  text-align: center; padding: 30px;
  font-size: 13px; color: var(--text-2); opacity: .7;
}
.empty-cart-icon { font-size: 32px; margin-bottom: 8px; }


/* ════════ Cart Bar ════════ */
.cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 10px 20px 12px; z-index: 300; display: none;
}
.cart-bar-inner {
  max-width: 1160px; margin: 0 auto;
  background: var(--forest);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 -4px 30px rgba(0,0,0,.25), 0 8px 40px rgba(0,0,0,.15);
  flex-wrap: wrap;
}
.cart-bar-left { display: flex; align-items: center; gap: 12px; }
.cart-count-pill {
  background: var(--gold); color: white;
  width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 14px;
}
.cart-bar-info { display: flex; flex-direction: column; gap: 1px; }
.cart-bar-info strong { color: white; font-size: 14px; }
.cart-bar-total { font-size: 12px; color: rgba(255,255,255,.55); }
.cart-bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }


/* ════════ Animations ════════ */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: none; }
}


/* ════════ Mobile ════════ */
@media (max-width: 600px) {

  /* Topbar */
  .brand-ar { display: none; }
  .topbar-inner { padding: 10px 14px; }
  .nav-link { font-size: 13px; }

  /* Hero */
  .hero {
    padding: 50px 16px 44px;
    min-height: auto;
    text-align: center;
  }
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 14px; }
  .hero-btns .btn { padding: 10px 16px; font-size: 13px; }

  /* Page body */
  .page-body { padding: 16px 14px; gap: 14px; }

  /* Sidebar */
  .sidebar { position: static !important; top: auto; }
  .sidebar-note { display: none; } /* توفير مسافة على الموبايل */

  /* Products head */
  .products-hint { display: none; }

  /* Cat head */
  .cat-head { padding: 12px 14px; }
  .cat-head h3 { font-size: 16px; }

  /* Card image smaller on mobile */
  .card .img { height: 160px; }

  /* Cart bar */
  .cart-bar { padding: 8px 12px 10px; }
  .cart-bar-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .cart-bar-info strong { font-size: 13px; }
  .cart-bar-actions .btn { font-size: 12px; padding: 8px 12px; }

  /* Modals */
  .modal { max-height: 95vh; border-radius: var(--r-lg); }
  .product-modal-grid { grid-template-columns: 1fr; }
  .product-modal-img { border-left: none; border-bottom: 1px solid var(--sand-lt); }
  .cart-modal-body { grid-template-columns: 1fr; }
  .cart-sidebar { border-right: none; border-top: 1px solid var(--sand-lt); }

  /* Qty on mobile */
  .qty button { width: 28px; height: 28px; font-size: 14px; }
  .qty .num { font-size: 13px; }
}
