/* ==========================================================================
   Arabshop — أنماط الصفحات
   الرئيسية، القوائم، تفاصيل المنتج، السلة، الدفع، الحساب، الصفحات الثابتة.
   ========================================================================== */

/* ══════════════════ الصفحة الرئيسية ══════════════════ */

/* ── البانر الرئيسي ───────────────────────────────────────────────────── */

.hero { padding-block: var(--space-5) var(--space-6); } /* room under the dots before the next section */

.hero__wrap { position: relative; }

.hero__slide {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--space-6);
  overflow: hidden;
  border-radius: var(--r-2xl);
  background: var(--brand-700);
  color: var(--on-primary);
  min-height: 22rem;
}

.hero__slide--sand { background: var(--sand-200); color: var(--ink-900); }

.hero__badge {
  position: absolute;
  z-index: 3;
  inset-block-start: var(--space-4);
  inset-inline-end: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, color-mix(in srgb, var(--sale) 70%, var(--accent)), var(--sale));
  color: var(--on-media);
  font-size: var(--text-2xs);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-6);
}

.hero__eyebrow {
  display: inline-flex;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--on-media) 16%, transparent);
  font-size: var(--text-xs);
  font-weight: 700;
}
.hero__slide--sand .hero__eyebrow { background: color-mix(in srgb, var(--shadow-color) 8%, transparent); }

.hero__title {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 1.35; /* نقاط الحروف العربية لا تُقص */
  color: inherit;
}

.hero__body {
  max-width: 32rem;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  opacity: 0.88;
}

.hero__trust { display: none; }

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block-start: var(--space-1); }
.hero__cta { display: inline-flex; align-items: center; gap: 0.375rem; border-radius: var(--r-full); }

.hero__media { position: relative; align-self: stretch; min-height: 13rem; }
.hero__media { overflow: hidden; }
.hero__media .hero__img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, center); }
/* "show whole": the picture fits inside the slide over a soft, blurred copy of itself (the same file, no extra download) */
.hero__backdrop { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.15); transform: scale(1.2); opacity: 0.6; }
.hero__media--contain .hero__backdrop { display: block; }
.hero__media--contain .hero__img { object-fit: contain; padding: var(--space-4); }
/* automatic slides (a category's product photo): whole, centred, never upscaled; short on phones */
.hero__media--product { display: flex; align-items: center; justify-content: center; height: min(40vh, 20rem); min-height: 11rem; padding: var(--space-4); }
.hero__media--product .hero__img { z-index: 2; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

.hero__pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: color-mix(in srgb, var(--on-media) 50%, transparent);
  opacity: 0.28;
  pointer-events: none;
}

.hero__dots { display: flex; justify-content: center; gap: 0.4375rem; padding-block-start: var(--space-4); }
.hero__dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: var(--r-full);
  background: var(--border-strong);
  transition: width var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}
.hero__dot.is-active { width: 1.75rem; background: var(--brand-600); }

/* — أزرار التنقّل — */
.hero__nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  transform: translateY(-50%);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-800);
  box-shadow: var(--shadow-md);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.hero__nav:hover { background: var(--brand-600); color: var(--on-primary); }
.hero__nav--prev { inset-inline-start: var(--space-3); }
.hero__nav--next { inset-inline-end: var(--space-3); }

@media (min-width: 640px) { .hero__nav { display: flex; } }
/* The arrows sit over the slide's edges: the text box keeps their width free (inset + button + gap), so the copy and
   its button never slide under them. One column (< 900px): both sides; two columns: only the copy's start side. */
@media (min-width: 640px) { .hero--arrows .hero__copy { padding-inline: calc(var(--space-3) * 2 + 2.5rem); } }
@media (min-width: 900px) {
  .hero--arrows .hero__copy { padding-inline-start: max(var(--space-10), calc(var(--space-3) * 2 + 2.5rem)); padding-inline-end: var(--space-10); }
}

@media (min-width: 900px) {
  .hero__slide { grid-template-columns: 1.05fr 1fr; align-items: stretch; gap: 0; height: 26rem; min-height: 0; }
  .hero__copy { justify-content: center; padding: var(--space-10) var(--space-10); gap: var(--space-3); }
  .hero__title { font-size: var(--text-4xl); }
  .hero__body { font-size: var(--text-md); }
  .hero__trust { display: flex; flex-wrap: wrap; gap: var(--space-5); margin-block: var(--space-2) 0; }
  .hero__trust-item { display: flex; align-items: center; gap: 0.4375rem; font-size: var(--text-xs); font-weight: 600; opacity: 0.9; }
  .hero__media { height: 100%; min-height: 0; }
  .hero__media--product { height: 100%; padding: var(--space-8); }
  .hero__media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to left, transparent 55%, var(--brand-700));
  }
  .hero__slide--ink .hero__media::before  { background: linear-gradient(to left, transparent 55%, var(--ink-900)); }
  .hero__slide--sand .hero__media::before { background: linear-gradient(to left, transparent 55%, var(--sand-200)); }
}

/* ── شريط الفئات ──────────────────────────────────────────────────────── */

.cat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
@media (min-width: 560px)  { .cat-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cat-strip { grid-template-columns: repeat(9, minmax(0, 1fr)); } }

.category-card__media--icon {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-sunk); color: var(--ink-400);
}

/* ── البانرات الترويجية ───────────────────────────────────────────────── */

.promo-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .promo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .promo-grid { grid-template-columns: 3fr 2fr; } }
/* Ads per row (promo grid "columns"); without one the wide + narrow pair above stays. */
@media (min-width: 768px) {
  .promo-grid--cols-1 { grid-template-columns: 1fr; }
  .promo-grid--cols-2, .promo-grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .promo-grid--cols-1 { grid-template-columns: 1fr; }
  .promo-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.promo {
  --split: 58%;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 11.5rem;
  padding: var(--space-6);
  overflow: hidden;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast) var(--ease);
}
.promo:hover { box-shadow: var(--shadow-md); }

/* — بطاقة إبراز المنتج: توهّج داكن خلف الصورة — */
.promo--dark {
  background: radial-gradient(135% 150% at 14% 18%, color-mix(in srgb, var(--scheme-dark-bg) 82%, var(--scheme-dark-text)), var(--scheme-dark-bg) 55%);
  color: var(--scheme-dark-text);
}
.promo--dark::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset-inline-end: -18%;
  inset-block-start: -40%;
  width: 62%;
  height: 180%;
  background: radial-gradient(circle, var(--brand-500), transparent 65%);
  opacity: 0.4;
  filter: blur(6px);
  pointer-events: none;
}

/* — بطاقة قسيمة الخصم: تذكرة مثقّبة بفاصل متقن — */
.promo--mint { background: var(--brand-50); color: var(--ink-900); }
.promo--mint::before,
.promo--mint::after {
  content: '';
  position: absolute;
  z-index: 3;
  inset-inline-end: calc(100% - var(--split) - 0.4375rem);
  width: 0.875rem;
  height: 0.875rem;
  border-radius: var(--r-full);
  background: var(--bg);
}
.promo--mint::before { inset-block-start: -0.4375rem; }
.promo--mint::after { inset-block-end: -0.4375rem; }

.promo__copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; max-width: var(--split); }
.promo--mint .promo__copy {
  padding-inline-end: var(--space-4);
  border-inline-end: 1.5px dashed var(--brand-300);
}

