/* Zīle v3 "Kadri": veikals (listing) and produkts (product page). */

/* ---------- listing ---------- */
.shop__head { padding: 0 var(--gutter); }
.shop__title { display: flex; align-items: baseline; gap: 12px; padding: 4px 0 16px; }
.shop__title h1 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.shop__title .count { color: var(--mute); }

.bar { position: sticky; top: var(--hdr); z-index: 30; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; }
.bar__cats { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter); height: 46px; align-items: center; min-width: 0; }
.bar__cats::-webkit-scrollbar { display: none; }
.bar__cats a { white-space: nowrap; padding: 6px 0; border-bottom: 1px solid transparent; color: var(--mute); }
.bar__cats a:hover, .bar__cats a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.bar__tools { display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter); height: 46px; border-left: 1px solid var(--line); }
.tool { display: inline-flex; align-items: center; gap: 8px; height: 46px; white-space: nowrap; }
.tool svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.tool:hover { color: var(--mute); }
.tool .n:empty { display: none; }
.tool .n { background: var(--ink); color: var(--paper); font-size: 9px; padding: 1px 5px; }
.sort { position: relative; display: inline-flex; align-items: center; }
.sort select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: var(--ui); letter-spacing: .08em; text-transform: uppercase; padding: 6px 18px 6px 0; cursor: pointer; }
.sort svg { position: absolute; right: 0; width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.5; pointer-events: none; }
.dens { display: inline-flex; gap: 2px; }
.dens button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--line-dark); }
.dens button[aria-pressed="true"], .dens button:hover { color: var(--ink); }
.dens svg { width: 16px; height: 16px; fill: currentColor; }
.dens--m { display: inline-flex; }
.dens--d { display: none; }
@media (min-width: 1024px) { .dens--m { display: none; } .dens--d { display: inline-flex; } }
@media (max-width: 599px) {
  .bar { grid-template-columns: 1fr; }
  .bar__tools { border-left: 0; border-top: 1px solid var(--line); justify-content: space-between; gap: 12px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px var(--gutter) 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); padding: 6px 10px; min-height: 32px; }
.chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.chip:hover { background: var(--ink); color: var(--paper); }
.chips .link { margin-left: 4px; align-self: center; }

.shop__grid { margin-top: 14px; }
.grid--m1 { grid-template-columns: 1fr; }
.grid--m2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .grid--m1, .grid--m2 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(3, 1fr); } .grid--6 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } .grid--6 { grid-template-columns: repeat(6, 1fr); } }
.grid--2 .card__txt { padding: 14px 14px 22px; }
.grid--2 .card__name { font-size: 13px; }
.grid--6 .card__sizes, .grid--6 .card__rating { display: none; }

.more { display: grid; justify-items: center; gap: 12px; padding: 36px var(--gutter) 24px; color: var(--mute); }
.more__bar { width: 160px; height: 1px; background: var(--line); position: relative; }
.more__bar span { position: absolute; left: 0; top: 0; height: 1px; background: var(--ink); }
.empty { padding: 48px var(--gutter); display: grid; gap: 12px; justify-items: start; }
.empty p { color: var(--mute); max-width: 48ch; }

/* filter panel */
.filters .drawer__body { padding: 0 var(--gutter) 24px; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: var(--ui); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary::after { content: "+"; font-size: 16px; font-weight: 400; }
.fgroup[open] summary::after { content: "-"; }
.fgroup__body { padding: 0 0 16px; display: grid; gap: 4px; }
.fgroup__body label { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 13px; cursor: pointer; }
.fgroup__body label small { color: var(--mute); margin-left: auto; font-size: 11px; }
.fgroup__body input[type="checkbox"], .fgroup__body input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: #000; }
.fsizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-bottom: 16px; }
.fsizes label { position: relative; min-height: 40px; border: 1px solid var(--line-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; text-align: center; padding: 4px; cursor: pointer; }
.fsizes input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; left: 0; top: 0; cursor: pointer; }
.fsizes label:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fsizes label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.fsizes.is-short label:nth-child(n + 17) { display: none; }
.fsizes-more { margin-bottom: 16px; }
.filters .drawer__foot { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }

/* ---------- product page ---------- */
.pdp { display: grid; }
.pdp__media { position: relative; background: var(--soft); }
.pdp__zoom { display: block; width: 100%; cursor: zoom-in; }
.pdp__zoom img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pdp__hint { position: absolute; right: var(--gutter); bottom: 12px; color: var(--ink); background: rgba(255, 255, 255, .85); padding: 4px 8px; pointer-events: none; }
.pdp__side { padding: 22px var(--gutter) 0; }
.pdp__cat { color: var(--mute); margin-bottom: 10px; display: inline-block; }
.pdp__cat:hover { color: var(--ink); }
.pdp__title { font-size: 20px; line-height: 1.25; letter-spacing: -.01em; font-weight: 500; text-transform: none; }
.pdp__price { margin-top: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.pdp__price .off { color: var(--mute); font-size: var(--ui); letter-spacing: .08em; }
.pdp__avail { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.pdp__avail::before { content: ""; width: 7px; height: 7px; background: var(--ink); border-radius: 50%; }
.pdp__avail.is-pre::before { background: var(--paper); border: 1px solid var(--ink); }
.pdp__avail.is-out { color: var(--mute); }
.pdp__avail.is-out::before { background: var(--line-dark); }
.pdp__rating { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--mute); cursor: pointer; }
.pdp__rating:hover { color: var(--ink); }
.pdp__rating .stars svg { width: 11px; height: 11px; }
.opt { margin-top: 22px; }
.opt__head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.opt__picked { color: var(--mute); text-transform: none; letter-spacing: 0; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizebtn { position: relative; min-width: 48px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-dark); display: inline-flex; align-items: center; justify-content: center; text-transform: none; letter-spacing: .02em; font-size: 12px; }
.sizebtn:hover { border-color: var(--ink); }
.sizebtn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sizebtn .now { position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.sizebtn[aria-pressed="true"] .now { background: var(--paper); }
.opt.needs-pick .sizes { outline: 1px solid var(--ink); outline-offset: 4px; }
.opt__hint { color: var(--mute); font-size: 12px; margin-top: 8px; }
.buy { margin-top: 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.buy .btn { height: 48px; }
.buy .fav { width: 48px; height: 48px; border: 1px solid var(--line-dark); }
.trust { margin-top: 20px; display: grid; gap: 6px; color: var(--mute); font-size: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.trust span::before { content: ""; display: inline-block; width: 4px; height: 4px; background: var(--ink); margin-right: 10px; vertical-align: middle; }
.acc { margin-top: 24px; border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: var(--ui); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 16px; font-weight: 400; }
.acc details[open] summary::after { content: "-"; }
.acc__body { padding: 0 0 18px; font-size: 13px; line-height: 1.6; color: #222; }
.acc__body p + p, .acc__body ul + p, .acc__body p + ul { margin-top: 10px; }
.acc__body ul { list-style: disc; padding-left: 18px; }
.acc__body li + li { margin-top: 4px; }
.acc__body b { font-weight: 600; }
.acc__note { color: var(--mute); margin-top: 10px; }
.acc__body .sizes { margin-top: 8px; }
.acc__body .sizebtn { min-height: 34px; min-width: 40px; cursor: default; }
.rev__sum { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rev__item { padding: 12px 0; border-top: 1px solid var(--line); }
.rev__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rev__head strong { font-weight: 500; }
.rev__head span { color: var(--mute); font-size: 11px; }
.pdp__facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin-top: 16px; font-size: 12px; }
.pdp__facts dt { color: var(--mute); }
.pdp__facts dd { margin: 0; }
.pdp__facts:empty { display: none; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.25fr) minmax(360px, .85fr); align-items: start; }
  .pdp__media { position: sticky; top: var(--hdr); }
  .pdp__zoom img { height: calc(100vh - var(--hdr)); aspect-ratio: auto; object-fit: cover; }
  .pdp__side { padding: 36px clamp(24px, 4vw, 64px) 48px; position: sticky; top: var(--hdr); }
  .pdp__title { font-size: 22px; }
}
@media (min-width: 1200px) {
  .pdp { grid-template-columns: minmax(0, 1.4fr) minmax(400px, .8fr); }
}

.missing { padding: 48px var(--gutter); display: grid; gap: 14px; justify-items: start; }

/* mobile sticky buy bar */
.buybar { position: fixed; inset: auto 0 0 0; z-index: 35; background: var(--paper); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .3s var(--ease); }
.buybar.is-on { transform: none; }
.buybar__price { font-size: 14px; display: grid; }
.buybar__name { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
@media (min-width: 900px) { .buybar { display: none; } }
body.pdp-page .tabbar { display: none; }
body.pdp-page { padding-bottom: 0; }
body.pdp-page .toast { bottom: 92px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: var(--paper); display: none; }
.lightbox.is-open { display: block; }
.lightbox__scroll { position: absolute; inset: 0; overflow: auto; cursor: zoom-in; display: grid; place-items: center; }
.lightbox__scroll img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .25s var(--ease); transform-origin: var(--ox, 50%) var(--oy, 50%); }
.lightbox.is-zoomed .lightbox__scroll { cursor: zoom-out; }
.lightbox.is-zoomed .lightbox__scroll img { transform: scale(2.2); }
.lightbox__close { position: absolute; right: 8px; top: 8px; z-index: 1; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); }
.lightbox__close svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.lightbox__hint { position: absolute; left: var(--gutter); bottom: 16px; color: var(--mute); pointer-events: none; }

/* rails on the product page */
.pdp-rails { padding-top: 24px; }
.pdp-rails .rail { padding-top: 32px; }
