/* ── Tokens ── */
:root {
  color-scheme: dark;
  --n-background: oklch(0.13 0.012 260);
  --n-foreground: oklch(0.93 0.008 250);
  --n-card:       oklch(0.18 0.012 250);
  --n-primary:    oklch(0.86 0.01 240);
  --n-primary-fg: oklch(0.14 0.01 260);
  --n-secondary:  oklch(0.22 0.012 250);
  --n-muted:      oklch(0.22 0.01 250);
  --n-muted-fg:   oklch(0.72 0.012 250);
  --n-accent:     oklch(0.28 0.018 250);
  --n-destructive:oklch(0.68 0.2 25);
  --n-success:    oklch(0.78 0.12 160);
  --n-warning:    oklch(0.83 0.12 85);
  --n-info:       oklch(0.75 0.08 240);
  --n-border:     oklch(0.32 0.014 250);
  --n-input:      oklch(0.55 0.014 250);
  --n-ring:       oklch(0.86 0.02 240);
  --grid-line:    oklch(0.86 0.02 240 / 5%);
  --glow:         0 0 48px -12px oklch(0.8 0.04 240 / 35%);
  --font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: Rajdhani, Inter, ui-sans-serif, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Parduotuvės kintamieji */
  --ink:        var(--n-foreground);
  --ink-light:  oklch(0.86 0.012 210);
  --muted:      var(--n-muted-fg);
  --brand:      var(--n-primary);
  --brand-dark: oklch(0.78 0.16 165);
  --on-brand:   var(--n-primary-fg);
  --brand-light:oklch(0.85 0.17 165 / 12%);
  --accent:     var(--n-primary);
  --surface:    var(--n-card);
  --wash:       var(--n-muted);
  --wash-warm:  var(--n-background);
  --border:     var(--n-border);
  --border-hover:var(--n-input);
  --error:      var(--n-destructive);
  --error-bg:   oklch(0.68 0.2 25 / 15%);
  --success:    var(--n-success);
  --success-bg: oklch(0.8 0.17 150 / 14%);
  --warning:    var(--n-warning);
  --warning-bg: oklch(0.83 0.15 80 / 14%);
  --shadow-sm:  0 1px 2px rgba(0,0,0,.35);
  --shadow:     0 1px 3px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.45), 0 2px 4px -2px rgba(0,0,0,.35);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.4);
  --radius:     .5rem;
  --radius-lg:  .5rem;
  --radius-xl:  .75rem;
  --transition: 150ms ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--wash-warm);
  color: var(--ink);
  font: 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.15; color: var(--ink); margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
h1 { font-size: clamp(1.85rem, 4.5vw, 2.75rem); font-weight: 600; }
h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }

/* ── Links ── */
a { color: var(--brand); text-underline-offset: .2em; transition: color var(--transition); }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--n-ring); outline-offset: 3px; border-radius: 2px; }

