/* Story of Hair: sklep i zamowienie. Kolory i fonty z tokenow w site.css. */

.shop, .order { padding: calc(var(--bar-h) + clamp(2rem, 5vw, 4rem)) 0 var(--sc-section); }
.shop__head { display: grid; gap: 1rem; margin-bottom: 2rem; max-width: 46rem; }

.notice {
  margin: 0; padding: .85rem 1rem; border-radius: var(--radius); font-size: .95rem; line-height: 1.5;
  background: var(--bg-alt); border-left: 1px solid var(--gold);
}
.notice--warn { background: var(--notice); }

/* --------------------------------------------------------- pasek: koszyk -- */
.cart-btn {
  position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-left: .25rem;
  background: none; border: 0; color: inherit; cursor: pointer; border-radius: var(--radius);
}
.cart-btn .icon { width: 1.45rem; height: 1.45rem; stroke-width: 1.4; }
.cart-btn__count {
  position: absolute; top: .2rem; right: .1rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: 500 .68rem/1.15rem var(--font-text); text-align: center;
}
.cart-btn__count[hidden] { display: none; }
.link-arrow--back { margin-left: auto; white-space: nowrap; }
.link-arrow--back::after { content: none; }
.link-arrow--back::before { content: "←"; }
@media (max-width: 959px) { .page-shop .bar__cta { display: none; } }

/* ----------------------------------------------------------------- filtry -- */
.filters { display: grid; gap: .6rem; margin-bottom: 1.75rem; }
.filters__row {
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .15rem;
  margin-inline: calc(var(--sc-gutter) * -1); padding-inline: var(--sc-gutter);
}
.filters__row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 2.6rem; padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 400 .9rem/1 var(--font-text); white-space: nowrap;
  transition: background-color 160ms var(--sc-ease-out), border-color 160ms var(--sc-ease-out), color 160ms var(--sc-ease-out);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (hover: hover) { .chip:hover:not([aria-pressed="true"]) { border-color: var(--gold); } }
.filters__count { margin: .25rem 0 0; font-size: .85rem; color: var(--ink-soft); }
@media (min-width: 960px) {
  .filters__row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* ---------------------------------------------------------------- produkty -- */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
@media (min-width: 720px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.5rem; } }
@media (min-width: 1200px) { .products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.products__empty { grid-column: 1 / -1; color: var(--ink-soft); }
.product { display: flex; flex-direction: column; gap: .9rem; }
.product__img { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); aspect-ratio: 4 / 5; }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__tag {
  position: absolute; left: .5rem; top: .5rem; padding: .25rem .5rem; border-radius: 999px;
  background: rgb(var(--bg-rgb) / .9); font: 400 .66rem/1.2 var(--font-text); letter-spacing: .04em; color: var(--ink-soft);
}
.product__body { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.product__brand { margin: 0; font: 500 .7rem/1.3 var(--font-text); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.product__name { margin: 0; font: 500 clamp(1.2rem, 1.1rem + .4vw, 1.4rem)/1.15 var(--font-display); }
.product__desc { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--ink-soft); }
.product__meta { margin: 0; font-size: .8rem; color: var(--ink-soft); }
.product__foot { margin-top: auto; padding-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.product__price { margin: 0; font: 500 1.05rem/1 var(--font-text); }
.product__foot .btn { flex: 1 1 auto; }
@media (max-width: 479px) {
  .product__desc { display: none; }
  .product__foot .btn { padding-inline: .6rem; letter-spacing: .1em; font-size: .72rem; }
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------ jak to dziala -- */
.how { margin-top: clamp(4rem, 9vw, 7rem); padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); display: grid; gap: 2.5rem; justify-items: center; text-align: center; }
.how__title { margin: 0; font: 500 clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem)/1.1 var(--font-display); }
.how__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2.25rem; width: 100%; max-width: 62rem; }
.how__list li { display: grid; justify-items: center; align-content: start; gap: .6rem; }
.how__num {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--accent); font: 400 1rem/1 var(--font-text);
}
.how__list h3 { margin: .35rem 0 0; font: 500 1.05rem/1.3 var(--font-text); color: var(--ink); }
.how__list p { margin: 0; max-width: 26ch; color: var(--ink-soft); line-height: 1.6; }
.how__ship { margin: 0; font-size: .92rem; color: var(--ink-soft); }
@media (min-width: 760px) { .how__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }

/* ------------------------------------------------------------------ koszyk -- */
.cart {
  margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(26rem, 100vw); max-width: 100vw;
  padding: 0; border: 0; background: var(--bg); color: var(--ink);
  box-shadow: -20px 0 50px -20px hsl(var(--sc-shadow-color) / .4);
}
.cart::backdrop { background: rgb(43 36 32 / .35); }
.cart[open] { animation: cart-in 280ms var(--sc-ease-out); }
@keyframes cart-in { from { transform: translateX(100%); } }
.cart__inner { display: flex; flex-direction: column; height: 100%; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.cart__head h2 { margin: 0; font: 500 1.7rem/1 var(--font-display); }
.cart__close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-right: -.6rem; background: none; border: 0; cursor: pointer; color: inherit; }
.cart__close .icon { width: 1.4rem; height: 1.4rem; }
.cart__lines { list-style: none; margin: 0; padding: .5rem 1.25rem; overflow-y: auto; flex: 1; }
.cart__empty { color: var(--ink-soft); padding: 1rem 0; }
.cart-line { display: grid; grid-template-columns: 4rem 1fr auto; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid color-mix(in oklab, var(--ink) 8%, transparent); }
.cart-line img { width: 4rem; height: 5rem; object-fit: cover; border-radius: var(--radius); background: var(--bg-alt); }
.cart-line__body p { margin: 0; }
.cart-line__brand { font: 500 .66rem/1.3 var(--font-text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.cart-line__name { font: 500 1.1rem/1.2 var(--font-display); margin: .15rem 0 .5rem !important; }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-line__price { margin: 0; font-weight: 500; white-space: nowrap; }
.cart-line__remove { background: none; border: 0; padding: .4rem 0; color: var(--ink-soft); font-size: .82rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 2.5rem; height: 2.5rem; background: none; border: 0; cursor: pointer; font-size: 1.1rem; color: inherit; }
.qty output { min-width: 1.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.cart__foot { padding: 1rem 1.25rem max(1.25rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: .7rem; background: var(--bg-alt); }
.cart__row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.cart__ship { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------- toast -- */
.toast {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 70;
  width: min(calc(100vw - 2rem), 30rem); transform: translate(-50%, 1rem); opacity: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem; border-radius: var(--radius); background: var(--band); color: var(--light); border: 1px solid color-mix(in oklab, var(--light) 12%, transparent);
  box-shadow: 0 16px 40px -18px hsl(var(--sc-shadow-color) / .6);
  transition: opacity 220ms var(--sc-ease-out), transform 220ms var(--sc-ease-out); font-size: .92rem;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast__link { flex: none; background: none; border: 0; color: var(--gold); font: 500 .78rem/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; padding: .6rem 0; }

/* -------------------------------------------------------------- zamowienie -- */
.order__layout { display: grid; gap: 2.5rem; }
.order__layout[hidden], .order__empty[hidden], .confirm[hidden] { display: none; }
.order__form { display: grid; gap: 1.75rem; }
.order__form .h2 { margin-bottom: -.25rem; }
.fs { margin: 0; padding: 0; border: 0; display: grid; gap: 1rem; min-width: 0; }
.fs legend { padding: 0; margin-bottom: 1rem; font: 500 .8rem/1.4 var(--font-text); letter-spacing: .18em; text-transform: uppercase; }
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-soft); }
.field { display: grid; gap: .4rem; min-width: 0; }
.field label { font-size: .92rem; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row--postal { grid-template-columns: 9rem 1fr; }
}
.field input, .field textarea {
  width: 100%; min-height: 3rem; padding: .7rem .85rem; border-radius: var(--radius);
  border: 1px solid var(--field-line); background: var(--field); color: var(--ink); font-size: 1rem;
  transition: border-color 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold) 35%, transparent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--error); }
.hint { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.sub { padding: 1rem; border-radius: var(--radius); background: var(--bg-alt); display: grid; gap: 1rem; }
.sub[hidden] { display: none; }

.choices { display: grid; gap: .6rem; }
.choice {
  display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; cursor: pointer;
  padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field);
  transition: border-color 160ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out);
}
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in oklab, var(--gold) 10%, var(--field)); }
.choice.is-disabled { opacity: .5; cursor: not-allowed; }
.choice input { margin: .2rem 0 0; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.choice span { display: grid; gap: .15rem; }
.choice strong { font-weight: 500; }
.choice small { color: var(--ink-soft); font-size: .84rem; }

.consents { display: grid; gap: .8rem; }
.check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: .92rem; line-height: 1.5; cursor: pointer; }
.check input { margin: .2rem 0 0; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order__note { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.order__submit { width: 100%; min-height: 3.4rem; white-space: normal; text-align: center; }
.order__status { margin: 0; color: var(--error); }
.order__status:empty { display: none; }

.order__summary { align-self: start; padding: 1.25rem; border-radius: var(--radius); background: var(--bg-alt); display: grid; gap: 1rem; }
.order__summary h2 { margin: 0; font: 500 1.6rem/1 var(--font-display); }
.sum__lines, .confirm__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.sum__lines li, .confirm__lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.sum__lines small, .confirm__lines small { display: block; color: var(--ink-soft); font-size: .8rem; }
.sum__rows { margin: 0; display: grid; gap: .4rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.sum__rows div { display: flex; justify-content: space-between; }
.sum__rows dt, .sum__rows dd { margin: 0; }
.sum__total, .confirm__total { font-weight: 500; font-size: 1.1rem; padding-top: .4rem; }
.order__summary .link-arrow { justify-self: start; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; }
.order__summary .link-arrow::after { content: none; }
@media (min-width: 960px) {
  .order__layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); }
  .order__summary { position: sticky; top: calc(var(--bar-h) + 1.5rem); grid-column: 2; grid-row: 1; }
  .order__submit { width: auto; }
}

.confirm { display: grid; gap: 1.5rem; max-width: 44rem; }
.confirm:focus { outline: none; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 1.25rem; }
.steps li { counter-increment: st; padding: 1.1rem 1.25rem 1.1rem 3.6rem; position: relative; background: var(--bg-alt); border-radius: var(--radius); }
.steps li::before {
  content: counter(st); position: absolute; left: 1.1rem; top: 1.05rem; display: grid; place-items: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1px solid var(--gold); color: var(--accent); font: 400 .9rem/1 var(--font-text);
}
.steps h2 { margin: 0 0 .3rem; font: 500 1.05rem/1.3 var(--font-text); }
.steps p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.confirm__data { margin-top: .5rem !important; padding: .75rem; background: var(--bg); border-radius: var(--radius); color: var(--ink) !important; font-variant-numeric: tabular-nums; }
.confirm__lines { padding-top: 1rem; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ dokumenty prawne -- */
.doc { padding: calc(var(--bar-h) + clamp(2rem, 5vw, 4rem)) 0 var(--sc-section); }
.doc__inner { max-width: 46rem; }
.doc h1 { margin: 0 0 1rem; }
.doc h2 { font: 500 1.15rem/1.3 var(--font-text); margin: 2.5rem 0 .75rem; }
.doc h3 { font: 500 1rem/1.4 var(--font-text); margin: 1.5rem 0 .5rem; }
.doc p, .doc li { line-height: 1.7; color: var(--ink); }
.doc ol, .doc ul { padding-left: 1.3rem; }
.doc li + li { margin-top: .35rem; }
.doc .draft { margin: 0 0 2rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--notice); border-left: 3px solid var(--error); }
.doc .todo { background: var(--notice); padding: 0 .25em; border-radius: 2px; }
.doc .form-box { padding: 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); }

@media (prefers-reduced-motion: reduce) {
  .cart[open] { animation: none; }
  .toast { transition: opacity 150ms; transform: translate(-50%, 0); }
}
