/*
 * Shared ST8 components for the page shell and P05: base, container,
 * buttons UI-45, fields UI-46, notices UI-48, header and navigation row,
 * bottom tab bar, catalog menu UI-02, footer, breadcrumbs UI-04, search UI-05.
 *
 * Values come from tokens.css; geometry from ST8 data/geometry.json and the
 * ST9 P05-01 frames. No shadows and no decorative motion (tokens.json).
 */

/* Base ------------------------------------------------------------------ */

body {
  font-family: var(--ti28-font-sans);
  font-size: var(--ti28-text-body);
  line-height: var(--ti28-line-height);
  color: var(--ti28-text-primary);
  background: var(--ti28-surface-page);
}

h1, h2, h3 {
  font-family: var(--ti28-font-sans);
  font-weight: 600;
  line-height: var(--ti28-line-height);
  color: var(--ti28-text-primary);
}

a {
  color: var(--ti28-link-light);
}

.ti28-container,
.site-content > .col-full {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--ti28-container-max) + 2 * var(--ti28-gutter));
  margin-inline: auto;
  padding-inline: var(--ti28-gutter);
}

/* Storefront clips sideways overflow with overflow-x: hidden on body and
   .site, which turns them into scroll containers and breaks the sticky
   navigation row; clip cuts the same overflow without that. */
body,
.site {
  overflow-x: clip;
}

/* Storefront's col-full adds its own float clearing and margins. */
.site-content > .col-full {
  margin-left: auto;
  margin-right: auto;
}

/* Storefront puts 2.6em under main and content-area; with the footer margin the
   gap before the footer grew to 150–260 px against 68–108 px in ST9. */
.site-main,
.content-area {
  margin-bottom: 0;
}

/* P01 sections carry their own containers; the hero is full-bleed (ST9 P01-01). */
.home .site-content > .col-full {
  max-width: none;
  padding-inline: 0;
}

/* Components set display; a hidden control must stay hidden (10-03). */
[hidden] {
  display: none !important;
}

.ti28-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ti28-skip-link {
  position: absolute;
  left: var(--ti28-space-4);
  top: -100px;
  z-index: 100;
  padding: var(--ti28-space-3) var(--ti28-space-4);
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
  font-weight: 600;
}

.ti28-skip-link:focus {
  top: var(--ti28-space-2);
}

/*
 * Focus ring: 2 px stroke, 2 px gap (geometry.focus). Storefront's purple
 * a/input/button:focus outline is replaced by a theme-aware keyboard ring.
 */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
summary:focus {
  outline: none;
}

:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: var(--ti28-focus-stroke) solid var(--ti28-focus-light);
  outline-offset: var(--ti28-focus-gap);
}

.ti28-surface-dark a:focus-visible,
.ti28-surface-dark button:focus-visible,
.ti28-surface-dark summary:focus-visible {
  outline-color: var(--ti28-focus-dark);
}

.ti28-icon {
  flex: 0 0 auto;
  width: var(--ti28-icon-size);
  height: var(--ti28-icon-size);
}

.ti28-caption {
  margin: 0 0 var(--ti28-space-2);
  font-size: var(--ti28-text-caption);
  color: var(--ti28-text-secondary);
}

.ti28-mono {
  font-family: var(--ti28-font-mono);
  font-size: var(--ti28-text-technical);
  overflow-wrap: anywhere;
}

.ti28-panel {
  box-sizing: border-box;
  padding: var(--ti28-panel-padding);
  background: var(--ti28-surface-panel);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  border-radius: var(--ti28-radius-panel);
}

/* Buttons UI-45 ----------------------------------------------------------- */

/* a.ti28-button outranks Storefront's underlined .entry-content a:not(.button):not(.components-button). */
.ti28-button,
a.ti28-button,
.site-content a.ti28-button:not(.button):not(.components-button) {
  text-decoration: none;
}

