/* Zīle, direction 2: Gimene. Shop and product page styles, on top of style.css. */

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 18px 0 0; font-size: .85rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-current] { color: var(--ink); font-weight: 600; max-width: 48ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Loading and no-JS fallback */
.loading { padding: 48px 0; color: var(--muted); }
.loading noscript a { text-decoration: underline; }

/* Shop head */
.shop-head { padding: 14px 0 18px; }
.shop-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; }
.shop-head .h1-count { color: var(--muted); font-weight: 500; font-size: .6em; white-space: nowrap; }
.shop-head .section__sub { max-width: 60ch; }

/* Age chips */
.ages-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.agechip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px 0 18px; border-radius: var(--pill);
  border: 1.5px solid var(--line); background: var(--white); font-weight: 600; font-size: .92rem; transition: all .15s var(--ease);
}
.agechip span { font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--oat); border-radius: var(--pill); padding: 2px 8px; }
.agechip:hover { border-color: var(--ink); }
.agechip.is-on { background: var(--sage); border-color: var(--sage); color: #fff; }
.agechip.is-on span { background: var(--sage-deep); color: #fff; }
.agechip:disabled { opacity: .45; cursor: default; }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.toolbar__left, .toolbar__right { display: flex; align-items: center; gap: 12px; }
.tbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--white); font-weight: 600; font-size: .9rem; }
.tbtn:hover { border-color: var(--ink); }
.seen { font-size: .88rem; color: var(--muted); }
.sortwrap { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.sortwrap select {
  font: inherit; font-weight: 600; color: var(--ink); min-height: 40px; padding: 0 36px 0 14px; border-radius: var(--pill);
  border: 1.5px solid var(--line); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231D1B18' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.sortwrap select:focus { outline: none; border-color: var(--ink); }

/* Active filter chips */
.active { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.achip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: var(--pill); background: var(--oat); border: 0; font-size: .85rem; font-weight: 600; }
.achip span { font-size: 1.1rem; line-height: 1; color: var(--muted); }
.achip:hover { background: var(--sand); }
.achip--clear { background: transparent; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.achip--clear:hover { background: transparent; color: var(--ink); }

/* Layout: sidebar + grid */
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; padding-bottom: clamp(48px, 7vw, 96px); }
.shop.filters-hidden { grid-template-columns: 1fr; }
.shop.filters-hidden .filters { display: none; }
.filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.filters__head, .filters__foot { display: none; }
.facet { border-top: 1px solid var(--line); }
.facet:first-of-type { border-top: 0; }
.facet summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-weight: 600; font-size: .98rem; }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.facet[open] summary::after { transform: rotate(-135deg); }
.facet__body { padding: 0 0 16px; }
.facet__list li + li { margin-top: 2px; }
.facet__link { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; border-radius: 10px; font-size: .93rem; color: var(--ink); }
.facet__link span { color: var(--muted); font-size: .82rem; }
.facet__link:hover { background: var(--oat); }
.facet__link.is-on { background: var(--sage-soft); font-weight: 600; }
.facet__sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.facet__sizes .chip:disabled { opacity: .4; cursor: default; }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .93rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--sage); margin: 0; }
.price-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.price-form input { min-width: 0; width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); font: inherit; }
.price-form input:focus { outline: none; border-color: var(--ink); }
.price-form .btn { min-height: 40px; padding: 0 14px; font-size: .88rem; }
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facet__note { font-size: .82rem; color: var(--muted); margin-top: 10px; }

