/* =========================================================
   Gago — shared styles (shop + admin)
   Mobile first: most customers use a phone.
   Look: a calm trade catalogue — flat surfaces, thin borders, line icons, no decoration.
   All brand colours live in :root — change them here only.
   ========================================================= */
:root {
  --green: #245346;       /* primary brand */
  --green-dark: #1B4034;
  --green-soft: #E6EEEA;
  --terra: #A54831;       /* main action buttons, sale */
  --terra-dark: #8B3B27;
  --terra-soft: #F5E6E0;
  --ink: #202B27;         /* body text */
  --muted: #5A6762;
  --bg: #FAF5EC;          /* page background */
  --card: #FFFFFF;
  --line: #E2D9C8;
  --fill: #F3EEE4;        /* neutral fill: photo placeholders, inactive controls */
  --ok: #176A39;          /* in stock / delivered */
  --ok-soft: #E1F0E6;
  --bad: #A32D3F;         /* out of stock / cancelled */
  --bad-soft: #F7E2E5;
  --warn: #7A5200;
  --warn-soft: #F8EDD2;

  --radius: 10px;
  --radius-sm: 8px;
  --shadow-float: 0 6px 20px rgba(32, 43, 39, .16);
  /* Only weights 400 and 700 are used: other weights make Windows swap Armenian letters to a different typeface. */
  --font: "Segoe UI", Roboto, "Noto Sans", "Noto Sans Armenian", "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 66px;
  --topbar-h: 58px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 23px; line-height: 1.2; font-weight: 700; color: var(--ink); }
