/* The Peripheral Lab: navy #05070D, blue #1E6BFF, white. Keycap-shaped buttons that press down. */
:root {
  --navy: #05070D; --blue: #1E6BFF; --white: #FFFFFF;
  --muted: rgba(255,255,255,0.72); --faint: rgba(255,255,255,0.6);
  --line: rgba(255,255,255,0.1); --line2: rgba(255,255,255,0.18); --panel: rgba(255,255,255,0.04);
  --font: Montserrat, system-ui, sans-serif;
}
html[lang="ar"] { --font: Cairo, system-ui, sans-serif; }
html[lang="ckb"] { --font: Vazirmatn, system-ui, sans-serif; }
* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--white); font-family: var(--font); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.blue { color: var(--blue); }
.latin { font-family: Montserrat, system-ui, sans-serif; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.2; }
p { margin: 0; }

/* keys */
.k { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel);
  color: var(--white); box-shadow: 0 6px 0 rgba(255,255,255,0.12); padding: 13px 22px; font-weight: 700; cursor: pointer; min-height: 44px;
  transition: transform .08s, box-shadow .08s, border-color .15s; touch-action: manipulation; user-select: none; }
@media (hover: hover) { .k:hover { transform: translateY(2px); border-color: var(--blue); } }
.k:active { transform: translateY(5px); box-shadow: none; }
.k.primary { background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 0 rgba(30,107,255,0.4); }
.k.dark { background: var(--navy); border-color: var(--navy); box-shadow: 0 6px 0 rgba(5,7,13,0.45); }
.k.big { width: 100%; min-height: 64px; font-size: 19px; font-weight: 800; border-radius: 16px; box-shadow: 0 8px 0 rgba(30,107,255,0.4); }
.k[aria-pressed="true"], .k.on { background: var(--blue); border-color: var(--blue); box-shadow: none; transform: translateY(4px); }
.k[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; font-weight: 600; }

/* header */
.hdr { border-bottom: 1px solid rgba(255,255,255,0.08); }
.hdr .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.brand { display: flex; align-items: center; gap: 12px; direction: ltr; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand b { font-family: Montserrat, sans-serif; font-weight: 800; letter-spacing: .08em; font-size: 14px; white-space: nowrap; }
.brand b span { color: var(--blue); letter-spacing: .3em; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; font-weight: 600; flex: 1 1 auto; }
.nav a:hover { color: var(--blue); }
.tools { display: flex; align-items: center; gap: 8px; }
.langs { display: flex; gap: 6px; }
.langs a { height: 40px; padding: 0 12px; border-radius: 9px; font-size: 13px; box-shadow: 0 3px 0 rgba(255,255,255,0.12); }
.langs a[lang="ar"] { font-family: Cairo, sans-serif; } .langs a[lang="ckb"] { font-family: Vazirmatn, sans-serif; } .langs a[lang="en"] { font-family: Montserrat, sans-serif; }
.cartbtn { position: relative; width: 46px; height: 40px; padding: 0; border-radius: 9px; box-shadow: 0 3px 0 rgba(255,255,255,0.12); }
.cartbtn .n { position: absolute; top: -8px; inset-inline-end: -8px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--blue); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-family: Montserrat, sans-serif; }
@media (max-width: 720px) { .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; padding-bottom: 4px; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } .tools { margin-inline-start: auto; } }

/* footer */
.ftr { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 72px; }
.ftr .wrap { padding-top: 48px; padding-bottom: 96px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; font-size: 14px; }
.ftr .cols { display: flex; flex-wrap: wrap; gap: 48px; }
.ftr .cols div { display: flex; flex-direction: column; gap: 10px; }
.ftr a:hover { color: var(--blue); }

/* floating chat */
.chat { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-end: 18px; z-index: 50; padding: 0 18px; min-height: 52px; border-radius: 16px; font-weight: 800;
  box-shadow: 0 6px 0 rgba(30,107,255,0.4), 0 12px 32px rgba(0,0,0,0.45); }