/* Grid and cards */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 16px; }
.shop.filters-hidden .grid { grid-template-columns: repeat(5, 1fr); }
.pcard { position: relative; }
.pcard__media { position: relative; }
.pcard .card__media { background: var(--white); border: 1px solid var(--line); }
.pcard.is-out .card__media img { opacity: .55; filter: saturate(.6); }
.pcard.is-out .card__name, .pcard.is-out .card__cat { color: var(--muted); }
.badge--sale { background: var(--clay); color: #fff; }
.badge--out { background: var(--ink); color: #fff; }
.card__price s { color: var(--muted); font-weight: 500; margin-left: 6px; }
.card__price .is-sale { color: var(--clay); }
.card__price .is-out { color: var(--muted); font-weight: 600; }
.fav {
  position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--white);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: 0 1px 3px rgba(29,27,24,.12); transition: transform .15s var(--ease);
}
.fav:hover { transform: scale(1.08); }
.fav.is-on { color: var(--clay); }
.fav.is-on svg { fill: currentColor; }
.quick {
  position: absolute; left: 10px; right: 10px; bottom: 10px; background: var(--white); border-radius: 14px; padding: 10px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
}
.quick__title { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.quick__sizes { display: flex; flex-wrap: wrap; gap: 5px; }
.chip--sm { min-height: 30px; padding: 0 10px; font-size: .78rem; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: .88rem; width: 100%; }
@media (hover: hover) {
  .pcard__media:hover .quick, .pcard__media:focus-within .quick { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.stars { display: inline-flex; gap: 1px; }
.star { width: 13px; height: 13px; background: var(--line); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat; position: relative; }
.star::after { content: ""; position: absolute; inset: 0; background: var(--clay); width: calc(var(--f, 0) * 100%); }

/* Load more and empty */
.more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; }
.more__bar { width: 180px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.empty { text-align: center; padding: 56px 16px; background: var(--oat); border-radius: var(--r-lg); }
.empty h2 { font-size: 1.4rem; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 18px; }
.empty .btn + .btn { margin-left: 8px; }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; padding: 22px 0 clamp(40px, 6vw, 72px); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); }
.gallery::-webkit-scrollbar { display: none; }
.gallery__item { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border: 0; padding: 0; background: var(--white); scroll-snap-align: start; cursor: zoom-in; overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__item .badge { left: 14px; top: 14px; }
.gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gallery__dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.gallery__dots span.is-on { background: var(--ink); }
.gallery__hint { font-size: .82rem; color: var(--muted); margin-top: 10px; text-align: center; }
.pdp__info { position: sticky; top: 84px; }
.pdp__panel { display: flex; flex-direction: column; gap: 14px; }
.pdp__title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.18; }
.pdp__full { color: var(--muted); font-size: .92rem; margin-top: -6px; }
.pdp__pricerow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pdp__price { font-size: 1.5rem; font-weight: 700; }
.pdp__price.is-sale { color: var(--clay); }
.pdp__price.is-out { color: var(--muted); }
.pdp__pricerow s { color: var(--muted); font-size: 1.05rem; }
.pdp__disc { background: var(--clay-soft); color: var(--clay); font-weight: 700; font-size: .82rem; border-radius: var(--pill); padding: 4px 10px; }
.avail { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; }
.avail::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sage); }
.avail--PreOrder::before { background: #C98A2E; }
.avail--OutOfStock { color: var(--muted); }
.avail--OutOfStock::before { background: var(--muted); }
.rating--lg { font-size: .9rem; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; margin-top: -4px; }
.rating--lg .star { width: 15px; height: 15px; }
.pick { border-top: 1px solid var(--line); padding-top: 14px; }
.pick__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pick__label { font-weight: 600; }
.pick__value { font-size: .88rem; color: var(--muted); }
.sizes--grid { gap: 8px; margin-top: 0; }
.chip--size { min-height: 42px; min-width: 56px; padding: 0 14px; font-size: .9rem; }
.chip--size:disabled { opacity: .45; cursor: default; }
.pick__note { font-size: .9rem; color: var(--muted); }
.buy { display: flex; gap: 10px; align-items: stretch; margin-top: 4px; }
.buy__add { flex: 1; }
.btn:disabled { background: var(--sand); color: var(--muted); cursor: not-allowed; border-color: transparent; }
.buy__hint { font-size: .85rem; color: var(--muted); margin-top: -6px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--white); height: 52px; }
.qty__btn { width: 44px; height: 100%; border: 0; background: none; font-size: 1.2rem; font-weight: 600; border-radius: var(--pill); }
.qty__btn:hover { background: var(--oat); }
.qty__btn:disabled { color: var(--muted); cursor: default; }
.qty__in { width: 40px; text-align: center; border: 0; background: none; font: inherit; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.qty__in::-webkit-outer-spin-button, .qty__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__in:focus { outline: none; }
.fav--ring { position: static; width: 52px; height: 52px; box-shadow: none; border: 1.5px solid var(--line); flex: none; }
.fav--ring:hover { transform: none; border-color: var(--ink); }
.trust { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); padding: 14px 0 4px; border-top: 1px solid var(--line); }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: none; }
.pacc-list { border-top: 1px solid var(--line); }
.pacc { border-bottom: 1px solid var(--line); }
.pacc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-weight: 600; font-size: 1.02rem; }
.pacc summary::-webkit-details-marker { display: none; }
.pacc summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; flex: none; }
.pacc[open] summary::after { transform: rotate(-135deg); }
.pacc__n { font-size: .78rem; color: var(--muted); background: var(--oat); border-radius: var(--pill); padding: 2px 8px; margin-left: 6px; margin-right: auto; }
.pacc__body { padding: 0 0 18px; color: var(--muted); font-size: .95rem; }
.pacc__body p + p, .pacc__body ul + p, .pacc__body p + ul { margin-top: 10px; }
.pacc__body ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.pacc__body b, .pacc__body strong { color: var(--ink); font-weight: 600; }
.rev { display: grid; gap: 14px; list-style: none; padding: 0; }
.rev__sum { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--ink); }
.rev__item { background: var(--oat); border-radius: 14px; padding: 12px 14px; }
.rev__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; color: var(--ink); }
.rev__head span { color: var(--muted); font-size: .85rem; margin-left: auto; }
.rev__none { color: var(--muted); }
.pdp-rail .section__head { margin-bottom: 20px; }
.pdp-rail .rail__item .card { padding: 0; border: 0; background: transparent; }
.pdp-rail .rail__item .card__body { padding: 12px 2px 0; }