.promo__eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-2xs);
  font-weight: 800;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-full);
}
.promo--dark .promo__eyebrow { background: color-mix(in srgb, var(--on-media) 12%, transparent); color: var(--brand-200); }
.promo--mint .promo__eyebrow { background: var(--brand-100); color: var(--brand-700); }

.promo__title { font-size: var(--text-2xl); font-weight: 900; color: inherit; line-height: 1.35; }
.promo--mint .promo__title {
  font-size: var(--text-4xl);
  line-height: 1.3;
  color: var(--brand-600);
  font-variant-numeric: tabular-nums;
}
.promo__body { font-size: var(--text-sm); opacity: 0.8; margin-block-end: 0.375rem; }

.promo__img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent, transparent 30%, var(--ink) 62%);
  mask-image: linear-gradient(to right, transparent, transparent 30%, var(--ink) 62%);
  transition: transform 320ms var(--ease-out);
}
[dir="rtl"] .promo__img {
  -webkit-mask-image: linear-gradient(to left, transparent, transparent 30%, var(--ink) 62%);
  mask-image: linear-gradient(to left, transparent, transparent 30%, var(--ink) 62%);
}
.promo--dark:hover .promo__img { transform: scale(1.045); }

@media (prefers-reduced-motion: reduce) {
  .promo__img { transition: none; }
}

/* ── العدّاد التنازلي ─────────────────────────────────────────────────── */

/* its place in the title row: base.css (.section-head .countdown, .flash-head, --tri, flash-head--end) */

.countdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--ink) 88%, var(--bg))); /* the section's text colour as the box, its background as the digits: readable in every colour scheme and in dark mode */
  box-shadow: var(--shadow-sm);
}

.countdown__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 2.75rem;
  color: var(--bg);
  font-variant-numeric: tabular-nums;
}
.countdown__cell b { font-size: var(--text-md); font-weight: 800; line-height: 1.2; }
.countdown__cell small {
  font-size: var(--text-2xs);
  font-weight: 600;
  opacity: 0.6;
}
.countdown__sep {
  align-self: flex-start;
  margin-block-start: 0.125rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--bg) 55%, var(--ink));
}

/* ── أزرار الشريط الأفقي ──────────────────────────────────────────────── */

.rail-wrap { position: relative; }

.rail-btn {
  position: absolute;
  top: 42%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-800);
  box-shadow: var(--shadow-md);
  transition: opacity var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.rail-btn:hover:not(:disabled) { background: var(--brand-600); color: var(--on-primary); }
.rail-btn:disabled { opacity: 0; pointer-events: none; }
.rail-btn--prev { inset-inline-start: -1.125rem; }
.rail-btn--next { inset-inline-end: -1.125rem; }

@media (min-width: 1024px) { .rail-btn { display: flex; } }

/* ── التغطية الجغرافية ────────────────────────────────────────────────── */

.coverage {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2xl);
  min-height: 20rem;
  display: flex;
  align-items: center;
  color: var(--on-media);
}

.coverage__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coverage__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to left, color-mix(in srgb, var(--brand-900) 55%, transparent), color-mix(in srgb, var(--brand-900) 94%, transparent));
}
.coverage__pattern { position: absolute; inset: 0; color: var(--on-media); opacity: 0.14; }

.coverage__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-6);
  max-width: 42rem;
}

.coverage__eyebrow { font-size: var(--text-xs); font-weight: 700; color: var(--brand-200); }
.coverage__title { font-size: var(--text-2xl); color: var(--on-media); }
.coverage__body { font-size: var(--text-md); line-height: var(--leading-normal); opacity: 0.85; }

.coverage__stats { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-block: var(--space-3); }
.coverage__stat { display: flex; flex-direction: column; }
.coverage__stat b { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 900; }
.coverage__stat span { font-size: var(--text-xs); opacity: 0.75; }

@media (min-width: 768px) {
  .coverage__inner { padding: var(--space-12) var(--space-10); }
  .coverage__title { font-size: var(--text-3xl); }
}

/* ── العلامات التجارية ────────────────────────────────────────────────── */

.brand-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (min-width: 640px)  { .brand-strip { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .brand-strip { grid-template-columns: repeat(8, 1fr); } }

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--space-5) var(--space-3);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--ink-500);
  transition: color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease-out);
}
.brand-card:hover { color: var(--brand-600); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.brand-card__logo { width: auto; max-width: 100%; height: 3rem; object-fit: contain; }
.brand-card__count { font-size: var(--text-2xs); color: var(--ink-400); }
.brand-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(var(--cols-m, 2), minmax(0, 1fr)); }
@media (min-width: 1024px) { .brand-grid { grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); } }
.brand-hero { display: flex; align-items: center; gap: var(--space-4); }
.brand-hero__logo { width: auto; height: 3.5rem; padding: 0.375rem; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-xs); object-fit: contain; }
a.product-card__brand:hover { text-decoration: underline; }
.brand-card__name { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 800; color: var(--ink-800); }
.brand-card:hover .brand-card__name { color: var(--brand-600); }

/* ── آراء العملاء ─────────────────────────────────────────────────────── */

.testimonials { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }
/* One or two quotes: a readable width, lined up with the heading, instead of one third of the row. */
@media (min-width: 768px) {
  .testimonials:has(> :only-child) { grid-template-columns: minmax(0, 28rem); }
  .testimonials:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 24rem)); }
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.testimonial__body { color: var(--ink-600); line-height: var(--leading-normal); }
.testimonial__foot { display: flex; align-items: center; gap: 0.75rem; margin-block-start: auto; }
.testimonial__foot b { display: block; font-size: var(--text-sm); }
.testimonial__foot small { color: var(--ink-400); font-size: var(--text-xs); }

/* ── النشرة البريدية ──────────────────────────────────────────────────── */

.newsletter { background: var(--bg); }

.newsletter__inner {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-10);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .newsletter__inner { grid-template-columns: 1fr 1fr; } }

.newsletter__title { font-size: var(--text-xl); }
.newsletter__body { color: var(--ink-600); margin-block-start: 0.375rem; }

.newsletter__form { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.newsletter__form .input-group { min-width: 15rem; }
.newsletter__form .btn { height: 2.875rem; }
.newsletter__form [data-newsletter-note] { flex-basis: 100%; }

/* ── تطبيق الجوال ─────────────────────────────────────────────────────── */

.appcta { background: var(--scheme-dark-bg); color: color-mix(in srgb, var(--scheme-dark-text) 78%, transparent); overflow: hidden; }

.appcta__inner {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-10);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .appcta__inner { grid-template-columns: 1.2fr 1fr; padding-block: var(--space-12); } }

.appcta__title { color: var(--scheme-dark-text); font-size: var(--text-2xl); margin-block: 0.5rem; }
.appcta__body { line-height: var(--leading-normal); max-width: 32rem; }
.appcta__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block-start: var(--space-5); }

.store-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--on-media) 10%, transparent);
  color: var(--on-media);
  transition: background-color var(--t-fast) var(--ease);
}
.store-badge:hover { background: color-mix(in srgb, var(--on-media) 18%, transparent); }
.store-badge small { display: block; font-size: var(--text-2xs); opacity: 0.7; }
.store-badge strong { display: block; font-size: var(--text-sm); }

.appcta__qr {
  display: none;
  align-items: center; justify-content: center;
  width: 3.75rem; height: 3.75rem;
  border-radius: var(--r-md);
  background: var(--on-media);
  color: var(--ink-900);
}
@media (min-width: 560px) { .appcta__qr { display: flex; } }

