/* ==========================================================
   NOTFUNIE — shared components
   ========================================================== */

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 1px solid rgba(92, 217, 255, .6); color: #fff; font: 600 .95rem/1 var(--f-body); letter-spacing: -.005em; white-space: nowrap;
  background: linear-gradient(180deg, #3aa4ff 0%, var(--primary-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 0 0 1px rgba(40, 150, 255, .25), 0 10px 30px -8px rgba(40, 150, 255, .6);
  transition: transform .2s var(--ease), box-shadow .25s, filter .25s, background .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px rgba(92, 217, 255, .4), 0 14px 36px -8px rgba(40, 150, 255, .75); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg.arr { transform: translateX(3px); }
.btn--glass { background: var(--glass-2); border-color: var(--border-2); color: var(--fg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn--glass:hover { background: rgba(255, 255, 255, .11); border-color: rgba(92, 217, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn--lg { min-height: 54px; padding-inline: 28px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.link { color: var(--ice); font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; padding-bottom: 2px; transition: background-size .3s var(--ease); }
.link:hover { background-size: 100% 1.5px; }

/* ---------- Glass, pills, statuses ---------- */
.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 28px rgba(150, 200, 255, .03); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(40, 150, 255, .1); border: 1px solid rgba(92, 217, 255, .22); color: var(--ice); font: 600 .72rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 10px var(--ice); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; font: 600 .72rem/1 var(--f-body); letter-spacing: .02em; backdrop-filter: blur(6px); background: rgba(4, 8, 16, .65); border: 1px solid var(--border-2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.status--ok { --c: var(--ok); color: #aef3d2; }
.status--updating { --c: var(--warn); color: #ffe2a0; }
.status--soon { --c: var(--primary); color: #b5dcff; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: rgba(40, 150, 255, .18); border: 1px solid rgba(92, 217, 255, .3); color: var(--ice); font: 600 .68rem/1.3 var(--f-body); letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Header ---------- */
.announce { background: linear-gradient(90deg, rgba(12, 60, 140, .55), rgba(40, 150, 255, .35), rgba(12, 60, 140, .55)); border-bottom: 1px solid var(--border); }
.announce__in { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 38px; padding-block: 6px; font-size: .84rem; font-weight: 500; flex-wrap: wrap; text-align: center; }
.code-chip { padding: 2px 10px; border-radius: 8px; border: 1px dashed rgba(92, 217, 255, .6); color: var(--ice); font: 700 .78rem var(--f-body); letter-spacing: .06em; transition: background .2s; }
.code-chip:hover { background: rgba(92, 217, 255, .16); }
#header { position: sticky; top: 0; z-index: 80; }
.site-header { height: var(--header-h); border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.site-header.scrolled { background: rgba(4, 8, 16, .78); backdrop-filter: blur(14px); border-color: var(--border); }
.site-header__in { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--f-head); letter-spacing: -.02em; justify-self: start; }
.brand__mark { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(40, 150, 255, .6)); }
.nav { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(12, 60, 140, .28); border: 1px solid var(--border-2); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.nav__link { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-size: .88rem; font-weight: 600; transition: color .2s, background .25s; }
.nav__link:hover { color: var(--fg); background: rgba(255, 255, 255, .07); }
.nav__link[aria-current="page"] { color: var(--ice); background: rgba(40, 150, 255, .22); box-shadow: inset 0 0 0 1px rgba(92, 217, 255, .28); }
.head-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--border-2); transition: background .2s, border-color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .11); border-color: rgba(92, 217, 255, .45); }
.icon-btn svg { width: 19px; height: 19px; }
.count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font: 700 .68rem/19px var(--f-body); text-align: center; box-shadow: 0 0 12px rgba(40, 150, 255, .7); }
.count[data-n="0"] { display: none; }
.icon-btn.bump .count { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.4); } }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .site-header__in { grid-template-columns: 1fr auto; }
  .menu-toggle { display: inline-grid; }
  .nav { position: absolute; top: calc(100% + 6px); left: var(--gutter); right: var(--gutter); flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 20px; background: rgba(7, 13, 26, .97); transform: translateY(-8px) scale(.98); opacity: 0; visibility: hidden; transition: transform .3s var(--ease), opacity .25s, visibility 0s .3s; }
  .nav.open { transform: none; opacity: 1; visibility: visible; transition: transform .3s var(--ease), opacity .25s, visibility 0s; }
  .nav__link { padding: 14px 16px; font-size: 1rem; border-radius: 14px; }
}

/* ---------- Section headings ---------- */
.sec-head { max-width: 660px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.sec-head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; margin: 18px 0 14px; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Generated product visual ---------- */
.tone-blue  { --a: #050f26; --b: #0c3c8c; --c: #5cd9ff; }
.tone-cyan  { --a: #041a22; --b: #0a6b7d; --c: #8af3ff; }
.tone-teal  { --a: #04201a; --b: #0d6b52; --c: #7cf5c8; }
.tone-amber { --a: #1c1004; --b: #8a4a0a; --c: #ffcb6b; }
.art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, var(--a) 0%, var(--b) 130%); isolation: isolate; }
.art svg, .art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.art img { object-fit: cover; }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(4, 8, 16, .75)); pointer-events: none; }
.art .status { position: absolute; top: 12px; left: 12px; z-index: 2; }
.art--mini { width: 64px; height: 64px; aspect-ratio: 1; border-radius: 12px; flex: none; border: 1px solid var(--border-2); }
.art--mini::after { display: none; }

/* ---------- Product card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.card:hover { transform: translateY(-5px); border-color: rgba(92, 217, 255, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 22px 50px -18px rgba(40, 150, 255, .55); }
.card .art svg { transition: transform .8s var(--ease); }
.card:hover .art svg { transform: scale(1.06); }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__body h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.card__cat { font-size: .78rem; color: var(--faint); }
.card__rate { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.card__rate b { color: #ffc24b; font-weight: 700; }
.card__price { margin-top: auto; padding-top: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card__price small { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.card__price b { font: 800 1.4rem/1 var(--f-head); letter-spacing: -.02em; }

/* ---------- FAQ accordion ---------- */
.acc { display: grid; gap: 10px; }
.acc details { border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025)); border: 1px solid var(--border); transition: border-color .25s, background .25s; }
.acc details[open] { border-color: rgba(92, 217, 255, .4); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font: 600 1.02rem/1.3 var(--f-head); letter-spacing: 0; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--ice), var(--ice)) center / 100% 2px no-repeat, linear-gradient(var(--ice), var(--ice)) center / 2px 100% no-repeat; transition: transform .3s var(--ease); }
.acc details[open] summary::after { transform: rotate(135deg); }
.acc .ans { padding: 0 22px 20px; color: var(--muted); animation: ans .35s var(--ease); }
.acc .ans a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; }
@keyframes ans { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field label.lbl { display: block; margin-bottom: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.input { width: 100%; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border-2); color: var(--fg); transition: border-color .2s, box-shadow .2s, background .2s; }
.input::placeholder { color: var(--faint); }
.input:focus-visible { outline: 0; border-color: var(--ice); box-shadow: 0 0 0 4px rgba(40, 150, 255, .2); background: rgba(255, 255, 255, .06); }
.field .hint { display: block; margin-top: 6px; font-size: .82rem; color: var(--faint); }
.field .err { display: none; margin-top: 6px; font-size: .84rem; font-weight: 600; color: var(--danger); }
.field[data-invalid] .input { border-color: var(--danger); }
.field[data-invalid] .err { display: block; }
.promo { display: flex; gap: 10px; margin: 18px 0 8px; }
.promo .input { padding-block: 11px; text-transform: uppercase; letter-spacing: .05em; }
.promo .btn { min-height: 46px; }

.opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 16px; margin-bottom: 10px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--border-2); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.opt:hover { background: rgba(255, 255, 255, .06); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .l { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.opt .dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; transition: border-color .2s; }
.opt .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 8px var(--ice); transform: scale(0); transition: transform .25s var(--ease); }
.opt:has(input:checked) { border-color: var(--ice); background: rgba(40, 150, 255, .14); box-shadow: 0 0 0 3px rgba(40, 150, 255, .14); }
.opt:has(input:checked) .dot { border-color: var(--ice); }
.opt:has(input:checked) .dot::after { transform: scale(1); }
.opt:has(input:focus-visible) { outline: 2px solid var(--ice); outline-offset: 3px; }
.opt.off { opacity: .5; cursor: not-allowed; }
.opt .sub { display: block; font-size: .82rem; font-weight: 400; color: var(--faint); }
.opt .price { font: 700 1.1rem var(--f-head); }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: .92rem; color: var(--muted); }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; border: 1.5px solid var(--faint); background: rgba(255, 255, 255, .04); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s var(--ease); }
.check input:checked { background: var(--primary); border-color: var(--ice); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; }
.qty { display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid var(--border-2); background: rgba(255, 255, 255, .04); }
.qty button { width: 32px; height: 32px; font-size: 1.05rem; color: var(--muted); transition: color .2s, background .2s; }
.qty button:hover { color: var(--fg); background: rgba(255, 255, 255, .08); }
.qty output { min-width: 28px; text-align: center; font-size: .88rem; font-weight: 600; }