/* sections */
.section { padding-top: 72px; padding-bottom: 72px; }
[hidden] { display: none !important; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 28px; }
.head h2 { font-size: clamp(26px, 3vw, 40px); }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--blue); }
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* category key tiles */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.cap { aspect-ratio: 1; border-radius: 22px; border: 1.5px solid rgba(255,255,255,0.14); background: var(--panel); box-shadow: 0 8px 0 rgba(255,255,255,0.1);
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: start; cursor: pointer; transition: transform .1s, box-shadow .1s, border-color .15s; }
@media (hover: hover) { .cap:hover { transform: translateY(4px); box-shadow: 0 4px 0 rgba(30,107,255,0.45); border-color: var(--blue); } }
.cap .f { font-family: Montserrat, sans-serif; font-size: 13px; font-weight: 800; color: var(--blue); direction: ltr; }
.cap b { font-size: 21px; } .cap small { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; }
.cap.c-blue { background: var(--blue); box-shadow: 0 8px 0 rgba(30,107,255,0.45); } .cap.c-blue .f, .cap.c-blue small { color: var(--white); }
.cap.c-white { background: var(--white); color: var(--navy); box-shadow: 0 8px 0 rgba(255,255,255,0.28); } .cap.c-white small { color: rgba(5,7,13,0.7); }
.cap.small { aspect-ratio: auto; min-height: 92px; padding: 14px 16px; border-radius: 18px; } .cap.small b { font-size: 15px; }
.cap[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); box-shadow: 0 2px 0 rgba(30,107,255,0.45); transform: translateY(4px); } .cap[aria-pressed="true"] .f { color: var(--white); }

/* product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 36px 24px; }
.pc { display: flex; flex-direction: column; gap: 12px; }
.ph { display: block; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; background: rgba(255,255,255,0.05); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
@media (hover: hover) { .pc:hover .ph img { transform: scale(1.03); } }
.ph.empty { display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 13px; font-weight: 600; }
.pc .row { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.pc b { font-size: 16px; } .pc .price { white-space: nowrap; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; border: 1px solid; }
.badge.fit { background: var(--blue); border-color: var(--blue); }
.badge.warn { background: var(--white); color: var(--navy); border-color: var(--white); }
.badge.plain { border-color: rgba(255,255,255,0.4); }
.badge i { font-style: normal; font-family: Montserrat, sans-serif; font-weight: 800; }

/* panels, forms */
.panel { border-radius: 22px; background: var(--panel); border: 1px solid var(--line); padding: 20px; }
.box { border-radius: 28px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); padding: clamp(20px, 3.5vw, 40px); }
.line { display: flex; justify-content: space-between; gap: 12px; }
.line.total > :last-child { white-space: nowrap; }
.line.total { padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 19px; font-weight: 800; }
label.f { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 700; }
.in { height: 52px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); padding: 0 16px; font-size: 16px; font-weight: 500; width: 100%; }
textarea.in { height: auto; padding: 14px 16px; resize: vertical; }
.in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,107,255,0.35); }
.in::placeholder { color: rgba(255,255,255,0.5); }
.in[aria-invalid="true"] { border-color: var(--white); box-shadow: 0 0 0 2px var(--white); }
.hint { font-size: 13px; font-weight: 500; color: var(--muted); }
.err { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.err::before { content: "!"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--white); color: var(--navy); display: flex; align-items: center; justify-content: center; font-family: Montserrat, sans-serif; font-weight: 800; }
.okmsg { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.okmsg::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; }
.stepper button { width: 44px; height: 44px; background: none; border: 0; font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper b { min-width: 28px; text-align: center; font-family: Montserrat, sans-serif; }
.govs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr)); gap: 10px; padding-bottom: 4px; }
.govs .k { min-height: 52px; padding: 8px 12px; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 14px; box-shadow: 0 4px 0 rgba(255,255,255,0.1); text-align: start; }
.govs .k.wide { grid-column: 1 / -1; } .govs .k small { font-size: 12px; opacity: .8; font-weight: 600; }
.fitstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.03); padding: 12px 16px; }
.fitstrip.known { background: rgba(30,107,255,0.12); border-color: rgba(30,107,255,0.5); }
.enterbar { width: 40px; height: 16px; border-radius: 4px; background: var(--white); display: inline-block; }
.enterl { position: relative; width: 26px; height: 30px; display: inline-block; direction: ltr; }
.enterl::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 13px; border-radius: 4px 4px 0 4px; background: var(--white); }
.enterl::after { content: ""; position: absolute; left: 7px; top: 10px; width: 19px; height: 20px; border-radius: 0 0 4px 4px; background: var(--white); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { min-height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.22); background: transparent; padding: 0 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--white); color: var(--navy); border-color: var(--white); }
.empty-note { border-radius: 22px; border: 1px dashed rgba(255,255,255,0.2); padding: 40px 24px; text-align: center; font-size: 17px; font-weight: 700; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--blue); animation: spin 0.8s linear infinite; margin: 48px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation-duration: 0.01ms !important; } }