.appcta__media { position: relative; }
.appcta__media img {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
}

/* ══════════════════ عناصر مشتركة بين الصفحات ══════════════════ */

/* رأس الصفحة مع فتات الخبز */
.page-hero { background: var(--surface); border-block-end: 1px solid var(--border); }
.page-hero__inner { padding-block: var(--space-6); }
.page-hero__title { margin-block-start: var(--space-3); font-size: var(--text-2xl); }
.page-hero__sub { margin-block-start: 0.5rem; color: var(--ink-500); max-width: 44rem; line-height: var(--leading-normal); }

/* صف مصغّر (سلة/مفضلة/شوهد مؤخراً) */
.mini-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--r-md);
  transition: background-color var(--t-fast) var(--ease);
}
.mini-row:hover { background: var(--surface-muted); }
.mini-row img { width: 3.25rem; height: 3.25rem; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.mini-row__body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.mini-row__title { font-size: var(--text-sm); font-weight: 600; }

/* سطر السلة (الدرج + صفحة السلة) */
.cart-line { display: flex; gap: 0.875rem; padding-block: var(--space-4); border-block-end: 1px solid var(--border); }
.cart-line:last-child { border-block-end: 0; }
.cart-line__media { flex-shrink: 0; }
.cart-line__media img { width: 5rem; height: 5rem; border-radius: var(--r-md); object-fit: cover; background: var(--surface-muted); }
.cart-line__body { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 0.375rem; }
.cart-line__title { font-size: var(--text-sm); font-weight: 600; color: var(--ink-800); }
.cart-line__title:hover { color: var(--brand-600); }
.cart-line__brand { font-size: var(--text-2xs); color: var(--brand-600); font-weight: 600; }
.cart-line__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-block-start: auto; }
.cart-line__remove { align-self: flex-start; padding: 0.375rem; border-radius: var(--r-xs); color: var(--ink-400); transition: color var(--t-fast) var(--ease); }
.cart-line__remove:hover { color: var(--danger); }

/* تلميح الشحن المجاني */
.ship-hint {
  padding: 0.75rem 0.875rem;
  margin-block-end: var(--space-4);
  border-radius: var(--r-md);
  background: var(--gold-50);
  color: var(--gold-700);
  font-size: var(--text-xs);
  font-weight: 600;
}
.ship-hint .icon { vertical-align: -0.2em; margin-inline-end: 0.375rem; }
.ship-hint--done { background: var(--success-50); color: var(--success); }

/* العرض السريع */
.quick { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 700px) { .quick { grid-template-columns: 1fr 1fr; } }
.quick__media { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-muted); }
.quick__media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.quick__info { display: flex; flex-direction: column; gap: 0.75rem; }
.quick__title { font-size: var(--text-lg); }
.quick__desc { color: var(--ink-500); line-height: var(--leading-normal); font-size: var(--text-sm); }
.quick__list { display: flex; flex-direction: column; gap: 0.4375rem; font-size: var(--text-sm); color: var(--ink-600); }
.quick__list li { display: flex; align-items: center; gap: 0.5rem; }
.quick__list .icon { color: var(--brand-500); }

/* ══════════════════ صفحة القائمة (الفئة/البحث) ══════════════════ */

.shop-layout { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .shop-layout { grid-template-columns: 17rem 1fr; } }

/* الفلاتر: شريط جانبي في الشاشات العريضة؛ في الجوال درج يفتحه زر «تصفية» (ومع غياب JS يبقى الشريط ظاهراً فوق النتائج؛ الصنف js يضيفه سكربت الرأس فوراً) */
.filters { display: block; }
@media (max-width: 1023px) { .js .filters { display: none; } }
@media (min-width: 1024px) { .filters { position: sticky; top: 7.5rem; max-height: calc(100vh - 9rem); overflow-y: auto; } }
.filters__title { font-size: var(--text-md); margin-block-end: var(--space-2); }
html:not(.js) .js-only { display: none !important; }
.facets { display: flex; flex-direction: column; }
.facets .filter-block { border: 0; border-block-end: 1px solid var(--border); margin: 0; padding-inline: 0; min-width: 0; }
.facets [data-facets-apply] { margin-block-start: var(--space-4); }
.filter-opt.is-empty { opacity: 0.5; cursor: not-allowed; }
.filter-block__hint { margin-block-start: var(--space-2); }
.price-range { display: flex; align-items: center; gap: var(--space-2); }
.price-range__field { flex: 1; min-width: 0; }
.price-range__field .input { width: 100%; }
.price-range__sep { color: var(--ink-400); }
.chip--clear { background: transparent; box-shadow: none; color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }

.filter-block { padding-block: var(--space-4); border-block-end: 1px solid var(--border); }
.filter-block:last-child { border-block-end: 0; }
.filter-block__title { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-sm); font-weight: 700; margin-block-end: var(--space-3); }
.filter-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 15rem; overflow-y: auto; }

.filter-opt { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-sm); color: var(--ink-600); cursor: pointer; }
.filter-opt input { width: 1rem; height: 1rem; accent-color: var(--brand-600); }
.filter-opt:hover { color: var(--ink-900); }
.filter-opt__count { margin-inline-start: auto; font-size: var(--text-2xs); color: var(--ink-400); }

/* نطاق السعر بمقبضين */
.range { display: flex; flex-direction: column; gap: 0.75rem; }
.range__track { position: relative; height: 1.5rem; }
.range__rail, .range__fill {
  position: absolute; top: 50%; height: 4px; border-radius: var(--r-full);
  transform: translateY(-50%); pointer-events: none;
}
.range__rail { inset-inline: 0; background: var(--surface-sunk); }
.range__fill { background: var(--brand-500); }
.range__input {
  position: absolute; inset-inline: 0; top: 0;
  width: 100%; height: 1.5rem; margin: 0;
  background: none; pointer-events: none; appearance: none; -webkit-appearance: none;
}
.range__input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 1.125rem; height: 1.125rem; border-radius: var(--r-full);
  background: var(--surface); border: 3px solid var(--brand-600); cursor: pointer; box-shadow: var(--shadow-sm);
}
.range__input::-moz-range-thumb {
  pointer-events: auto; width: 1.125rem; height: 1.125rem; border-radius: var(--r-full);
  background: var(--surface); border: 3px solid var(--brand-600); cursor: pointer;
}
.range__values { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--ink-500); }

/* شريط الأدوات */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--space-3); margin-block-end: var(--space-4);
}
.toolbar__count { font-size: var(--text-sm); color: var(--ink-500); }
.toolbar__count strong { color: var(--ink-900); }
.toolbar__side { display: flex; align-items: center; gap: 0.5rem; }
.toolbar__filter-btn { display: inline-flex; }
@media (min-width: 1024px) { .toolbar__filter-btn { display: none; } }

.active-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-end: var(--space-4); }

/* ══════════════════ صفحة المنتج ══════════════════ */

.pdp { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.05fr 1fr; gap: var(--space-8); } }

/* ── معرض صور المنتج (UI/product-gallery + theme.js initGallery) ── */
.gallery { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.gallery__main {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--gallery-bg);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
  isolation: isolate;
}
/* a soft canvas; in light mode the photo is multiplied into it, so a photo's own white or off-white background melts
   away instead of showing as a pale box */
.gallery { --gallery-bg: color-mix(in srgb, var(--ink) 3.5%, var(--card-bg)); }
/* dark backgrounds: product photos are shot on white, so the frame stays a soft light panel (from the light text
   colour) and the photo still melts into it */