.ti28-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ti28-space-2);
  box-sizing: border-box;
  min-height: var(--ti28-button-min-height);
  padding: var(--ti28-space-3) var(--ti28-space-4);
  border: 0;
  border-radius: var(--ti28-radius-control);
  font: 600 var(--ti28-text-body) / var(--ti28-line-height) var(--ti28-font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ti28-button--primary {
  background: var(--ti28-action-primary);
  color: var(--ti28-action-foreground);
}

.ti28-button--primary:hover {
  background: var(--ti28-action-hover);
  color: var(--ti28-action-foreground);
}

/* Pressed: hover fill plus an inset 2 px foreground stroke (S8-A01). */
.ti28-button--primary:active {
  background: var(--ti28-action-pressed);
  box-shadow: inset 0 0 0 3px var(--ti28-action-pressed), inset 0 0 0 5px var(--ti28-action-foreground);
}

.ti28-button--secondary {
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
  border: var(--ti28-border-control-width) solid var(--ti28-border-control);
}

.ti28-button--secondary:hover {
  border-color: var(--ti28-text-primary);
}

.ti28-button--dark {
  background: var(--ti28-surface-inverse);
  color: var(--ti28-text-inverse);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
}

.ti28-button--dark:hover {
  background: var(--ti28-surface-inverse-hover);
  color: var(--ti28-text-inverse);
}

.ti28-button--secondary:active {
  background: var(--ti28-surface-accent-soft);
}

.ti28-button--dark:active {
  background: var(--ti28-surface-inverse);
  box-shadow: inset 0 0 0 3px var(--ti28-surface-inverse), inset 0 0 0 5px var(--ti28-text-inverse);
}

.ti28-button--block {
  width: 100%;
}

/* Disabled and loading: no colour-only signal, the label or a reason says why. */
.ti28-button:disabled,
.ti28-button[aria-disabled="true"] {
  background: var(--ti28-disabled-surface);
  color: var(--ti28-disabled-text);
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
}

.ti28-button[aria-busy="true"] {
  cursor: progress;
}

/* padding-block lifts a 22 px line link to the 24 px target (WCAG 2.5.8, A11Y-08). */
.ti28-link {
  padding-block: 2px;
}

.ti28-link,
.ti28-link-button {
  color: var(--ti28-link-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.ti28-link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--ti28-target-min);
  padding: 0;
  border: 0;
  background: none;
  font: 600 var(--ti28-text-body) / var(--ti28-line-height) var(--ti28-font-sans);
  cursor: pointer;
}

.ti28-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--ti28-target-min);
  min-height: var(--ti28-target-min);
  padding: 0;
  border: 0;
  border-radius: var(--ti28-radius-control);
  background: none;
  color: inherit;
  cursor: pointer;
}

/* Fields UI-46 ------------------------------------------------------------ */

.ti28-label {
  display: block;
  margin-bottom: var(--ti28-space-2);
  font-weight: 600;
}

/* input.ti28-field outranks Storefront's input[type=…] rules. */
.ti28-field,
input.ti28-field {
  box-sizing: border-box;
  min-height: var(--ti28-field-min-height);
  padding: 0 14px;
  background: var(--ti28-surface-panel);
  border: var(--ti28-border-control-width) solid var(--ti28-border-control);
  border-radius: var(--ti28-radius-control);
  color: var(--ti28-text-primary);
  font: 400 var(--ti28-text-body) / var(--ti28-line-height) var(--ti28-font-sans);
  box-shadow: none;
}

.ti28-field::placeholder,
input.ti28-field::placeholder {
  color: var(--ti28-text-secondary);
  opacity: 1;
}

.ti28-field:focus,
input.ti28-field:focus {
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
}

.woocommerce input.input-text:not(.ti28-field),
.woocommerce textarea:not(.ti28-field),
.woocommerce select:not(.ti28-sort__select) {
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
  border: var(--ti28-border-control-width) solid var(--ti28-border-control);
  box-shadow: none;
}

.woocommerce input.input-text:not(.ti28-field)::placeholder,
.woocommerce textarea:not(.ti28-field)::placeholder {
  color: var(--ti28-text-secondary);
  opacity: 1;
}

/* Error owns the border, focus owns the outline: both show together (UI-05 fix). */
input.ti28-field[aria-invalid="true"] {
  border-color: var(--ti28-error-text);
}

input.ti28-field:focus-visible,
input.ti28-field:focus {
  outline: var(--ti28-focus-stroke) solid var(--ti28-focus-light);
  outline-offset: var(--ti28-focus-gap);
}

.ti28-field-error {
  margin: var(--ti28-space-2) 0 0;
  color: var(--ti28-error-text);
}

/* Price and quantity UI-17 (P05, P06) ----------------------------------- */

.ti28-price {
  font-size: var(--ti28-text-price);
  font-weight: 600;
  line-height: var(--ti28-line-height);
  white-space: nowrap;
}

/* A sum never breaks between its digits and the rouble sign. */
.woocommerce-Price-amount {
  white-space: nowrap;
}

.ti28-qty {
  margin-bottom: var(--ti28-space-4);
}

.ti28-qty__row {
  display: flex;
  align-items: flex-start;
  gap: var(--ti28-space-2);
}

.ti28-qty__step {
  flex: 0 0 auto;
  width: var(--ti28-button-min-height);
  padding: 0;
  font-size: 20px;
}

.ti28-qty__field,
input.ti28-qty__field {
  width: 100px;
  min-width: 0;
  font-size: var(--ti28-text-technical);
}

/* Storefront pads the page header by ~96 px (cart, checkout: .storefront-full-width-content.woocommerce-cart
   .entry-header) and then zeroes the title margin; the title's own margin is enough (remix stage 3). */
/* Storefront's WooCommerce sheet loads after this one: the selectors outrank it instead. */
.site-main .entry-header,
.storefront-full-width-content.woocommerce-cart .site-main .entry-header,
.storefront-full-width-content.woocommerce-checkout .site-main .entry-header {
  margin-bottom: 0;
  padding-bottom: 0;
}

