/* «Медь»: экраны витрины, товара, корзины, оформления, статуса и истории. */

.art { display: block; width: 100%; height: 100%; }
.tile--beans { background: var(--tile-beans); }
.tile--drinks { background: var(--tile-drinks); }
.tile--pastry { background: var(--tile-pastry); }

/* ---------- витрина ---------- */

.intro { padding: 8px var(--side) 20px; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 8.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead { margin-top: 10px; color: var(--ink-2); font-size: 15px; max-width: 32ch; }

.search { position: relative; margin: 0 var(--side); }
.search .ico { position: absolute; left: 14px; top: 14px; color: var(--muted); pointer-events: none; }
.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: #9a8879; }
.search-input:focus { border-color: var(--ink); }

.chips {
  display: flex;
  gap: 6px;
  padding: 12px var(--side) 4px;
  overflow-x: auto;
  scroll-padding-inline: var(--side);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
/* Отступ справа у прокручиваемого ряда: последний чип не прилипает к краю, даже если ряд шире экрана. */
.chips::after { content: ""; flex: 0 0 calc(var(--side) - 6px); }
.chip {
  flex: none;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 15px;
  font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }

.feature {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 40%;
  align-items: center;
  gap: 0 4px;
  margin: 16px var(--side) 0;
  padding: 20px 12px 16px 20px;
  border-radius: 22px;
  background: var(--espresso);
  color: #f6ecdf;
  overflow: hidden;
}
.eyebrow { font-size: 13px; color: #d9b89c; }
.feature-title { margin-top: 4px; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.feature-notes { margin-top: 8px; font-size: 14px; color: #e3d3c3; }
.feature .roast { margin-top: 10px; color: #e3d3c3; }
.feature .roast-dots i { background: rgba(246, 236, 223, 0.25); }
.feature .roast-dots i.on { background: #f6ecdf; }
.feature .btn { grid-column: 1 / -1; margin: 8px -4px 0 0; justify-content: space-between; padding: 0 16px; }
.feature-art { margin: -8px -8px -12px -8px; }

.roast { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13px; color: var(--ink-2); }
.roast-label { white-space: nowrap; }

/* Нечётная последняя карточка в сетке ложится горизонтально, без «дыры» справа. */
.grid--beans .card:last-child:nth-child(odd),
.grid--pastry .card:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: 44% 1fr; grid-template-rows: 1fr auto; column-gap: 4px; }
.grid .card:last-child:nth-child(odd) .card-link { display: contents; }
.grid .card:last-child:nth-child(odd) .tile { grid-row: 1 / 3; }
.grid .card:last-child:nth-child(odd) .card-text { padding: 10px 6px 0 10px; }
.grid .card:last-child:nth-child(odd) .card-foot { padding-left: 10px; }
.roast-dots { display: inline-flex; gap: 3px; }
.roast-dots i { width: 10px; height: 4px; border-radius: 2px; background: var(--line-strong); }
.roast-dots i.on { background: var(--ink); }

.shelf { margin-top: 32px; padding: 0 var(--side); }
.shelf-head { display: flex; align-items: baseline; gap: 8px; }
.shelf-title { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.shelf-count { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.shelf-hint { margin-top: 4px; font-size: 13px; color: var(--muted); }

.grid { display: grid; gap: 12px; margin-top: 16px; }
.grid--beans,
.grid--pastry { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  padding: 6px 6px 8px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.card-link { display: flex; flex-direction: column; flex: 1; border-radius: 12px; }
.tile { display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; }
.card-text { display: flex; flex-direction: column; gap: 4px; padding: 10px 6px 0; }
.card-title { font-family: var(--font-display); font-size: 18px; line-height: 1.15; }
.card-notes {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 0 6px; }
.price { font-weight: 600; font-size: 15px; white-space: nowrap; }
.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  color: var(--ink);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.add-btn:hover { background: var(--ink); color: var(--paper); }
.add-btn:active { transform: scale(0.94); }

.grid--drinks .card { display: grid; grid-template-columns: 116px 1fr; grid-template-rows: 1fr auto; column-gap: 4px; }
.grid--drinks .card-link { display: contents; }
.grid--drinks .tile { grid-row: 1 / 3; width: 116px; }
.grid--drinks .card-text { padding: 8px 6px 0 8px; }
.grid--drinks .card-foot { padding: 8px 0 0 8px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px var(--side) 16px; }
.empty-art { width: 176px; height: 176px; }
.empty-title { margin-top: 8px; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.empty-text { margin: 8px 0 20px; color: var(--muted); max-width: 30ch; }
.empty--inline { padding-top: 40px; }
.empty--inline .empty-title { font-size: 20px; }

.foot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 40px; padding: 0 var(--side); text-align: center; }
.foot-note { font-size: 12px; color: var(--muted); }
.reset-confirm { width: 100%; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.reset-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

/* ---------- товар ---------- */

.p-hero { margin: 8px var(--side) 0; border-radius: 22px; overflow: hidden; }
.p-art { width: min(78%, 300px); aspect-ratio: 1 / 1; margin: 0 auto; }
.p-art.is-swap .art { animation: swap 0.2s var(--ease); }
@keyframes swap { from { opacity: 0.4; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.p-body { padding: 20px var(--side) 0; }
.p-title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.p-notes { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.p-roast { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.p-about { margin-top: 12px; font-size: 14px; color: var(--muted); }

.opt { margin-top: 24px; }
.opt-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.opt-hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.opt--qty { display: flex; align-items: center; justify-content: space-between; }
.opt--qty .opt-title { margin: 0; }

.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.seg--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg-item { position: relative; display: block; }
.seg-item input,
.method-item input,
.slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-face {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 6px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.seg-label { font-size: 15px; font-weight: 500; }
.opt-price { font-size: 12px; color: var(--muted); }
.seg-item input:checked + .seg-face,
.method-item input:checked + .method-face,
.slot input:checked + .slot-face { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.seg-item input:focus-visible + .seg-face,
.method-item input:focus-visible + .method-face,
.slot input:focus-visible + .slot-face,
.check-row input:focus-visible ~ .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }

.checks { display: grid; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.check-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; cursor: pointer; }
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: transparent;
  transition: background-color var(--t-fast) var(--ease);
}
.check-row input:checked ~ .check-box { background: var(--ink); color: var(--paper); box-shadow: none; }
.check-label { flex: 1; font-size: 15px; }
.check-price { font-size: 13px; color: var(--muted); white-space: nowrap; }
.check-row.is-off { cursor: default; }
.check-row.is-off .check-label,
.check-row.is-off .check-price { opacity: 0.45; }

.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-ctl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.step-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-ctl); }
.step-btn:hover:not(:disabled) { background: var(--surface-2); }
.step-btn:disabled { color: #bfb2a5; }
.step-val { min-width: 28px; text-align: center; font-weight: 600; }

/* ---------- корзина ---------- */

.screen-h { margin: 20px 0 16px; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }

.ship { padding: 14px 16px 16px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ship-row,
.ship.is-done { display: flex; align-items: center; gap: 10px; }
.ship.is-done { color: var(--ok); }
.ship-text { flex: 1; font-size: 14px; font-weight: 500; color: var(--ink); }
.ship-goal { font-size: 12px; color: var(--muted); white-space: nowrap; }
.meter { height: 6px; margin-top: 12px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--accent); transform-origin: left center; transition: transform 0.3s var(--ease); }
.ship.is-done .meter-fill { background: var(--ok); }

.lines { margin-top: 8px; }
.line { display: grid; grid-template-columns: 72px 1fr 44px; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-art { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; }
.line-main { min-width: 0; }
.line-title { font-family: var(--font-display); font-size: 18px; line-height: 1.2; }
.line-title:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.line-desc { margin-top: 2px; font-size: 13px; color: var(--muted); }
.line-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.line-total { font-weight: 600; white-space: nowrap; }
.line-del { color: var(--muted); margin-top: -10px; }
.line-del:hover { color: var(--err); }

.promo { margin-top: 24px; }
.promo-row { display: flex; gap: 8px; margin-top: 6px; }
.input--code { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.promo-msg { margin-top: 8px; font-size: 13px; }
.promo-msg:empty { display: none; }
.is-ok { color: var(--ok); }
.is-warn { color: var(--warn); }
.is-err { color: var(--err); }
.codes { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.codes-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.codes-list { display: grid; gap: 4px; margin-top: 6px; }
.codes-list li { display: flex; align-items: center; gap: 10px; }
.code {
  flex: none;
  min-width: 104px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: left;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(154, 66, 32, 0.35);
  text-underline-offset: 4px;
}
.code:hover { background: var(--surface); }
.code-rule { font-size: 13px; color: var(--ink-2); }

.sum { display: grid; gap: 8px; margin-top: 24px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.sum dd { white-space: nowrap; color: var(--ink); }
.sum .is-discount dd { color: var(--ok); }
.sum-total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sum .sum-total dt,
.sum .sum-total dd { font-size: 18px; font-weight: 600; color: var(--ink); }
.sum--compact { margin-top: 12px; padding: 12px 0 0; background: none; box-shadow: none; border-top: 1px solid var(--line); border-radius: 0; }

/* ---------- оформление ---------- */

.method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.method-item { position: relative; display: block; }
.method-face {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--t-fast) var(--ease);
}
.method-face .ico { color: var(--ink-2); margin-bottom: 4px; }
.method-label { font-weight: 600; font-size: 16px; }
.method-hint { font-size: 12px; line-height: 1.35; color: var(--muted); }

.pickup-card { display: flex; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.pickup-card b { color: var(--ink); font-weight: 600; }
.pickup-card .ico { margin-top: 2px; }

.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.slot { position: relative; display: block; }
.slot-face {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 6px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 14px;
  line-height: 1.25;
}
.opt.has-error .slot-face { box-shadow: inset 0 0 0 1px var(--err); }
.opt .field-err { margin-top: 8px; }
.opt .field:first-of-type { margin-top: 0; }

.mini { margin-top: 28px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.mini-title { font-size: 15px; font-weight: 600; }
.mini-lines { display: grid; gap: 8px; margin-top: 10px; }
.mini-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.mini-lines li > span:last-child { white-space: nowrap; }
.mini-desc { display: block; font-size: 12px; color: var(--muted); }

/* ---------- статус ---------- */

.status { padding-top: 16px; text-align: left; }
.status-art { width: 128px; height: 128px; margin: 0 0 4px -8px; }
.status-when { font-size: 14px; color: var(--muted); }
.status-title { margin-top: 4px; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }

.track { position: relative; display: grid; gap: 0; margin-top: 20px; }
.track-step { position: relative; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; min-height: 48px; }
.track-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -14px;
  width: 2px;
  background: var(--line-strong);
}
.track-step.is-done:not(:last-child)::after { background: var(--ok); }
.track-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--line-strong);
  color: #fff;
  transition: background-color 0.24s var(--ease);
}
.track-step.is-done .track-dot { background: var(--ok); box-shadow: none; }
.track-step.is-current .track-dot { background: var(--paper); box-shadow: inset 0 0 0 8px var(--accent), 0 0 0 4px var(--accent-soft); }
.track-label { font-size: 16px; color: var(--muted); }
.track-step.is-done .track-label { color: var(--ink-2); }
.track-step.is-current .track-label { color: var(--ink); font-weight: 600; }
.track-time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.track-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }

/* ---------- история ---------- */

.orders { display: grid; gap: 12px; }
.order-card { display: grid; gap: 8px; padding: 6px 6px 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.order-card .btn { justify-self: start; margin-left: 10px; }
.order-link { display: grid; gap: 4px; padding: 10px; border-radius: 12px; }
.order-link:hover { background: var(--paper); }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-no { font-family: var(--font-mono); font-size: 14px; color: var(--ink-2); }
.order-state { padding: 2px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 500; }
.order-state.is-live { background: var(--accent-soft); color: var(--accent); }
.order-items { font-family: var(--font-display); font-size: 18px; line-height: 1.25; }
.order-meta { font-size: 13px; color: var(--muted); }

@media (max-width: 359px) {
  :root { --side: 14px; }
  .feature { grid-template-columns: 1fr 38%; padding-left: 16px; }
  .feature-title { font-size: 23px; }
  .card-title { font-size: 16px; }
  .grid--drinks .card { grid-template-columns: 96px 1fr; }
  .grid--drinks .tile { width: 96px; }
  .method-face { min-height: 112px; }
}