:root[data-mode="dark"] .gallery, .color-scheme--dark .gallery { --gallery-bg: color-mix(in srgb, var(--ink) 90%, var(--bg)); }
.gallery--fit-contain .gallery__img, .gallery--fit-contain .gallery__thumb img { mix-blend-mode: multiply; }
/* "Product photo background" (settings.photo_bg on <body>): "mode" = transparent photos, the frame follows light and
   dark mode (no multiply in dark: it would darken the photo itself); "light" = the soft light panel also behind cards
   and quick view. "auto" = as above. */
[data-photo-bg="mode"] .gallery, :root[data-mode="dark"] [data-photo-bg="mode"] .gallery { --gallery-bg: color-mix(in srgb, var(--ink) 4%, var(--card-bg)); }
:root[data-mode="dark"] [data-photo-bg="mode"] .gallery__img, :root[data-mode="dark"] [data-photo-bg="mode"] .gallery__thumb img { mix-blend-mode: normal; }
/* contain (default): the whole photo with room around it, never cropped; cover: fills the square */
.gallery__img {
  width: 100%; height: 100%;
  object-fit: contain; padding: 6%;
  transition: transform var(--t-base) var(--ease);
}
.gallery--fit-cover .gallery__img { object-fit: cover; padding: 0; }
.gallery[data-gallery-lightbox] .gallery__main { cursor: zoom-in; }
.gallery__main.is-zoomed .gallery__img { transform: scale(2); }
.gallery__flags { position: absolute; z-index: 2; inset-block-start: 1rem; inset-inline-start: 1rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }

/* round glass buttons over the photo: arrows, full screen; shown on hover with a mouse, always on touch */
.gallery__btn {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--card-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
  color: var(--ink);
  cursor: pointer;
  transition: opacity var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.gallery__btn:hover { background: var(--card-bg); scale: 1.06; }
.gallery__nav { inset-block-start: 50%; translate: 0 -50%; }
.gallery__nav--prev { inset-inline-start: 0.75rem; }
.gallery__nav--next { inset-inline-end: 0.75rem; }
.gallery__expand { inset-block-start: 0.75rem; inset-inline-end: 0.75rem; width: 2.25rem; height: 2.25rem; }
.gallery__count {
  position: absolute; z-index: 2;
  inset-block-end: 0.75rem; inset-inline-end: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-full);
  font-size: var(--text-2xs); font-weight: 700;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: var(--bg);
}
@media (hover: hover) and (pointer: fine) {
  .gallery__main .gallery__btn { opacity: 0; }
  .gallery__main:hover .gallery__btn, .gallery__main .gallery__btn:focus-visible { opacity: 1; }
}

.gallery__thumbs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 4.5rem; gap: 0.625rem;
  overflow-x: auto; scrollbar-width: none; padding: 2px;
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--gallery-bg);
  box-shadow: inset 0 0 0 1px var(--border);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity var(--t-fast) var(--ease);
}
.gallery--fit-contain .gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.gallery--fit-cover .gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
/* the ring is drawn over the picture (an inset shadow on the button sat under it and never showed) */
.gallery__thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow var(--t-fast) var(--ease); }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { opacity: 1; }
.gallery__thumb.is-active::after { box-shadow: inset 0 0 0 2px var(--brand-600); }

/* thumbnails in a column beside the photo (setting), from 900px */
@media (min-width: 900px) {
  .gallery--thumbs-side { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: start; }
  .gallery--thumbs-side .gallery__thumbs {
    order: -1;
    grid-auto-flow: row; grid-auto-columns: auto; grid-auto-rows: 4.5rem;
    height: 0; min-height: 100%; /* as tall as the photo, scrolls when longer */
    overflow-x: hidden; overflow-y: auto;
  }
  .gallery--thumbs-side .gallery__main { grid-column: 2; }
}

/* full-screen viewer */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  color: var(--ink);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: color-mix(in srgb, var(--ink) 50%, transparent); }
.lightbox__img { max-width: min(92vw, 1400px); max-height: 86dvh; object-fit: contain; }
.lightbox .gallery__btn { position: fixed; opacity: 1; }
.lightbox__close { inset-block-start: 1rem; inset-inline-end: 1rem; }
.lightbox .gallery__nav--prev { inset-inline-start: 1rem; }
.lightbox .gallery__nav--next { inset-inline-end: 1rem; }
.lightbox__count { position: fixed; inset-block-end: 1.25rem; inset-inline: 0; width: max-content; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  .gallery__img, .gallery__btn { transition: none; }
}

.pdp__info { display: flex; flex-direction: column; gap: var(--space-4); }
.pdp__brand { font-size: var(--text-sm); font-weight: 700; color: var(--brand-600); }
.pdp__title { font-size: var(--text-2xl); }
.pdp__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); font-size: var(--text-sm); color: var(--ink-500); }
.pdp__price-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.pdp__vat { font-size: var(--text-xs); color: var(--ink-500); } /* AA on page, quick view and sticky bar */

/* 1-click order form (the platform's embed; UI/quick-checkout). The frame is full width; its height comes from the
   platform's script. The editor preview shows a placeholder of bars instead. */
/* The 1-click form's colours (the platform's loader reads these on the wrapper and hands them to the form, so it
   matches the section's colour scheme in light and dark). A stable contract: rename nothing without the platform. */
.quick-checkout {
  margin-block-start: var(--space-4);
  --qc-bg: var(--card-bg); --qc-ink: var(--ink); --qc-muted: var(--muted); --qc-primary: var(--primary);
  --qc-on-primary: var(--on-primary); --qc-line: var(--line); --qc-radius: var(--card-radius);
  --qc-btn-radius: var(--btn-radius); --qc-input-radius: var(--input-radius); --qc-font: var(--font-body);
}
/* On a brand-coloured (or the merchant's own-coloured) box the softer text is too faint for the form's labels and
   hints (white 76% over green ≈ 3.5:1): there they use the full text colour (≈ 5:1, WCAG AA). Page and dark schemes
   keep their muted (≥ 7:1). */
.color-scheme--brand .quick-checkout, .has-own-bg .quick-checkout, .has-own-ink .quick-checkout { --qc-muted: var(--ink); }
.quick-checkout iframe { display: block; width: 100%; min-height: 24rem; border: 0; border-radius: var(--card-radius); background: transparent; }
.pdp__quick { margin-block-start: var(--space-6); padding-block-start: var(--space-5); border-block-start: 1px solid var(--line); }
.pdp__quick-title { font-weight: 700; }
.pdp__quick--above { margin-block-start: 0; padding-block-start: 0; border-block-start: 0; }
/* «أو أضف إلى السلة»: a quiet divider between the 1-click form (above) and the cart options and buttons */
.pdp__or { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-size: var(--text-sm); color: var(--ink-500); }
.pdp__or::before, .pdp__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.quick-checkout--placeholder { display: grid; gap: var(--space-3); padding: var(--space-5); border: 1px dashed var(--line); border-radius: var(--card-radius); background: var(--card-bg); }
.quick-checkout__title { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; }
.quick-checkout__bar { display: block; height: 2.75rem; border-radius: var(--input-radius); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.quick-checkout__bar--half { width: 55%; }
.quick-checkout__bar--button { background: color-mix(in srgb, var(--primary) 35%, transparent); }
.quick-checkout__hint { font-size: var(--text-sm); color: var(--muted); }

.pdp__box {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.pdp__stock { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-sm); font-weight: 700; }
.pdp__stock--in { color: var(--success); }
.pdp__stock--low { color: var(--warning-700); }
.pdp__stock--out { color: var(--danger); }
/* «طلب مسبق»: sold out, still sold; the note («يُشحن عند توفره») follows in a quieter weight */
/* a pre-order: an amber notice box under the price (UX review M2) */
.pdp__stock--preorder {
  flex-wrap: wrap; row-gap: 0.125rem; padding: 0.625rem 0.75rem; border-radius: var(--r-md);
  background: var(--warning-50); color: var(--warning-700); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warning) 30%, transparent);
}
.pdp__stock--preorder::before { content: "⏳"; font-size: 1rem; }
.pdp__stock--preorder .pdp__stock-note { color: var(--ink-700); }
.pdp__stock-eta { flex-basis: 100%; font-weight: 600; color: var(--ink-700); }
.pdp__stock-note { font-weight: 500; color: var(--ink-500); }
.pdp__stock-note::before { content: "·"; margin-inline-end: 0.5rem; }