.storefront-full-width-content.woocommerce-cart .site-main .entry-header h1.entry-title:last-child,
.storefront-full-width-content.woocommerce-checkout .site-main .entry-header h1.entry-title:last-child {
  margin-bottom: var(--ti28-space-5);
}

/* Page titles: heading.page, left-aligned like ST9 (Storefront centres some). */
.site-main .entry-header .entry-title {
  margin: 0 0 var(--ti28-space-5);
  font-size: var(--ti28-text-h-page);
  text-align: left;
}

/* Notices UI-48 ----------------------------------------------------------- */

.ti28-notice {
  box-sizing: border-box;
  min-height: 56px;
  margin: 0 0 var(--ti28-space-4);
  padding: var(--ti28-space-4);
}

.ti28-notice p {
  margin: 0;
}

.ti28-notice--icon {
  display: flex;
  gap: var(--ti28-space-3);
  align-items: flex-start;
}

.ti28-notice--warning .ti28-icon {
  color: var(--ti28-warning-text);
}

.ti28-notice--error .ti28-icon {
  color: var(--ti28-error-text);
}

/* Header (remix stage 3) ------------------------------------------------- */
/*
 * Skeleton of the sample site in ti28 colours. From 992: top bar and logo row
 * on the inverse surface, then a sticky navigation row. Up to 991: compact header
 * without the navigation row; the bottom tab bar takes over (footer.php).
 */

.ti28-header {
  background: var(--ti28-surface-inverse);
  color: var(--ti28-text-inverse);
  border-bottom: var(--ti28-border-decorative-width) solid var(--ti28-border-inverse);
}

.ti28-header a {
  color: var(--ti28-text-inverse);
  text-decoration: none;
}

.ti28-header a.ti28-button--primary,
.ti28-header a.ti28-button--primary:hover {
  color: var(--ti28-action-foreground);
}

/* Phones: the sample's order — logo and cart, city and hours, phone and
   callback, e-mail, search (owner decision 2026-10-26, overrides stage 5
   item 6). The header becomes one grid; its rows lend it their children. */
.ti28-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--ti28-space-4);
  font-size: var(--ti28-text-caption);
  color: var(--ti28-text-inverse-secondary);
}

.ti28-topbar .ti28-icon {
  width: 18px;
  height: 18px;
}

.ti28-topbar__city {
  position: relative;
}

.ti28-topbar__city > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--ti28-space-1);
  min-height: var(--ti28-target-min);
  color: var(--ti28-text-inverse);
  cursor: pointer;
  list-style: none;
}

.ti28-topbar__city > summary::-webkit-details-marker {
  display: none;
}

.ti28-topbar__popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  box-sizing: border-box;
  width: min(300px, calc(100vw - 2 * var(--ti28-gutter)));
  padding: var(--ti28-space-3) var(--ti28-space-4);
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  border-radius: var(--ti28-radius-panel);
}

.ti28-topbar__popover p {
  margin: 0 0 var(--ti28-space-2);
}

/* Outranks .ti28-surface-dark a.ti28-link (pages.css): the popover is white (A11Y-02). */
.ti28-header .ti28-topbar__popover a.ti28-link {
  color: var(--ti28-link-light);
  text-decoration: underline;
}

.ti28-header .ti28-topbar__popover a.ti28-link:focus-visible {
  outline-color: var(--ti28-focus-light);
}

.ti28-topbar__hours {
  margin: 0;
}

.ti28-topbar__mail,
.ti28-topbar__messenger {
  display: none;
}

.ti28-topbar__mail a,
.ti28-topbar__messenger {
  display: inline-flex;
  align-items: center;
  gap: var(--ti28-space-2);
  min-height: var(--ti28-target-min);
}

.ti28-header__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "logo . cart"
    "contact contact contact"
    "search search search";
  align-items: center;
  gap: var(--ti28-space-2) var(--ti28-space-3);
  padding-block: var(--ti28-space-2) var(--ti28-space-4);
}

.ti28-header__logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  min-height: var(--ti28-target-min);
}

.ti28-header__logo img {
  display: block;
  width: 88px;
  height: auto;
}

.ti28-header__search {
  grid-area: search;
}

.ti28-header__search .ti28-search-ui__field {
  padding-right: 96px;
}

.ti28-header__search .ti28-search-ui__submit-text {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  min-height: 0;
  padding-block: 0;
}

.ti28-header__contact {
  grid-area: contact;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--ti28-space-4);
}

@media (max-width: 991px) {
  .ti28-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "logo . cart"
      "city hours hours"
      "contact contact contact"
      "mail mail mail"
      "search search search";
    align-items: center;
    gap: 0 var(--ti28-space-3);
    padding: var(--ti28-space-2) var(--ti28-gutter) var(--ti28-space-4);
  }

  .ti28-header__main,
  .ti28-topbar {
    display: contents;
  }

  .ti28-topbar__city {
    grid-area: city;
  }

  .ti28-topbar__hours {
    grid-area: hours;
    justify-self: end;
    text-align: right;
  }

  .ti28-topbar__messenger {
    display: none;
  }

  .ti28-topbar__mail {
    grid-area: mail;
    display: flex;
    align-items: center;
    font-size: var(--ti28-text-caption);
  }

  .ti28-header__search {
    margin-top: var(--ti28-space-2);
  }
}

