.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
header.top { background: var(--tin); color: var(--blik); border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--tsian), var(--impuls), var(--urazhennia), var(--tsil), var(--fakel), var(--spalakh)) 1; position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo img { height: 42px; width: auto; }
nav.main { display: flex; gap: 22px; flex: 1; align-items: center; margin-left: 32px; }
nav.main a, .cartlink, .account { text-decoration: none; font: 800 1.1rem var(--font-display); white-space: nowrap; padding: 8px 0; border-bottom: 3px solid transparent; }
nav.main a:hover, nav.main a[aria-current] { border-color: var(--tsil); }
.cartlink { margin-left: 0; }
.cartlink b { display: inline-block; min-width: 1.5em; padding: 0 5px; margin-left: 6px; background: var(--tsil); color: var(--tin); border-radius: var(--radius); text-align: center; }
main { min-height: 60vh; padding-block: 24px 80px; }

.shelf + .shelf { margin-top: 80px; }
.shelf > h1 { margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a, .chips button { padding: 8px 14px; min-width: 46px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--card); cursor: pointer; text-decoration: none; }
.chips [aria-current], .chips [aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips button:disabled { color: var(--muted); opacity: .6; text-decoration: line-through; cursor: not-allowed; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar select { width: auto; }

.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.product .pic { aspect-ratio: 1; background: var(--blik); border-radius: var(--radius); overflow: hidden; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: var(--blik); cursor: pointer; }
.thumbs button[aria-pressed=true] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product .price { font-size: 1.8rem; margin-block: 8px 24px; }
.opt { margin-bottom: 20px; }
.opt > span { display: block; font-weight: 700; margin-bottom: 8px; }
.desc { white-space: pre-line; margin-top: 28px; max-width: 65ch; }

.cart { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.line .pic { width: 84px; height: 84px; background: var(--blik); }
.qty { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty button { width: 32px; height: 32px; border: 1px solid var(--field-line); background: var(--card); cursor: pointer; border-radius: var(--radius); }
.checkout { background: var(--card); border-left: 3px solid var(--accent); padding: 24px; border-radius: var(--radius); }
.radio { display: flex; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
/* підказки Нової пошти стоять у потоці форми: на телефоні їх ніщо не обрізає */
.np-list { margin: -10px 0 16px; max-height: 232px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--card); }
.np-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.np-list button:hover, .np-list button:focus-visible { background: var(--blik); color: var(--tin); }
#np-picked { display: block; margin: -8px 0 16px; }
#np-picked:empty { display: none; }
.empty-state { text-align: center; padding: 64px 0; }
.empty-state .btn { margin-top: 12px; }


.foot { background: var(--foot); border-top: 1px solid var(--line); padding-top: 36px; font-size: .86rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.1fr; gap: 32px; padding-bottom: 28px; }
.foot h2 { font-size: 1rem; color: var(--accent); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot p { margin: 0 0 10px; }
/* емблема — ліва частина фірмового логотипа: біла заливка з темними лініями */
.foot-mark { width: 84px; aspect-ratio: 282 / 216; margin-bottom: 14px; background: url(/brand/logo.svg) left center / auto 100% no-repeat; filter: var(--foot-mark); }
.foot .phone { font: 800 1.25rem/1.2 var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 12px; color: var(--muted); font-size: .8rem; }
.foot-bottom button { background: none; border: 1px solid var(--field-line); border-radius: var(--radius); padding: 5px 11px; cursor: pointer; }
.foot-bottom button:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

@media (max-width: 760px) {
  .product, .cart { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .shelf + .shelf { margin-top: 48px; }
  .shelf > h1 { margin-bottom: 16px; }
}
.thumbs button:has(img.cut) { background: var(--tile); }
.line .pic img.cut { padding: 6px; }
.thumbs img.cut { object-fit: contain; padding: 5px; }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } .foot { padding-top: 40px; } }

/* комплект, іменний друк, промокод */
.addon { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--card); cursor: pointer; max-width: 420px; }
.addon:has(:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.addon input { width: 20px; height: 20px; accent-color: var(--accent); }
.addon span { flex: 1; font-weight: 700; }
.print { display: grid; grid-template-columns: 1fr 110px; gap: 0 12px; max-width: 420px; }
.print input { text-transform: uppercase; }
.pic:has(.jersey) { background: var(--tile); display: grid; place-items: center; }
.jersey { width: 100%; height: 100%; padding: 7%; display: block; }
.line .jersey { padding: 4px; }
.jersey text { fill: #e9e9ec; }
/* прізвище — звичайний UAF Sans Medium, цифри — UAF Sans NameTape */
.jersey .j-name { font: 500 74px var(--font-body); letter-spacing: 2px; }
.jersey .j-num { font: 400 440px 'UAF NameTape', var(--font-body); }
.jersey .hint { fill-opacity: .45; }
.thumbs button.mine { background: var(--tile); color: var(--ink); font-weight: 700; font-size: .85rem; }
.promo { display: flex; gap: 8px; }
.promo input { text-transform: uppercase; }
.sumrow { display: flex; justify-content: space-between; gap: 12px; }

/* фото товару зі стрілками */
.viewer { position: relative; touch-action: pan-y; }
/* на сторінці товару стрілки видно завжди, і на телефоні теж */
.viewer .car-arrow, .viewer .car-arrow:not(:focus-visible) { opacity: .75; visibility: visible; }
.product .price.none { color: var(--muted); font-size: 1.4rem; }
.need { margin: -8px 0 12px; color: var(--muted); font-size: .95rem; }

/* пропозиція товару та соцмережі */
nav.main a.suggest { color: var(--spalakh); }
.idea { max-width: 620px; margin-inline: auto; }
.idea p.lead { font-size: 1.2rem; margin-bottom: 28px; }
.idea textarea { resize: vertical; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-weight: 700; }

/* приховані підменю */
.drop { position: relative; display: flex; align-items: center; }
.drop-btn { display: none; background: none; border: 0; padding: 4px 6px; cursor: pointer; }
.drop-menu { position: absolute; left: -14px; top: 100%; z-index: 20; display: none; min-width: 200px; padding: 8px 0; background: var(--tin); border: 1px solid #343860; box-shadow: 0 14px 30px rgb(5 6 20 / .4); }
nav.main .drop-menu a { display: block; padding: 6px 14px; font: 500 1rem var(--font-body); border: 0; border-left: 3px solid transparent; }
nav.main .drop-menu a:hover { border-color: var(--tsil); background: rgb(255 255 255 / .06); }
.drop.open .drop-menu, .drop:focus-within .drop-menu { display: block; }
@media (hover: hover) { .drop:hover .drop-menu { display: block; } }
@media (hover: none) { .drop-btn { display: block; } .drop:focus-within:not(.open) .drop-menu { display: none; } }
header.top .account { font-size: 1.1rem; }
.findbtn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: none; border: 0; cursor: pointer; }
.findbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* пошук */
#search { width: min(640px, 100% - 24px); margin-top: 8vh; padding: 0; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--card); color: var(--ink); max-height: 76vh; }
#search::backdrop { background: rgb(5 6 20 / .55); backdrop-filter: blur(3px); }
.s-top { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.s-top button { width: 40px; border: 0; background: none; font-size: 1.5rem; cursor: pointer; }
.s-list { display: grid; }
.s-list p { padding: 0 14px; }
.s-list a { display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.s-list a:hover, .s-list a:focus-visible { background: var(--wash); outline-offset: -3px; }
.s-item .pic { flex: none; width: 52px; height: 52px; background: var(--blik); overflow: hidden; }
.s-item > span:nth-child(2) { flex: 1; display: grid; line-height: 1.35; }
.s-list small, .s-cat span { color: var(--muted); font-size: .85rem; }
.s-list em { font-style: normal; font-weight: 700; white-space: nowrap; }

/* стрічка новинок */

/* патч на жилетці */
.product .pic { position: relative; }
.pic img.onpatch, .pic img.onpatch.cut { position: absolute; padding: 0; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .55)); }
.patches { margin-top: 18px; }
.patchlist { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; max-width: 100%; }
.patchlist button { flex: none; display: grid; justify-items: center; gap: 2px; width: 74px; padding: 5px 3px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--tile); cursor: pointer; color: var(--ink); }
.patchlist button.none { align-content: center; background: var(--card); font-size: .8rem; }
.patchlist button[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.patchlist img { width: 54px; height: 42px; object-fit: contain; }
.patchlist small { font-size: .72rem; }
.product > div { min-width: 0; }
.viewer .badges { left: -4px; top: 14px; }

/* кошик: допомога батальйону */
.tip { gap: 8px; }
.small { font-size: .85rem; }

/* кабінет */
.account-page { max-width: 760px; margin-inline: auto; }
.account-page h3 { margin-top: 32px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--card); border-left: 3px solid var(--accent); }
.state { display: inline-block; padding: 2px 10px; border: 1px solid var(--field-line); border-radius: var(--radius); font-size: .85rem; font-weight: 700; }
.state.on { border-color: #0a7f87; color: #0a7f87; }
@media (prefers-color-scheme: dark) { .state.on { border-color: var(--tsian); color: var(--tsian); } }
.order { background: var(--card); border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 12px; }
.order header, .order footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.order header .state { margin-left: auto; }
.order ul { list-style: none; padding: 0; margin: 12px 0; }
.order ul li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .75rem; color: var(--muted); }
.steps li { border-top: 4px solid var(--line); padding-top: 4px; }
.steps li.on { border-color: var(--accent); color: var(--ink); font-weight: 700; }

/* оферта */
.legal { max-width: 72ch; margin-inline: auto; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.3rem; margin-top: 28px; }
.draft { padding: 10px 14px; border: 1px dashed var(--accent); font-weight: 700; }

/* маленькі вікна */
.pop { position: fixed; left: 16px; bottom: 16px; z-index: 40; width: min(340px, 100% - 32px); padding: 16px 18px; background: var(--card); color: var(--ink); border: 1px solid var(--field-line); border-left: 3px solid var(--accent); box-shadow: 0 16px 40px rgb(5 6 20 / .3); font-size: .92rem; animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; translate: 0 12px; } }
.pop p { margin: 0 0 12px; }
.pop-title { font: 800 1.35rem/1.1 var(--font-display); text-transform: uppercase; padding-right: 24px; }
.pop-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* банка і монобаза — в одну лінію */
.pop-x { position: absolute; right: 6px; top: 4px; width: 30px; height: 30px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; }

/* логотип у шапці раз на 10 секунд переливається, як голограма на посвідченні */
.logo { position: relative; display: block; flex: none; isolation: isolate; }
.logo::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: 0;
  -webkit-mask: url(/brand/logo.svg) center / 100% 100% no-repeat; mask: url(/brand/logo.svg) center / 100% 100% no-repeat;
  background: linear-gradient(115deg, #fff 0 18%, #8ff3ff 28%, #b7a6ff 36%, #ff9be0 44%, #ffe79a 52%, #9dffc4 60%, #8fd0ff 68%, #fff 80% 100%);
  background-size: 320% 100%; animation: holo 10s ease-in-out infinite; }
@keyframes holo { 0% { opacity: 0; background-position: 100% 0; } 4% { opacity: 1; } 26% { opacity: 1; } 32%, 100% { opacity: 0; background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .logo::after { display: none; } }

/* 404 */
.lost { text-align: center; padding: 40px 0; max-width: 560px; margin-inline: auto; }
.lost .code { font: 400 clamp(7rem, 28vw, 13rem)/1 'UAF NameTape', var(--font-display); color: var(--accent); margin: 0; }
.lost .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* «Підтримати батальйон» — звичайний пункт меню після напоїв */
.navbtn { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 0; font: 800 1.1rem var(--font-display); white-space: nowrap; cursor: pointer; }
.navbtn:hover { border-color: var(--tsil); }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.linklike:hover { color: var(--accent); }
.nav-account, .burger, nav.main .drop-menu a.drop-all { display: none; }
@media (max-width: 1060px) { nav.main .drop-menu a.drop-all { display: block; } }
#donate, #gone { width: min(380px, 100% - 32px); padding: 22px 22px 20px; background: var(--card); color: var(--ink); border: 1px solid var(--field-line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
#donate::backdrop, #gone::backdrop { background: rgb(5 6 20 / .55); backdrop-filter: blur(3px); }
#donate p, #gone p { margin: 0 0 14px; }

/* вузькі екрани: бургер, логотип, пошук і кошик */
@media (max-width: 1060px) {
  header.top .wrap { gap: 12px; min-height: 60px; flex-wrap: nowrap; }
  .burger { display: grid; flex: none; align-content: center; gap: 4px; width: 36px; height: 36px; margin-left: -6px; padding: 0 7px; background: none; border: 0; cursor: pointer; }
  .burger i { display: block; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .menu-open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .burger i:nth-child(2) { opacity: 0; }
  .menu-open .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  header.top .logo img { height: 30px; }
  header.top #account { display: none; }
  header.top .findbtn { margin-left: auto; }
  header.top .cartlink { font-size: 1.05rem; }
  nav.main { display: none; margin: 0; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100dvh - 63px); overflow-y: auto; padding: 8px 16px 20px; background: var(--tin); border-top: 1px solid #343860; box-shadow: 0 20px 40px rgb(5 6 20 / .45); }
  .menu-open nav.main { display: flex; }
  /* рядки з тонкими лініями, як у таблиці уражень із гайду */
  nav.main > a, nav.main .drop > a, nav.main .navbtn { flex: none; display: block; text-align: left; font-size: 1.15rem; line-height: 24px; padding: 12px 0; border: 0; }
  nav.main > a, nav.main .drop, nav.main .navbtn { flex: none; border-bottom: 1px solid rgb(10 189 198 / .45); }
  nav.main .drop:has([aria-current]), nav.main > a[aria-current] { border-color: var(--tsil); }
  nav.main .drop { display: block; }
  /* підрозділи відкриваються натисканням на весь рядок розділу */
  nav.main .drop-btn { display: flex; justify-content: flex-end; align-items: center; position: absolute; left: 0; right: 0; top: 0; height: 48px; font-size: 1.1rem; color: var(--tsian); }
  nav.main .drop.open .drop-btn { transform: scaleY(-1); }
  nav.main .drop .drop-menu { display: none; position: static; min-width: 0; padding: 0 0 10px; background: none; border: 0; box-shadow: none; }
  nav.main .drop.open .drop-menu { display: block; }
  nav.main .drop-menu a { padding: 8px 0 8px 14px; border: 0; opacity: .85; }
  nav.main > a.nav-account { display: block; margin-top: 24px; padding: 12px; text-align: center; border: 1px solid var(--tsil); }
}
@media (max-width: 400px) { header.top .logo img { height: 26px; } header.top .wrap { gap: 8px; } }

/* назва товару з серцем */
.title-row { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.title-row .fav { flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#favs { margin-top: 48px; }

/* сторінка подяки: звичайна, без окремої великої картинки */
.thanks { max-width: 560px; margin-inline: auto; padding: 40px 0; text-align: center; }
.thanks h1 { font-size: 1.8rem; }
.thanks .sum { font-weight: 700; font-size: 1.3rem; margin: 16px 0 24px; }
.thanks .sum small { display: block; font-weight: 400; font-size: .9rem; color: var(--muted); }
.thanks .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.codes { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 400; font-size: .9rem; }
.codes span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 1px solid #0a7f87; border-radius: var(--radius); }
.codes button { border: 0; background: none; cursor: pointer; color: inherit; }
.ask { margin-top: 20px; margin-bottom: 20px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.ask summary { cursor: pointer; font-weight: 700; }
.ask p { margin: 10px 0; }
/* пастка для ботів: людина цього поля не бачить і не потрапляє на нього клавіатурою */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* «летить у кошик» і світла радість після покупки; без руху, якщо так налаштовано в пристрої */
.fly { position: fixed; z-index: 1000; object-fit: contain; pointer-events: none; }
.cheer { position: relative; width: 84px; height: 84px; margin: 0 auto 8px; }
.cheer svg { width: 100%; height: 100%; fill: none; stroke: #0a7f87; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cheer circle, .cheer path { stroke-dasharray: 1; }
.cheer.play circle { animation: draw 1.1s ease both; }
.cheer.play path { animation: draw .7s .8s ease both; }
.cheer i { position: absolute; left: 38px; top: 38px; width: 8px; height: 8px; border-radius: 50%; background: #e8b94a; opacity: 0; animation: spark 2.2s 1s ease-out both; }
.cheer i:nth-of-type(even) { background: #5fc3c9; }
.cheer-text { font-weight: 700; font-size: 1.15rem; margin: 0 0 8px; }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes spark { 25% { opacity: .75; } to { opacity: 0; translate: var(--x) var(--y); } }
/* донат: суми, своя сума, банка та »Хвиля« */
.donate { display: grid; gap: 8px; }
.donate .chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.donate .chips button { min-width: 0; padding: 8px 2px; white-space: nowrap; font-size: .9rem; }
.donate input { width: 100%; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; }
.donate .btn { text-align: center; justify-content: center; }
.thanks h2 { margin: 36px 0 12px; font-size: 1.3rem; }
.thanks .donate { max-width: 360px; margin-inline: auto; }
.pop-donate { max-height: calc(100dvh - 32px); overflow: auto; }
.donate .btn { white-space: normal; line-height: 1.25; }