h2 { font-size: 19px; line-height: 1.25; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 700; }
b, strong { font-weight: 700; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid #D98A6F; outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic--cat { stroke-width: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 14px; }

/* ---------- demo strip ---------- */
.demo-strip { background: var(--ink); color: #EFE7D8; text-align: center; font-size: 12.5px; padding: 5px 12px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.topbar__in { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; }
.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 26px; width: auto; }
.topbar__space { flex: 1; }
.topsearch, .topnav, .topcart { display: none; }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; flex: none; background: #fff; }
.lang button { min-width: 44px; height: 38px; padding: 0 9px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.lang button[aria-pressed="true"] { background: var(--green); color: #fff; }

.acc-btn { height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--green); color: var(--green); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.acc-btn .ic { width: 20px; height: 20px; }
.acc-btn--in { width: 40px; padding: 0; justify-content: center; background: var(--green); color: #fff; }
.acc-btn__name { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 17px; line-height: 1.15; text-align: center;
  background: var(--green); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--green-dark); }
.btn--cta { background: var(--terra); }
.btn--cta:hover { background: var(--terra-dark); }
.btn--ghost { background: #fff; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn--ghost:hover { background: var(--green-soft); }
.btn--quiet { background: var(--green-soft); color: var(--green); }
.btn--quiet:hover { background: #D8E5DF; }
.btn--danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn--danger:hover { background: var(--bad-soft); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn--lg { min-height: 56px; font-size: 18px; }
.btn[disabled] { background: #C9C4B9; color: #fff; box-shadow: none; cursor: not-allowed; }
.btn .ic { width: 21px; height: 21px; }
.linkbtn { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.linkbtn--bad { color: var(--bad); }

/* ---------- chips (small labels) ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 2px 8px; border-radius: 6px; font-size: 13.5px; font-weight: 700; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--bad { background: var(--bad-soft); color: var(--bad); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--terra { background: var(--terra-soft); color: var(--terra-dark); }
.chip--green { background: var(--green-soft); color: var(--green); }
.chip--sale { background: var(--terra); color: #fff; }
.chip--ink { background: var(--fill); color: var(--ink); }
.chip .ic { width: 15px; height: 15px; stroke-width: 2.2; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card + .card { margin-top: 10px; }
.card__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- photo placeholder ---------- */
.noimg { background: var(--fill) !important; color: #B4AB99; }
.noimg .ic { width: 38%; height: 38%; max-width: 72px; max-height: 72px; }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 14px; }
.field__label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.field__hint { display: block; font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid #CFC6B4; background: #fff; font-size: 18px; color: var(--ink); appearance: none;
}
.textarea { min-height: 84px; resize: vertical; font-size: 16.5px; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23245346' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 42px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(36, 83, 70, .14); }
.input--pin { letter-spacing: .5em; font-weight: 700; font-size: 24px; text-align: center; }
.phone { display: flex; align-items: stretch; }
.phone__pre { display: flex; align-items: center; padding: 0 12px; border: 1.5px solid #CFC6B4; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--fill); font-weight: 700; font-size: 18px; }
.phone .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-weight: 700; letter-spacing: .04em; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 700; font-size: 15px; margin-top: 12px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 52px; height: 30px; border-radius: 999px; background: #C9C4B9; position: relative; transition: background .15s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch__track { outline: 3px solid #D98A6F; outline-offset: 2px; }

/* ---------- page frame ---------- */
.view { padding: 14px 0 calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); min-height: 70vh; }
.view.has-cartbar { padding-bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom)); }
.pagehead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pagehead__back { width: 44px; height: 44px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--green); flex: none; }
.pagehead__sub { font-size: 14.5px; color: var(--muted); }
.section { margin-top: 24px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }

/* ---------- home ---------- */
.searchbox { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-radius: var(--radius-sm); background: #fff; border: 1.5px solid var(--green); color: var(--muted); font-size: 17.5px; }
.searchbox .ic { color: var(--green); }
.searchbox--input { cursor: text; }
.searchbox--input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.searchbox--input input::placeholder { color: var(--muted); }

/* this week's sale */
.sale { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--terra); border-radius: var(--radius); padding: 12px 0 12px 12px; }
.sale__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-right: 12px; margin-bottom: 10px; }
.sale__head h2 { color: var(--terra-dark); font-size: 18px; }
.sale__until { display: block; font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.sale__all { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding-left: 8px; font-weight: 700; font-size: 15px; color: var(--green); white-space: nowrap; }
.sale__all .ic { width: 18px; height: 18px; }
.sale__row { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 4px 0; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sale__row::-webkit-scrollbar { display: none; }
.scard { flex: 0 0 132px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.scard__img { position: relative; display: flex; align-items: center; justify-content: center; width: 132px; height: 132px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.scard__img img { width: 100%; height: 100%; object-fit: contain; }
.scard__name { font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.scard .price__now { font-size: 18px; }
.scard .price-lock { min-height: 0; font-size: 13px; }
.salebadge { position: absolute; top: 6px; left: 6px; z-index: 1; background: var(--terra); color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1; padding: 5px 6px; border-radius: 4px; }

/* guest banner / client strip */
.hero { margin-top: 12px; padding: 18px 16px; border-radius: var(--radius); background: var(--green); color: #fff; }
.hero h1 { color: #fff; font-size: 21px; }
.hero p { margin-top: 6px; color: #D3E3DB; }
.hero .btn { margin-top: 14px; }
.acct { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--green); color: #fff; }
.acct__name { font-size: 18px; font-weight: 700; }
.acct__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14.5px; color: #DCE9E3; }
.acct__meta span { display: inline-flex; align-items: center; gap: 6px; }
.acct__meta .ic { width: 17px; height: 17px; }

/* categories: a plain index list */
.cats { display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cat { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px; border-top: 1px solid var(--line); }
.cat:first-child { border-top: 0; }
.cat:hover, .cat:active { background: var(--green-soft); }
.cat__icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); flex: none; }
.cat__icon .ic { width: 24px; height: 24px; }
.cat__text { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cat__name { font-weight: 700; font-size: 16.5px; line-height: 1.25; }
.cat__count { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.cat::after { content: ""; width: 9px; height: 9px; border-right: 2px solid #A9A08D; border-top: 2px solid #A9A08D; transform: rotate(45deg); flex: none; margin-right: 4px; }

.steps { display: grid; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step__n { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; flex: none; }
.step__t { font-weight: 700; }

.contact { display: grid; gap: 8px; }
.cbtn { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 16px; border-radius: var(--radius-sm); color: #fff; font-weight: 700; font-size: 17.5px; width: 100%; text-align: left; }
.cbtn small { display: block; font-weight: 400; font-size: 13.5px; opacity: .92; }
.cbtn--call { background: var(--green); }
.cbtn--wa { background: #1E7E46; }
.cbtn--viber { background: #5B47AD; }
.contact--col { grid-template-columns: 1fr !important; }

.statuscard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); margin-top: 10px; }
.statuscard__ic { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--terra-soft); color: var(--terra); display: flex; align-items: center; justify-content: center; flex: none; }
.statuscard b { display: block; line-height: 1.25; }

.footer { margin-top: 30px; padding: 16px 0 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.footer a { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 10px 6px; }

/* ---------- product list / cards ---------- */
.layout { display: block; }
.side { display: none; }
.plist { display: grid; gap: 8px; }
.pcard { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pcard__img { position: relative; display: flex; align-items: center; justify-content: center; width: 104px; height: 104px; border-radius: 6px; background: #fff; overflow: hidden; align-self: start; }
.pcard__img img { width: 100%; height: 100%; object-fit: contain; }
.pcard__body { display: flex; flex-direction: column; min-width: 0; }
.pcard__name { font-weight: 700; font-size: 16.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { font-size: 14px; color: var(--muted); margin-top: 3px; }
.pcard__foot { margin-top: auto; padding-top: 8px; display: grid; gap: 8px; }
.pcard__foot .btn { width: 100%; }
.pcard__foot .stepper { display: flex; }
.pcard__foot .stepper__qty { flex: 1; min-width: 0; }
.pcard__foot .chip { justify-self: start; }
.pcard.is-out .pcard__img { opacity: .45; filter: grayscale(.6); }
.pcard.is-out .pcard__name { color: var(--muted); }

.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; line-height: 1.1; }
.price__now { font-size: 20px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.price__old { font-size: 14px; color: var(--muted); text-decoration: line-through; white-space: nowrap; }
.price--sale .price__now { color: var(--terra-dark); }
.price-lock { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14.5px; color: var(--muted); }
.price-lock .ic { width: 17px; height: 17px; }

.btn--add { min-height: 46px; padding: 0 14px 0 10px; font-size: 16px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--green); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { width: 46px; height: 43px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.stepper button:active { background: var(--green); color: #fff; }
.stepper .ic { stroke-width: 2.4; }
.stepper__qty { width: 52px; height: 43px; border: 0; background: #fff; text-align: center; font-weight: 700; font-size: 18px; color: var(--ink); padding: 0; -moz-appearance: textfield; }
.stepper__qty:focus { outline: none; box-shadow: inset 0 0 0 2px var(--green); }
.stepper--lg button { width: 56px; height: 52px; }
.stepper--lg .stepper__qty { width: 70px; height: 52px; font-size: 21px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-top: 8px; max-width: 100%; background: var(--fill); }
.seg button { min-height: 36px; padding: 0 11px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--green); font-weight: 700; box-shadow: inset 0 -2px 0 var(--green); }

.more { margin-top: 12px; }
.empty { text-align: center; padding: 30px 16px; }
.empty__ic { width: 68px; height: 68px; border-radius: 50%; background: var(--fill); color: #9A917F; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.empty__ic .ic { width: 32px; height: 32px; }
.empty p { color: var(--muted); margin-top: 6px; }
.empty .btn { margin-top: 16px; }

/* ---------- product page ---------- */
.pd { display: grid; gap: 14px; }
.pd__img { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-height: 340px; width: 100%; }
.pd__img--ph { aspect-ratio: auto; height: 170px; }
.pd__img img { width: 100%; height: 100%; object-fit: contain; }
.pd__img .salebadge { top: 10px; left: 10px; font-size: 16px; padding: 7px 9px; }
.pd__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.unitopts { display: grid; gap: 8px; margin-top: 14px; }
.unitopt { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; width: 100%; padding: 11px 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; }
.unitopt[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.unitopt b { display: block; font-size: 16.5px; }
.unitopt small { color: var(--muted); font-size: 13.5px; }
.pd__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pd__buy .btn { flex: 1; }
.note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.note .ic { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- cart ---------- */
.cline { display: grid; grid-template-columns: 60px 1fr auto; gap: 8px 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.cline:first-child { border-top: 0; padding-top: 0; }
.cline__info { min-width: 0; }
.cline > .cline__sum { padding-top: 2px; }
.cline__img { width: 60px; height: 60px; border-radius: 6px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.cline__img img { width: 100%; height: 100%; object-fit: contain; }
.cline__name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.cline__meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.cline__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cline__sum { font-weight: 700; font-size: 18px; white-space: nowrap; }
.cline__del { width: 42px; height: 42px; margin: -6px -6px 0 0; border-radius: var(--radius-sm); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.cline__del:hover { color: var(--bad); background: var(--bad-soft); }

.sum { display: grid; gap: 8px; }
.sum__row { display: flex; justify-content: space-between; gap: 12px; }
.sum__row--save { color: var(--ok); }
.sum__row--total { font-size: 21px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 2px; }
.progress { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--terra); transition: width .2s; }
.progress.is-ok > i { background: var(--ok); }
.infoline { display: flex; align-items: flex-start; gap: 12px; }
.infoline__ic { width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.infoline b { display: block; font-size: 17px; line-height: 1.25; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 13px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-weight: 700; margin-bottom: 10px; }
.banner .linkbtn { color: var(--warn); margin-left: auto; }
.paybar { margin-top: 12px; }
.paybar--inline { display: none; }

/* ---------- orders ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; background: var(--fill); }
.tabs button { min-height: 46px; font-size: 16px; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: #fff; color: var(--green); font-weight: 700; box-shadow: inset 0 -3px 0 var(--green); }
.ocard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ocard__no { font-weight: 700; font-size: 18px; }
.ocard__meta { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.ocard__sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; }
.ocard__sum b { font-size: 19px; }
.ocard__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ocard__actions > :only-child { grid-column: 1 / -1; }
.thumbs { display: flex; gap: 6px; margin-top: 10px; overflow: hidden; }
.thumbs span { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.thumbs .noimg .ic { width: 22px; height: 22px; }
.thumbs .thumbs__more { background: var(--fill); font-size: 13px; font-weight: 700; color: var(--muted); }

/* Order progress: a column of steps on phones (four Armenian words do not fit in a row), a row on wider screens. */
.track { display: grid; margin-top: 6px; position: relative; }
.track__step { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 15px; line-height: 1.25; color: var(--muted); position: relative; }
.track__dot { width: 30px; height: 30px; border-radius: 50%; background: #E4DDCE; color: #fff; flex: none; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.track__dot .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.track__step::before { content: ""; position: absolute; left: 13.5px; top: -50%; width: 3px; height: 100%; background: #E4DDCE; }
.track__step:first-child::before { display: none; }
.track__step.is-done { color: var(--green); font-weight: 700; }
.track__step.is-done .track__dot { background: var(--green); }
.track__step.is-done::before { background: var(--green); }
.track__step.is-now { color: var(--terra-dark); font-weight: 700; }
.track__step.is-now .track__dot { background: var(--terra); }
.track__step.is-now::before { background: var(--green); }
@media (min-width: 600px) {
  .track { grid-template-columns: repeat(4, 1fr); }
  .track__step { display: block; padding: 0; text-align: center; font-size: 13px; }
  .track__dot { width: 32px; height: 32px; margin: 0 auto 6px; }
  .track__dot .ic { width: 17px; height: 17px; }
  .track__step::before { top: 15px; left: -50%; width: 100%; height: 3px; }
}

.done { text-align: center; padding: 22px 8px 8px; }
.done__ic { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); color: #fff; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.done__ic .ic { width: 40px; height: 40px; stroke-width: 2.6; }
.done .card { text-align: left; margin-top: 16px; }
.done__actions { display: grid; gap: 10px; margin-top: 16px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* ---------- cart bar + tab bar (phone) ---------- */
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25; padding: 0 10px 8px; pointer-events: none; }
.cartbar a { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: var(--radius); background: var(--terra); color: #fff; font-weight: 700; box-shadow: var(--shadow-float); max-width: 560px; margin: 0 auto; }
.cartbar__sum { font-size: 19px; }
.cartbar__go { display: inline-flex; align-items: center; gap: 4px; font-size: 16.5px; }
.cartbar small { display: block; font-weight: 400; font-size: 13px; opacity: .92; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a, .tabbar button { height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--muted); position: relative; width: 100%; }
.tabbar .ic { width: 26px; height: 26px; }
.tabbar .is-active { color: var(--green); font-weight: 700; }
.tabbar .is-active::before { content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 3px; background: var(--green); }
.badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--terra); color: #fff; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

/* ---------- sheet (bottom dialog) + toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(32, 43, 39, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 14px 14px 0 0; padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet__close { width: 44px; height: 44px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sheet__actions { display: grid; gap: 10px; margin-top: 16px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); z-index: 60; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15.5px; max-width: calc(100vw - 32px); text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- login ---------- */
.auth { max-width: 460px; margin: 0 auto; }
.demo-box { margin-top: 16px; padding: 14px; border-radius: var(--radius); border: 1.5px dashed #C9BFAA; background: #fff; }
.demo-box p { font-size: 14.5px; color: var(--muted); margin: 4px 0 12px; }

@media (max-width: 359px) { .logo img { height: 21px; } .lang button { min-width: 40px; padding: 0 7px; } .acc-btn { padding: 0 10px; } .wrap { padding: 0 10px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =========================================================
   Wider phones / tablets
   ========================================================= */
@media (min-width: 560px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .cat:nth-child(2) { border-top: 0; }
  .cat:nth-child(odd) { border-right: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .contact { grid-template-columns: repeat(3, 1fr); }
  .plist { grid-template-columns: repeat(2, 1fr); }
  .done__actions { grid-template-columns: 1fr 1fr; }
  .scard { flex-basis: 150px; }
  .scard__img { width: 150px; height: 150px; }
}

/* =========================================================
   Desktop
   ========================================================= */
@media (min-width: 900px) {
  :root { --topbar-h: 70px; }
  body { font-size: 16.5px; }
  .wrap { padding: 0 24px; }
  h1 { font-size: 28px; }
  .logo img { height: 34px; }
  .tabbar, .cartbar { display: none; }
  .view, .view.has-cartbar { padding: 24px 0 60px; }
  .toast { bottom: 32px; }
  .overlay { align-items: center; }
  .sheet { border-radius: 14px; padding: 22px; }

  .topbar__in { gap: 18px; }
  .topbar__space { display: none; }
  .topsearch { display: flex; flex: 1 1 260px; min-width: 200px; max-width: 460px; position: relative; }
  .topsearch input { width: 100%; height: 44px; border-radius: var(--radius-sm); border: 1.5px solid #CFC6B4; background: #fff; padding: 0 14px 0 42px; font-size: 16px; }
  .topsearch input:focus { outline: none; border-color: var(--green); }
  .topsearch .ic { position: absolute; left: 12px; top: 10px; color: var(--green); }
  .topnav { display: flex; gap: 4px; margin-left: auto; }
  .topnav a, .topnav button { white-space: nowrap; height: 44px; padding: 0 12px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15.5px; display: inline-flex; align-items: center; color: var(--ink); }
  .topnav a:hover, .topnav button:hover { background: var(--green-soft); color: var(--green); }
  .topnav .is-active { color: var(--green); background: var(--green-soft); }
  .topnav .ic { width: 19px; height: 19px; }
  .acc-btn--in { width: auto; padding: 0 14px; }
  .acc-btn__name { display: inline; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topcart { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--radius-sm); background: var(--terra); color: #fff; font-weight: 700; position: relative; }
  .topcart:hover { background: var(--terra-dark); }

  .home-search { display: none; }
  .sale { margin-top: 0; padding: 16px 0 16px 16px; }
  .sale__head { padding-right: 16px; }
  .sale__row { padding-right: 16px; gap: 16px 14px; flex-wrap: wrap; overflow: visible; }
  .scard { flex-basis: 168px; }
  .scard__img { width: 168px; height: 168px; }
  .hero { padding: 26px 28px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 17.5px; }
  .acct { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
  .acct__meta { margin-top: 0; font-size: 15px; }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .cat { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .cat:nth-child(-n+3) { border-top: 0; }
  .cat:nth-child(3n) { border-right: 0; }

  .layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
  .side { display: block; position: sticky; top: calc(var(--topbar-h) + 18px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
  .side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 15px; line-height: 1.2; }
  .side a .ic { width: 21px; height: 21px; color: var(--green); }
  .side a:hover { background: var(--green-soft); }
  .side a.is-active { background: var(--green); color: #fff; font-weight: 700; }
  .side a.is-active .ic { color: #fff; }

  .plist { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pcard { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  .pcard__img { width: 100%; height: 180px; }
  .plist--wide { grid-template-columns: repeat(4, 1fr); }

  .pd { grid-template-columns: 400px 1fr; gap: 30px; align-items: start; }
  .pd__img { max-height: none; }
  .pd__img--ph { height: 300px; }
  .paybar--inline { display: block; }
  .cartgrid { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
  .cartgrid > .stack { position: sticky; top: calc(var(--topbar-h) + 18px); }
  .ogrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ogrid .card + .card { margin-top: 0; }
  .narrow { max-width: 760px; margin: 0 auto; }
}
@media (min-width: 1200px) {
  .cats { grid-template-columns: repeat(4, 1fr); }
  .cat:nth-child(-n+3), .cat:nth-child(3n) { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .cat:nth-child(-n+4) { border-top: 0; }
  .cat:nth-child(4n) { border-right: 0; }
  .plist { grid-template-columns: repeat(4, 1fr); }
  .plist--wide { grid-template-columns: repeat(5, 1fr); }
}