.ti28-header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--ti28-space-2);
  min-height: var(--ti28-target-min);
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
}

.ti28-header__icons {
  grid-area: cart;
  display: flex;
  align-items: center;
  gap: var(--ti28-space-2);
}

html:not(.ti28-theme-ready) .ti28-theme-toggle {
  display: none;
}

.ti28-header__icons .ti28-theme-toggle {
  min-width: var(--ti28-target-min);
  min-height: var(--ti28-target-min);
  color: var(--ti28-text-inverse);
}

.ti28-theme-toggle [data-ti28-theme-icon="light"] {
  display: none;
}

html[data-ti28-theme="dark"] .ti28-theme-toggle [data-ti28-theme-icon="light"] {
  display: block;
}

html[data-ti28-theme="dark"] .ti28-theme-toggle [data-ti28-theme-icon="dark"] {
  display: none;
}

/* «Сравнение» and «Избранное» beside the cart, as in the sample header. */
.ti28-header__saved {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: var(--ti28-target-min);
  min-height: var(--ti28-target-min);
}

.ti28-header__saved-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ti28-header__saved-count {
  position: absolute;
  top: 0;
  left: calc(50% + 4px);
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--ti28-radius-control);
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

@media (min-width: 992px) {
  .ti28-header__saved-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    font-size: var(--ti28-text-caption);
    color: var(--ti28-text-inverse-secondary);
  }
}

/* Save buttons: round on the card photo, with a label on the product page. */
.ti28-saves--icon {
  position: absolute;
  top: var(--ti28-space-2);
  right: var(--ti28-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--ti28-space-2);
}

.ti28-saves--text {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ti28-space-2);
  margin-top: var(--ti28-space-3);
}

.ti28-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ti28-space-2);
  min-width: var(--ti28-target-min);
  min-height: var(--ti28-target-min);
  padding: 0 var(--ti28-space-3);
  background: var(--ti28-surface-panel);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  border-radius: var(--ti28-radius-control);
  color: var(--ti28-text-primary);
  font: 600 var(--ti28-text-caption) / var(--ti28-line-height) var(--ti28-font-sans);
  cursor: pointer;
}

.ti28-save--icon {
  padding: 0;
  border-radius: 50%;
}

.ti28-save .ti28-icon {
  width: 20px;
  height: 20px;
}

.ti28-save:hover {
  border-color: var(--ti28-text-primary);
}

.ti28-save:active {
  transform: translateY(1px);
}

.ti28-save[aria-pressed="true"] {
  border-color: var(--ti28-link-light);
  color: var(--ti28-link-light);
}

.ti28-save[data-ti28-save="fav"][aria-pressed="true"] .ti28-icon {
  fill: currentColor;
}

.ti28-header__cart {
  grid-area: cart;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: var(--ti28-target-min);
  min-height: var(--ti28-target-min);
}

.ti28-header__cart-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ti28-header__cart-count {
  position: absolute;
  top: 0;
  left: calc(50% + 4px);
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--ti28-radius-control);
  background: var(--ti28-action-primary);
  color: var(--ti28-action-foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

@media (min-width: 992px) {
  .ti28-topbar {
    display: flex;
    border-bottom: var(--ti28-border-decorative-width) solid var(--ti28-border-inverse);
  }

  .ti28-topbar__mail,
  .ti28-topbar__messenger {
    display: inline-flex;
  }

  .ti28-topbar__mail {
    margin-left: auto;
  }

  .ti28-header__main {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "logo search contact cart";
    gap: var(--ti28-space-5);
    padding-block: var(--ti28-space-4);
  }

  .ti28-header__logo img {
    width: 120px;
  }

  .ti28-header__search {
    max-width: 600px;
  }

  .ti28-header__contact {
    flex-direction: column;
    align-items: flex-end;
  }

  .ti28-header__phone {
    font-size: 21px;
  }

  .ti28-header__cart-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    font-size: var(--ti28-text-caption);
    color: var(--ti28-text-inverse-secondary);
  }
}

/* Navigation row: sticky, light; only from 992 ------------------------------ */

.ti28-navbar {
  display: none;
}

