/* ==========================================================================
   FORGELINE — Premium Supplements Store
   Core Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;900&display=swap');

/* --------------------------------------------------------------------------
   DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color */
  --navy-950: #060F1F;
  --navy-900: #0A1F3D;
  --navy-800: #122B4F;
  --navy-700: #1C3A63;
  --navy-600: #2C4F7C;
  --navy-100: #E8EDF4;
  --navy-50:  #F4F7FB;

  --white: #FFFFFF;
  --silver-300: #C8CDD6;
  --silver-200: #DDE1E7;
  --silver-100: #EEF0F3;

  --gold: #A89968;
  --gold-light: #C9BB91;
  --gold-dark: #8A7B4F;

  --ink: #0A1424;
  --ink-soft: #4A5568;
  --ink-faint: #8995A6;

  --success: #1E7A4C;
  --warning: #B7791F;
  --danger: #B3261E;

  /* Type */
  --font-display: 'Bricolage Grotesque', 'Tajawal', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Tajawal', sans-serif;
  --font-ar: 'Tajawal', sans-serif;

  /* Layout */
  --max-width: 1320px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.45s;
}

/* --------------------------------------------------------------------------
   RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ar);
  background: var(--white);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="fr"] body { font-family: var(--font-body); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

::selection { background: var(--gold-light); color: var(--navy-950); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: var(--font-ar);
  font-weight: 900;
  letter-spacing: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
html[lang="ar"] .eyebrow {
  font-family: var(--font-ar);
  letter-spacing: 0.02em;
}

.text-faint { color: var(--ink-faint); }
.text-soft { color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 88px; }
.section-tight { padding-block: 56px; }

@media (max-width: 768px) {
  .section { padding-block: 56px; }
  .section-tight { padding-block: 36px; }
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 1024px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform var(--duration) var(--ease), background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
  /* يزيل تأخير 300ms على الموبايل */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy-900);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-800); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: var(--navy-950);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--silver-300);
  color: var(--navy-900);
}
.btn-outline:hover { border-color: var(--navy-900); background: var(--navy-50); }

.btn-outline-light {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.55); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.btn-icon {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  transition: background var(--duration) var(--ease);
}
.btn-icon:hover { background: var(--navy-100); }

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-950);
  color: var(--white);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--white);
}
html[lang="ar"] .brand { font-family: var(--font-ar); font-weight: 900; }
.brand svg { color: var(--gold); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  transition: color var(--duration) var(--ease);
  position: relative;
}
.main-nav a:hover { color: var(--white); }
.main-nav a.active { color: var(--gold); }

@media (max-width: 920px) {
  .main-nav { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  padding: 9px 16px;
  width: 280px;
  transition: border-color var(--duration) var(--ease);
}
.header-search:focus-within { border-color: var(--gold); }
.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 13.5px;
  width: 100%;
}
.header-search input::placeholder { color: rgba(255,255,255,0.4); }
.header-search svg { color: rgba(255,255,255,0.5); flex-shrink: 0; }

@media (max-width: 920px) {
  .header-search { display: none; }
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  padding: 9px 14px;
  color: var(--white);
  transition: background var(--duration) var(--ease);
}
.lang-switch:hover { background: rgba(255,255,255,0.16); }

.cart-trigger {
  position: relative;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  color: var(--white);
  transition: background var(--duration) var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.cart-trigger:hover { background: rgba(255,255,255,0.1); }

.cart-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  background: var(--gold);
  color: var(--navy-950);
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.announce-bar {
  background: var(--gold);
  color: var(--navy-950);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
}

.mobile-menu-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--white);
}
@media (max-width: 920px) {
  .mobile-menu-toggle { display: inline-flex; }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 4px;
  font-weight: 600;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  margin-bottom: 10px;
}
.mobile-search input {
  background: transparent; border: none; outline: none;
  color: var(--white); font-size: 14px; width: 100%;
}
.mobile-search input::placeholder { color: rgba(255,255,255,0.4); }
.mobile-search svg { color: rgba(255,255,255,0.5); }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--navy-950);
  color: var(--white);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,0.10) 1px, transparent 0);
  background-size: 26px 26px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -120px;
  inset-inline-end: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(168,153,104,0.25), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
  padding-block: 96px;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; padding-block: 64px; gap: 36px; text-align: center; }
}