/* Zoom */
.zoombox { position: fixed; inset: 0; z-index: 95; background: rgba(29,27,24,.92); display: flex; align-items: center; justify-content: center; overflow: auto; }
.zoombox[hidden] { display: none; }
.zoombox img { max-width: min(92vw, 1000px); max-height: 92vh; width: auto; height: auto; object-fit: contain; cursor: zoom-in; border-radius: 12px; }
.zoombox img.is-big { max-width: none; max-height: none; width: min(1800px, 200vw); cursor: zoom-out; border-radius: 0; margin: auto; }
.zoombox__close { position: fixed; top: 16px; right: 16px; background: var(--white); color: var(--ink); z-index: 1; }
.zoombox__hint { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: .85rem; }

/* Mobile buy bar */
.buybar { display: none; }

/* Not found */
.notfound { padding: clamp(48px, 10vw, 120px) 0; max-width: 640px; }
.notfound h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 14px; }
.notfound__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Responsive */
@media (max-width: 1260px) {
  .grid, .shop.filters-hidden .grid { grid-template-columns: repeat(3, 1fr); }
  .shop.filters-hidden .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .shop { grid-template-columns: 220px 1fr; gap: 28px; }
  .grid, .shop.filters-hidden .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .shop { grid-template-columns: 1fr; }
  .grid, .shop.filters-hidden .grid { grid-template-columns: repeat(3, 1fr); gap: 22px 12px; }
  .filters {
    position: fixed; inset: 0; z-index: 85; max-height: none; top: 0; background: var(--paper); padding: 0; overflow: hidden;
    display: flex; flex-direction: column; transform: translateY(100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s;
  }
  .filters.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .shop.filters-hidden .filters { display: flex; }
  .filters__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
  .filters__head .h4 { margin: 0; }
  .filters__scroll { flex: 1; overflow-y: auto; padding: 4px 20px 20px; }
  .filters__foot { display: block; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--white); }
  .toolbar { position: sticky; top: 68px; z-index: 20; background: var(--paper); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .pdp { grid-template-columns: 1fr; gap: 22px; }
  .pdp__info { position: static; }
  .gallery { border-radius: var(--r); }
}
@media (max-width: 640px) {
  .crumbs { padding-top: 14px; }
  .crumbs span[aria-current] { max-width: 24ch; }
  .shop-head { padding: 10px 0 12px; }
  .shop-head h1 { font-size: 1.7rem; }
  .ages-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: 4px; }
  .ages-row::-webkit-scrollbar { display: none; }
  .agechip { flex: none; min-height: 38px; font-size: .86rem; padding: 0 12px 0 14px; }
  .toolbar { top: 60px; gap: 8px; padding: 10px 0; margin-bottom: 14px; }
  .toolbar .seen { display: none; }
  .sortwrap > span { display: none; }
  .sortwrap select { padding-left: 12px; font-size: .86rem; }
  .tbtn { font-size: .86rem; padding: 0 12px; }
  .grid, .shop.filters-hidden .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 10px; }
  .pcard .card__media { border-radius: 14px; }
  .fav { width: 32px; height: 32px; right: 8px; top: 8px; }
  .fav svg { width: 17px; height: 17px; }
  .card__name { font-size: .92rem; }
  .shop { padding-bottom: 48px; }
  .pdp { padding-top: 14px; }
  .gallery__item { aspect-ratio: 4 / 5; }
  .pdp__title { font-size: 1.5rem; }
  .buy { flex-wrap: wrap; }
  .buy__add { flex-basis: 100%; order: 3; }
  .buybar {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--white); border-top: 1px solid var(--line); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  }
  .buybar__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .buybar__txt strong { font-size: 1.05rem; }
  .buybar__txt span { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar .btn { flex: none; }
  body[data-page="produkts"] .tabbar { display: none; }
  body[data-page="produkts"] .toast { bottom: 90px; }
  .notfound__cta .btn { flex: 1 1 100%; }
}
