/* ===================================================================
   main.css — معاذ كيدز | Moath Kids
   الإصدار: 3.0 (Mobile-First)
   التاريخ: 2026-10-10
   =================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: #000;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  font-size: 14px;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible { outline: 1px solid #000; outline-offset: 3px; }
::selection { background: #000; color: #fff; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }
.ico { display: block; }

/* ===== شريط الإعلان ===== */
.announce {
  background: #000; color: #fff; text-align: center;
  padding: 10px 16px; font-size: 11px; font-weight: 400;
}
.announce:empty { display: none; }

/* ===== الرأس ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  transition: all .3s;
}
.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  transition: padding .3s;
}
.header-right { display: flex; gap: 4px; align-items: center; justify-self: start; }
.header-left { display: flex; gap: 4px; align-items: center; justify-self: end; }

.brand {
  display: flex; align-items: center; gap: 10px;
  justify-self: center; transition: opacity 0.2s; max-width: 100%;
}
.brand:hover { opacity: 0.7; }
.brand img {
  height: 60px; max-width: 200px; width: auto;
  object-fit: contain; display: block;
  transition: height .3s ease;
}
.brand img:not([src]), .brand img[src=""] { display: none; }
.brand span { font-weight: 700; font-size: 22px; color: #000; white-space: nowrap; }

.topbar.scrolled .brand img { height: 40px; }
.topbar.scrolled .topbar-inner { padding: 8px 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 0;
  background: transparent; color: #000;
  transition: opacity 0.2s; border: none; cursor: pointer;
  position: relative; flex-shrink: 0;
}
.icon-btn:hover { opacity: 0.6; }
.icon-btn:active { opacity: 0.4; }
.icon-btn.small { width: 38px; height: 38px; }
.icon-btn .ico { width: 20px; height: 20px; stroke-width: 1.3; }
.icon-wa { background: #25D366; width: 42px; height: 42px; }
.icon-wa:hover { background: #1ea952; opacity: 1; }
.icon-wa .ico { width: 18px; height: 18px; color: #fff; }

.header-cart-count {
  position: absolute; top: 4px; inset-inline-end: 4px;
  background: #000; color: #fff;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 100px; font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.header-cart-count:empty { display: none; }

/* ===== شريط البحث ===== */
.search-panel {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.search-panel.open { max-height: 90px; padding-bottom: 14px; padding-top: 4px; }
.header-search { position: relative; width: 100%; }
.header-search .search-icon {
  position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: #000; pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round;
}
.header-search input {
  width: 100%; height: 44px; padding: 0 32px;
  border: none; border-bottom: 1px solid #000; border-radius: 0;
  font-family: inherit; font-size: 16px; font-weight: 400;
  background: transparent; color: #000; outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* ===== القائمة الجانبية ===== */
.cats-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cats-overlay.open { opacity: 1; pointer-events: auto; }

.cats-panel {
  position: fixed; top: 0; right: 0; left: auto;
  width: min(280px, 78vw); height: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  z-index: 100;
  transform: translateX(105%); visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.22,0.61,0.36,1), visibility 0s linear 0.35s;
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.7);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}
.cats-panel.open { transform: none; visibility: visible; transition-delay: 0s; }

.cats-panel-head {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; padding: 20px 16px 16px;
  font-weight: 600; font-size: 16px; color: #000; gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cats-panel-head #catsTitle { text-align: center; font-size: 16px; font-weight: 700; }
.back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 0;
  background: transparent; color: #000; font-size: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cats-list {
  padding: 12px 8px; display: flex; flex-direction: column;
  overflow-y: auto; flex: 1;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}
.cats-list .cat-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 20px 18px;
  font-size: 17px; font-weight: 500; color: #000;
  background: transparent; border: none; text-align: right;
  width: 100%; font-family: inherit; cursor: pointer;
  transition: background .2s;
  line-height: 1.4;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.cats-list .cat-item:hover { background: rgba(0,0,0,0.05); }