@media (min-width: 992px) {
  .ti28-navbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--ti28-surface-panel);
    border-bottom: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  }

  .ti28-navbar__inner {
    display: flex;
    align-items: center;
    gap: var(--ti28-space-3);
    min-height: 64px;
  }

  .ti28-navbar__catalog {
    flex: 0 0 auto;
    min-width: 148px;
  }

  .ti28-navbar__links,
  .ti28-navbar__dropdown {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .ti28-navbar__links {
    align-items: center;
    min-width: 0;
  }

  .ti28-navbar__links a,
  .ti28-navbar__more-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--ti28-space-1);
    box-sizing: border-box;
    min-height: 64px;
    padding: 0 var(--ti28-space-2);
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--ti28-text-primary);
    font: 600 var(--ti28-text-caption) / var(--ti28-line-height) var(--ti28-font-sans);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }

  .ti28-navbar__links a:hover,
  .ti28-navbar__more-toggle:hover {
    color: var(--ti28-link-light);
  }

  .ti28-navbar__links a[aria-current="page"] {
    border-bottom-color: var(--ti28-link-light);
  }

  .ti28-navbar__more-toggle .ti28-icon {
    width: 18px;
    height: 18px;
  }

  .ti28-navbar__more-toggle[aria-expanded="true"] .ti28-icon {
    transform: rotate(180deg);
  }

  .ti28-navbar__more {
    position: relative;
  }

  /* Without the script the «Ещё» links stay in the row; with it they wait in a closed dropdown. */
  html:not(.ti28-js) .ti28-navbar__more-toggle {
    display: none;
  }

  .ti28-js .ti28-navbar__dropdown:not(.is-open) {
    display: none;
  }

  .ti28-js .ti28-navbar__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    display: block;
    min-width: 220px;
    padding: var(--ti28-space-2) 0;
    background: var(--ti28-surface-panel);
    border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
    border-radius: var(--ti28-radius-panel);
  }

  .ti28-js .ti28-navbar__dropdown a {
    display: flex;
    min-height: var(--ti28-target-min);
    padding: 0 var(--ti28-space-4);
    border-bottom: 0;
  }

  .ti28-navbar__callback {
    flex: 0 0 auto;
    margin-left: auto;
  }

  /* Without room for the row button the header link stays (see below).
     Qualified: forms.css, loaded later, sets the link's own display. */
  .ti28-header__contact .ti28-header__callback {
    display: none;
  }
}

@media (min-width: 992px) and (max-width: 1279px) {
  .ti28-navbar__callback {
    display: none;
  }

  .ti28-header__contact .ti28-header__callback {
    display: inline-flex;
  }
}

/* Bottom tab bar and its menu: up to 991 ---------------------------------- */

.ti28-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ti28-surface-panel);
  border-top: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
}

body {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.ti28-tabbar__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ti28-text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.ti28-tabbar__item:hover,
.ti28-tabbar__item[aria-expanded="true"] {
  color: var(--ti28-link-light);
}

.ti28-tabbar__item:focus-visible {
  outline-offset: -4px;
}

.ti28-tabbar__count {
  position: absolute;
  top: 6px;
  left: calc(50% + 4px);
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--ti28-radius-control);
  background: var(--ti28-action-primary);
  color: var(--ti28-action-foreground);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.ti28-mobile-menu {
  position: fixed;
  right: var(--ti28-space-2);
  bottom: calc(64px + var(--ti28-space-2) + env(safe-area-inset-bottom));
  left: var(--ti28-space-2);
  z-index: 45;
  max-height: calc(100vh - 64px - var(--ti28-space-6));
  overflow-y: auto;
  padding: var(--ti28-space-2) 0;
  background: var(--ti28-surface-panel);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  border-radius: var(--ti28-radius-panel);
}

.ti28-mobile-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ti28-mobile-menu__list a,
.ti28-mobile-menu__list button,
.ti28-mobile-menu__back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--ti28-button-min-height);
  padding: 0 var(--ti28-space-4);
  border: 0;
  background: none;
  color: var(--ti28-text-primary);
  font: 600 var(--ti28-text-body) / var(--ti28-line-height) var(--ti28-font-sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ti28-mobile-menu__list a:focus-visible,
.ti28-mobile-menu__list button:focus-visible,
.ti28-mobile-menu__back:focus-visible {
  outline-offset: -4px;
}

.ti28-mobile-menu__back {
  justify-content: flex-start;
  gap: var(--ti28-space-2);
  color: var(--ti28-text-secondary);
}

@media (min-width: 992px) {
  .ti28-tabbar,
  .ti28-mobile-menu {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }
}

/* A focused element scrolled into view clears the tab bar below 992 and the
   sticky navigation row above (WCAG 2.4.11, review A11Y-01). */
html {
  scroll-padding-bottom: calc(64px + var(--ti28-space-4) + env(safe-area-inset-bottom));
}

@media (min-width: 992px) {
  html {
    scroll-padding-top: calc(64px + var(--ti28-space-2));
    scroll-padding-bottom: 0;
  }
}

/* Search UI-05 ------------------------------------------------------------ */

.ti28-search-ui__row {
  display: flex;
  position: relative;
}

.ti28-search-ui__field {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-right: 52px;
}

.ti28-search-ui__submit {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ti28-target-min);
  height: var(--ti28-target-min);
  padding: 0;
  border: 0;
  border-radius: var(--ti28-radius-control);
  background: none;
  color: var(--ti28-text-primary);
  cursor: pointer;
}

/*
 * Focus colour follows the surface around the ring (10-01): the header
 * field sits on the inverse surface, so its ring is light; the submit button
 * sits inside the field and takes the local focus colour.
 */
