*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; font-family: var(--f-body); font-size: 16px; line-height: 1.55; color: var(--black);
  background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.has-layer { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
bdi { unicode-bidi: isolate; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--yellow); padding: 8px 14px; z-index: 999; font-weight: 700; }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- icons ---- */
.icon { width: 22px; height: 22px; flex: none; }
.icon.flip, [dir="rtl"] .icon-btn .icon.flip { transform: scaleX(-1); }

/* ---- brand ---- */
.brand { font-family: var(--f-display); font-size: 30px; line-height: 1; letter-spacing: .02em; display: inline-flex; align-items: stretch; transform: skewX(-8deg); white-space: nowrap; }
.brand__prime { padding-inline-end: 1px; }
.brand__kits { background: var(--yellow); color: var(--black); padding: 1px 5px 0; margin-inline-start: 2px; }
.brand--lg { font-size: 44px; }
.brand--sm { font-size: 18px; }

/* ---- buttons ---- */
.btn {
  --bg: var(--black); --fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; background: var(--bg); color: var(--fg);
  font-weight: 800; font-size: 16px; letter-spacing: .01em; border: 2px solid var(--bg);
  border-radius: var(--radius); position: relative; isolation: isolate; overflow: hidden;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn .icon { width: 20px; height: 20px; transition: transform var(--t) var(--ease); }
.btn:hover .icon { transform: translateX(-4px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--yellow { --bg: var(--yellow); --fg: var(--black); }
.btn--yellow:hover { --bg: var(--black); --fg: var(--yellow); }
.btn--dark:hover { --bg: var(--yellow); --fg: var(--black); border-color: var(--black); }
.btn--line { background: transparent; color: currentColor; border-color: currentColor; }
.btn--line:hover { background: var(--black); color: var(--yellow); border-color: var(--black); }
.btn--line-dark { background: transparent; color: var(--black); border-color: var(--black); }
.btn--line-dark:hover { background: var(--black); color: var(--white); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.btn--wa { --bg: var(--wa); --fg: #062b14; font-size: 18px; }
.btn--wa:hover { --bg: var(--wa-deep); --fg: var(--white); }
.btn--wa .icon { width: 26px; height: 26px; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }

.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--radius); transition: background var(--t-fast), color var(--t-fast); position: relative; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn--line { border: 2px solid currentColor; }
.icon-btn--line:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.icon-btn[aria-pressed="true"] { background: var(--black); color: var(--yellow); }

.link-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--yellow); }
.link-btn .icon { width: 17px; height: 17px; }
.link-btn:hover { color: var(--gray-600); }
.link-btn--muted { color: var(--gray-500); text-decoration-color: var(--gray-300); }
.link-btn--center { display: flex; justify-content: center; margin-top: 12px; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--gray-300); background: var(--white); font-size: 14px; font-weight: 600; border-radius: 999px; transition: all var(--t-fast); }
.chip:hover { border-color: var(--black); }
.chip.is-on { background: var(--black); color: var(--yellow); border-color: var(--black); }
.chip--ghost { background: transparent; }

.pill { display: inline-flex; align-items: center; padding: 2px 10px; background: var(--black); color: var(--yellow); font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.pill--ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-300); }

.badge { position: absolute; z-index: 3; top: 10px; inset-inline-start: 10px; font-family: var(--f-display); font-size: 15px; letter-spacing: .08em; padding: 3px 9px 1px; line-height: 1.2; }
.badge--sale { background: var(--yellow); color: var(--black); box-shadow: 2px 2px 0 var(--black); }
.badge--out { inset-inline-start: auto; inset-inline-end: 10px; background: var(--black); color: var(--white); font-family: var(--f-body); font-size: 11px; letter-spacing: 0; font-weight: 700; padding: 4px 8px; }
.badge--lg { font-size: 20px; padding: 4px 12px 2px; top: 18px; inset-inline-start: 18px; }

.price { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 800; }
.price s { font-weight: 500; color: var(--gray-500); font-size: .85em; }
.price--sale > .price-num:first-child { background: var(--yellow); color: var(--black); padding: 0 6px; }

.eyebrow { display: inline-block; font-family: var(--f-display); font-size: 18px; letter-spacing: .14em; padding: 4px 10px 2px; background: var(--black); color: var(--yellow); }
.eyebrow--dark { background: var(--black); color: var(--yellow); }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: inherit; opacity: .75; }
.crumbs a:hover { text-decoration: underline; }

.section-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 28px; }
.section-head__en { font-family: var(--f-display); font-size: 18px; letter-spacing: .2em; color: var(--gray-500); }
.section-head h2 { font-family: var(--f-display-he); font-weight: 700; font-size: clamp(40px, 5vw, 64px); line-height: .95; }

.page-head { padding: 40px 0 28px; }
.page-head__en { font-family: var(--f-display); font-size: 18px; letter-spacing: .2em; color: var(--gray-500); display: block; }
.page-head h1 { font-family: var(--f-display-he); font-weight: 700; font-size: clamp(48px, 7vw, 84px); line-height: .9; }
.page-head p { color: var(--gray-600); margin-top: 8px; }

