/* M.T.K — shared design tokens + storefront styles */
:root {
  --navy: #1f2387;
  --navy-2: #2b34a8;
  --pink: #d81b7a;
  --pink-soft: #fde7f1;
  --ink: #161838;
  --muted: #646a8a;
  --line: #e5e7f2;
  --bg: #f5f6fb;
  --card: #ffffff;
  --ok: #138a52;
  --ok-soft: #e3f6ec;
  --warn: #b4232c;
  --warn-soft: #fde8e9;
  --gold: #b7791f;
  --gold-soft: #fff4dc;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(22, 24, 56, .06), 0 6px 20px rgba(22, 24, 56, .06);
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }

/* ---------- logo ---------- */
.logo {
  font-family: "Cairo", sans-serif;
  font-weight: 900;
  font-style: italic;
  letter-spacing: .02em;
  color: var(--navy);
  direction: ltr;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.topbar .logo { font-size: 28px; }
.topbar .logo span { color: var(--pink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn { transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .2s ease, box-shadow .25s ease; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #1a9449; }
.btn-call { background: var(--navy); color: #fff; }
.btn-call:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff;
  padding: 36px 0 0;
  background:
    radial-gradient(60% 50% at 10% 20%, rgba(91, 120, 255, .45), transparent 70%),
    radial-gradient(45% 45% at 95% 85%, rgba(216, 27, 122, .38), transparent 70%),
    linear-gradient(165deg, #2b34a8 0%, #1f2387 55%, #171a63 100%);
}
/* faint dotted texture */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
/* giant watermark logo */
.hero-mark {
  position: absolute; z-index: -1; inset-inline-end: -2%; top: 8px;
  font: italic 900 clamp(120px, 26vw, 300px)/1 "Cairo", sans-serif;
  color: rgba(255, 255, 255, .045); direction: ltr; pointer-events: none; user-select: none;
  letter-spacing: -.02em;
}
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 40px; } }

.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 5px 14px 5px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  font-size: 13px; font-weight: 700;
}
.hero .eyebrow i {
  font-style: normal; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--pink); font-size: 13px;
}
.hero h1 {
  margin: 0 0 14px; font-size: clamp(30px, 6.4vw, 54px); line-height: 1.25; font-weight: 900; text-wrap: balance;
}
.hero h1 .hl {
  background: linear-gradient(90deg, #ff5fa8, #ffb3d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 0 24px; max-width: 560px; color: rgba(255, 255, 255, .82); font-size: 16.5px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { min-height: 54px; padding: 0 24px; font-size: 16px; border-radius: 16px; }
.btn-wa { box-shadow: 0 10px 24px rgba(31, 168, 85, .35); }
.btn-wa:hover { box-shadow: 0 14px 30px rgba(31, 168, 85, .45); }
.btn-glass {
  background: rgba(255,255,255,.1); color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn-glass:hover { background: #fff; color: var(--navy); }
.btn-browse svg { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.btn-browse:hover svg { transform: translateX(-4px); }
@media (max-width: 560px) {
  .hero-actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; }
  .hero-actions .btn { padding: 0 12px; font-size: 15px; min-height: 52px; }
}

/* contact card */
.contact {
  margin-top: 22px; max-width: 560px;
  padding: 14px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.contact-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: rgba(255,255,255,.75); margin: 0 4px 10px;
}
.live { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61,220,132,.2); }
.contact-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(255,255,255,.08); color: #fff; text-decoration: none;
  transition: background .2s ease, transform .25s cubic-bezier(.2,.8,.2,1);
}
.contact-item:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.contact-item:active { transform: scale(.98); }
.ci-icon {
  flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--pink); box-shadow: 0 6px 14px rgba(216,27,122,.4);
}
.ci-icon svg { width: 17px; height: 17px; color: #fff; }
.ci-txt { display: grid; line-height: 1.3; min-width: 0; }
.ci-txt small { font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.65); }
.ci-txt b { font-size: 15.5px; font-weight: 800; direction: ltr; text-align: right; letter-spacing: .03em; }
@media (max-width: 560px) {
  .contact { padding: 12px; }
  .contact-list { grid-template-columns: 1fr 1fr; }
  .contact-item:first-child { grid-column: 1 / -1; } /* landline full width, two mobiles side by side */
  .contact-item { padding: 9px 10px; gap: 8px; }
  .ci-icon { width: 32px; height: 32px; }
  .ci-txt b { font-size: 14.5px; }
}

/* product collage */
/* Square box so the rings stay inside it and never overlap the content above */
.hero-art { position: relative; aspect-ratio: 1; margin-inline: auto; width: 100%; max-width: 320px; }
@media (min-width: 900px) { .hero-art { max-width: 420px; } }
.hero-art .glow {
  position: absolute; inset: 50% auto auto 50%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 160, 255, .55) 0%, rgba(80, 110, 255, .18) 45%, transparent 70%);
}
.hero-art .ring {
  position: absolute; inset: 50% auto auto 50%; width: 88%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .18);
  animation: spin 60s linear infinite;
}
.hero-art .arc {
  position: absolute; inset: 50% auto auto 50%; width: 100%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 6px solid transparent; border-top-color: var(--pink); border-inline-start-color: var(--pink);
  rotate: -20deg; opacity: .9;
}
@keyframes spin { to { rotate: 360deg; } }
.float {
  position: absolute; display: block; padding: 10px; border: 0; cursor: pointer;
  background: #fff; border-radius: 22px;
  box-shadow: 0 18px 40px rgba(6, 8, 40, .38);
  animation: bob 6s ease-in-out infinite;
}
.float img { width: 100%; height: 100%; object-fit: contain; }
.float.f1 { width: 46%; aspect-ratio: 1; top: 8%; inset-inline-start: 27%; z-index: 2; }
.float.f2 { width: 34%; aspect-ratio: 1; top: 46%; inset-inline-start: 2%; rotate: -8deg; animation-delay: -2s; }
.float.f3 { width: 34%; aspect-ratio: 1; top: 50%; inset-inline-end: 2%; rotate: 7deg; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
/* trust strip */
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 30px; }
.perk {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  font-size: 13px; font-weight: 700; line-height: 1.4; color: rgba(255,255,255,.9);
}
.perk svg { width: 22px; height: 22px; flex: none; color: #ff8cc0; }
@media (max-width: 560px) {
  .perks { grid-template-columns: 1fr; gap: 8px; margin-top: 22px; }
  .perk { padding: 10px 12px; }
  .hero p { font-size: 15.5px; }
}

/* curved pink edge like the shop sign */
.hero-curve { display: block; width: 100%; height: 56px; margin-top: 26px; }
@media (min-width: 900px) { .hero-curve { height: 90px; } }

/* ---------- toolbar ---------- */
.toolbar { padding: 4px 0 6px; }
.search {
  position: relative;
}
.search input {
  width: 100%; height: 50px;
  padding-inline: 46px 16px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(43, 52, 168, .12); }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 4px; }