.ti28-surface-dark input.ti28-field:focus,
.ti28-surface-dark input.ti28-field:focus-visible {
  outline-color: var(--ti28-focus-dark);
}

.ti28-surface-dark .ti28-search-ui__submit:focus-visible {
  outline-color: var(--ti28-focus-light);
  outline-offset: -4px;
}

/* «Найти» with text sits inside the header field. */
.ti28-header .ti28-search-ui__submit-text:focus-visible {
  outline-color: var(--ti28-focus-light);
}

/* The error message sits on the inverse header surface. */
.ti28-header .ti28-field-error {
  color: var(--ti28-text-inverse);
  font-weight: 600;
}

/* Catalog mega-menu (remix stage 3, sample S01/S02) ------------------------ */
/*
 * A modal <dialog> at every width. From 992: a centred window over a dimmed
 * page, sections on the left, subsections on the right. Below 992: full
 * screen, the section list first and one section after a step down.
 */

.ti28-mm {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ti28-surface-panel);
  color: var(--ti28-text-primary);
}

.ti28-mm[open] {
  display: flex;
  flex-direction: column;
  animation: ti28-mm-in 0.18s ease;
}

.ti28-mm::backdrop {
  background: color-mix(in srgb, var(--ti28-surface-inverse) 60%, transparent);
}

@keyframes ti28-mm-in {
  from {
    opacity: 0;
  }
}

.ti28-mm__head {
  display: flex;
  align-items: center;
  gap: var(--ti28-space-3);
  padding: var(--ti28-space-3) var(--ti28-gutter);
  border-bottom: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
}

.ti28-mm__search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.ti28-mm__search > .ti28-icon {
  position: absolute;
  top: 50%;
  left: var(--ti28-space-3);
  transform: translateY(-50%);
  color: var(--ti28-text-secondary);
  pointer-events: none;
}

.ti28-mm__field,
input.ti28-mm__field {
  width: 100%;
  padding-left: 44px;
}

.ti28-mm__close {
  flex: 0 0 auto;
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
}

.ti28-mm__body {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
}

.ti28-mm__rail,
.ti28-mm__panels {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ti28-mm__rail {
  display: flex;
  flex-direction: column;
  padding: var(--ti28-space-2);
}

.ti28-mm__tab {
  display: flex;
  align-items: center;
  gap: var(--ti28-space-2);
  box-sizing: border-box;
  width: 100%;
  min-height: var(--ti28-button-min-height);
  padding: 0 var(--ti28-space-3);
  border: 0;
  border-radius: var(--ti28-radius-control);
  background: none;
  color: var(--ti28-text-primary);
  font: 600 var(--ti28-text-body) / var(--ti28-line-height) var(--ti28-font-sans);
  text-align: left;
  cursor: pointer;
}

.ti28-mm__tab .ti28-icon {
  width: 18px;
  height: 18px;
  color: var(--ti28-text-secondary);
}

.ti28-mm__tab-name {
  flex: 1 1 auto;
  min-width: 0;
}

.ti28-mm__tab:hover {
  background: var(--ti28-surface-page);
}

.ti28-mm__count {
  color: var(--ti28-text-secondary);
  font-size: var(--ti28-text-caption);
  font-weight: 400;
  white-space: nowrap;
}

.ti28-mm__panels {
  padding: var(--ti28-space-4) var(--ti28-gutter) var(--ti28-space-6);
}

.ti28-mm__back {
  display: inline-flex;
  align-items: center;
  gap: var(--ti28-space-1);
  min-height: var(--ti28-target-min);
  margin-bottom: var(--ti28-space-2);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ti28-link-light);
  font: 600 var(--ti28-text-body) / var(--ti28-line-height) var(--ti28-font-sans);
  cursor: pointer;
}

.ti28-mm__back .ti28-icon {
  width: 18px;
  height: 18px;
}

.ti28-mm__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ti28-space-1) var(--ti28-space-3);
  margin-bottom: var(--ti28-space-4);
}

.ti28-mm__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.ti28-mm__title a {
  color: var(--ti28-text-primary);
  text-decoration: none;
}

.ti28-mm__title a:hover {
  color: var(--ti28-link-light);
  text-decoration: underline;
}

.ti28-mm__cards {
  display: grid;
  gap: var(--ti28-space-2);
  margin: 0 0 var(--ti28-space-4);
  padding: 0;
  list-style: none;
}

.ti28-mm__card {
  display: flex;
  flex-direction: column;
  gap: var(--ti28-space-1);
  box-sizing: border-box;
  height: 100%;
  min-height: 56px;
  padding: var(--ti28-space-3) var(--ti28-space-4);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  border-radius: var(--ti28-radius-panel);
  color: var(--ti28-text-primary);
  font-weight: 600;
  text-decoration: none;
}

.ti28-mm__card:hover {
  border-color: var(--ti28-action-primary);
  color: var(--ti28-text-primary);
}