.cats-list .cat-item:active { background: rgba(0,0,0,0.08); }
.cats-list .cat-item.active { background: rgba(0,0,0,0.07); font-weight: 700; }
.cats-list .cat-item .arrow { color: #000; font-size: 14px; line-height: 1; margin-inline-start: auto; }

/* ===== الغلاف ===== */
.hero-bg { position: relative; overflow: hidden; background: #fff; }
.hero-cover, .hero-bg .pf {
  position: absolute; top: 0; right: 0; left: auto; bottom: 0;
  width: 48%; height: 100%; min-height: 0;
  background: none; object-fit: cover; z-index: 0;
}
.hero-bg .pf .frame { width: 100%; height: 100%; display: block; }
.hero-bg .pf .frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.hero-bg .pf .frame.ph { display: none; }
.hero-bg:has(.pf img) .hero-cover { display: none; }
.hero-bg .hero {
  position: relative; z-index: 1;
  direction: ltr; display: flex; align-items: center;
  min-height: 340px; padding: 60px 0; gap: 0;
}
.hero-bg .hero-text { direction: rtl; width: 54%; align-items: center; text-align: center; }
.hero h1 { font-weight: 300; color: #000; margin-bottom: 20px; font-size: clamp(28px, 4vw, 52px); line-height: 1.15; }
.hero p { margin: 0 auto 30px; font-size: 13px; color: #666; max-width: 380px; font-weight: 400; }
.btn-row { justify-content: center; display: flex; gap: 12px; flex-wrap: wrap; }
.cta-main {
  display: inline-flex; align-items: center; justify-content: center;
  background: #000; color: #fff;
  border: 1px solid #000; gap: 10px; padding: 14px 40px;
  border-radius: 0; font-size: 14px; font-weight: 500;
  transition: all 0.25s;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.cta-main:hover { background: #fff; color: #000; }
.cta-main:active { transform: scale(0.98); }
.cta-alt, #waHero { display: none !important; }

@media (min-width: 900px) {
  .hero-cover, .hero-bg .pf { width: 42%; }
  .hero-bg .hero { min-height: 480px; }
  .hero-bg .hero-text { width: 50%; }
}

/* ===== شريط الثقة ===== */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 48px 0 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.trust div {
  background: #fff; border: none; border-inline-end: 1px solid #f0f0f0; border-radius: 0;
  padding: 24px 16px; font-size: 12px; font-weight: 500; color: #000;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.trust div:last-child { border-inline-end: none; }
.trust svg { flex: none; color: #000; width: 20px; height: 20px; }

/* ===== عناوين ===== */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.sec-head h2 { font-weight: 700; font-size: 24px; color: #000; margin: 0; line-height: 1.3; }
.sec-head p { font-size: 13px; color: #666; margin: 8px 0 0; font-weight: 400; }

/* ===== المتجر ===== */
.shop { padding-top: 72px; }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 32px; }
.gender-bar { display: inline-flex; gap: 0; background: transparent; border-radius: 0; padding: 0; border: 1px solid #e5e5e5; }
.gender-btn {
  padding: 10px 22px; border-radius: 0; font-size: 14px; font-weight: 500;
  color: #666; transition: all 0.2s; cursor: pointer; font-family: inherit;
  background: transparent; border: none; white-space: nowrap;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.gender-btn + .gender-btn { border-inline-start: 1px solid #e5e5e5; }
.gender-btn:hover { color: #000; }
.gender-btn.active { background: #000; color: #fff; }
.filter-select {
  min-width: 180px; height: 44px; border: 1px solid #e5e5e5;
  border-radius: 0; padding: 0 16px; font-family: inherit;
  font-size: 14px; background: #fff; color: #000;
  cursor: pointer; outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-inline-start: 36px;
}

/* ===== شبكة المنتجات ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 20px; }
.shop-empty {
  display: none; flex-direction: column; align-items: center; text-align: center;
  padding: 80px 24px; background: #fff; border: 1px solid #f0f0f0;
  border-radius: 0; gap: 12px;
}
.grid:empty + .shop-empty { display: flex; }
.shop-empty svg { color: #000; fill: none; stroke: currentColor; margin-bottom: 6px; }
.shop-empty h3 { font-weight: 500; font-size: 18px; color: #000; }
.shop-empty p { font-size: 13px; color: #666; max-width: 340px; }

/* ===== بطاقة المنتج ===== */
.card {
  background: #fff; border-radius: 0; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  box-shadow: none; transition: opacity 0.3s;
}
.card:hover { opacity: 0.95; }
.card .ph-wrap { aspect-ratio: 3/4; background: #f7f7f7; overflow: hidden; position: relative; cursor: zoom-in; border-radius: 0; }
.card img.product-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s, transform 0.8s; }
.card:hover img.product-img { transform: scale(1.03); }
.card img.product-img.ld { opacity: 1; }
.no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 60px; color: #ccc; }
.zoom-hint {
  position: absolute; bottom: 14px; inset-inline-end: 14px;
  width: 36px; height: 36px; border-radius: 0;
  background: rgba(255,255,255,0.95); display: grid; place-items: center;
  font-size: 14px; pointer-events: none; opacity: 0; transition: opacity 0.25s;
}
.card:hover .zoom-hint { opacity: 1; }
.card-body { padding: 16px 0 12px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 14px; font-weight: 500; line-height: 1.5; margin: 0 0 6px; color: #000; }
.card-code { font-size: 11px; color: #999; margin: 0 0 8px; }
.card-meta { font-size: 12.5px; color: #666; margin: 8px 0; }
.card-meta b { color: #000; font-weight: 600; }
.card-desc { font-size: 12px; color: #888; margin: 8px 0; line-height: 1.5; }

.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.swatch {
  width: 36px; height: 36px; padding: 0; border-radius: 0;
  border: 1px solid #e5e5e5; background: #fff; overflow: hidden;
  cursor: pointer; transition: all 0.15s; flex: none;
  -webkit-tap-highlight-color: transparent;
}
.swatch:hover { border-color: #000; }
.swatch:active { transform: scale(0.95); }
.swatch img { width: 100%; height: 100%; object-fit: cover; }
.swatch.selected { border: 2px solid #000; }
.swatch.txt {
  width: auto; height: auto; min-height: 32px; padding: 6px 12px;
  border-radius: 0; font-size: 12px; color: #000; background: #fff;
}
.swatch.txt.selected { background: #000; color: #fff; border-color: #000; }
.swatch.off { opacity: 0.3; position: relative; cursor: not-allowed; }
.swatch.off::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 46%, #c8102e 46%, #c8102e 54%, transparent 54%); }

.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.size-chip {
  border: 1px solid #e5e5e5; border-radius: 0;
  padding: 8px 14px; font-size: 12px; cursor: pointer;
  font-family: inherit; color: #000; background: #fff;
  transition: all 0.15s; min-height: 40px; min-width: 48px;
  font-weight: 500; display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.size-chip:hover:not(.off) { border-color: #000; }
.size-chip:active:not(.off) { background: #f0f0f0; }
.size-chip.selected { background: #000; border-color: #000; color: #fff; }
.size-chip.off { opacity: 0.3; text-decoration: line-through; cursor: not-allowed; }

.price { font-weight: 600; font-size: 15px; color: #000; margin-top: 10px; }
.old-price { font-size: 12px; color: #999; text-decoration: line-through; margin-inline-start: 8px; font-weight: 300; }

.order-btn {
  background: #000; color: #fff; border: 1px solid #000; border-radius: 0;
  font-size: 14px; font-weight: 500; padding: 14px;
  margin: 12px 0 0; width: 100%;
  transition: all 0.25s; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.order-btn:hover:not(.disabled) { background: #fff; color: #000; }
.order-btn:active:not(.disabled) { transform: scale(0.98); }
.order-btn.disabled { background: #f5f5f5; pointer-events: none; color: #aaa; border-color: #f5f5f5; }

.badge-sold, .badge-sale {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 6px 11px; font-size: 11px; font-weight: 600;
  z-index: 2; border-radius: 0;
}
.badge-sold { background: #000; color: #fff; }
.badge-sale { background: #c8102e; color: #fff; }

/* ===== كيف تطلب ===== */
.how { padding-top: 80px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid #f0f0f0; }
.steps > div {
  background: #fff; border: none; border-inline-end: 1px solid #f0f0f0;
  padding: 36px 24px; text-align: center; border-radius: 0;
  transition: background .2s;
}
.steps > div:last-child { border-inline-end: none; }
.steps > div:hover { background: #fafafa; }
.steps b {
  display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 20px;
  background: #000; color: #fff; font-weight: 600; font-size: 14px; border-radius: 0;
}
.steps strong { display: block; color: #000; font-size: 15px; margin: 10px 0 8px; font-weight: 700; }
.steps span { display: block; font-size: 13px; color: #666; line-height: 1.7; font-weight: 400; }

/* ===== الأسئلة الشائعة ===== */
.faq { padding-top: 80px; }
.faq details { border-bottom: 1px solid #f0f0f0; padding: 0; }
.faq summary {
  cursor: pointer; font-weight: 500; font-size: 14px; padding: 24px 4px; color: #000;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  -webkit-tap-highlight-color: transparent;
  min-height: 60px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 20px; font-weight: 300; color: #000; line-height: 1; transition: transform 0.25s; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: #666; line-height: 1.9; padding: 0 4px 24px; font-size: 13px; font-weight: 400; }

/* ===== التوصيل ===== */
.delivery { padding-top: 80px; }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid #f0f0f0; }
.dcard {
  border: none; border-inline-end: 1px solid #f0f0f0;
  padding: 40px 24px; text-align: center; background: #fff;
  border-radius: 0;
}
.dcard:last-child { border-inline-end: none; }
.dcard i { font-style: normal; font-size: 32px; display: block; margin-bottom: 14px; }
.dcard .dname { font-weight: 600; font-size: 15px; color: #000; margin-bottom: 8px; }
.dcard .dprice { font-weight: 400; font-size: 24px; color: #000; }

/* ===== شريط التواصل ===== */
.contact-band {
  margin-top: 80px; background: #fafafa; border: none;
  padding: 48px 40px; display: flex; gap: 24px; flex-wrap: wrap;
  align-items: center; justify-content: space-between; border-radius: 0;
}
.contact-band > div:first-child { flex: 1 1 280px; min-width: 0; }
.contact-band h3 { font-weight: 500; font-size: 20px; color: #000; margin: 0 0 10px; }
.contact-band p { margin: 0; color: #666; font-size: 13px; font-weight: 400; }
.pill-wa {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; padding: 14px 32px; border-radius: 0;
  font-size: 14px; font-weight: 500; transition: all 0.2s;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.pill-wa:hover { background: #333; }
.pill-wa:active { transform: scale(0.98); }
.addr { display: inline-flex; align-items: center; gap: 6px; color: #000; font-weight: 500; margin-top: 12px; font-size: 13px; }

/* ===== الفوتر ===== */
footer { margin-top: 72px; border-top: 1px solid #f0f0f0; background: #fff; padding: 56px 0 32px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid #f0f0f0; }
.foot .brand img { height: 36px; }
.foot .brand span { font-size: 18px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; margin: 32px 0; }
.foot-cols h4 { color: #000; margin: 0 0 16px; font-size: 14px; font-weight: 700; }
.foot-cols a { display: block; color: #666; padding: 8px 0; font-size: 13px; transition: color 0.2s; font-weight: 400; }
.foot-cols a:hover { color: #000; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 0; transition: opacity 0.25s;
  border: 1px solid #e5e5e5;
  -webkit-tap-highlight-color: transparent;
}
.socials a:hover { opacity: 0.7; }
.socials a:active { transform: scale(0.95); }
.socials a svg { width: 18px; height: 18px; }
.soc-instagram { background: #fff; }
.soc-facebook { background: #fff; }
.soc-tiktok { background: #fff; }
.soc-instagram svg, .soc-facebook svg, .soc-tiktok svg { fill: #000; }
.soc-instagram svg * { stroke: #000; fill: none; }
.soc-instagram svg circle[fill="#fff"] { fill: #000 !important; }
.copy { text-align: center; color: #999; font-size: 12px; margin-top: 24px; }
.footer-note { font-size: 12px; color: #aaa; text-align: center; margin-top: 8px; }

/* ===== الزر الأخضر الثابت ===== */
.cart-mobile-bar {
  display: flex;
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  background: #25D366;
  border: none; color: #fff;
  padding: 18px 24px; font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(37,211,102,0.35);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .2s;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.cart-mobile-bar:hover { background: #1ea952; }
.cart-mobile-bar:active { transform: scale(0.98); }
.cart-mobile-bar.is-empty { display: none !important; }
.cart-mobile-bar .cart-mobile-total { font-weight: 400; opacity: 0.95; font-size: 13px; margin-inline-start: 6px; }

/* ===== النوافذ ===== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100; display: none;
  align-items: flex-start; justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}
.modal-bg.open { display: flex; }
.modal {
  background: #fff; border-radius: 0;
  width: 100%; max-width: 520px; padding: 0;
  box-shadow: none;
  animation: slideUp 0.3s ease;
  margin: auto 0;
  border: 1px solid #e5e5e5;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 48px);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex: none;
}
.modal-head h3 { margin: 0; font-weight: 700; font-size: 18px; color: #000; }
.modal-close {
  width: 40px; height: 40px; border-radius: 50%;
  background: #f5f5f5; color: #000; font-size: 16px;
  display: grid; place-items: center;
  transition: all .2s; cursor: pointer; border: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: #e5e5e5; }
.modal-close:active { transform: scale(0.95); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.modal h3 { margin: 0 0 24px; font-weight: 700; font-size: 20px; color: #000; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; padding: 14px; }

/* ===== الأزرار ===== */
.btn {
  border: 1px solid #e5e5e5; border-radius: 0; padding: 14px 24px;
  font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 500;
  background: #fff; color: #000; transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #fafafa; border-color: #000; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: #000; color: #fff; border-color: #000; }
.btn.primary:hover { background: #333; }
.btn.green { background: #25D366; color: #fff; border-color: #25D366; }
.btn.green:hover { background: #1ea952; }
.btn.danger { background: #c8102e; color: #fff; border-color: #c8102e; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: calc(110px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #000; color: #fff;
  padding: 14px 28px; font-size: 14px;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: all 0.3s; max-width: 90vw;
  text-align: center; border-radius: 0; font-weight: 500;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================================
   🛒 نافذة إتمام الطلب
   =================================================================== */

.cart-modal { max-width: 560px; }

.chk-section { margin-bottom: 24px; }
.chk-section:last-child { margin-bottom: 0; }

.chk-section-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700;
  color: #000; margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.chk-section-head .chk-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: #000; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

.chk-items { display: flex; flex-direction: column; gap: 10px; }
.chk-item {
  display: flex; gap: 12px;
  padding: 10px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
}
.chk-item img,
.chk-item .chk-noimg {
  width: 64px; height: 80px; object-fit: cover; flex: none;
  background: #f0f0f0; display: grid; place-items: center;
  font-size: 24px;
}
.chk-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chk-item-name { font-size: 13.5px; font-weight: 600; color: #000; line-height: 1.3; }
.chk-item-meta { font-size: 11.5px; color: #888; }
.chk-item-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; gap: 8px; }
.chk-item-qty {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e5e5e5;
  padding: 2px;
}
.chk-item-qty button {
  width: 32px; height: 32px;
  background: transparent; color: #000;
  font-size: 16px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.chk-item-qty button:hover { background: #f0f0f0; }
.chk-item-qty button:active { background: #e5e5e5; }
.chk-item-qty b { font-size: 14px; min-width: 22px; text-align: center; font-weight: 600; }
.chk-item-price { font-size: 14px; font-weight: 700; color: #000; }
.chk-item-remove {
  background: none; color: #c8102e;
  font-size: 20px; cursor: pointer;
  padding: 4px; line-height: 1;
  align-self: flex-start;
  min-width: 32px;
  min-height: 32px;
  -webkit-tap-highlight-color: transparent;
}
.chk-item-remove:hover { color: #a00d25; }

.chk-fields { display: flex; flex-direction: column; gap: 12px; }
.chk-field { display: flex; flex-direction: column; gap: 6px; }
.chk-field label {
  font-size: 12.5px; font-weight: 500; color: #555;
}
.chk-field label .opt { color: #aaa; font-weight: 400; }
.chk-field input,
.chk-field select {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  color: #000;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}
.chk-field input:focus,
.chk-field select:focus { border-color: #000; }
.chk-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-inline-start: 36px;
}

.chk-summary {
  background: #fafafa;
  padding: 16px;
  border: 1px solid #f0f0f0;
  display: flex; flex-direction: column; gap: 10px;
}
.chk-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; color: #555;
  gap: 8px;
  flex-wrap: wrap;
}
.chk-summary-row.total {
  font-size: 17px; font-weight: 700; color: #000;
  border-top: 1px dashed #ddd;
  padding-top: 12px;
  margin-top: 4px;
}
.chk-summary-row .val { font-weight: 600; color: #000; }

.chk-actions { display: flex; gap: 10px; margin-top: 20px; }
.chk-submit {
  flex: 1;
  padding: 18px;
  background: #25D366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .2s;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.chk-submit:hover { background: #1ea952; }
.chk-submit:active { transform: scale(0.98); }
.chk-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.chk-submit svg { width: 20px; height: 20px; }

.chk-empty {
  text-align: center;
  color: #888;
  padding: 48px 16px;
  font-size: 14px;
  line-height: 1.8;
}
.chk-empty-icon { font-size: 48px; margin-bottom: 12px; }

#successModal .modal { max-width: 440px; }

/* ===== Lightbox ===== */
.lb {
  position: fixed; inset: 0; z-index: 300; background: rgba(255,255,255,0.98);
  display: none; flex-direction: column; align-items: center;
  padding: 64px 16px 16px;
}
.lb.open { display: flex; }
.lb-stage { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 960px; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; border-radius: 0; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 0; border: 1px solid #000;
  background: #fff; color: #000; font-size: 22px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0 0 4px; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:active { transform: translateY(-50%) scale(0.95); }
.lb-prev { right: 12px; }
.lb-next { left: 12px; }
.lb-close {
  position: absolute; top: 16px; left: 16px; width: 44px; height: 44px;
  border-radius: 0; border: 1px solid #000; background: #fff;
  color: #000; font-size: 16px; cursor: pointer; z-index: 3;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:active { transform: scale(0.95); }
.lb-count {
  direction: ltr; position: absolute; top: 24px; right: 20px;
  color: #000; font-size: 13px; font-weight: 600;
  background: #fff; padding: 8px 16px; border-radius: 0;
  border: 1px solid #000;
}
.lb-cap { color: #000; font-weight: 600; font-size: 14px; margin: 16px 0 12px; text-align: center; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 4px; -webkit-overflow-scrolling: touch; }
.lb-thumbs:empty { display: none; }
.lb-th {
  flex: none; width: 60px; height: 60px; padding: 0; overflow: hidden;
  border: 1px solid #e5e5e5; background: #fff; cursor: pointer;
  opacity: 0.5; border-radius: 0; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lb-th img { width: 100%; height: 100%; object-fit: cover; }
.lb-th.on { border-color: #000; opacity: 1; }

/* ===================================================================
   📱 استجابة الجوال
   =================================================================== */

@media (max-width: 900px) {
  .hero-bg .hero { min-height: 340px; padding: 40px 0; }
  .hero-bg .hero-text { width: 100%; }
  .hero-bg .pf { display: none; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .trust div:nth-child(2) { border-inline-end: none; }
  .trust div:nth-child(-n+2) { border-bottom: 1px solid #f0f0f0; }
  .dgrid { grid-template-columns: 1fr; }
  .dcard { border-inline-end: none; border-bottom: 1px solid #f0f0f0; }
  .dcard:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .topbar-inner { gap: 8px; padding: 10px 0; }
  .icon-btn { width: 42px; height: 42px; }
  .icon-btn .ico { width: 20px; height: 20px; }
  .icon-wa { width: 42px; height: 42px; }
  .brand img { height: 52px; max-width: 160px; }
  .topbar.scrolled .brand img { height: 36px; }
  .brand span { font-size: 18px; }
  .header-search input { height: 42px; padding: 0 28px; font-size: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .shop { padding-top: 48px; }
  .how, .faq, .delivery { padding-top: 56px; }
  .sec-head h2 { font-size: 20px; }
  .card-title { font-size: 13px; }
  .price { font-size: 14px; }
  .order-btn { margin: 10px 0 0; padding: 13px; font-size: 13px; }
  .card-body { padding: 14px 0 8px; }
  .steps { grid-template-columns: 1fr; }
  .steps > div { border-inline-end: none; border-bottom: 1px solid #f0f0f0; padding: 24px 18px; text-align: right; display: flex; align-items: center; gap: 16px; }
  .steps > div:last-child { border-bottom: none; }
  .steps b { margin: 0; width: 32px; height: 32px; font-size: 13px; flex-shrink: 0; border-radius: 0; }
  .steps strong { font-size: 14px; margin: 0 0 4px; }
  .steps span { font-size: 12px; }
  .contact-band { padding: 32px 20px; text-align: center; }
  .contact-band h3 { font-size: 17px; }
  .contact-band .pill-wa { width: 100%; justify-content: center; padding: 16px 24px; font-size: 14px; }
  .foot-cols { grid-template-columns: repeat(2, 1fr); gap: 24px; text-align: center; }
  .foot { flex-direction: column; text-align: center; }
  .socials { justify-content: center; }
  footer { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .modal { padding: 0; border-radius: 0; }
  .modal-head { padding: 16px; }
  .modal-body { padding: 16px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 13px; }
  .cta-main { padding: 14px 32px; font-size: 13px; }
  .swatch { width: 34px; height: 34px; }
  .size-chip { padding: 7px 11px; font-size: 12px; min-height: 38px; min-width: 44px; }
  .gender-btn { padding: 10px 18px; font-size: 13px; }
  .filter-select { min-width: 160px; font-size: 14px; height: 44px; }
  .cart-mobile-bar { font-size: 14px; padding: 16px 20px; min-height: 52px; }
  .cats-panel { width: min(260px, 76vw); }
  .cats-list .cat-item { font-size: 16px; padding: 18px 16px; }
  .chk-item img, .chk-item .chk-noimg { width: 58px; height: 72px; }
  .chk-item-name { font-size: 13px; }
  .chk-item-price { font-size: 13.5px; }
  .chk-submit { padding: 16px; font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}