/* ── Skip link ── */
.skip-link { position: absolute; top: -5rem; left: 1rem; padding: .75rem 1rem; background: var(--surface); color: var(--brand); z-index: 100; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.skip-link:focus { top: 1rem; }

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 0 max(1.25rem, calc((100% - 78rem) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  height: 4.25rem;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.site-header.is-scrolled {
  background: color-mix(in oklab, #07080c 72%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.brand {
  font-size: 1.15rem; font-weight: 600; text-decoration: none;
  color: var(--ink); letter-spacing: .16em; text-transform: uppercase;
  font-family: var(--font-display);
  display: flex; align-items: center; gap: .55rem; flex: none;
}
.brand-mark { border-radius: 6px; }
.nav-drawer { margin-left: auto; }
.nav-toggle {
  display: none; list-style: none; cursor: pointer;
  width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink);
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-drawer[open] .nav-toggle .icon-open { display: none; }
.nav-drawer[open] .nav-toggle .icon-close { display: block; }
.site-nav {
  display: flex; flex-wrap: wrap; gap: .05rem; align-items: center;
}
.site-header nav a, .site-header .nav-logout {
  padding: .45rem .65rem; border-radius: var(--radius);
  text-decoration: none; font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  font-family: var(--font-display);
  color: var(--ink-light); transition: color var(--transition), background var(--transition);
}
.site-header nav a:hover { color: var(--ink); background: transparent; }
.site-header form { margin: 0; }
.site-header button {
  background: transparent; color: var(--muted); padding: .45rem .65rem;
  border: 0; font-size: .78rem; font-weight: 600; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; transition: all var(--transition);
  letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-display);
}
.site-header button:hover { background: var(--error-bg); color: var(--error); }
.nav-icon-link, .nav-logout { display: inline-flex; align-items: center; gap: .35rem; }
.icon {
  width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex: none; display: inline-block; vertical-align: -0.2em;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Cart badge-style link */
.site-header nav a[href*="krepselis"] {
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   MAIN CONTAINER
   ═══════════════════════════════════════════════════════ */
.container {
  width: min(78rem, calc(100% - 2rem));
  margin: 2rem auto;
  min-height: 60vh;
  padding: 0 .25rem;
}

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  min-height: min(92vh, 56rem);
  width: 100vw;
  max-width: 100vw;
  margin: -2rem calc(50% - 50vw) 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(6rem, 12vw, 10rem) max(1.5rem, calc((100vw - 78rem) / 2)) clamp(3rem, 8vw, 5.5rem);
  border-radius: 0;
  background: transparent;
  border: 0; box-shadow: none;
  color: var(--ink);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 58% 52% at 22% 72%, rgba(2, 3, 5, .82) 0%, rgba(2, 3, 5, .42) 46%, transparent 74%),
    linear-gradient(90deg, rgba(2, 3, 5, .55) 0%, rgba(2, 3, 5, .12) 42%, transparent 68%);
}
.hero > * { position: relative; z-index: 1; }
.hero::after { display: none; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  max-width: 14ch; line-height: .95; color: var(--ink);
  margin-bottom: 1rem; font-weight: 600;
}
.hero p { color: var(--ink-light); font-size: 1.15rem; max-width: 42ch; margin-bottom: 1.5rem; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); }
.hero .eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); font-family: var(--font-display);
  margin-bottom: 1rem;
}
.hero .button {
  display: inline-flex; width: auto; align-self: flex-start;
  background: var(--brand); color: var(--on-brand);
  padding: .8rem 1.5rem; font-weight: 700; font-size: 1rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: all var(--transition);
}
.hero .button:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hero .hs-actions { margin-top: 0; align-items: center; }
.hero.hs-align-center .hs-actions, .hero.hs-align-center .button { justify-content: center; align-self: center; }
.hero.hs-align-right .hs-actions { justify-content: flex-end; }
.hero.hs-align-right .button { align-self: flex-end; }
.hero .hs-actions a:not(.button) { color: var(--ink-light); text-decoration: underline; font-weight: 500; }
.hero .hs-actions a:not(.button):hover { color: var(--brand); }

/* ═══════════════════════════════════════════════════════
   SECTION HEADINGS
   ═══════════════════════════════════════════════════════ */
.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-family: var(--font-display);
}
.section-heading {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; margin: 2.5rem 0 1.25rem;
}
.section-heading h2 { margin: .1rem 0; }
.section-heading .eyebrow { margin: 0 0 .25rem; }
.section-heading > a {
  font-weight: 600; font-size: .9rem; white-space: nowrap;
  color: var(--brand); text-decoration: none;
}
.section-heading > a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.25rem; border: 0; border-radius: var(--radius);
  background: var(--brand); color: var(--on-brand);
  font: inherit; font-size: .9rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.button:hover, button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.button:active, button:active { transform: translateY(0); }
