/* order-base.css — structure for the order builder + flavor panel.
   Each design sets these variables and adds its own look on top.     */
:root {
  --bt-bg: #f3e7d3; --bt-ink: #2a3421; --bt-soft: #5c6450; --bt-accent: #723a16; --bt-on-accent: #f6ecdc;
  --bt-line: rgba(42, 52, 33, .18); --bt-card: rgba(255, 255, 255, .55); --bt-radius: 14px;
  --bt-display: Georgia, serif; --bt-body: system-ui, sans-serif;
}
[hidden] { display: none !important; }
.bt-preview-note { display: none; }
.bt-preview .bt-preview-note { display: block; }

/* buttons */
.bt-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .8em 1.4em;
  border: 0; border-radius: 999px; background: var(--bt-accent); color: var(--bt-on-accent); font: 600 1rem/1.1 var(--bt-body);
  cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.bt-btn:hover { transform: translateY(-1px); }
.bt-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.bt-btn--ghost { background: transparent; color: var(--bt-ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.bt-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
:where(button, a, input, summary):focus-visible { outline: 2.5px solid var(--bt-accent); outline-offset: 3px; }

/* picker rows */
.bt-row { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--bt-radius);
  background: var(--bt-card); box-shadow: inset 0 0 0 1px var(--bt-line); transition: box-shadow .15s; }
.bt-row.has-qty { box-shadow: inset 0 0 0 2px var(--bt-accent); }
.bt-row__img { padding: 0; border: 0; background: var(--flavor, #ddd); border-radius: calc(var(--bt-radius) - 4px); overflow: hidden; aspect-ratio: 4/5; cursor: zoom-in; }
.bt-row__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bt-row__name { display: block; padding: 0; border: 0; background: none; font: 600 1.08rem/1.2 var(--bt-display); color: var(--bt-ink); cursor: pointer; text-align: left; }
.bt-row__name::after { content: ' \24D8'; font-size: .8em; opacity: .5; }
.bt-row__notes { margin: .2em 0 0; font-size: .85rem; color: var(--bt-soft); }
.bt-row__line { display: none; margin: .4em 0 0; font-size: .9rem; }
.bt-step { display: inline-flex; align-items: center; gap: 2px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--bt-line); background: rgba(255,255,255,.6); }
.bt-step__btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font: 500 1.3rem/1 var(--bt-body); color: var(--bt-ink); cursor: pointer; }
.bt-step__btn:hover:not(:disabled) { background: rgba(0,0,0,.06); }
.bt-step__btn:disabled { opacity: .3; cursor: default; }
.bt-step__qty { min-width: 1.6em; text-align: center; font: 600 1.05rem/1 var(--bt-body); font-variant-numeric: tabular-nums; }

/* packs */
.bt-packs { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-pack { min-height: 38px; padding: .45em 1em; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--bt-line);
  font: 500 .88rem/1 var(--bt-body); color: var(--bt-ink); cursor: pointer; }
.bt-pack:hover { box-shadow: inset 0 0 0 1.5px var(--bt-ink); }
.bt-pack--clear { color: var(--bt-soft); }

/* starter box items */
.bt-starter__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bt-starter__item { display: grid; gap: 6px; text-align: center; font-size: .82rem; }
.bt-starter__img { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4/5; cursor: zoom-in; background: #ddd; }
.bt-starter__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* summary */
.bt-sum__line { display: flex; justify-content: space-between; gap: 1em; padding: .35em 0; font-size: .95rem; }
.bt-sum__line s { opacity: .55; margin-right: .3em; }
.bt-sum__empty { margin: 0; color: var(--bt-soft); font-size: .92rem; }
.bt-progress { height: 6px; border-radius: 6px; background: var(--bt-line); overflow: hidden; }
.bt-progress::after { content: ''; display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--bt-accent); border-radius: inherit; transition: width .3s; }
.bt-msg { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; font-size: .88rem; word-break: break-word; }
.bt-msg--error { background: #fbe4e1; color: #8d1f14; }
.bt-msg--info { background: rgba(255,255,255,.7); color: var(--bt-ink); }
.bt-check { display: flex; gap: .6em; align-items: flex-start; font-size: .88rem; }
.bt-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--bt-accent); }
.bt-promo-form { display: flex; gap: 8px; margin-top: 8px; }
.bt-promo-form input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border: 1px solid var(--bt-line); border-radius: 10px; font: 500 .95rem var(--bt-body); text-transform: uppercase; background: #fff; }
.bt-promo-form button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--bt-ink); color: #fff; font: 600 .9rem var(--bt-body); cursor: pointer; }
#bt-promo-msg { font-size: .82rem; color: #8d1f14; min-height: 1em; margin: 4px 0 0; }

