/* icase shop, design v2: quiet and premium. White space, large type, big photos, pill buttons.
   Phone first, right-to-left Arabic by default (English flips it with dir="ltr").
   No letter-spacing on Arabic text: it breaks the joined letters. */
:root {
  --bg: #ffffff;
  --alt: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --hair: rgb(0 0 0 / .1);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --warm: #b64400;
  --ok: #248a3d;
  --bad: #e30000;
  --ease: cubic-bezier(.28, .11, .32, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Helvetica Neue", "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; }
[dir="ltr"] h1, [dir="ltr"] h2 { letter-spacing: -.022em; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; top: 8px; }
:focus-visible { outline: 3px solid rgb(0 113 227 / .55); outline-offset: 2px; border-radius: 8px; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn, .add {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 980px; text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), transform .2s var(--ease), opacity .2s;
}
.btn { height: 52px; padding: 0 28px; font-size: 17px; font-weight: 500; background: transparent; color: var(--blue); border-color: var(--blue); }
.btn.primary, .add { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover, .add:hover { background: var(--blue-hover); }
.btn:active, .add:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.add { height: 36px; padding: 0 18px; font-size: 14px; font-weight: 500; }
.link { color: var(--blue); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.link:hover { text-decoration: underline; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(232 232 237 / .9); color: var(--ink); }
.stepper { display: inline-flex; align-items: center; height: 36px; border-radius: 980px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.stepper button { width: 38px; height: 100%; border: 0; background: transparent; font-size: 19px; line-height: 1; color: var(--blue); }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper span { min-width: 22px; text-align: center; font-weight: 600; font-size: 15px; }

/* ---------- top ---------- */
.preview { background: #fff8e1; color: #6b4a00; text-align: center; padding: 8px 14px; font-size: 13px; }
.top {
  position: sticky; top: 0; z-index: 20; height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
  background: rgb(255 255 255 / .8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.logo { font-size: 21px; font-weight: 700; text-decoration: none; direction: ltr; letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.lang, .cart-btn { height: 44px; min-width: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 12px; }
.lang { font-size: 14px; font-weight: 500; padding: 0 8px; opacity: .88; }
.cart-btn { position: relative; }
.badge { position: absolute; top: 7px; inset-inline-end: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 980px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.offer { background: var(--alt); color: var(--ink); text-align: center; padding: 11px 16px; font-size: 13px; line-height: 1.5; }
.offer b { font-weight: 600; }

main { min-height: 62vh; outline: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 12px; }
.loading { text-align: center; color: var(--faint); padding: 120px 0; }

/* ---------- the icon of each iPhone model, and the row of models ---------- */
.micon { width: 34px; height: 47px; flex: none; }
.micon.lg { width: 54px; height: 74px; }
.micon text { font-family: inherit; }
.modelnav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-bottom: 1px solid var(--hair); }
.modelnav::-webkit-scrollbar { display: none; }
.modelnav > div { display: flex; gap: 2px; width: max-content; margin: 0 auto; padding: 14px 12px 10px; }
.mn { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 78px; padding: 6px 8px 8px; border-radius: 14px; text-decoration: none; color: var(--ink); font-size: 12px; line-height: 1.2; white-space: nowrap; opacity: .82; transition: opacity .2s, background .2s; }
.mn:hover { opacity: 1; background: var(--alt); }
.mn.on { opacity: 1; font-weight: 600; background: var(--alt); }
.mn .micon { transition: transform .3s var(--ease); }
.mn:hover .micon { transform: translateY(-2px); }
.feature .micon { display: block; margin: 0 auto 14px; color: #f5f5f7; }
.tile .micon { display: block; margin: 0 auto 10px; }
.model-head .micon { display: block; margin: 0 auto 14px; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 52px 22px 40px; }
.hero h1 { font-size: clamp(36px, 9.5vw, 72px); line-height: 1.12; max-width: 13em; margin: 0 auto; }
.hero p { color: var(--muted); font-size: clamp(19px, 4.8vw, 26px); line-height: 1.35; margin-top: 14px; }
.hero .cta { margin-top: 26px; display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; }

.feature { display: block; position: relative; width: calc(100% - 24px); max-width: 1416px; margin: 0 auto; border-radius: 28px; overflow: hidden; background: #000; color: #f5f5f7; text-decoration: none; text-align: center; }
.feature-text { padding: 46px 20px 0; }
.eyebrow { font-size: 14px; font-weight: 600; color: #ff9f0a; margin-bottom: 8px; }
.feature h2 { font-size: clamp(32px, 8.2vw, 60px); }
.feature p { color: #a1a1a6; font-size: clamp(17px, 4.4vw, 24px); margin-top: 8px; }
.feature .eyebrow { color: #ff9f0a; font-size: 14px; margin: 0 0 8px; }
.feature .cta { margin-top: 20px; }
.feature-img { margin-top: 32px; aspect-ratio: 5 / 6; overflow: hidden; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature:hover .feature-img img { transform: scale(1.03); }

.section-head { text-align: center; padding: 64px 22px 22px; }
.section-head h2 { font-size: clamp(28px, 7vw, 48px); }
.section-head p { color: var(--muted); font-size: 19px; margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 12px; max-width: 1440px; margin: 0 auto; }
.tile { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--alt); text-decoration: none; text-align: center; }
.tile-text { padding: 22px 10px 16px; }
.tile h3 { font-size: clamp(17px, 4.6vw, 24px); line-height: 1.2; }
.tile p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tile .link { font-size: 14px; margin-top: 6px; }
.tile-img { aspect-ratio: 1 / 1; overflow: hidden; margin-top: auto; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.tile:hover .tile-img img { transform: scale(1.04); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 56px 16px 64px; text-align: center; max-width: 980px; margin: 0 auto; }
.values div { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.values svg { width: 34px; height: 34px; stroke-width: 1.3; color: var(--ink); }

/* ---------- one model ---------- */
.crumb { display: inline-flex; align-items: center; gap: 2px; color: var(--blue); text-decoration: none; font-size: 14px; padding: 14px 6px 0; }
.model-head { text-align: center; padding: 22px 16px 30px; }
.model-head h1 { font-size: clamp(34px, 9vw, 64px); }
.model-head p { color: var(--muted); font-size: 19px; margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 64px; }
.card { display: flex; flex-direction: column; background: var(--alt); border-radius: 20px; overflow: hidden; }
.card-img { display: block; width: 100%; padding: 0; border: 0; background: #e8e8ed; aspect-ratio: 4 / 5; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .card-img img { transform: scale(1.04); }
.card-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 14px; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-name { font-weight: 600; font-size: 15px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { color: var(--muted); font-size: 13px; white-space: nowrap; }
.card-ctl { display: block; }
.card-ctl .add { width: 100%; }
.card-ctl .stepper { display: flex; justify-content: space-between; }
.card-ctl .stepper button { width: 46px; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; justify-content: flex-end; animation: fade .25s var(--ease); }
[dir="rtl"] .overlay:not(.center) { justify-content: flex-start; }
.overlay.center { align-items: flex-end; justify-content: center; }
@keyframes fade { from { opacity: 0; } }

.cart { width: min(460px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; animation: slide .35s var(--ease); }
@keyframes slide { from { transform: translateX(var(--from, 40px)); opacity: 0; } }
[dir="rtl"] .cart { --from: -40px; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.cart-head h2 { font-size: 30px; }
.cart-body { flex: 1; overflow: auto; padding: 4px 20px 16px; }
.cart-foot { padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.line img { width: 72px; height: 90px; object-fit: cover; border-radius: 12px; background: var(--alt); }
.line b { display: block; font-size: 17px; font-weight: 600; }
.line small { display: block; color: var(--muted); font-size: 14px; }
.line .rm { border: 0; background: transparent; color: var(--blue); font-size: 14px; padding: 6px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 72px 16px; }
.empty b { display: block; color: var(--ink); font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.tip { color: var(--warm); font-size: 14px; text-align: center; padding: 16px 0 4px; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin-bottom: 16px; font-size: 15px; }
.sum dt { color: var(--muted); }
.sum dd { text-align: end; }
.sum .total { font-size: 21px; font-weight: 600; color: var(--ink); padding-top: 12px; border-top: 1px solid var(--hair); }
.cod { color: var(--faint); font-size: 12px; line-height: 1.5; text-align: center; margin-top: 12px; }

.product { width: min(980px, 100%); max-height: 96vh; overflow: auto; background: var(--bg); border-radius: 24px 24px 0 0; animation: rise .4s var(--ease); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.product-img { position: relative; background: var(--alt); }
.product-img img { width: 100%; max-height: 52vh; object-fit: contain; }
.product-img .icon-btn { position: absolute; top: 12px; inset-inline-end: 12px; }
.product-info { padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.product-info h2 { font-size: 32px; }
.product-info .muted { color: var(--muted); font-size: 15px; }
.product-info .model { color: var(--warm); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-row b { font-size: 21px; font-weight: 600; }
.chip { color: var(--muted); font-size: 14px; }
.buy-row { display: flex; gap: 10px; align-items: center; }
.buy-row .btn { flex: 1; }
.buy-row .stepper { flex: 1; height: 52px; justify-content: space-between; }
.buy-row .stepper button { width: 60px; font-size: 22px; }

/* ---------- checkout ---------- */
.page-title { font-size: clamp(32px, 8vw, 48px); padding: 14px 6px 22px; }
.checkout { display: grid; gap: 22px; padding-bottom: 64px; }
.panel h2 { font-size: 21px; margin-bottom: 16px; }
.panel.side { background: var(--alt); border-radius: 22px; padding: 22px 18px; }
.checkout > .panel:first-child { padding: 0 6px; }
.fields { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: 14px; }
.field .opt { color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 56px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 17px;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; }
[dir="ltr"] .field select { background-position: right 14px center; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgb(0 113 227 / .16); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--bad); background: #fff5f5; }
.field .err { color: var(--bad); font-size: 13px; }
/* Hidden from people, without moving it off-screen: an offset to the left makes a right-to-left page scroll sideways. */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.mini .line { grid-template-columns: 52px 1fr auto; padding: 12px 0; }
.mini .line:first-child { padding-top: 0; }
.mini .line img { width: 52px; height: 66px; border-radius: 10px; background: #e8e8ed; }
.mini .line b { font-size: 15px; }
.mini .line small { font-size: 13px; }
.mini + .sum { margin-top: 16px; }
.form-error { background: #fff5f5; color: var(--bad); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }

/* ---------- done ---------- */
.done { max-width: 560px; margin: 0 auto; padding: 56px 16px 72px; text-align: center; }
.done .tick { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; border: 2px solid var(--ok); color: var(--ok); display: grid; place-items: center; }
.done h1 { font-size: clamp(32px, 8vw, 48px); }
.done > p { color: var(--muted); font-size: 19px; margin-top: 10px; }
.done .panel { text-align: start; margin: 28px 0; background: var(--alt); border-radius: 22px; padding: 22px 18px; }
.done .ordno { font-size: 15px; font-weight: 600; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.done .sum dt { white-space: nowrap; }

/* ---------- foot ---------- */
.foot { background: var(--alt); padding: 22px 20px calc(26px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 12px; }
.foot .links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.foot a { color: var(--blue); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.toast { position: fixed; top: calc(60px + env(safe-area-inset-top)); left: 50%; z-index: 60; max-width: calc(100vw - 32px); background: rgb(29 29 31 / .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; padding: 10px 20px; border-radius: 980px; font-size: 14px; white-space: nowrap; opacity: 0; transform: translate(-50%, -10px); pointer-events: none; transition: .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.soon { text-align: center; padding: 140px 20px; }
.soon h1 { font-size: clamp(44px, 12vw, 80px); }
.soon p { color: var(--muted); margin-top: 14px; font-size: 21px; }

/* things fade up as they come into view (only when the script says the browser can do it) */
.anim .reveal { opacity: 0; transform: translateY(22px); }
.anim .reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

@media (min-width: 735px) {
  .top { height: 52px; }
  .hero { padding: 84px 22px 60px; }
  .feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; text-align: start; }
  .feature .micon { margin-inline: 0; }
  .feature-text { padding: 40px 6%; }
  .feature-img { margin: 0; aspect-ratio: auto; height: 600px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile-text { padding: 30px 12px 20px; }
  .values { padding: 80px 20px 96px; }
  .values div { font-size: 17px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .overlay.center { align-items: center; padding: 24px; }
  .product { border-radius: 28px; display: grid; grid-template-columns: 1.05fr 1fr; max-height: 88vh; overflow: hidden; }
  .product-img { display: grid; place-items: center; }
  .product-img img { max-height: 88vh; height: 100%; object-fit: cover; }
  .product-info { padding: 48px 40px; justify-content: center; overflow: auto; }
  .product-info h2 { font-size: 40px; }
  .cart-head { padding: 26px 28px 8px; }
  .cart-body { padding: 4px 28px 16px; }
  .cart-foot { padding: 18px 28px 24px; }
}
@media (min-width: 1068px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .checkout { grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: start; }
  .checkout .side { position: sticky; top: 76px; padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, .anim .reveal { animation: none !important; transition: none !important; }
  .anim .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