.btn-danger { background: oklch(0.5 0.19 25); color: #fff; }
.btn-danger:hover { background: oklch(0.44 0.18 25); }
.button-secondary { background: var(--wash); color: var(--ink-light); box-shadow: none; border: 1px solid var(--border); }
.button-secondary:hover { background: var(--border); color: var(--ink); border-color: var(--border-hover); }
.button-danger { background: oklch(0.5 0.19 25); color: #fff; }
.button-danger:hover { background: oklch(0.44 0.18 25); }

/* ═══════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; background: var(--surface);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ── Category cards ── */
.category-card { max-width: none; }
.category-card h3 { margin-top: 0; }
.category-card h3 a { text-decoration: none; color: var(--ink); }
.category-card h3 a:hover { color: var(--brand); }
.category-card p { color: var(--muted); font-size: .92rem; }
.text-link {
  font-weight: 600; font-size: .9rem; color: var(--brand);
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* ── Product cards ── */
.product-card {
  display: flex; flex-direction: column; align-items: stretch;
  max-width: none; padding: 0; overflow: hidden;
}
.product-card-img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: var(--wash); border-bottom: 1px solid var(--border);
}
.product-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.product-card-title {
  font-size: 1.05rem; font-weight: 700; text-decoration: none;
  color: var(--ink); display: block; margin-bottom: .35rem;
}
.product-card-title:hover { color: var(--brand); }
.product-description {
  color: var(--muted); font-size: .88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: .75rem;
}
.product-price {
  margin-top: auto; font-size: 1.2rem; font-weight: 800;
  color: var(--brand-dark); padding: .25rem 0 .5rem;
}
.product-card form { margin-top: auto; }
.product-card button {
  width: 100%; padding: .7rem; border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px);
  font-weight: 600;
}
/* product cards without .product-card-body wrapper (existing templates) */
.product-card > .product-card-title { padding: 1.25rem 1.25rem 0; }
.product-card > .product-description { padding: 0 1.25rem; }
.product-card > .product-price { padding: 0 1.25rem .5rem; }
.product-card > form { padding: 0; }

.home-products { margin-top: 3rem; }

/* ═══════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════ */
.form-card {
  max-width: 28rem; margin: 2rem auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; background: var(--surface); box-shadow: var(--shadow);
}
.form-card h1 { text-align: center; margin-bottom: 1.5rem; }
.form-card form { display: grid; gap: .75rem; }
.form-card label { font-size: .88rem; font-weight: 600; color: var(--ink-light); }
.form-card a { display: block; text-align: center; margin-top: .75rem; font-size: .9rem; }

input, select, textarea {
  width: 100%; padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; font-size: .95rem;
  background: var(--surface); color: var(--ink);
  transition: all var(--transition);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.85 0.17 165 / 20%);
  outline: none;
}
textarea { min-height: 8rem; resize: vertical; }
input[type="number"] { width: 5rem; text-align: center; }

.field-error { color: var(--error); font-size: .82rem; font-weight: 500; }

/* ═══════════════════════════════════════════════════════
   NOTICES & ERRORS
   ═══════════════════════════════════════════════════════ */
.notice {
  padding: .85rem 1.25rem; margin: 0 0 1.5rem;
  background: var(--success-bg); color: var(--success);
  border-left: 4px solid var(--success);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500; font-size: .92rem;
}
.error:not(span) {
  padding: .85rem 1.25rem; margin: 0 0 1.5rem;
  background: var(--error-bg); color: var(--error);
  border-left: 4px solid var(--error);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500; font-size: .92rem;
}
span.error, span.field-error { padding: 0; margin: 0; background: none; border: 0; }

/* ═══════════════════════════════════════════════════════
   CATALOG FILTERS
   ═══════════════════════════════════════════════════════ */
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem .85rem;
  padding: 1.25rem; margin-bottom: 2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.filters label { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.filters input, .filters select { margin-top: .2rem; }
.filters button {
  grid-column: 1 / -1; margin-top: .5rem;
  padding: .7rem; font-weight: 600;
}

/* ── Product detail page ── */
.product-detail {
  max-width: 44rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--n-card) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.product-detail-img {
  max-width: 100%; height: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border); margin-bottom: 1.5rem;
}

/* ── Pagination ── */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 1rem; padding: 2rem 0 .5rem;
}
.pagination a {
  padding: .5rem 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; font-weight: 600; font-size: .9rem;
  transition: all var(--transition);
}
.pagination a:hover { background: var(--wash); border-color: var(--border-hover); }
.pagination span { color: var(--muted); font-size: .9rem; }

/* ═══════════════════════════════════════════════════════
   CART TABLE
   ═══════════════════════════════════════════════════════ */
table {
  width: 100%; border-collapse: collapse; text-align: left;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
}
th, td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
thead th {
  background: var(--wash); color: var(--muted);
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--wash-warm); }
tbody td a { font-weight: 600; }

/* Cart-specific */
td form { display: inline-flex; align-items: center; gap: .4rem; }
td button { padding: .4rem .65rem; font-size: .82rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════════════
   CHECKOUT & ORDER PAGES
   ═══════════════════════════════════════════════════════ */
.checkout-summary {
  max-width: 36rem; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow);
}
.checkout-summary ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checkout-summary li {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 0; border-bottom: 1px solid var(--border);
  font-size: .95rem;
}
.checkout-summary li:last-child { border-bottom: 0; }