/* a digital product: how it arrives, and its free samples (UI/digital-previews) */
.pdp__digital { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-sm); font-weight: 700; color: var(--brand-700); }
.digital-previews { display: flex; flex-direction: column; gap: var(--space-2); }
.digital-previews__title { font-size: var(--text-sm); font-weight: 700; }
.digital-previews__list { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.digital-preview__link {
  display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-size: var(--text-sm);
}
.digital-preview__link:hover { border-color: var(--brand-600); }
.digital-preview__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.digital-preview__size { color: var(--ink-500); font-size: var(--text-xs); unicode-bidi: isolate; white-space: nowrap; }
.digital-previews__stage { display: grid; place-items: center; }
.digital-previews__media { width: min(92vw, 960px); max-height: 80dvh; }
audio.digital-previews__media { width: min(92vw, 520px); }

/* buy box controls, all one height: row 1 the quantity and the wishlist heart, row 2 "add to cart" and "buy now"
   side by side at the same width (wrapping under each other only when too narrow) */
.pdp__actions { --pdp-ctl: 3.25rem; display: flex; flex-direction: column; gap: var(--space-3); }
.pdp__actions-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.pdp__actions .qty { height: var(--pdp-ctl); border-radius: var(--r-lg); }
.pdp__actions .qty__btn { width: var(--pdp-ctl); height: var(--pdp-ctl); }
.pdp__actions .qty__value { min-width: 3rem; font-size: var(--text-md); }
.pdp__actions .btn--icon { flex: none; width: var(--pdp-ctl); height: var(--pdp-ctl); border-radius: var(--r-lg); }
.pdp__buy { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.pdp__buy .btn { flex: 1 1 9.5rem; min-width: 0; height: var(--pdp-ctl); padding-inline: var(--space-4); white-space: nowrap; }

/* description layouts (main-product details_layout): accordion in the product column, stacked titled sections */
.pdp-acc { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.pdp-acc__item + .pdp-acc__item { border-block-start: 1px solid var(--border); }
.pdp-acc__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-weight: 700; color: var(--ink-900);
  cursor: pointer; list-style: none;
}
.pdp-acc__head::-webkit-details-marker { display: none; }
.pdp-acc__head:hover { color: var(--brand-600); }
.pdp-acc__chev { color: var(--ink-400); transition: rotate var(--t-base) var(--ease); }
.pdp-acc__item[open] .pdp-acc__chev { rotate: 180deg; }
.pdp-acc__body { padding: 0 var(--space-5) var(--space-5); }
.pdp-acc__body .prose { max-width: none; }
.pdp-blocks { display: flex; flex-direction: column; gap: var(--space-8); }
.pdp-block + .pdp-block { padding-block-start: var(--space-8); border-block-start: 1px solid var(--border); }
.pdp-block__title { font-size: var(--text-xl); margin-block-end: var(--space-4); }

.pdp__perks { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 560px) { .pdp__perks { grid-template-columns: repeat(2, 1fr); } }
.pdp__perk { display: flex; gap: 0.625rem; font-size: var(--text-xs); color: var(--ink-600); line-height: var(--leading-snug); }
.pdp__perk .icon { color: var(--brand-500); flex-shrink: 0; }

.pdp__highlights { display: flex; flex-direction: column; gap: 0.5rem; }
.pdp__highlights li { display: flex; gap: 0.5rem; font-size: var(--text-sm); color: var(--ink-600); }
.pdp__highlights .icon { color: var(--brand-500); flex-shrink: 0; margin-block-start: 0.15rem; }

/* جدول المواصفات */
.specs { width: 100%; font-size: var(--text-sm); }
.specs tr:nth-child(odd) { background: var(--surface-muted); }
.specs th, .specs td { padding: 0.75rem 1rem; text-align: start; }
.specs th { width: 40%; font-weight: 700; color: var(--ink-700); }
.specs td { color: var(--ink-600); }

/* ملخص التقييمات */
.rating-summary { display: grid; gap: var(--space-5); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 640px) { .rating-summary { grid-template-columns: auto 1fr; } }
.rating-score { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; padding: var(--space-5) var(--space-8); border-radius: var(--r-lg); background: var(--brand-50); }
.rating-score__value { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 900; color: var(--brand-700); line-height: 1; }
.rating-bars { display: flex; flex-direction: column; gap: 0.5rem; }
.rating-bar { display: flex; align-items: center; gap: 0.625rem; font-size: var(--text-xs); color: var(--ink-500); }
.rating-bar__track { flex: 1; height: 0.5rem; border-radius: var(--r-full); background: var(--surface-sunk); overflow: hidden; }
.rating-bar__fill { display: block; height: 100%; border-radius: var(--r-full); background: var(--gold-500); }

.review { display: flex; flex-direction: column; gap: 0.625rem; padding: var(--space-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.review__head { display: flex; align-items: center; gap: 0.75rem; }
.review__meta { display: flex; flex-direction: column; gap: 0.125rem; margin-inline-end: auto; }
.review__name { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: var(--text-sm); }
.review__verified { display: inline-flex; align-items: center; gap: 0.25rem; font-size: var(--text-2xs); font-weight: 600; color: var(--success); }
.review__date { font-size: var(--text-2xs); color: var(--ink-400); }
.review__title { font-size: var(--text-sm); font-weight: 700; }
.review__body { font-size: var(--text-sm); color: var(--ink-600); line-height: var(--leading-normal); }

.reviews-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }

/* يُشترى معاً */
.bundle { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.bundle__item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 7.5rem; text-align: center; }
.bundle__item img { width: 100%; aspect-ratio: 1; border-radius: var(--r-md); object-fit: cover; background: var(--surface-muted); }
.bundle__item span { font-size: var(--text-2xs); color: var(--ink-600); }
.bundle__plus { color: var(--ink-300); }
.bundle__total { margin-inline-start: auto; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }

/* ══════════════════ السلة والدفع ══════════════════ */

.checkout-layout { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .checkout-layout { grid-template-columns: 1fr 22rem; } }

.summary { position: sticky; top: 7.5rem; display: flex; flex-direction: column; gap: var(--space-4); }
.summary__rows { display: flex; flex-direction: column; gap: 0.75rem; }
.summary__row { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-sm); }
.summary__row span:first-child { color: var(--ink-500); }
.summary__row--free span:last-child { color: var(--success); font-weight: 700; }
.summary__row--save span:last-child { color: var(--gold-700); font-weight: 700; }
.summary__total { display: flex; align-items: baseline; justify-content: space-between; padding-block-start: var(--space-3); border-block-start: 1px solid var(--border); }
.summary__total b { font-size: var(--text-md); }

.coupon-row { display: flex; gap: 0.5rem; }
.coupon-row .input { flex: 1; }

/* ══════════════════ الصفحات الثابتة ══════════════════ */

.prose { max-width: 46rem; color: var(--ink-600); line-height: var(--leading-normal); }
.prose h3 { margin-block: var(--space-6) var(--space-3); font-size: var(--text-lg); color: var(--ink-900); }
.prose p { margin-block-end: var(--space-4); }
.prose strong { color: var(--ink-900); }
.prose a:not(.btn) { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { list-style: disc; padding-inline-start: 1.25rem; margin-block-end: var(--space-4); }
.prose ol { list-style: decimal; padding-inline-start: 1.25rem; margin-block-end: var(--space-4); }
.prose li { margin-block-end: var(--space-1); }

.value-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px)  { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .value-grid { grid-template-columns: repeat(4, 1fr); } }

.value {
  display: flex; flex-direction: column; gap: 0.625rem;
  padding: var(--space-5); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.value__icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: var(--r-md);
  background: var(--brand-50); color: var(--brand-600);
}
.value__title { font-size: var(--text-md); }
.value__body { font-size: var(--text-sm); color: var(--ink-500); line-height: var(--leading-normal); }

.stat-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: var(--space-5); border-radius: var(--r-lg); background: var(--brand-50); text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 900; color: var(--brand-700); }
.stat span { font-size: var(--text-xs); color: var(--ink-500); }

.contact-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }

.contact-item { display: flex; gap: 0.875rem; padding-block: var(--space-4); border-block-end: 1px solid var(--border); }
.contact-item:last-child { border-block-end: 0; }
.contact-item__icon { display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; flex-shrink: 0; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-600); }
.contact-item b { display: block; font-size: var(--text-sm); }
.contact-item span { font-size: var(--text-sm); color: var(--ink-500); }

/* شبكة العلامات (صفحة العلامات) */
.brands-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px)  { .brands-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .brands-grid { grid-template-columns: repeat(4, 1fr); } }

.brand-tile { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-6); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink-600); transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease-out); }
.brand-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--brand-600); }
.brand-tile__glyph { width: 3.25rem; height: 3.25rem; color: var(--brand-600); }
.brand-tile__name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; color: var(--ink-900); }
.brand-tile__meta { font-size: var(--text-xs); color: var(--ink-400); }

/* صفحة 404 والصيانة */
.big-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); padding-block: var(--space-20); text-align: center; }
.big-state__code { font-family: var(--font-display); font-size: 6rem; font-weight: 900; line-height: 1; color: var(--brand-100); }
.big-state__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }

/* دليل المكوّنات */
.kit-section { padding-block: var(--space-8); border-block-end: 1px solid var(--border); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.kit-label { font-size: var(--text-xs); font-weight: 700; color: var(--ink-400); margin-block-end: var(--space-3); }
.swatch-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px)  { .swatch-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .swatch-grid { grid-template-columns: repeat(6, 1fr); } }
.swatch { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-xs); background: var(--surface); }
.swatch__chip { height: 4rem; }
.swatch__meta { padding: 0.5rem 0.625rem; font-size: var(--text-2xs); }
.swatch__meta b { display: block; }
.swatch__meta code { color: var(--ink-400); font-size: 0.625rem; }

/* Listing without a filters column (phase 1: no storefront filters). */
@media (min-width: 1024px) { .shop-layout--full { grid-template-columns: 1fr; } }

/* ── بانر بصورة (image-banner) ─────────────────────────────────────────── */
.s-banner { position: relative; display: grid; align-items: center; min-height: var(--banner-h, 18rem); padding: var(--space-12) var(--gutter); overflow: hidden; color: var(--on-media); background-size: cover; background-position: center; }
.s-banner .ov { position: absolute; inset: 0; background: var(--shadow-color); opacity: var(--ov, 0.45); }
.s-banner .inner { position: relative; max-width: var(--container); width: 100%; margin-inline: auto; }
.s-banner__title { margin: 0 0 var(--space-2); font-size: var(--text-3xl); line-height: 1.3; color: var(--on-media); }
.s-banner__text { margin: 0 0 var(--space-5); max-width: 60ch; color: color-mix(in srgb, var(--on-media) 90%, transparent); }
.s-banner .inner[style*="center"] .s-banner__text { margin-inline: auto; }
/* Boxed banner: inside the page width, rounded, with space around it */
.s-banner-box { margin-block: var(--space-6); }
.s-banner--boxed { border-radius: var(--r-xl); padding-inline: var(--space-8); }
@media (max-width: 767px) { .s-banner--boxed { padding-inline: var(--space-5); } }

/* ── شبكة مرنة (media-grid): صور، منتجات، نصوص، فيديو بأي ترتيب ── */
.mg { --mg-ratio: 4 / 3; display: grid; gap: var(--mg-gap, 1rem); grid-template-columns: 1fr; align-items: stretch; }
.mg--square { --mg-ratio: 1 / 1; }
.mg--portrait { --mg-ratio: 3 / 4; }
.mg--wide { --mg-ratio: 16 / 9; }
.mg--m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .mg--cols-2, .mg--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .mg--cols-1 { grid-template-columns: 1fr; }
  .mg--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mg__cell { position: relative; min-width: 0; overflow: hidden; border-radius: var(--r-xl); }
/* width fixed by the column; the shape sets the least height and the row (a taller product card) can stretch it */
.mg__cell--image, .mg__cell--video { width: 100%; aspect-ratio: var(--mg-ratio); background: var(--surface-muted); }
.mg__cell--no-image { background: linear-gradient(135deg, var(--brand-600), var(--brand-800)); }
.mg__img, .mg__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.mg__ov { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--shadow-color) 75%, transparent), transparent 70%); }
.mg__ov--top { background: linear-gradient(to bottom, color-mix(in srgb, var(--shadow-color) 75%, transparent), transparent 70%); }
.mg__ov--center { background: color-mix(in srgb, var(--shadow-color) 45%, transparent); }
.mg__copy { position: absolute; inset-inline: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-6); color: var(--on-media); }
.mg__copy--bottom { inset-block-end: 0; }
.mg__copy--top { inset-block-start: 0; }
.mg__copy--center { inset-block: 0; justify-content: center; align-items: center; text-align: center; }
.mg__title { margin: 0; font-size: var(--text-2xl); line-height: 1.3; color: var(--on-media); }
.mg__text { margin: 0; max-width: 46ch; color: color-mix(in srgb, var(--on-media) 90%, transparent); }
.mg__link { position: absolute; inset: 0; z-index: 3; }
.mg__cell--image:hover .mg__img { transform: scale(1.03); }
.mg__img { transition: transform 320ms var(--ease-out); }
.mg__cell--text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-3); padding: var(--space-8); background: var(--bg); }
.mg__cell--text.color-scheme--page { border: 1px solid var(--border); }
.mg__cell--text[style*="center"] { align-items: center; }
.mg__heading { margin: 0; font-size: var(--text-2xl); line-height: 1.35; }
.mg__body { margin: 0; opacity: 0.85; }
.mg__cell--product { display: flex; flex-direction: column; justify-content: center; overflow: visible; }
.mg__cell--product .product-card { height: 100%; }
@media (prefers-reduced-motion: reduce) { .mg__img { transition: none; } }

