/* Кнопки, сторінка речі, кошик, оформлення */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 2px solid var(--ink); border-radius: 99px; background: var(--ink); color: var(--paper); font-weight: 600; text-align: center; text-decoration: none; transition: transform .15s var(--ease), background-color .2s; }
.btn:hover { background: #d9d7d0; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--stage); }
.btn.wide { width: 100%; }
.empty { display: grid; justify-items: center; gap: 16px; padding: 48px 20px; border-radius: 10px; background: var(--stage); text-align: center; }
.hint { font-size: 13px; color: var(--soft); }
.crumb { font-size: 14px; color: var(--soft); margin-bottom: 14px; }
.crumb a { display: inline-flex; align-items: center; min-height: 32px; }

.item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 56px; }
@media (min-width: 860px) {
  .item { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 56px; align-items: start; }
  .gallery { position: sticky; top: 90px; }
}
.gallery { min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 12px; background: var(--stage); }
.slides img { flex: 0 0 100%; width: 100%; height: min(52svh, 480px); object-fit: contain; scroll-snap-align: start; }
@media (min-width: 860px) { .slides img { height: min(70vh, 680px); } }
.slides .iscut { padding: 24px; filter: drop-shadow(0 16px 16px rgba(16, 21, 34, .25)); }
.thumbs { display: flex; gap: 6px; margin-top: 8px; padding: 3px; overflow-x: auto; }
.thumbs button { flex: 0 0 auto; width: 62px; height: 76px; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: var(--stage); }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.about { display: grid; gap: 18px; justify-items: start; }
.about h1 { margin: 0; font-size: clamp(34px, 4.5vw, 56px); }
.big b { font: 900 46px/1 var(--display); margin-right: 8px; }
#buy { display: grid; gap: 14px; width: 100%; }
fieldset { border: 0; min-width: 0; }
.chips legend { font-size: 14px; color: var(--soft); margin-bottom: 6px; }
.chips label { display: inline-block; position: relative; margin: 0 6px 6px 0; cursor: pointer; }
.chips input, .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: grid; place-items: center; min-width: 52px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s, background-color .2s; }
.chips input:checked + span { border: 2px solid var(--ink); background: var(--tag); color: var(--on-tag); font-weight: 600; }
.chips input:focus-visible + span, .pick input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.buyline { display: flex; gap: 12px; }
.buyline .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; }
.qty button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; font-size: 20px; }
.qty button:not(:disabled):hover { background: var(--stage); }
.qty output { min-width: 28px; text-align: center; font-weight: 600; }
.facts { width: 100%; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--soft); }
.desc { width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.desc h2 { font-size: 26px; margin-bottom: 6px; }
.desc p { min-height: 72px; white-space: pre-line; }

/* Кошик */
#drawer { margin: 0 0 0 auto; width: min(440px, 100%); height: 100%; max-width: 100%; max-height: 100%; padding: 0 20px 24px; border: 0; background: var(--paper); color: var(--ink); overscroll-behavior: contain; }
#drawer[open] { animation: slide .35s var(--ease); }
#drawer::backdrop { background: rgba(0, 0, 0, .65); }
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; background: var(--paper); }
.drawer-head h2 { margin: 0; }
.close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--stage); }
.lines li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.pic { position: relative; align-self: start; }
.pic img { width: 92px; height: 112px; object-fit: contain; border-radius: 8px; background: var(--stage); }
.x { position: absolute; left: -12px; top: -12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; }
.x span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: 12px; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.x:hover span { background: var(--ink); color: var(--paper); transform: rotate(90deg); }
.info { display: grid; align-content: start; justify-items: start; gap: 4px; font-size: 14px; }
.info > span:not(.qty) { color: var(--soft); }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 12px 0 18px; padding-top: 12px; border-top: 2px solid var(--ink); }
.total b { font: 900 34px/1 var(--display); white-space: nowrap; }
.foot-actions { display: grid; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
#toast { position: fixed; z-index: 20; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; width: max-content; max-width: calc(100% - 32px); padding: 4px 8px 4px 20px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 14px; }
#undo { min-height: 44px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--tag); color: var(--on-tag); font-weight: 600; }

/* Оформлення */
.trial { margin-bottom: 20px; padding: 10px 16px; border-radius: 8px; background: var(--tag); color: var(--on-tag); font-size: 14px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) {
  .checkout { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
  #summary { position: sticky; top: 90px; }
}
#order { display: grid; gap: 28px; min-width: 0; }
#order legend { margin-bottom: 12px; font: 900 28px/1.1 var(--display); }
.two, .picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.picks + .two { margin-top: 16px; }
.field { display: grid; align-content: start; gap: 4px; }
.field > span { font-size: 14px; color: var(--soft); }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid #5b606c; border-radius: 8px; background: var(--paper); }
.field input[aria-invalid="true"] { border: 2px solid #ff8a80; }
.field em { color: #ff8a80; font-style: normal; font-size: 14px; }
.pick { position: relative; cursor: pointer; }
.pick > span { display: grid; align-content: center; height: 100%; min-height: 60px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; transition: border-color .2s, background-color .2s; }
.pick span span { color: var(--soft); }
.pick input:checked + span { border: 2px solid var(--ink); background: var(--tag-soft); }
#summary { padding: 20px; border-radius: 12px; background: var(--stage); }
.summary li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; }
.summary img { flex: 0 0 auto; width: 48px; height: 58px; object-fit: contain; }
.summary li > span { display: grid; margin-right: auto; }
.summary li > span span { color: var(--soft); }
.summary b { white-space: nowrap; }

.done { display: grid; gap: 12px; }
.done h1, .done .trial { margin: 0; }
.tick { width: 72px; height: 72px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { fill: var(--tag); stroke: none; }
.tick path { stroke: var(--on-tag); stroke-dasharray: 40; animation: draw .6s .2s var(--ease) backwards; }
@keyframes draw { from { stroke-dashoffset: 40; } }
.prepay { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