/* Order info cards */
.order-info {
  max-width: 40rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.order-info h1 { margin-bottom: 1rem; }
.order-info p { color: var(--ink-light); }

/* Bank transfer details */
.bank-details {
  display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem;
  padding: 1.25rem; margin: 1rem 0;
  background: var(--wash); border-radius: var(--radius);
  font-size: .95rem;
}
.bank-details dt { font-weight: 600; color: var(--muted); }
.bank-details dd { margin: 0; font-weight: 500; }

/* ═══════════════════════════════════════════════════════
   ACCOUNT PAGES
   ═══════════════════════════════════════════════════════ */
.account-nav {
  display: flex; gap: .5rem; margin-bottom: 2rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.account-nav a {
  padding: .5rem .85rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: .9rem;
  color: var(--muted);
}
.account-nav a:hover, .account-nav a.active {
  background: var(--brand-light); color: var(--brand-dark);
}

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; color: var(--muted);
  padding: 3rem 1rem; font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  margin-top: 4rem;
  padding: 2rem max(1.25rem, calc((100% - 78rem) / 2));
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 1.5rem;
  background: color-mix(in oklab, #07080c 55%, transparent);
  border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--muted);
  letter-spacing: .04em;
}
.footer-credits { width: 100%; margin: 0; font-size: .78rem; opacity: .85; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer nav a {
  color: var(--muted); text-decoration: none; font-weight: 500;
}
.site-footer nav a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════
   SEARCH FORM (reusable)
   ═══════════════════════════════════════════════════════ */
.search-form {
  display: flex; gap: .75rem; align-items: end; max-width: 36rem;
}
.search-form label { flex: 1; }

/* ═══════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════ */
dt { font-weight: 700; }
dd { margin: 0 0 .8rem; }
article { max-width: 52rem; }
.back-link { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; margin-bottom: 1rem; }

/* Status pills */
.status-pill {
  display: inline-block; padding: .2rem .6rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.status-active, .status-paid { background: var(--success-bg); color: var(--success); }
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-failed, .status-cancelled, .status-refunded, .status-inactive { background: var(--error-bg); color: oklch(0.78 0.14 25); }
.status-fulfilled { background: oklch(0.75 0.13 230 / 15%); color: var(--n-info); }
.status-danger { background: var(--error-bg); color: oklch(0.78 0.14 25); }
.count-summary { font-size: .88rem; color: var(--muted); margin-top: .25rem; }
.message-preview { max-width: 20rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-drawer { position: static; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .75rem 1rem 1.25rem;
    background: color-mix(in oklab, #07080c 88%, transparent);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
  }
  .nav-drawer[open] .site-nav { display: flex; }
  .site-header nav a, .site-header .nav-logout { padding: .75rem .5rem; font-size: .9rem; }
  .site-header form { width: 100%; }
  .site-header button { width: 100%; justify-content: flex-start; }
}
@media (max-width: 700px) {
  .site-header { height: 3.75rem; padding: 0 1rem; }
  .container { margin: 1rem auto; }
  .hero { min-height: 78vh; padding: 5.5rem 1.25rem 2.5rem; }
  .hero .hs-actions { flex-direction: column; align-items: stretch; }
  .hero .button { width: 100%; align-self: stretch; }
  .filters { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .search-form { flex-direction: column; align-items: stretch; }
  th, td { padding: .6rem .65rem; font-size: .9rem; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
}

/* ═══════════════════════════════════════════════════════
   FORM PAGE LAYOUT
   ═══════════════════════════════════════════════════════ */
.form-page {
  min-height: calc(100vh - 12rem);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3rem 1rem 4rem;
}
.form-card {
  width: 100%; max-width: 28rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem 2.25rem; background: var(--surface); box-shadow: var(--shadow);
}
.form-card-header { margin-bottom: 1.5rem; }
.form-card-header h1 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .4rem; }
.form-card-header p { margin: 0; }
.form-card form { display: grid; gap: .75rem; }
.form-card-footer {
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; gap: .5rem; align-items: center;
  font-size: .9rem; color: var(--muted);
}
.form-card-footer .separator { color: var(--border); }
.form-card-danger { border-color: var(--n-destructive); }

.form-error {
  padding: .85rem 1.25rem; margin: 0 0 1rem;
  background: var(--error-bg); color: var(--error);
  border-left: 4px solid var(--error);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500; font-size: .92rem;
}

.button-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════
   NOTICE VARIANTS
   ═══════════════════════════════════════════════════════ */
.notice-warning {
  background: var(--warning-bg); color: var(--warning);
  border-left-color: var(--warning);
}
.notice-danger {
  background: var(--error-bg); color: var(--error);
  border-left-color: var(--error);
}

/* ═══════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════ */
.error-page {
  min-height: calc(100vh - 14rem);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1rem;
  gap: 1rem;
}
.error-code {
  font-size: 5rem; font-weight: 900; line-height: 1;
  color: var(--border); margin: 0;
  font-variant-numeric: tabular-nums;
}
.error-page h1 { margin: 0; font-size: 1.5rem; }
.error-page p { margin: 0; }

/* ═══════════════════════════════════════════════════════
   CONTENT PAGES (privacy, terms, about, payments)
   ═══════════════════════════════════════════════════════ */
.content-page {
  max-width: 46rem; margin: 0 auto;
  padding: 3rem 1rem 5rem;
}
.content-page-header { margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.content-page-header h1 { margin: 0 0 .5rem; }
.content-section { margin-bottom: 2rem; }
.content-section h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .75rem; }
.lead { font-size: 1.1rem; color: var(--ink-light); margin: 0; }

/* Didesnio kontrasto režimas ir judesio mažinimas */
@media (prefers-contrast: more) {
  :root { --border: oklch(0.58 0.02 220); --border-hover: oklch(0.72 0.02 220); --muted: oklch(0.82 0.015 220); --n-ring: oklch(0.97 0.01 190); }
  body { background-image: none; }
  :focus-visible { outline-width: 3px; outline-offset: 3px; }
}
@media (forced-colors: active) { :focus-visible { outline: 2px solid Highlight; } }
@media (prefers-reduced-motion: reduce) {
  html { --transition: 600ms ease; }
  .hero, .gate, .form-card, .content-page-header, .error-page, .card, .product-card, .metric, .admin-panel {
    animation-duration: 2.8s !important;
  }
}
code, pre, kbd { font-family: var(--font-mono); }

/* ── Buvę inline stiliai (perkelti dėl griežtos CSP be unsafe-inline) ── */
.u-cat-desc-input { min-width:10rem;min-height:2.5rem;font-size:.88rem; }
.u-img-preview { max-width:16rem;max-height:12rem;border-radius:var(--radius);border:1px solid var(--border);object-fit:cover; }
.u-form-narrow { max-width:28rem; }
.u-thumb { width:3rem;height:3rem;border-radius:var(--radius);object-fit:cover;border:1px solid var(--border); }
.u-mt-075 { margin-top:.75rem; }
.u-cat-name-input { min-width:8rem;font-weight:600; }
.u-thumb-placeholder { display:inline-block;width:3rem;height:3rem;border-radius:var(--radius);background:var(--wash);border:1px solid var(--border);text-align:center;line-height:3rem;font-size:1.2rem;color:var(--muted); }
.u-section-divider { margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--border); }
.u-w-full { width:100%; }
.u-mt-1 { margin-top:1rem; }
.u-cat-slug-input { min-width:7rem;font-size:.88rem;color:var(--muted); }
.u-mt-035 { margin-top:.35rem; }
.u-icon-xl { font-size:3rem; }
.icon-xl { width: 3rem; height: 3rem; }
.icon-lg { width: 2.5rem; height: 2.5rem; }
.u-self-start-mt { justify-self:start;margin-top:.25rem; }
.u-icon-lg { font-size:2.5rem; }
.u-mb-15 { margin-bottom:1.5rem; }
.u-checkout-total { border-top:2px solid var(--border);padding-top:1rem;margin-top:.5rem;display:flex;justify-content:space-between;align-items:center; }
.u-max-w-36 { max-width:36rem; }
.u-total-right { text-align:right;margin-top:1rem; }
.u-text-left { text-align:left; }
.u-price-cell { font-weight:600;white-space:nowrap; }
.u-fw-normal { font-weight:400; }
.u-nowrap { white-space:nowrap; }
.u-cart-total-bar { margin-top:1.5rem;display:flex;justify-content:space-between;align-items:center; }
.u-text-center { text-align:center; }
.u-my-075 { margin:.75rem 0; }
.u-contents { display:contents; }
.u-mt-05 { margin-top:.5rem; }
.u-honeypot { position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden; }
.u-hint-sm { font-size:.82rem;margin-top:.25rem; }
.u-grid-2 { display:grid;grid-template-columns:1fr 1fr;gap:1rem; }
.u-col-thumb { width:3.5rem; }
[hidden] { display: none !important; }

/* Google sign-in button (Google identity branding: white, #747775 border, Roboto-like, G logo) */
.gsi-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 4px; font-family: Roboto, Arial, sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .25px; text-decoration: none; transition: background-color .2s, box-shadow .2s; }
.gsi-button:hover { background: #f8f9fa; color: #1f1f1f; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); }
.gsi-button:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.gsi-icon { display: inline-flex; width: 20px; height: 20px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.gate {
  max-width: none; width: 100vw; position: relative;
  margin: -2rem calc(50% - 50vw) 2rem; text-align: center;
  min-height: min(88vh, 48rem);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 6rem max(1.5rem, calc((100vw - 40rem) / 2)) 4rem;
  background: transparent; border: 0;
}
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 62% 48% at 50% 46%, rgba(2, 3, 5, .8) 0%, rgba(2, 3, 5, .4) 44%, transparent 72%),
    linear-gradient(180deg, rgba(2, 3, 5, .35) 0%, transparent 28%, transparent 68%, rgba(2, 3, 5, .5) 100%);
}
.gate > * { position: relative; z-index: 1; }
.gate h1 { font-size: clamp(2.2rem, 7vw, 4.8rem); max-width: 16ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .55); }
.gate .subtitle, .gate p { text-shadow: 0 1px 16px rgba(0, 0, 0, .5); }
.hero h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, .55); }
.gate-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.gate-actions .button { justify-content: center; }