/* ---------- Summary & lines ---------- */
.panel { padding: clamp(20px, 3vw, 28px); }
.panel h2, .panel h3 { font-size: 1.25rem; margin-bottom: 4px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.line:last-child { border-bottom: 0; }
.line h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.line .meta { margin-top: 2px; font-size: .82rem; color: var(--faint); }
.line .ctl { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.line .rm { font-size: .78rem; font-weight: 600; color: var(--faint); transition: color .2s; }
.line .rm:hover { color: var(--danger); }
.line .amt { font: 700 1rem var(--f-head); }
.sums { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.sum { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--muted); font-size: .94rem; }
.sum.disc { color: var(--ok); }
.sum.total { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--fg); font: 800 1.45rem var(--f-head); }

/* ---------- Cart drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 110; background: rgba(2, 4, 10, .66); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.scrim.open { opacity: 1; visibility: visible; transition: opacity .3s, visibility 0s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(430px, 100%); display: flex; flex-direction: column; background: var(--bg-2); border-left: 1px solid var(--border-2); box-shadow: -30px 0 80px rgba(0, 0, 0, .5); transform: translateX(102%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; }
.drawer.open { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer__head h2 { font-size: 1.3rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 4px 22px; overscroll-behavior: contain; }
.drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.drawer__foot .sum.total { margin: 0 0 6px; padding: 0; border: 0; }

.empty { padding: clamp(36px, 7vw, 72px) 20px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--border-2); background: var(--glass); }
.empty h2, .empty h3 { margin: 12px 0 8px; }
.empty p { color: var(--muted); max-width: 40ch; margin: 0 auto 22px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 250; transform: translate(-50%, 20px); opacity: 0; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 12px; background: rgba(12, 22, 44, .95); border: 1px solid rgba(92, 217, 255, .4); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(40, 150, 255, .25); font-weight: 600; font-size: .9rem; pointer-events: none; transition: .35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(32px, 6vw, 72px); border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, rgba(12, 60, 140, .12)); }
.foot { display: grid; grid-template-columns: 1.6fr repeat(auto-fit, minmax(140px, 1fr)); gap: 40px 32px; padding-block: 56px 40px; }
.foot p { margin-top: 14px; max-width: 32ch; color: var(--muted); font-size: .92rem; }
.foot h4 { margin-bottom: 14px; font: 700 .78rem var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.foot li + li { margin-top: 9px; }
.foot li a { color: var(--muted); font-size: .94rem; transition: color .2s; }
.foot li a:hover { color: var(--ice); }
.foot-bottom { display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding-block: 20px 28px; border-top: 1px solid var(--border); color: var(--faint); font-size: .82rem; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot { grid-template-columns: 1fr; } }
