/* Kainometras – be build įrankių. Spalvos pagal logotipą: tamsiai mėlyna + oranžinė. */
:root {
  --navy: #13233F;
  --navy-2: #1E3358;
  --orange: #FF7A2F;
  --orange-d: #E8611A;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --text: #15171C;
  --muted: #5A6170;
  --line: #E3E6EC;
  --green: #0E7A4F;
  --red: #C0352B;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 35, 63, .06), 0 4px 16px rgba(19, 35, 63, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--orange-d); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.top { background: var(--navy); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { font-weight: 800; font-size: 26px; letter-spacing: -1px; color: #fff; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo b { color: var(--orange); }
.logo-o { display: inline-block; width: .66em; height: .66em; margin: 0 .02em; vertical-align: -.04em; overflow: visible; }
.logo-o .arc { color: var(--orange); stroke: var(--orange); }
.search { flex: 1; display: flex; max-width: 640px; }
.search input { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: 10px 0 0 10px; padding: 0 16px; font-size: 16px; }
.search input:focus { outline: 3px solid var(--orange); outline-offset: -3px; }
.search button { height: 46px; border: 0; border-radius: 0 10px 10px 0; padding: 0 20px; background: var(--orange); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.search button:hover { background: var(--orange-d); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 48px 0 56px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; line-height: 1.15; }
.hero p { margin: 0 0 24px; color: #C9D2E3; font-size: 18px; }
.hero .search { max-width: 720px; }
.hero .search input { height: 56px; font-size: 18px; }
.hero .search button { height: 56px; padding: 0 28px; font-size: 18px; }
.stats { display: flex; gap: 28px; margin-top: 22px; color: #C9D2E3; font-size: 15px; flex-wrap: wrap; }
.stats strong { color: #fff; font-size: 20px; margin-right: 4px; }

/* Sections */
main { padding: 28px 0 56px; }
h2 { font-size: 22px; margin: 32px 0 14px; letter-spacing: -.3px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

/* Product cards */
.grid-box { container-type: inline-size; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(19, 35, 63, .12); color: var(--text); }
.card .img { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: contain; }
.card .brand { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.card .name { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 61px; }
.card .price { margin-top: auto; font-size: 20px; font-weight: 800; color: var(--navy); }
.card .price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.card .shops { font-size: 13px; color: var(--green); font-weight: 600; }
.noimg { width: 56px; height: 56px; border-radius: 50%; background: var(--bg); }

/* Chips (brands, categories) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--text); }
.chip:hover, .chip.on { border-color: var(--orange); color: var(--orange-d); }
.chip small { color: var(--muted); margin-left: 4px; }

/* Listing layout */
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.side { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: sticky; top: 16px; }
.side h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 10px; }
.side .group + .group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.side ul { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.side li a { display: flex; justify-content: space-between; padding: 5px 0; color: var(--text); font-size: 15px; }
.side li a.on { color: var(--orange-d); font-weight: 700; }
.side li small { color: var(--muted); }
.range { display: flex; gap: 8px; align-items: center; }
.range input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--orange-d); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy-2); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--orange); color: var(--orange-d); }
.btn.full { width: 100%; margin-top: 10px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.bar h1 { margin: 0; font-size: 28px; letter-spacing: -.5px; }
.bar .count { color: var(--muted); font-size: 15px; }
select { height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 15px; background: #fff; }
.empty { background: var(--card); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); }

/* Product page */
.pp { display: grid; grid-template-columns: 380px 1fr; gap: 28px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.pp .img { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.pp .img img { width: 100%; height: 100%; object-fit: contain; }
.pp h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -.5px; }
.pp .meta { color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.best { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: #FFF4EC; border: 1px solid #FFD8BF; border-radius: 12px; padding: 16px 18px; }
.best .from { font-size: 14px; color: var(--muted); }
.best .p { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1; }
.best .shop { font-weight: 600; }
.spark { margin-top: 18px; }
.spark h3 { font-size: 14px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.spark svg { width: 100%; height: 80px; }

.offers { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 20px; overflow: hidden; }
.offer { display: grid; grid-template-columns: 1.2fr 2fr .8fr .9fr auto; gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
.offer:first-child { border-top: 0; }
.offer.cheapest { background: #F6FBF8; }
.offer .shop { font-weight: 700; }
.offer .title { color: var(--muted); font-size: 14px; line-height: 1.35; }
.offer .price { font-size: 22px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.offer .old { text-decoration: line-through; color: var(--muted); font-size: 13px; margin-left: 6px; font-weight: 400; }
.offer .del { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #E6F4EC; color: var(--green); }
.badge.no { background: #FBEAEA; color: var(--red); }
.badge.best-b { background: var(--orange); color: #fff; margin-left: 6px; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 15px; }
.pager .on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.pager .off { color: #A8AEBB; }

/* Text pages */
.prose { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; max-width: 820px; }
.prose h1 { margin-top: 0; font-size: 28px; letter-spacing: -.5px; }
.prose h2 { font-size: 19px; margin: 26px 0 8px; }
.prose p, .prose li { color: #2A2F3A; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Footer */
footer { background: var(--navy); color: #C9D2E3; padding: 32px 0; font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer a { color: #fff; }
footer .logo { font-size: 22px; }

@media (max-width: 900px) {
  .listing { grid-template-columns: 1fr; }
  .side { position: static; }
  .pp { grid-template-columns: 1fr; }
  .pp .img { max-width: 320px; margin: 0 auto; }
  .offer { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .offer .title { grid-column: 1 / -1; order: 3; }
  .offer .avail { order: 4; }
  .offer .go { grid-column: 1 / -1; order: 5; }
  .offer .go .btn { width: 100%; }
}
@media (max-width: 600px) {
  .top .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { max-width: none; width: 100%; flex-basis: 100%; }
  .grid { gap: 10px; }
  .card { padding: 10px; }
  .card .price { font-size: 17px; }
  .hero { padding: 32px 0 36px; }
}

/* Prekių tinklelis: stulpelių skaičius visada dalija prekių kiekį (12 / 24 → 2, 3, 4; panašios 6 → 2, 3, 6),
   todėl paskutinė eilutė užsipildo iki galo. Remiamasi ne ekrano, o paties bloko pločiu. */
@container (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@container (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@container (min-width: 900px) { .grid.grid--6 { grid-template-columns: repeat(6, 1fr); } }
@container (min-width: 760px) and (max-width: 899px) { .grid.grid--6 { grid-template-columns: repeat(3, 1fr); } }

.about { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-top: 24px; }
.about h2 { margin-top: 0; font-size: 18px; }
.about p { line-height: 1.6; margin: 0 0 12px; }
.about dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; font-size: 14px; }
.about dt { color: var(--muted); }
.about dd { margin: 0; }

.intro { color: var(--muted); line-height: 1.6; margin: -4px 0 18px; max-width: 820px; }

.top-link { margin-left: auto; color: #fff; opacity: .85; font-weight: 600; font-size: 14px; white-space: nowrap; }
.top-link:hover { color: #fff; opacity: 1; }
.invite { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px 28px; margin: 32px 0; }
.invite h2 { color: #fff; margin: 0 0 6px; }
.invite p { margin: 0; max-width: 620px; line-height: 1.55; color: #d6deea; }
.invite p strong { color: #fff; }
.invite-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.invite-more { color: #fff; font-size: 14px; text-decoration: underline; }
.invite-mail { font-size: 13px; color: #9fb0c9; }
.prose table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { white-space: nowrap; width: 1%; color: var(--muted); font-weight: 600; }
.updated { margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
.offer .codes { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