/* Privačios žinutės */
.chat-badge { display:inline-block; min-width:1.25rem; padding:0 .35rem; margin-left:.25rem; border-radius:999px; background:var(--accent, #3ee8b0); color:#0f1a20; font-size:.75rem; font-weight:700; text-align:center; line-height:1.25rem; }
.chat-pq-note { font-size:.85rem; }
.chat-columns { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1rem; margin-bottom:1rem; }
.chat-panel { padding:1rem 1.25rem; }
.chat-panel:hover { transform:none; }
.chat-search { display:flex; gap:.5rem; margin-bottom:.75rem; }
.chat-search input { flex:1; }
.chat-list { list-style:none; margin:0; padding:0; }
.chat-list li { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.5rem 0; border-bottom:1px solid var(--border); }
.chat-list li:last-child { border-bottom:0; }
.chat-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.chat-messages { max-height:55vh; overflow-y:auto; display:flex; flex-direction:column; gap:.5rem; padding:.25rem 0 1rem; }
.chat-msg { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; max-width:80%; padding:.5rem .75rem; border-radius:12px; border:1px solid var(--border); background:var(--wash); }
.chat-msg-mine { align-self:flex-end; }
.chat-msg-theirs { align-self:flex-start; }
.chat-msg-meta { font-size:.78rem; color:var(--muted); }
.chat-report { background:none; box-shadow:none; color:var(--muted); font-size:.75rem; padding:.1rem .3rem; text-decoration:underline; }
.chat-report:hover { background:none; color:var(--ink); }
.chat-viewer { border:1px solid var(--border); border-radius:12px; padding:1rem; margin-bottom:1rem; text-align:center; }
.chat-viewer-text { white-space:pre-wrap; word-break:break-word; text-align:left; font-size:1.05rem; }
.chat-viewer-img { max-width:100%; max-height:60vh; border-radius:8px; }
.chat-send { display:flex; flex-wrap:wrap; gap:.5rem; align-items:flex-end; border-top:1px solid var(--border); padding-top:1rem; }
.chat-send textarea { flex:1 1 100%; resize:vertical; }
.chat-file { font-size:.9rem; cursor:pointer; }
.chat-send.is-disabled { opacity:.5; }
.chat-intro { margin-bottom:1.5rem; }
.chat-features { margin:1rem 0 0; }
.chat-features .card { padding:1rem 1.25rem; }
.chat-features .card h2 { font-size:1.05rem; margin:0 0 .4rem; }
.chat-features .card p { margin:0; color:var(--ink-light); }
.content-page .chat-intro { margin-top:2rem; padding-top:1.5rem; border-top:1px solid rgba(127,127,127,.25); }
.chat-intro-cta { margin-top:1rem; }
.solana-pay { max-width:40rem; }
.solana-qr { display:block; width:min(320px,100%); height:auto; margin:1rem 0; background:#fff; padding:.5rem; border-radius:8px; image-rendering:pixelated; }
.solana-pay .wallet-addr { word-break:break-all; font-family:monospace; }
.solana-tokens { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:1rem; }
.lang-switch { position:relative; margin-left:.75rem; font-size:.85rem; }
.lang-switch > summary { cursor:pointer; list-style:none; padding:.25rem .55rem; border:1px solid currentColor; border-radius:6px; opacity:.85; white-space:nowrap; user-select:none; display:inline-flex; align-items:center; gap:.35rem; }
.lang-switch > summary::-webkit-details-marker { display:none; }
.lang-switch[open] > summary { opacity:1; }
.lang-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:50; margin:0; padding:.35rem; list-style:none; background:var(--surface, #fff); color:inherit; border:1px solid rgba(127,127,127,.35); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.18); display:grid; grid-template-columns:repeat(2, minmax(9.5rem, 1fr)); gap:2px; max-height:70vh; overflow:auto; }
.lang-menu a { display:flex; gap:.5rem; padding:.3rem .5rem; border-radius:5px; text-decoration:none; white-space:nowrap; }
.lang-menu a:hover, .lang-menu a:focus-visible { background:rgba(127,127,127,.15); }
.lang-menu a.active { font-weight:700; }
.lang-code { font-family:var(--font-mono); opacity:.65; min-width:1.8rem; }
@media (max-width:600px) { .lang-menu { grid-template-columns:1fr; } }
/* CJK ir devanagari šriftų atsarginės šeimos */
:lang(ja) { font-family: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
:lang(zh) { font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif; }
:lang(hi) { font-family: Inter, "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Kohinoor Devanagari", "Devanagari Sangam MN", system-ui, sans-serif; line-height:1.8; }
:lang(ja) h1, :lang(ja) h2, :lang(zh) h1, :lang(zh) h2, :lang(hi) h1, :lang(hi) h2 { letter-spacing:normal; }
:lang(ja), :lang(zh) { word-break:normal; line-break:strict; overflow-wrap:anywhere; }

/* ── DI ── */
.di-page { display: grid; gap: 1.25rem; max-width: 860px; margin: 0 auto; }
.di-header h1 { margin-bottom: .25rem; }
.di-messages { display: grid; gap: .75rem; max-height: 60vh; overflow-y: auto; margin-bottom: 1rem; }
.di-msg { padding: .75rem 1rem; border-radius: 12px; border: 1px solid var(--n-border, #ddd); }
.di-msg strong { display: block; font-size: .8rem; opacity: .7; margin-bottom: .25rem; }
.di-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.di-user { background: var(--n-secondary, #f3f4f6); }
.di-form textarea { width: 100%; }
.di-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.di-options { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; border: 0; padding: 0; margin: .5rem 0 0; min-width: 0; }
.di-options label { display: grid; gap: .2rem; font-size: .85rem; }
.di-options label.checkbox { display: flex; flex-direction: row; align-items: center; gap: .4rem; white-space: nowrap; min-height: 2.4rem; }
.di-options input[type="checkbox"] { width: auto; margin: 0; flex: none; }
.di-deep-note { flex-basis: 100%; margin: 0; }
.di-sources { margin: .5rem 0 0; padding-left: 1.25rem; font-size: .85rem; }
.di-sources a { overflow-wrap: anywhere; }
.di-error { border-color: #b42318; background: color-mix(in srgb, #b42318 12%, transparent); }
.di-model-tag { display: block; margin-top: .35rem; font-size: .75rem; color: #8a8f98; }
#di-model-status { font-size: .85rem; align-self: center; }

.field-checkbox label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.field-checkbox input[type="checkbox"] { width: auto; margin-top: .25rem; flex: none; }

.withdrawal-form { list-style:none; padding:1rem 1.25rem; border:1px dashed var(--n-border, #2a3a44); border-radius:8px; }
.withdrawal-form li { padding:.35rem 0; border-bottom:1px dotted rgba(255,255,255,.12); }

/* ═══════════════════════════════════════════════════════
   PRADINIO PUSLAPIO KONSTRUKTORIUS (admin sekcijos)
   ═══════════════════════════════════════════════════════ */
.home-page > .home-products,
.home-page > .hs-text,
.home-page > .hs-html,
.home-page > .hs-contacts,
.home-page > .hs-features,
.home-page > .hs-media,
.home-page > .hs-row,
.home-page > .hs-promo {
  width: min(78rem, 100%);
  margin-left: auto;
  margin-right: auto;
}
.hs-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; margin: 0 0 2.5rem; align-items: stretch; }
.hs-row > section { grid-column: span 12; margin-top: 0; margin-bottom: 0; }
.hs-row > .hs-w-half { grid-column: span 6; }
.hs-row > .hs-w-third { grid-column: span 4; }
.hs-row > .hs-w-two-thirds { grid-column: span 8; }
.hs-row > .hs-w-quarter { grid-column: span 3; }
.hs-row > section .section-heading { margin-top: 0; }
@media (max-width: 800px) { .hs-row > section { grid-column: span 12 !important; } }
.cards.hs-cols-1 { grid-template-columns: 1fr; }
.cards.hs-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.hs-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.hs-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards.hs-cols-3, .cards.hs-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards.hs-cols-2, .cards.hs-cols-3, .cards.hs-cols-4 { grid-template-columns: 1fr; } }
.hs-align-left { text-align: left; }
.hs-align-center { text-align: center; }
.hs-align-center h1, .hs-align-center h2, .hs-align-center p { margin-left: auto; margin-right: auto; }
.hs-align-center .gate-actions, .hs-align-center .hs-actions { justify-content: center; }
.hs-align-right { text-align: right; }
.hs-align-right h1, .hs-align-right h2, .hs-align-right p { margin-left: auto; }
.hs-bg-plain { background: none; border: 0; box-shadow: none; }
.hs-bg-surface, .hs-bg-accent, .hs-bg-dark { padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius-xl); }
.hs-bg-surface { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.hs-bg-accent { background: color-mix(in oklab, var(--brand) 18%, var(--surface)); border: 1px solid var(--border); }
.hs-bg-dark { background: color-mix(in oklab, #07080c 55%, transparent); color: #e8edf4; }
.hs-bg-dark h1, .hs-bg-dark h2, .hs-bg-dark h3, .hs-bg-dark p { color: #e8edf4; }
.hs-text, .hs-html, .hs-contacts, .hs-features, .hs-media { margin: 2.5rem 0; }
.home-page > .hs-band {
  width: 100vw;
  max-width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: clamp(4.5rem, 11vw, 8.5rem) max(1.5rem, calc((100vw - 72rem) / 2));
  border-top: 1px solid rgba(210, 220, 235, .08);
  background:
    linear-gradient(180deg, rgba(2, 3, 5, .55) 0%, rgba(2, 3, 5, .28) 40%, rgba(2, 3, 5, .6) 100%);
}
.home-page > .hs-band h2 {
  font-size: clamp(1.7rem, 5vw, 3.4rem);
  max-width: 18ch;
  letter-spacing: .08em;
}
.home-page > .hs-band .subtitle,
.home-page > .hs-band > p { max-width: 62ch; color: var(--ink-light); font-size: 1.08rem; }
.home-page > .hs-band .cards { margin-top: 2rem; }
.home-page > .hs-band.hs-align-center h2,
.home-page > .hs-band.hs-align-center .subtitle { margin-left: auto; margin-right: auto; }
.home-page > .hs-contacts.hs-band .hs-contact-list { max-width: 36rem; }
@media (max-width: 700px) {
  .gate::before {
    background:
      radial-gradient(ellipse 90% 42% at 50% 38%, rgba(2, 3, 5, .86) 0%, rgba(2, 3, 5, .5) 52%, transparent 78%);
  }
}
.hs-text p, .hs-contacts p { max-width: 70ch; }
.hs-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.hs-img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-lg); margin: 1rem 0; }
.gate .hs-img { margin-left: auto; margin-right: auto; }
.hs-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.hs-media-img img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.hs-media-right .hs-media-img { order: 2; }
.hs-media.hs-align-right { text-align: left; }
@media (max-width: 800px) { .hs-media { grid-template-columns: 1fr; } .hs-media-right .hs-media-img { order: 0; } }
.hs-html-body img { max-width: 100%; height: auto; }
.hs-promo { margin-top: 2.5rem; }
.hs-contact-list { margin: 1rem 0; }
.announce-bar { padding: .55rem 1rem; text-align: center; font-weight: 600; font-size: .92rem; background: var(--wash); color: var(--ink); border-bottom: 1px solid var(--border); }
.announce-bar a { color: inherit; text-decoration: underline; }
.announce-accent { background: var(--brand); color: var(--on-brand); }
.announce-warning { background: oklch(0.85 0.15 85); color: #1d1a10; }
.brand-logo { display: block; width: auto; height: 24px; max-width: 160px; object-fit: contain; }
.footer-text, .footer-contacts { margin: .25rem 0; color: var(--muted); }
.footer-contacts a, .footer-contacts span { margin-right: 1rem; }