/* ── نص منسّق (rich-text) ──────────────────────────────────────────────── */
.rich-text__title { margin: 0 0 var(--space-3); font-size: var(--text-2xl); line-height: 1.35; color: var(--ink-900); }
.rich-text__text { color: var(--ink-500); }
.rich-text__btn { margin-block-start: var(--space-5); }

/* ── كتل المحرّر ───────────────────────────────────────────────────────── */
.block-feature { padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.block-feature__title { margin: 0 0 var(--space-2); font-size: var(--text-lg); color: var(--ink-900); }
.block-feature__text { margin: 0; color: var(--ink-500); }
.btn--custom { background: var(--btn-bg); color: var(--btn-fg); }
.btn--custom:hover { filter: brightness(0.94); }
.drawer .state { padding-block: var(--space-8); }

/* ── صفحة المنتج: وعود المتجر والمشاركة ── */
.pdp__perks--store { margin-block-start: var(--space-4); padding-block-start: var(--space-4); border-block-start: 1px solid var(--border); }
.p-share { margin-block-start: var(--space-3); }
.rating-score { align-self: flex-start; }
.contact-item > span:last-child { display: flex; flex-direction: column; gap: 0.125rem; }
.contact-item a { color: var(--ink-800); }
.contact-item a:hover { color: var(--brand-600); }

/* ── الأقسام الفرعية: شريط شرائح أفقي قابل للتمرير ── */
.subcats { display: flex; gap: var(--space-2); margin-block-start: var(--space-4); overflow-x: auto; padding-block-end: var(--space-1); scrollbar-width: thin; }
.subcats .chip { flex: none; }
.subcats .chip .num { font-size: var(--text-xs); }

/* ── صورة مع نص ── */
.iwt { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .iwt { grid-template-columns: 1fr 1fr; gap: var(--space-10); } .iwt--media-end .iwt__media { order: 2; } }
.iwt__media { position: relative; overflow: hidden; border-radius: var(--r-xl); aspect-ratio: 4 / 3; background: var(--surface-muted); }
.iwt__media img { width: 100%; height: 100%; object-fit: cover; }
.iwt__media--empty { background: linear-gradient(135deg, var(--brand-100), var(--gold-100)); color: var(--brand-600); }
.iwt__media--empty .pattern { position: absolute; inset: 0; opacity: 0.25; }
.iwt__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.iwt__title { font-size: var(--text-2xl); line-height: 1.35; }

/* ── بانر القسم ── */
.collection-banner { margin-block-start: var(--space-4); }
.collection-banner img { width: 100%; max-height: min(22rem, 45vw); object-fit: cover; border-radius: var(--r-xl); } /* short on phones */
/* a small or squarish picture (often a product photo): whole, centred, never upscaled (theme.js) */
.collection-banner--small { display: flex; justify-content: center; }
.collection-banner--small img { width: auto; max-width: 100%; height: auto; max-height: min(16rem, 45vw); object-fit: contain; }

/* ── حالات بلا صورة: لون النمط والنقش بدل صورة مكسورة ── */
.s-banner[data-no-image] { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.hero__slide--ink { background: var(--scheme-dark-bg); color: var(--scheme-dark-text); }
.avatar--img { object-fit: cover; padding: 0; }

/* ── تخطيط صفحة المنتج من الإعدادات ── */
@media (min-width: 900px) {
  .pdp--media-small { grid-template-columns: 0.8fr 1fr; }
  .pdp--media-large { grid-template-columns: 1.4fr 1fr; }
  .pdp--gallery-end > .gallery { order: 2; }
  .pdp--sticky > .pdp__info { position: sticky; top: 8rem; }
}

/* محاذاة نص البانر الرئيسي */
.hero--text-center .hero__copy { text-align: center; align-items: center; }
.hero--text-center .hero__actions, .hero--text-center .hero__trust { justify-content: center; }
.big-state__search { display: flex; gap: var(--space-2); max-width: 28rem; margin: var(--space-4) auto; }
.big-state__search .input { flex: 1; }
.block-image { display: block; max-width: 100%; height: auto; border-radius: var(--r-md); }
.cat-strip__item { display: contents; }

/* ── التقييمات (B4): أشرطة النجوم كأزرار تصفية، المزيد ── */
.rating-bar { width: 100%; padding: 0.125rem 0.25rem; border-radius: var(--r-sm); text-align: start; transition: background-color var(--t-fast) var(--ease); }
.rating-bar:not(:disabled):hover, .rating-bar[aria-pressed="true"] { background: var(--surface-muted); }
.rating-bar[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--brand-500); }
.rating-bar:disabled { opacity: 0.55; cursor: default; }
.rating-bar__star { width: 0.75rem; height: 0.75rem; fill: var(--gold-500); color: var(--gold-500); }
.rating-bar__count { min-width: 2ch; text-align: end; }
.reviews-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block-start: var(--space-5); font-weight: 700; font-size: var(--text-sm); }
#panel-reviews .reviews-grid { margin-block-start: var(--space-5); }
#panel-reviews .reviews-grid[aria-busy="true"] { opacity: 0.6; }
.reviews-more { display: flex; justify-content: center; margin-block-start: var(--space-5); }
.review__body { overflow-wrap: anywhere; white-space: pre-line; } /* the review keeps its line breaks */

/* header: signed-in dot on the account icon */
.header__action--signed { position: relative; }
.header__signed-dot { position: absolute; inset-block-start: 0.35rem; inset-inline-end: calc(50% - 0.85rem); width: 0.5rem; height: 0.5rem; border-radius: var(--r-full); background: var(--success); box-shadow: 0 0 0 2px var(--header-bg, var(--surface)); }

/* listing swapped in place (theme.js initListing): the old results fade while the next ones load */
[data-listing] .product-grid { transition: opacity var(--t-base) var(--ease); }
[data-listing].is-loading .product-grid { opacity: 0.45; pointer-events: none; }

/* Sales page parts (product-gallery, product-info, product-buy, product-details, product-reviews): one column, each a
   section the owner orders in the editor. The narrow width keeps a landing-page measure on desktop. */
.product-part--gallery .gallery { max-width: 40rem; margin-inline: auto; }
.pdp__excerpt { color: var(--muted); line-height: var(--leading-normal); }

/* Offer countdown section: heading, short text and the shared countdown, centred. */
.offer-countdown { display: grid; justify-items: center; gap: var(--space-3); text-align: center; }
.offer-countdown__title { font-size: var(--text-2xl); font-weight: 800; }
.offer-countdown__text { color: var(--muted); max-width: 40rem; }