.chip {
  flex: none; height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink);
  font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.count { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- grid ---------- */
.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px 0 40px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.card {
  position: relative;
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(22,24,56,.06), 0 14px 32px rgba(22,24,56,.12); }
  .card:hover .card-img img { transform: scale(1.04); }
}
.card-open {
  display: flex; flex-direction: column; flex: 1;
  border: 0; padding: 0; background: none; text-align: start; cursor: pointer; width: 100%;
}
.card-open:focus-visible, .card-cta:focus-visible { outline: 3px solid var(--navy-2); outline-offset: -3px; }

/* Fixed square frame: every photo — tall, wide or small — fits inside the same box */
.card-img {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #f3f4fa 100%);
  border-bottom: 1px solid var(--line);
}
.card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 12%; object-fit: contain; mix-blend-mode: multiply;
  transition: transform .3s ease;
}

.card-body { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; }
.card-cat {
  font-size: 12px; color: var(--muted); font-weight: 700; line-height: 18px; height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-name {
  margin: 0; font-size: 15px; font-weight: 800; line-height: 1.5;
  min-height: 3em; /* always reserve 2 lines so short names don't lift the footer */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Footer pinned to the bottom of every card */
.card-foot { margin-top: auto; padding: 8px 12px 12px; display: grid; gap: 8px; }
.card-price { height: 26px; display: flex; align-items: center; }
.card-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 14px; transition: background .15s;
}
.card-cta:hover { background: var(--navy-2); }
.card-cta svg { width: 18px; height: 18px; }
.card.is-out .card-cta { background: var(--bg); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.price { font-weight: 900; color: var(--navy); font-size: 17px; }
.price small { font-size: 12px; font-weight: 700; color: var(--muted); }
.price-ask { font-size: 13px; font-weight: 800; color: var(--pink); }
@media (max-width: 380px) {
  .card-body { padding: 8px 10px 2px; }
  .card-foot { padding: 6px 10px 10px; }
  .card-name { font-size: 14px; }
  .card-cta { font-size: 13px; }
}

.badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; z-index: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 800; line-height: 1.7;
}
.badge-best { background: var(--gold-soft); color: var(--gold); }
.badge-out { background: var(--warn-soft); color: var(--warn); }
.badge-in { background: var(--ok-soft); color: var(--ok); }
.card.is-out .card-img img { opacity: .45; filter: grayscale(.7); }
.grid > .card { min-width: 0; }

/* ---------- empty / skeleton ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }
.skeleton { aspect-ratio: .78; border-radius: var(--radius); background: linear-gradient(90deg, #eceef7 25%, #f6f7fc 50%, #eceef7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- product sheet ---------- */
.sheet { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; }
.sheet::backdrop { background: rgba(14, 16, 40, .55); }
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet-panel {
  position: relative;
  width: 100%; max-width: 820px; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; background: #fff;
  border-radius: 22px 22px 0 0;
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 760px) {
  .sheet[open] { align-items: center; }
  .sheet-panel { border-radius: 22px; display: grid; grid-template-columns: 1.05fr 1fr; max-height: 86vh; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-close {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.95); box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center;
}
.sheet-close svg { width: 20px; height: 20px; }

.gallery { position: relative; background: #fff; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .gallery { border-bottom: 0; border-inline-end: 1px solid var(--line); } }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: contain; scroll-snap-align: center; padding: 18px; }
.g-nav {
  position: absolute; top: calc(50% - 40px); z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.95); color: var(--navy); box-shadow: var(--shadow);
  display: none; place-items: center; cursor: pointer; transition: transform .2s;
}
.g-nav:hover { transform: scale(1.08); }
.g-nav svg { width: 20px; height: 20px; }
/* RTL: "previous" sits on the right and points right; "next" sits on the left and points left */
.g-prev { inset-inline-start: 10px; }
.g-next { inset-inline-end: 10px; } .g-next svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) { .g-nav { display: grid; } }
.g-count {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  padding: 2px 10px; border-radius: 999px; background: rgba(22,24,56,.72); color: #fff; font-size: 12px; font-weight: 800;
  direction: ltr; unicode-bidi: isolate; /* keep "1 / 3" in reading order inside RTL pages */
}
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 14px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button {
  flex: none; width: 58px; height: 58px; padding: 3px; border-radius: 12px; cursor: pointer;
  background: #fff; border: 2px solid var(--line); opacity: .65; transition: border-color .2s, opacity .2s;
}
.thumbs button.on { border-color: var(--navy); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }

.sheet-info { padding: 20px 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.sheet-info h2 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.4; }
.sheet-info .desc { margin: 0; color: #3b3f63; white-space: pre-line; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-price { padding: 12px 14px; border-radius: 12px; background: var(--bg); display: flex; justify-content: space-between; align-items: center; }
.sheet-price .price { font-size: 22px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 4px; }

/* ---------- about + footer ---------- */
.about-strip { background: #fff; border-top: 1px solid var(--line); padding: 32px 0; }
.about-strip h2 { margin: 0 0 8px; font-size: 20px; }
.about-strip p { margin: 0; color: var(--muted); max-width: 720px; }
.footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.footer .logo { color: #fff; font-size: 24px; }
.footer .logo span { color: var(--pink); }

/* floating WhatsApp on mobile */
.fab {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline-start: 16px; z-index: 15;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1fa855; color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(31, 168, 85, .4);
}
.fab svg { width: 28px; height: 28px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* lock page scroll behind open sheets */
html:has(dialog[open]) { overflow: hidden; }