.ti28-mm__card-name {
  overflow-wrap: anywhere;
}

.ti28-mm__card--all .ti28-mm__card-name {
  color: var(--ti28-link-light);
}

.ti28-mm__empty {
  margin: 0 0 var(--ti28-space-4);
  color: var(--ti28-text-secondary);
}

/* Below 992: the list first, one section after a step down. */
@media (max-width: 991px) {
  .ti28-mm__body:not(.is-step2) .ti28-mm__panels,
  .ti28-mm__body.is-step2 .ti28-mm__rail,
  .ti28-mm__tab--all {
    display: none;
  }

  .ti28-mm__body.is-searching .ti28-mm__rail {
    display: none;
  }

  .ti28-mm__body.is-searching .ti28-mm__panels {
    display: block;
  }

  .ti28-mm__tab {
    border-bottom: var(--ti28-border-decorative-width) solid var(--ti28-surface-page);
    border-radius: 0;
  }
}

@media (min-width: 992px) {
  .ti28-mm {
    width: min(1240px, calc(100vw - 2 * var(--ti28-gutter)));
    height: auto;
    max-height: calc(100vh - 80px);
    margin: 40px auto auto;
    border-radius: var(--ti28-radius-panel);
  }

  .ti28-mm__head {
    padding: var(--ti28-space-4) var(--ti28-space-5);
  }

  .ti28-mm__body {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .ti28-mm__rail {
    border-right: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  }

  .ti28-mm__tab[aria-selected="true"] {
    background: var(--ti28-surface-accent-soft);
    color: var(--ti28-link-light);
  }

  .ti28-mm__tab[aria-selected="true"] .ti28-icon {
    color: var(--ti28-link-light);
  }

  .ti28-mm__panels {
    padding: var(--ti28-space-5);
  }

  .ti28-mm__back {
    display: none;
  }

  .ti28-mm__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ti28-space-3);
  }
}

@media (min-width: 1200px) {
  .ti28-mm__cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ti28-mm[open] {
    animation: none;
  }
}

body.ti28-modal-open {
  overflow: hidden;
}

/* Header search suggestions (owner item 11, sample S04) --------------------- */

.ti28-suggest {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 70;
  max-height: min(460px, 60vh);
  margin: 0;
  padding: var(--ti28-space-1) 0;
  overflow-y: auto;
  background: var(--ti28-surface-panel);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  border-radius: var(--ti28-radius-panel);
  color: var(--ti28-text-primary);
  list-style: none;
  text-align: left;
}

.ti28-header .ti28-suggest a {
  display: flex;
  align-items: center;
  gap: var(--ti28-space-3);
  min-height: var(--ti28-target-min);
  padding: var(--ti28-space-2) var(--ti28-space-3);
  color: var(--ti28-text-primary);
  text-decoration: none;
}

.ti28-suggest img {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--ti28-radius-control);
  background: var(--ti28-surface-page);
}

.ti28-suggest__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.ti28-suggest__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ti28-suggest__meta {
  color: var(--ti28-text-secondary);
  font-size: var(--ti28-text-caption);
  overflow-wrap: anywhere;
}

.ti28-suggest__price {
  flex: 0 0 auto;
  font-weight: 600;
  white-space: nowrap;
}

.ti28-suggest mark {
  background: var(--ti28-selection-surface);
  color: inherit;
  font-weight: 700;
}

.ti28-suggest [aria-selected="true"] a,
.ti28-header .ti28-suggest a:hover {
  background: var(--ti28-surface-accent-soft);
}

.ti28-header .ti28-suggest__all a {
  justify-content: center;
  border-top: var(--ti28-border-decorative-width) solid var(--ti28-border-decorative);
  color: var(--ti28-link-light);
  font-weight: 600;
}

@media (max-width: 767px) {
  .ti28-suggest__price {
    display: none;
  }
}

/* Breadcrumbs UI-04 ------------------------------------------------------- */

.ti28-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: var(--ti28-space-5) 0 var(--ti28-space-4);
  padding: 0;
  list-style: none;
  font-size: var(--ti28-text-caption);
  color: var(--ti28-text-secondary);
}

.ti28-breadcrumbs li + li::before {
  content: "/";
  margin: 0 var(--ti28-space-1);
}

.ti28-breadcrumbs a {
  display: inline-block;
  padding-block: 3px;
  color: var(--ti28-text-secondary);
}

/* Footer (remix stage 3) ------------------------------------------------- */

.ti28-footer {
  margin-top: var(--ti28-space-8);
  padding-block: var(--ti28-space-7) var(--ti28-space-5);
  background: var(--ti28-surface-inverse);
  color: var(--ti28-text-inverse);
}

.ti28-footer a {
  color: var(--ti28-text-inverse-secondary);
  text-decoration: none;
}

.ti28-footer a:hover {
  color: var(--ti28-text-inverse);
  text-decoration: underline;
}

.ti28-footer__grid {
  display: grid;
  gap: var(--ti28-space-4);
}

