/* Витрина example template: shared by the three example pages (Магазин, Меню, Услуги).
   Palettes: data-palette on <html>. Every palette sets all --t-* tokens for light and dark. */
:root, :root[data-palette="glina"] {
  color-scheme: light dark;
  --t-bg: #fbf8f4; --t-raise: #ffffff; --t-ink: #2a2420; --t-muted: #6f655c; --t-line: rgba(42,36,32,.12);
  --t-brand: #a3532e; --t-on-brand: #fffaf6; --t-tile: #efe6dc;
  --note: #fff3c4; --note-ink: #4a3b00;
  --f-tpl: system-ui, sans-serif;
}
:root[data-palette="more"] {
  --t-bg: #f3f9fa; --t-raise: #ffffff; --t-ink: #10272d; --t-muted: #4b6168; --t-line: rgba(16,39,45,.12);
  --t-brand: #0b6e7a; --t-on-brand: #f2fcfd; --t-tile: #dcedf0;
}
:root[data-palette="sliva"] {
  --t-bg: #faf6f9; --t-raise: #ffffff; --t-ink: #2a1f27; --t-muted: #6a5a66; --t-line: rgba(42,31,39,.12);
  --t-brand: #8a2f6b; --t-on-brand: #fff7fc; --t-tile: #f0e3ec;
}
:root[data-palette="maslina"] {
  --t-bg: #f8f8f1; --t-raise: #ffffff; --t-ink: #23251a; --t-muted: #5f6350; --t-line: rgba(35,37,26,.12);
  --t-brand: #5b6b1f; --t-on-brand: #fafbee; --t-tile: #e8ebd5;
}
@media (prefers-color-scheme: dark) {
  :root, :root[data-palette="glina"] {
    --t-bg: #1b1714; --t-raise: #24201c; --t-ink: #f1ebe4; --t-muted: #b3a89c; --t-line: rgba(241,235,228,.12);
    --t-brand: #e08a5f; --t-on-brand: #24130a; --t-tile: #2f2924; --note: #3b3210; --note-ink: #f4e4a1;
  }
  :root[data-palette="more"] {
    --t-bg: #0f1b1f; --t-raise: #162429; --t-ink: #e6f2f4; --t-muted: #9fb6bc; --t-line: rgba(230,242,244,.12);
    --t-brand: #4fc3d0; --t-on-brand: #06242a; --t-tile: #1f3238;
  }
  :root[data-palette="sliva"] {
    --t-bg: #1a1318; --t-raise: #231a21; --t-ink: #f2e9ef; --t-muted: #b5a3ae; --t-line: rgba(242,233,239,.12);
    --t-brand: #d98bbd; --t-on-brand: #2a0f20; --t-tile: #2e2229;
  }
  :root[data-palette="maslina"] {
    --t-bg: #161710; --t-raise: #1f2017; --t-ink: #eef0e0; --t-muted: #aeb299; --t-line: rgba(238,240,224,.12);
    --t-brand: #aebf63; --t-on-brand: #1a2002; --t-tile: #2a2c1d;
  }
}

/* base */
* { box-sizing: border-box }
html { scroll-padding-bottom: 88px } /* a focused or scrolled-to element is never left under the basket bar */
body { margin: 0; background: var(--t-bg); color: var(--t-ink); font-family: var(--f-tpl); font-size: 16px; line-height: 1.5 }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--t-brand); outline-offset: 2px }
.tpl { max-width: 1120px; margin: 0 auto }
.tpl-in { padding-left: max(16px, 4vw); padding-right: max(16px, 4vw) }
.has-bar .t-foot { padding-bottom: 96px } /* room for the basket bar over the footer */

/* note bar */
.note { background: var(--note); color: var(--note-ink); padding: 10px max(16px, 4vw); font-size: 14px; margin: 0 }
.note p { margin: 0 }
.note p + p { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px }
.note a { color: inherit; font-weight: 600 }
.note .back { white-space: nowrap; margin-left: 4px }
.note [aria-current="page"] { text-decoration: none; font-weight: 800 }
.note .grp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px }
.note .grp a, .note .grp button { display: inline-flex; align-items: center; min-height: 44px }
.note .grp [aria-current="page"] { cursor: default }
.pal { font: inherit; font-size: 14px; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 999px;
  padding: 4px 12px 4px 8px; gap: 6px; cursor: pointer }