/* ══ Marketing sections (steps, comparison, before-after, guarantee) ═══════════════════════════════════════════ */
.mk-head { display: grid; gap: var(--space-2); text-align: center; margin-block-end: var(--space-6); }
.mk-head__title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--ink-900); }
.mk-head__sub { color: var(--muted); max-width: 40rem; margin-inline: auto; }
.mk-steps { display: grid; gap: var(--space-4); grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 768px) { .mk-steps--2 { grid-template-columns: repeat(2, 1fr); } .mk-steps--3 { grid-template-columns: repeat(3, 1fr); } .mk-steps--4 { grid-template-columns: repeat(4, 1fr); } }
.mk-step { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-5); text-align: center; border-radius: var(--card-radius); background: var(--card-bg); box-shadow: inset 0 0 0 1px var(--line); }
.mk-step__num { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: var(--text-lg); }
.mk-step__title { font-weight: 700; color: var(--ink-900); }
.mk-step__text { color: var(--muted); font-size: var(--text-sm); }
.mk-compare-wrap { overflow-x: auto; border-radius: var(--card-radius); box-shadow: inset 0 0 0 1px var(--line); background: var(--card-bg); }
.mk-compare { width: 100%; border-collapse: collapse; }
.mk-compare :is(th, td) { padding: 0.875rem 1rem; border-block-end: 1px solid var(--line); text-align: center; }
.mk-compare tbody th { text-align: start; font-weight: 600; color: var(--ink-900); }
.mk-compare tr:last-child :is(th, td) { border-block-end: 0; }
.mk-compare thead th { font-weight: 800; color: var(--ink-900); }
.mk-compare__us { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.mk-yes { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--success); color: #fff; }
.mk-no { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.mk-ba { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.mk-ba__item { position: relative; margin: 0; border-radius: var(--card-radius); overflow: hidden; background: var(--surface-muted); }
.mk-ba__item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.mk-ba__label { position: absolute; inset-block-start: 0.75rem; inset-inline-start: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 75%, transparent); color: var(--bg); font-size: var(--text-xs); font-weight: 700; }
.mk-ba__item--after .mk-ba__label { background: var(--primary); color: var(--on-primary); }
.mk-ba__caption { margin-block-start: var(--space-3); text-align: center; color: var(--muted); }
.mk-guarantee { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-6) var(--space-5); text-align: center; border-radius: var(--card-radius); background: var(--card-bg); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }
.mk-guarantee__badge { display: grid; place-items: center; gap: 0.125rem; min-width: 5.5rem; min-height: 5.5rem; padding: 0.75rem; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.mk-guarantee__days { font-size: var(--text-sm); font-weight: 800; line-height: 1.1; }
.mk-guarantee__title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--ink-900); }
.mk-guarantee__text { color: var(--muted); max-width: 32rem; }

/* Order call-to-action section (order-cta) */
.order-cta { display: grid; justify-items: center; gap: var(--space-3); text-align: center; }
.order-cta__title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--ink-900); }
.order-cta__price { display: flex; align-items: baseline; gap: 0.5rem; font-size: var(--text-xl); }

/* «الأقسام» (/collections, main-collections): a panel per main category, its subcategories as chips */
.cat-index { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cat-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .cat-index--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-index--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cat-index__item {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4);
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm);
}
.cat-index__head { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.cat-index__head:hover .cat-index__name { color: var(--brand-700); }
.cat-index__media {
  flex: none; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; overflow: hidden;
  border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-700);
}
.cat-index__media img { width: 100%; height: 100%; object-fit: cover; }
.cat-index__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.cat-index__name { font-weight: 700; overflow-wrap: anywhere; }
.cat-index__count { font-size: var(--text-xs); color: var(--ink-500); }
.cat-index__arrow { flex: none; color: var(--ink-400); }
.cat-index__kids { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.cat-index__kids .chip { font-size: var(--text-xs); }
.cat-index__kids .chip--more { color: var(--brand-700); }

/* «يُشترى معاً بسعر أقل» under the buy box (UI/in-bundles): items in a row with «+» between, the saving, the buttons.
   Phones: the row scrolls sideways (snap), so the «+» flow stays one line. */
.fbt { display: flex; flex-direction: column; gap: var(--space-3); margin-block-start: var(--space-4); padding: var(--space-4); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.fbt__title { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: var(--text-base); font-weight: 800; color: var(--ink); }
.fbt__title .icon { color: var(--brand-700); }
.fbt__bundle { display: flex; flex-direction: column; gap: var(--space-3); }
.fbt__bundle--more { padding-block-start: var(--space-3); border-block-start: 1px solid var(--line); }
.fbt__bundle--more > summary { cursor: pointer; list-style-position: inside; }
.fbt__name { margin: 0; font-size: var(--text-sm); font-weight: 700; }
.fbt__name a { color: var(--ink); }
.fbt__row {
  display: flex; align-items: flex-start; gap: 0; margin: 0; padding: 0 0 var(--space-1); list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.fbt__item { display: flex; align-items: flex-start; flex: none; scroll-snap-align: start; }
.fbt__plus { display: grid; place-items: center; width: 1.5rem; height: 4.5rem; flex: none; font-size: 1.25rem; font-weight: 700; color: var(--ink-400); }
.fbt__tile { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 6.5rem; padding: 0.375rem; border-radius: var(--r-md); color: var(--ink); text-decoration: none; text-align: center; }
.fbt__tile:hover .fbt__iname { color: var(--brand-700); }
.fbt__media { position: relative; display: block; width: 4.5rem; height: 4.5rem; border-radius: var(--r-md); background: var(--surface-sunk); box-shadow: inset 0 0 0 1px var(--line); }
.fbt__media img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.fbt__qty {
  position: absolute; inset-block-end: -0.375rem; inset-inline-end: -0.375rem; padding: 0 0.375rem; border-radius: var(--r-full);
  background: var(--ink); color: var(--bg); font-size: var(--text-2xs); font-weight: 700; line-height: 1.5; direction: ltr; unicode-bidi: isolate;
}
.fbt__item.is-current .fbt__tile { box-shadow: inset 0 0 0 2px var(--brand-600); background: var(--brand-50); }
.fbt__this { margin-block-start: 0.375rem; padding: 0 0.375rem; border-radius: var(--r-full); background: var(--brand-600); color: var(--on-primary); font-size: var(--text-2xs); font-weight: 700; }
.fbt__iname { font-size: var(--text-xs); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.fbt__ivar, .fbt__iout { font-size: var(--text-2xs); color: var(--ink-500); }
.fbt__iout { color: var(--danger); }
.fbt__iprice { font-size: var(--text-xs); font-weight: 700; }
.fbt__sum { display: flex; flex-direction: column; gap: 0.25rem; }
.fbt__sep { margin: 0; font-size: var(--text-sm); color: var(--ink-500); }
.fbt__price { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; font-size: var(--text-sm); }
.fbt__price b { font-size: var(--text-lg); }
.fbt__save { padding: 0.125rem 0.5rem; border-radius: var(--r-full); background: color-mix(in srgb, var(--sale) 12%, var(--card-bg)); color: var(--sale); font-size: var(--text-xs); font-weight: 800; }
.fbt__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fbt__actions .btn { flex: 1 1 12rem; }
.fbt__form { display: contents; }
@media (max-width: 599px) {
  .fbt__tile { width: 5.5rem; }
  .fbt__media { width: 4rem; height: 4rem; }
  .fbt__plus { height: 4rem; width: 1.25rem; }
}

/* phones: a shorter main photo, so the price and the buy button come up sooner (UX review M1) */
@media (max-width: 599px) {
  .gallery__main { aspect-ratio: auto; height: min(80vw, 340px); }
}

/* the SKU as small grey text (UX review) */
.pdp__sku { font-size: var(--text-2xs); color: var(--ink-400); }
.pdp__sku b { font-weight: 600; }
/* desktop: the photos stay in view beside a long buy box (split and 1-click layouts, the normal page) */
@media (min-width: 1024px) {
  .pdp:not(.pdp--sticky) > .gallery { position: sticky; inset-block-start: var(--space-6); align-self: start; }
}