.hero-title {
  font-size: clamp(40px, 5.2vw, 68px);
  margin-block: 18px 22px;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.68);
  max-width: 460px;
  margin-bottom: 34px;
}
@media (max-width: 920px) { .hero-sub { margin-inline: auto; } }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 42px;
}
@media (max-width: 920px) { .hero-cta-row { justify-content: center; } }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
@media (max-width: 920px) { .hero-badges { justify-content: center; } }

.hero-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}
.hero-badge svg { color: var(--gold); flex-shrink: 0; }

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(160deg, rgba(168,153,104,0.18), transparent 60%);
}
.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
}
@media (max-width: 920px) { .hero-visual { display: none; } }

/* --------------------------------------------------------------------------
   SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-top: 6px;
}
.section-head .eyebrow { display: block; }
.section-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   CATEGORY PILLS
   -------------------------------------------------------------------------- */
.cat-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }

.cat-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--silver-200);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
}
.cat-pill:hover { border-color: var(--navy-700); }
.cat-pill.active {
  background: var(--navy-950);
  border-color: var(--navy-950);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   PRODUCT CARD
   -------------------------------------------------------------------------- */
.product-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--navy-700);
  box-shadow: 0 20px 40px -16px rgba(10,31,61,0.18);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--navy-50);
  overflow: hidden;
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.06); }

.product-tags {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}
.tag-sale { background: var(--danger); color: var(--white); }
.tag-best { background: var(--gold); color: var(--navy-950); }
.tag-new { background: var(--navy-950); color: var(--white); }

.product-oos {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.product-oos span {
  background: var(--navy-950);
  color: var(--white);
  font-size: 12px; font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-full);
}

.product-quick {
  position: absolute;
  inset-inline: 10px;
  bottom: 10px;
  background: rgba(255,255,255,0.96);
  color: var(--navy-950);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-full);
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--duration) var(--ease);
}
.product-card:hover .product-quick { opacity: 1; transform: translateY(0); }

.product-body { padding: 16px; }
.product-brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.product-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.product-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-950);
}
html[lang="ar"] .product-price { font-family: var(--font-ar); }
.product-price small { font-size: 11px; font-weight: 700; color: var(--ink-faint); }
.product-price-old {
  font-size: 12.5px;
  color: var(--ink-faint);
  text-decoration: line-through;
}
.product-stock-low {
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 8px;
}
.product-add {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border-radius: var(--radius-full);
  background: var(--navy-950);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background var(--duration) var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.product-add:hover { background: var(--navy-800); }
.product-add:disabled { background: var(--silver-200); color: var(--ink-faint); cursor: not-allowed; }

/* --------------------------------------------------------------------------
   OFFER BANNER
   -------------------------------------------------------------------------- */
.offer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) { .offer-grid { grid-template-columns: 1fr; } }

.offer-card {
  position: relative;
  min-height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-950);
  color: var(--white);
  display: flex;
  align-items: center;
}
.offer-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.32;
}
.offer-content { position: relative; padding: 32px; z-index: 1; width: 100%; }
.offer-discount {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-950);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}
.offer-content h3 { font-size: 22px; margin-bottom: 6px; }
.offer-content p { font-size: 13.5px; color: rgba(255,255,255,0.7); }
.offer-end { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 10px; }

/* باقة تجميعية */
.bundle-badge {
  display: inline-block;
  background: #6366F1;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-inline-start: 8px;
  vertical-align: middle;
}
.bundle-products-line {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
  line-height: 1.5;
}
.bundle-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.bundle-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
}
.bundle-original {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  text-decoration: line-through;
}
.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.7);
  margin-top: 90px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-block: 64px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
}
.footer-grid h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 14px; transition: color var(--duration) var(--ease); }
.footer-grid a:hover { color: var(--white); }
.footer-about { font-size: 14px; line-height: 1.7; max-width: 340px; margin-top: 14px; }
.footer-contact-item { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.footer-admin-link {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: rgba(255,255,255,0.35);
  transition: color var(--duration) var(--ease);
}
.footer-admin-link:hover { color: rgba(255,255,255,0.7); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.35);
  padding: 20px 0;
}

/* --------------------------------------------------------------------------
   CART DRAWER
   -------------------------------------------------------------------------- */
.drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6,15,31,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 90%;
  max-width: 420px;
  background: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
}
.drawer.open { transform: translateX(0) !important; }
.drawer.drawer-rtl {
  right: auto;
  left: 0;
  transform: translateX(-110%);
  box-shadow: 8px 0 32px rgba(0,0,0,0.18);
}

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--silver-100);
  flex-shrink: 0;
}
.drawer-head h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.drawer-empty {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 40px;
}
.drawer-empty svg { color: var(--silver-200); margin-bottom: 8px; }

.cart-line {
  display: flex; gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--silver-100);
}
.cart-line:first-child { padding-top: 0; }
.cart-line img {
  width: 68px; height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--navy-50);
  flex-shrink: 0;
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-size: 13.5px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.cart-line-price { font-size: 12.5px; color: var(--ink-faint); }
.cart-line-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty-btn {
  /* حجم كافٍ للضغط بالإصبع على الموبايل (44×44 minimum) */
  width: 36px; height: 36px;
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--duration) var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-size: 18px;
  cursor: pointer;
}
.qty-btn:hover, .qty-btn:active { background: var(--navy-50); }
.qty-value { font-size: 14px; font-weight: 700; min-width: 24px; text-align: center; }
.cart-line-remove {
  margin-inline-start: auto;
  color: var(--silver-300);
  transition: color var(--duration) var(--ease);
  padding: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.cart-line-remove:hover, .cart-line-remove:active { color: var(--danger); }
.cart-line-total { font-size: 14px; font-weight: 800; flex-shrink: 0; }

.drawer-foot { border-top: 1px solid var(--silver-100); padding: 20px 24px 24px; }
.drawer-subtotal { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer-subtotal span:first-child { font-weight: 700; color: var(--ink-soft); }
.drawer-subtotal span:last-child { font-size: 19px; font-weight: 800; }

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field .req { color: var(--danger); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--silver-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--duration) var(--ease);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-900); }
.field textarea { resize: vertical; min-height: 80px; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }
.field-error-msg { font-size: 11.5px; color: var(--danger); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--silver-200);
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 700;
  transition: all var(--duration) var(--ease);
}
.choice-card.selected { border-color: var(--navy-900); background: var(--navy-50); }

.payment-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--navy-50);
  border: 2px solid var(--navy-900);
  border-radius: var(--radius-md);
  padding: 18px;
}
.payment-radio {
  width: 20px; height: 20px; border-radius: 999px;
  border: 6px solid var(--navy-900);
  margin-top: 2px; flex-shrink: 0;
}
.payment-box strong { font-size: 14px; display: block; margin-bottom: 3px; }
.payment-box small { font-size: 12.5px; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   MISC PAGE BLOCKS (checkout summary, success, breadcrumb)
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-faint);
  margin-bottom: 24px;
}
.breadcrumb a:hover { color: var(--navy-900); }

.panel {
  background: var(--white);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-md);
  padding: 28px;
}

.summary-line {
  display: flex; align-items: center; gap: 12px;
  padding-block: 10px;
}
.summary-line img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--navy-50); flex-shrink: 0; }
.summary-line-name { font-size: 12.5px; font-weight: 700; flex: 1; min-width: 0; }
.summary-line-qty { font-size: 11px; color: var(--ink-faint); }
.summary-line-total { font-size: 13.5px; font-weight: 800; flex-shrink: 0; }

.totals-row { display: flex; justify-content: space-between; font-size: 14px; padding-block: 6px; color: var(--ink-soft); }
.totals-row strong { color: var(--ink); font-weight: 700; }
.totals-row.grand { font-size: 18px; font-weight: 800; color: var(--ink); padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--silver-200); }

.success-wrap { max-width: 480px; margin-inline: auto; text-align: center; padding-block: 90px; }
.success-icon {
  width: 84px; height: 84px;
  background: #E8F5EC;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  margin-inline: auto; margin-bottom: 26px;
  color: var(--success);
}
.success-order-box {
  background: var(--navy-50);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-block: 28px;
}
.success-order-id { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }

/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s var(--ease) both; }
.fade-up-delay-1 { animation: fadeUp 0.6s var(--ease) 0.1s both; }
.fade-up-delay-2 { animation: fadeUp 0.6s var(--ease) 0.2s both; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-anim { animation: modalIn 0.3s var(--ease) both; }

/* --------------------------------------------------------------------------
   RTL / LTR DIRECTION HELPERS
   -------------------------------------------------------------------------- */
html[dir="rtl"] .flip-x { transform: scaleX(-1); }