.pal[aria-pressed="true"] { border-color: currentColor; font-weight: 700 }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; flex: none }
.dot.glina { background: #a3532e } .dot.more { background: #0b6e7a } .dot.sliva { background: #8a2f6b } .dot.maslina { background: #5b6b1f }

/* header, hero, buttons */
.t-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--t-line) }
.t-top strong { margin-right: auto; font-size: 18px }
.chip { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--t-line); color: var(--t-ink); background: var(--t-raise) }
.t-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding-block: 36px }
@media (max-width: 760px) { .t-hero { grid-template-columns: 1fr } }
.t-hero h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.05; margin: 0 0 12px; text-wrap: balance }
.t-hero p { color: var(--t-muted); margin: 0 0 18px; max-width: 46ch }
.t-btn { font: inherit; font-weight: 700; border: 0; cursor: pointer; background: var(--t-brand); color: var(--t-on-brand);
  min-height: 44px; padding: 11px 18px; border-radius: 10px; text-decoration: none; display: inline-flex; align-items: center }
.t-btn.ghost { background: transparent; color: var(--t-ink); border: 1px solid var(--t-line) }
.tile { background: var(--t-tile); border-radius: 12px; aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center }
.tile svg { width: 46%; height: auto }

/* sections */
.t-sec { padding-block: 28px; border-top: 1px solid var(--t-line) }
.t-sec h2 { font-size: 26px; margin: 0 0 16px }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: s }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr } }
.steps li { counter-increment: s; background: var(--t-raise); border: 1px solid var(--t-line); border-radius: 12px; padding: 14px }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--t-brand); color: var(--t-on-brand); font-weight: 800; margin-bottom: 8px }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px }
@media (max-width: 760px) { .two { grid-template-columns: 1fr } }
.two p { color: var(--t-muted); margin: 0 0 8px }
.lead { margin: 0; color: var(--t-muted) }
.contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px }
.demo { margin: 12px 0 0; font-size: 14px; color: var(--t-muted) }
.t-foot { padding-block: 18px; border-top: 1px solid var(--t-line); font-size: 14px; color: var(--t-muted); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between }
.t-foot a { color: var(--t-ink) }

/* "Добави" and the count next to it */
.add { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap }
.add .t-btn { padding: 8px 14px; font-size: 14px }
.in-basket { font-size: 14px; color: var(--t-muted) }
.in-basket:empty { display: none }

/* basket bar */
.basket-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, 4vw); background: var(--t-raise); border-top: 1px solid var(--t-line); box-shadow: 0 -6px 20px rgba(0,0,0,.12) }
.basket-bar[hidden] { display: none }
.basket-bar strong { font-size: 16px }

/* dialog */
dialog { border: 1px solid var(--t-line); border-radius: 14px; background: var(--t-raise); color: var(--t-ink); font-family: var(--f-tpl);
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 20px }
dialog::backdrop { background: rgba(0,0,0,.45) }
dialog h3 { margin: 0 0 12px }
dialog label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px }
dialog input, dialog textarea { width: 100%; font: inherit; min-height: 44px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--t-line); background: var(--t-bg); color: var(--t-ink) }
dialog .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap }
.sent { font-size: 14px; color: var(--t-muted); margin: 10px 0 0 }
.form-privacy { font-size: 14px; color: var(--t-muted); margin: 10px 0 0 }
.form-privacy a { color: var(--t-ink) }
.picked { list-style: none; margin: 0 0 4px; padding: 0 }
.picked li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--t-line) }
.picked .nm { flex: 1 1 140px; font-weight: 600 }
.picked .ctl { display: inline-flex; gap: 6px }
.picked .ctl button { font: inherit; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--t-line); background: var(--t-bg); color: var(--t-ink) }
.none { color: var(--t-muted); font-size: 14px; margin: 0 0 4px }

