/* Спільна база: скидання, свотчі, мініатюри, акордеон, липка смуга, кошик-шторка.
   Вигляд задає варіант через змінні --ob-*. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
body.ob-locked { overflow: hidden; }
[hidden] { display: none !important; }

:root {
  --ob-bg: #f7f5f1; --ob-ink: #17150f; --ob-muted: #8b8378; --ob-line: rgba(23,21,15,.14);
  --ob-accent: #a8402c; --ob-font: system-ui, sans-serif; --ob-radius: 0px;
  --sku: #a8402c;
}

/* свотчі: фото товару, не кружечки */
.ob-swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; max-width: 520px; }
.ob-swatch {
  width: 100%; aspect-ratio: 1 / 1; padding: 4px; border: 1px solid transparent; background: rgba(0,0,0,.03);
  border-radius: var(--ob-radius); transition: border-color .2s, background .2s;
}
.ob-swatch img { width: 100%; height: 100%; object-fit: contain; }
.ob-swatch:hover { background: rgba(0,0,0,.06); }
.ob-swatch.is-on { border-color: var(--sku); background: #fff; }

/* мініатюри галереї */
.ob-thumbs { display: flex; gap: 8px; }
.ob-thumb {
  padding: 0; border: 1px solid transparent; background: none; opacity: .55;
  transition: opacity .25s, border-color .25s; flex: 1 1 0; min-width: 0;
}
.ob-thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.ob-thumb.is-on, .ob-thumb:hover { opacity: 1; border-color: var(--sku); }

/* акордеон */
.ob-acc { border-top: 1px solid var(--ob-line); }
.ob-acc__item { border-bottom: 1px solid var(--ob-line); }
.ob-acc__head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; padding: 13px 0; text-align: left;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
}
.ob-acc__head::after { content: '+'; font-size: 17px; line-height: 1; color: var(--ob-muted); }
.ob-acc__item.is-open .ob-acc__head::after { content: '–'; }
.ob-acc__body { display: none; padding: 0 0 16px; font-size: 14px; line-height: 1.62; color: var(--ob-muted); }
.ob-acc__item.is-open .ob-acc__body { display: block; }
.ob-acc__body p { margin: 0 0 10px; }
.ob-acc__body p:last-child { margin-bottom: 0; }
.ob-acc__body dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.ob-acc__body dt { color: var(--ob-ink); }
.ob-acc__body dd { margin: 0; }
.ob-acc__body img { margin: 10px 0 0; }

/* липка смуга */
.ob-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 20px; background: var(--ob-bg); border-top: 1px solid var(--ob-line);
  transform: translateY(102%); transition: transform .3s ease;
}
.ob-sticky.is-on { transform: none; }
.ob-sticky__l { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.ob-sticky__n { font-size: 13px; color: var(--ob-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-sticky__p { font-size: 18px; white-space: nowrap; }
.ob-sticky button {
  border: 0; background: var(--sku); color: #fff; padding: 12px 22px; white-space: nowrap;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; border-radius: var(--ob-radius);
}

/* кошик: бічна шторка */
.ob-cart { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; }
.ob-cart__veil { position: absolute; inset: 0; background: rgba(20,16,12,.44); backdrop-filter: blur(2px); }
.ob-cart__panel {
  position: relative; width: min(440px, 100%); height: 100%; overflow-y: auto;
  background: var(--ob-bg); color: var(--ob-ink); font-family: var(--ob-font);
  padding: 0 24px 26px; box-shadow: -18px 0 50px rgba(20,16,12,.16);
}
.ob-cart__bar {
  position: sticky; top: 0; background: var(--ob-bg); display: flex; align-items: center;
  justify-content: space-between; padding: 16px 0 12px; z-index: 2;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ob-muted);
}
.ob-cart__x { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--ob-muted); padding: 0 2px; }
.ob-cart__head { display: flex; gap: 16px; align-items: center; padding: 6px 0 18px; border-bottom: 1px solid var(--ob-line); }
.ob-cart__head img { width: 104px; flex: none; }
.ob-cart__name { margin: 0 0 5px; font-size: 15px; line-height: 1.35; }
.ob-cart__spec { margin: 0 0 8px; font-size: 12.5px; color: var(--ob-muted); }
.ob-cart__price { margin: 0; font-size: 20px; }
.ob-cart__lbl { margin: 18px 0 10px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ob-muted); }
.ob-cart__bumps { display: grid; gap: 10px; padding-bottom: 18px; }
.ob-bump { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--ob-line); cursor: pointer; }
.ob-bump input { margin-top: 3px; accent-color: var(--sku); width: 17px; height: 17px; flex: none; }
.ob-bump__t { flex: 1; font-size: 14px; line-height: 1.4; }
.ob-bump__t em { display: block; font-style: normal; color: var(--ob-muted); font-size: 12.5px; margin-top: 3px; }
.ob-bump__p { font-size: 14px; white-space: nowrap; color: var(--ob-muted); }
.ob-form { display: grid; gap: 12px; }
.ob-field { display: grid; gap: 6px; }
.ob-field span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ob-muted); }
.ob-field input {
  font: inherit; font-size: 16px; padding: 13px 14px; background: #fff; color: var(--ob-ink);
  border: 1px solid var(--ob-line); border-radius: 0; width: 100%;
}
.ob-field input:focus { outline: 2px solid var(--sku); outline-offset: -1px; }
.ob-field input.is-bad { border-color: #b4432f; }
.ob-total { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 0; font-size: 13px; color: var(--ob-muted); }
.ob-total b { font-size: 22px; color: var(--ob-ink); font-weight: 500; }
.ob-submit {
  margin-top: 2px; padding: 16px 20px; border: 0; background: var(--sku); color: #fff;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; border-radius: var(--ob-radius);
}
.ob-submit:hover { filter: brightness(1.07); }
.ob-note { margin: 0; font-size: 12px; color: var(--ob-muted); line-height: 1.55; }
.ob-done { padding: 30px 0 8px; }
.ob-done p:first-child { font-size: 19px; margin: 0 0 8px; }

@media (max-width: 760px) {
  .ob-swatches { max-width: none; gap: 6px; }
  .ob-cart__panel { width: 100%; }
}