/* mobile bar */
.bt-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bt-bg); box-shadow: 0 -1px 0 var(--bt-line), 0 -10px 30px rgba(0,0,0,.08);
  transition: transform .25s; }
.bt-bar.is-hidden { transform: translateY(110%); }
.bt-bar__total { font: 700 1.1rem/1.1 var(--bt-body); }
.bt-bar__note { font-size: .78rem; color: var(--bt-soft); }
.bt-bar .bt-btn { min-height: 46px; padding: .7em 1.2em; }
@media (min-width: 960px) { .bt-bar { display: none; } }

/* flavor panel */
.bt-dialog { width: min(860px, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto; padding: 0; border: 0; border-radius: 22px; background: var(--bt-bg); color: var(--bt-ink); }
.bt-dialog::backdrop { background: rgba(30, 24, 16, .55); backdrop-filter: blur(3px); }
.bt-dialog__inner { position: relative; }
.bt-dialog__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); font-size: 1.6rem; line-height: 1; cursor: pointer; color: #222; }
.bt-dialog__content { display: grid; grid-template-columns: 1fr 1.1fr; }
.bt-dialog__media { background: var(--flavor); min-height: 100%; }
.bt-dialog__media img { width: 100%; height: 100%; max-height: 80dvh; object-fit: cover; display: block; }
.bt-dialog__text { padding: 34px 32px 30px; display: flex; flex-direction: column; gap: 12px; }
.bt-dialog__moment { margin: 0; font-size: .9rem; color: var(--bt-soft); }
.bt-dialog__name { margin: 0; font: 400 clamp(2rem, 4vw, 2.6rem)/1 var(--bt-display); }
.bt-dialog__award { margin: 0; font-size: .85rem; font-weight: 600; color: #2b5ea7; }
.bt-dialog__line { margin: 0; font: 400 1.15rem/1.45 var(--bt-display); }
.bt-dialog__notes, .bt-dialog__tip { margin: 0; font-size: .9rem; line-height: 1.5; }
.bt-dialog__tip { color: var(--bt-soft); }
.bt-dialog__scales { display: grid; gap: 8px; padding: 12px 0; border-block: 1px solid var(--bt-line); }
.bt-scale { display: grid; grid-template-columns: 7.5em auto 1fr; align-items: center; gap: 10px; font-size: .82rem; }
.bt-scale > span:last-child { text-align: left; }
.bt-scale__dots { display: inline-flex; gap: 5px; }
.bt-scale__dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--bt-ink); }
.bt-scale__dots i.on { background: var(--bt-ink); }
.bt-dialog__add { align-self: flex-start; margin-top: 6px; }
@media (max-width: 700px) {
  .bt-dialog { margin: auto 0 0; width: 100vw; border-radius: 22px 22px 0 0; max-height: 92dvh; overflow: auto; }
  .bt-dialog__content { grid-template-columns: 1fr; }
  .bt-dialog__media img { max-height: 42dvh; }
  .bt-dialog__text { padding: 22px 20px 28px; }
}
.bt-dialog[open] { animation: bt-rise .28s ease-out; }
@keyframes bt-rise { from { transform: translateY(24px); opacity: 0; } }

/* click-to-play video */
.bt-facade { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.bt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.bt-facade__play { position: absolute; inset: auto auto 18px 18px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px;
  border-radius: 999px; background: rgba(255,255,255,.92); color: #1d1a14; font: 600 .92rem/1 var(--bt-body); }
.bt-facade__play::before { content: ''; width: 34px; height: 34px; border-radius: 50%; background: #1d1a14 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23fff'/%3E%3C/svg%3E") center/18px no-repeat; }
.bt-facade__video { width: 100%; height: 100%; display: block; background: #000; object-fit: cover; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 440px) {
  .bt-row { grid-template-columns: 56px 1fr auto; gap: 10px; padding: 10px; }
  .bt-step__btn { width: 34px; height: 38px; }
  .bt-row__name { font-size: 1rem; }
  .bt-row__name::after { content: none; }
}