/* layout: Магазин (.lay-shop): an uneven catalogue, the first tile is big */
.lay-shop .grid { display: grid; grid-template-columns: 1fr; gap: 16px }
@media (min-width: 560px) { .lay-shop .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (min-width: 860px) { .lay-shop .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) } .lay-shop .item:first-child { grid-column: span 2; grid-row: span 2 } }
.lay-shop .item { background: var(--t-raise); border: 1px solid var(--t-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px }
.lay-shop .item h3 { margin: 4px 0 0; font-size: 17px }
.lay-shop .item p { margin: 0; font-size: 14px; color: var(--t-muted) }
.lay-shop .item .row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; flex-wrap: wrap }
.lay-shop .item .pr { font-weight: 800; font-variant-numeric: tabular-nums }
.lay-shop .item:first-child .tile { aspect-ratio: 4 / 3.4; flex: 1 }
.lay-shop .item:first-child h3 { font-size: 22px }
.lay-shop .item:first-child p { font-size: 16px }
@media (max-width: 859px) { .lay-shop .item:first-child .tile { aspect-ratio: 4 / 4.2 } }

/* layout: Меню (.lay-menu): a list by category, rows with a dotted leader */
.lay-menu .t-hero { grid-template-columns: 1fr auto }
@media (max-width: 760px) { .lay-menu .t-hero { grid-template-columns: 1fr } .lay-menu .t-hero svg { display: none } }
.lay-menu .t-hero svg { width: 120px; height: auto }
.lay-menu h3 { font-size: 20px; margin: 22px 0 4px; color: var(--t-brand) }
.lay-menu h3:first-of-type { margin-top: 0 }
.mrow { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--t-line) }
.mrow .top { display: flex; align-items: baseline; gap: 8px; grid-column: 1 }
.mrow .nm { font-weight: 700 }
.mrow .lead-dots { flex: 1; border-bottom: 2px dotted var(--t-muted); min-width: 16px; transform: translateY(-4px) }
.mrow .pr { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap }
.mrow .pr.ask { font-weight: 400; font-size: 14px; color: var(--t-muted) }
.mrow .desc { grid-column: 1; margin: 2px 0 0; font-size: 14px; color: var(--t-muted) }
.mrow .add { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end }
@media (max-width: 640px) {
  .mrow { grid-template-columns: 1fr }
  .mrow .add { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 8px }
}

/* layout: Услуги (.lay-svc): two columns, the left one sticks */
.lay-svc .cols { display: grid; grid-template-columns: 1fr; gap: 24px; padding-block: 28px }
@media (min-width: 860px) { .lay-svc .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start } .lay-svc .side { position: sticky; top: 16px } }
.lay-svc .side h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; margin: 0 0 12px; text-wrap: balance }
.lay-svc .side > p { color: var(--t-muted); margin: 0 0 18px }
.hours { background: var(--t-raise); border: 1px solid var(--t-line); border-radius: 12px; padding: 14px }
.hours h2 { font-size: 17px; margin: 0 0 6px }
.hours p { margin: 0; color: var(--t-muted); font-size: 15px }
.lay-svc .svcs h2 { font-size: 26px; margin: 0 0 8px }
.lay-svc .svcs h3 { font-size: 20px; margin: 22px 0 4px; color: var(--t-brand) }
.lay-svc .svcs h2 + h3 { margin-top: 8px }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--t-line) }
.srow .nm { font-weight: 700; display: block }
.srow .meta { font-size: 14px; color: var(--t-muted); font-variant-numeric: tabular-nums }

/* privacy section: last in <main>; placed after the layouts so its h3 beats .lay-menu / .lay-svc h3 */
.priv summary { font-size: 17px; font-weight: 700; cursor: pointer; padding-block: 10px } /* 17px x 1.5 + 20px >= 44px, keeps the disclosure marker */
.t-sec.priv h3 { font-size: 15px; margin: 16px 0 4px; color: var(--t-ink) }
.priv p, .priv li { font-size: 14px; line-height: 1.55; max-width: 70ch }
.priv a { color: var(--t-ink) }