.ti28-footer__logo {
  display: inline-flex;
  min-height: var(--ti28-target-min);
}

.ti28-footer__logo img {
  display: block;
  width: 100px;
  height: auto;
}

.ti28-footer__group {
  border-bottom: var(--ti28-border-decorative-width) solid var(--ti28-border-inverse);
}

.ti28-footer__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--ti28-target-min);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.ti28-footer__title::-webkit-details-marker {
  display: none;
}

.ti28-footer__title::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
}

.ti28-footer__group[open] > .ti28-footer__title::after {
  content: "−";
}

.ti28-footer__group ul,
.ti28-footer__legal {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ti28-footer__group ul {
  padding-bottom: var(--ti28-space-3);
}

.ti28-footer__group li {
  break-inside: avoid;
}

.ti28-footer__group li a {
  display: inline-flex;
  align-items: center;
  min-height: var(--ti28-target-min);
  font-size: var(--ti28-text-body);
}

.ti28-footer__about {
  max-width: 34ch;
  margin: var(--ti28-space-2) 0 0;
  font-size: var(--ti28-text-caption);
  color: var(--ti28-text-inverse-secondary);
}

.ti28-footer__legal {
  margin-top: var(--ti28-space-2);
  font-size: var(--ti28-text-caption);
}

.ti28-footer__legal li {
  display: flex;
  align-items: center;
  min-height: var(--ti28-target-min);
}

.ti28-footer__contacts {
  padding: var(--ti28-panel-padding);
  border: var(--ti28-border-decorative-width) solid var(--ti28-border-inverse);
  border-radius: var(--ti28-radius-panel);
}

.ti28-footer__phone {
  display: inline-flex;
  align-items: center;
  min-height: var(--ti28-target-min);
  font-size: 24px;
  font-weight: 600;
  color: var(--ti28-text-inverse) !important;
}

.ti28-footer__hours,
.ti28-footer__address {
  margin: 0 0 var(--ti28-space-3);
  color: var(--ti28-text-inverse-secondary);
  font-size: var(--ti28-text-caption);
}

.ti28-footer__address {
  display: flex;
  gap: var(--ti28-space-2);
}

.ti28-footer__address .ti28-icon,
.ti28-footer__messenger .ti28-icon {
  width: 18px;
  height: 18px;
}

.ti28-footer__mail {
  display: flex;
  align-items: center;
  gap: var(--ti28-space-1);
}

.ti28-footer__mail a {
  color: var(--ti28-text-inverse);
  font-weight: 600;
}

.ti28-footer a.ti28-footer__callback,
.ti28-footer a.ti28-footer__callback:hover,
.ti28-footer a.ti28-footer__callback:focus,
.ti28-footer a.ti28-footer__callback:visited,
.ti28-footer a.ti28-footer__callback:active {
  width: 100%;
  margin-block: var(--ti28-space-3);
  color: var(--ti28-action-foreground);
  text-decoration: none;
}

.ti28-footer__messenger {
  display: inline-flex;
  align-items: center;
  gap: var(--ti28-space-2);
  min-height: var(--ti28-target-min);
}

.ti28-footer__bottom {
  margin-top: var(--ti28-space-6);
  padding-top: var(--ti28-space-4);
  border-top: var(--ti28-border-decorative-width) solid var(--ti28-border-inverse);
  color: var(--ti28-text-inverse-secondary);
  font-size: var(--ti28-text-caption);
}

.ti28-footer__bottom p {
  margin: 0 0 var(--ti28-space-2);
}

@media (min-width: 992px) {
  .ti28-footer__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 1.1fr) minmax(0, 1.6fr);
    gap: var(--ti28-space-6);
  }

  .ti28-footer__group {
    border-bottom: 0;
  }

  .ti28-footer__title {
    pointer-events: none;
  }

  .ti28-footer__title::after,
  .ti28-footer__group[open] > .ti28-footer__title::after {
    content: none;
  }

  .ti28-footer__group--catalog ul {
    columns: 2;
    column-gap: var(--ti28-space-5);
  }

  .ti28-footer__group li a {
    min-height: 34px;
  }
}

/* Storefront parts replaced by the ST8 shell. */
.storefront-handheld-footer-bar {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Toast for the save buttons: above the tab bar on phones (decision 2026-10-26). */
.ti28-toast {
  position: fixed;
  left: 50%;
  bottom: calc(64px + var(--ti28-space-3) + env(safe-area-inset-bottom));
  z-index: 70;
  box-sizing: border-box;
  max-width: calc(100vw - 2 * var(--ti28-gutter));
  margin: 0;
  padding: var(--ti28-space-2) var(--ti28-space-4);
  background: var(--ti28-surface-inverse);
  color: var(--ti28-text-inverse);
  border-radius: var(--ti28-radius-panel);
  font-size: var(--ti28-text-caption);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.ti28-toast.is-shown {
  opacity: 1;
}

@media (min-width: 992px) {
  .ti28-toast {
    bottom: var(--ti28-space-5);
  }
}