.note { background: var(--gray-100); border-inline-start: 4px solid var(--gray-400); padding: 12px 14px; font-size: 14px; color: var(--gray-700); }
.note--demo { border-color: var(--yellow); background: #FFF8D6; }
.note strong { display: block; }
.ph-flag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--black); background: var(--yellow-soft); padding: 1px 6px; margin-inline-start: 4px; vertical-align: middle; }

/* ---- fields ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 700; }
.field > span i { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  min-height: 50px; padding: 10px 14px; border: 2px solid var(--gray-300); background: var(--white);
  border-radius: var(--radius); font-size: 16px; transition: border-color var(--t-fast), box-shadow var(--t-fast); width: 100%;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px var(--yellow); }
.field.has-error input { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 13px; font-weight: 600; min-height: 0; }
.field__error:empty { display: none; }
input[dir="ltr"] { text-align: left; }
input[dir="ltr"]::placeholder { text-align: left; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 44px; height: 24px; background: var(--gray-300); border-radius: 99px; position: relative; transition: background var(--t-fast); }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; background: var(--white); border-radius: 50%; transition: transform var(--t) var(--ease); }
.switch input:checked + span { background: var(--black); }
.switch input:checked + span::after { transform: translateX(-20px); background: var(--yellow); }
.switch input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---- qty ---- */
.qty { display: inline-flex; align-items: center; border: 2px solid var(--black); height: 56px; }
.qty button { width: 46px; height: 100%; display: grid; place-items: center; }
.qty button:hover { background: var(--yellow); }
.qty output { min-width: 36px; text-align: center; font-weight: 800; font-size: 18px; }
.qty--sm { height: 40px; }
.qty--sm button { width: 36px; }
.qty .icon { width: 18px; height: 18px; }

/* ---- states ---- */
.empty-state { min-height: 56vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding-block: 60px; }
.empty-state h1 { font-family: var(--f-display-he); font-size: 64px; line-height: 1; }
.empty-state p { color: var(--gray-600); }
.empty-state__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.empty-state__hanger { width: 120px; height: 90px; position: relative; }
.empty-state__hanger::before { content: ""; position: absolute; inset: 30px 0 0; border: 6px solid var(--black); border-bottom-width: 6px; clip-path: polygon(50% 0, 100% 70%, 100% 100%, 0 100%, 0 70%); background: var(--yellow); }
.empty-state__hanger::after { content: ""; position: absolute; top: 0; left: 50%; width: 22px; height: 32px; border: 6px solid var(--black); border-bottom: 0; border-radius: 14px 14px 0 0; transform: translateX(-50%); }

.boot { min-height: 70vh; display: grid; place-content: center; gap: 18px; justify-items: center; }
.boot .brand { font-size: 56px; }
.boot__bar { width: 160px; height: 4px; background: var(--gray-200); position: relative; overflow: hidden; }
.boot__bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--yellow); animation: boot 1s var(--ease) infinite; }
@keyframes boot { from { transform: translateX(100%); } to { transform: translateX(-250%); } }

#main { min-height: 60vh; outline: none; }
#main.is-entering { animation: enter .45s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---- shirt media (real photo or drawn placeholder) ----
   The outer box is always square, so every product occupies the same space everywhere.
   The inner box takes the photo's own aspect ratio (contain), and the print layer sits on that inner box,
   so name/number coordinates are always relative to the photo itself. */
.shirt-media { position: relative; width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.shirt-media__box { --ar: 1; position: relative; width: min(100%, calc(100% * var(--ar))); aspect-ratio: var(--ar); }
.shirt-media__box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.shirt-media__box > .shirt-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Product photos are transparent cut-outs (tools/remove-background.py). On light mats we also multiply, so a photo
   uploaded with a plain white backdrop still blends in until it is processed. */
.exhibit__mat .shirt-media.has-image .shirt-media__box > img,
.thumb .shirt-media.has-image .shirt-media__box > img,
.cart-item__media .shirt-media.has-image .shirt-media__box > img,
.mini-list__media .shirt-media.has-image .shirt-media__box > img,
.search-hit .shirt-media.has-image .shirt-media__box > img { mix-blend-mode: multiply; }
.print-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.shirt-media__tag { position: absolute; bottom: 2%; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; color: rgba(0,0,0,.6); background: rgba(255,255,255,.8); padding: 1px 7px; border-radius: 99px; opacity: 0; transition: opacity var(--t); pointer-events: none; }

/* ---- flags ---- */
.flag { display: inline-block; width: 24px; height: 18px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.2); flex: none; vertical-align: middle; }
.flag--sm { width: 18px; height: 13.5px; }
.flag--md { width: 30px; height: 22.5px; }
.flag--lg { width: 40px; height: 30px; }

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