:root {
  --primary: #111111;
  --secondary: #ffffff;
  --accent: #111111;
  --light: #ffffff;
  --dark: #111111;
  --muted: #686868;
  --card: #ffffff;
  --ring: rgba(17, 17, 17, 0.18);
  --shadow: 0 10px 25px rgba(44, 42, 61, 0.15);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --bottom-nav-clearance: 150px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Microsoft Sans Serif', Tahoma, sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--bottom-nav-clearance);
}

img,
picture,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

body > header,
body > footer,
body > main,
body > .tab-content {
  width: 100%;
}

body > footer {
  margin-top: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button,
input,
select,
textarea,
summary,
details,
iframe {
  touch-action: manipulation;
}

button,
.btn,
.mobile-filter-pill,
.subcategory-filter-chip,
.catalog-toggle,
.catalog-menu-link,
.catalog-menu-subcategory,
.catalog-menu-action,
.catalog-shortcut,
.mobile-bottom-link,
.category-btn,
.chat-fab,
.chat-close,
.catalog-menu-close {
  border-radius: 0 !important;
}

.chat-fab {
  border-radius: 999px 999px 999px 12px !important;
}

body.modal-open {
  overflow: hidden;
}

body.catalog-drawer-open,
body.mobile-filter-sheet-open {
  overflow: hidden;
}

body.catalog-drawer-open .mobile-bottom-nav,
body.catalog-drawer-open .chat-fab,
body.modal-open .mobile-bottom-nav,
body.modal-open .chat-fab,
body.chat-open .mobile-bottom-nav,
body.chat-open .chat-fab {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.container { width: min(1120px, 92%); margin: 0 auto; }

header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid rgba(44,42,61,0.06);
}

footer {
  background: #111111;
  color: #ffffff;
  border-top: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -10px 28px rgba(17,17,17,0.16);
}

header .bar, footer .bar { 
  display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; 
}

footer .bar {
  justify-content: center;
  min-height: 84px;
  text-align: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

footer a {
  color: inherit;
}

.site-footer {
  background: #111111;
  color: #ffffff;
  padding: 28px 0 0;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.site-footer-brandblock,
.site-footer-column {
  display: grid;
  gap: 10px;
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
}

.site-footer-brand .brand-logo {
  box-shadow: none;
}

.site-footer-text {
  color: rgba(255,255,255,0.72);
  max-width: 320px;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer-column h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.56);
  margin-bottom: 4px;
}

.site-footer-link {
  color: #ffffff;
  text-decoration: none;
  line-height: 1.5;
  width: fit-content;
  transition: opacity 0.2s ease;
}

.site-footer-link:hover {
  opacity: 0.72;
}

.site-footer-link-strong {
  margin-top: 4px;
  font-weight: 800;
}

.site-footer-bottom {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.site-footer-bottom-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}
.site-footer-rating {
  display: flex;
  justify-content: center;
  padding: 0 0 20px;
}
.yandex-rating-badge {
  display: block;
  border: 0;
  max-width: 100%;
}

.header-topbar {
  padding-bottom: 8px;
  transition: padding 0.25s ease, transform 0.25s ease;
  flex-wrap: wrap;
}

.header-utility-links {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-utility-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
  scrollbar-width: none;
}

.mobile-utility-links::-webkit-scrollbar {
  display: none;
}

.utility-phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: var(--dark);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.utility-phone-link:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.utility-about-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  color: var(--dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.utility-about-link:hover {
  background: rgba(17, 17, 17, 0.06);
}

.header-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  padding: 0 0 14px;
}

.header-toolbar > * {
  align-self: stretch;
}

.catalog-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  gap: 8px;
  border: 1px solid rgba(44,42,61,0.12);
  background: rgba(255,255,255,0.92);
  color: var(--dark);
  border-radius: 0;
  padding: 10px 13px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.catalog-toggle-label {
  display: inline-block;
  white-space: nowrap;
}

.catalog-toggle.active {
  border-color: rgba(17,17,17,0.45);
  background: #111111;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.18);
}

.catalog-toggle-icon,
.catalog-toggle-icon::before,
.catalog-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.catalog-toggle-icon {
  position: relative;
}

.catalog-toggle-icon::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.catalog-toggle-icon::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.header-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  column-gap: 8px;
  min-width: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.header-search-input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(44,42,61,0.14);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(44,42,61,0.08);
}

.header-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex-shrink: 0;
  color: currentColor;
  font-size: 22px;
  line-height: 1;
}

.header-search-submit {
  width: 54px;
  min-width: 54px;
  height: 54px;
  align-self: stretch;
  border: 0;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(17,17,17,0.12);
}

.header-nav-panel {
  display: none;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.catalog-menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 0 0 12px;
  background: transparent;
  box-shadow: none;
  z-index: 40;
}

.catalog-menu-panel.open {
  display: block;
}

.catalog-menu-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  width: min(880px, 82vw);
  margin: 0 auto;
  height: min(620px, calc(100vh - 128px));
  padding: 18px 20px 20px;
  background: rgba(255,255,255,0.99);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 0;
  box-shadow: 0 18px 44px rgba(44,42,61,0.14);
  overflow: hidden;
  align-items: start;
}

.catalog-menu-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.catalog-menu-mobile-search {
  display: none;
}

.catalog-menu-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding-right: 14px;
  border-right: 1px solid rgba(44,42,61,0.08);
}

.catalog-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}

.catalog-menu-list::-webkit-scrollbar {
  width: 6px;
}

.catalog-menu-list::-webkit-scrollbar-thumb {
  background: rgba(44,42,61,0.18);
  border-radius: 999px;
}

.catalog-menu-link {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition);
}

.catalog-menu-link:hover {
  transform: translateY(-1px);
  border-color: rgba(17,17,17,0.34);
  background: #111111;
  color: #ffffff;
}

.catalog-menu-link.active {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.catalog-menu-content {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding-left: 14px;
}

.modal-related {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(44,42,61,0.08);
}

.related-products-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.related-products-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.related-products-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.related-products-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.related-products-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-product-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  color: var(--dark);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-align: left;
}

.related-product-card img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(243,243,248,0.92);
}

.related-product-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.related-product-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.related-product-meta {
  font-size: 11px;
  color: var(--muted);
}

.related-product-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.catalog-menu-group {
  display: grid;
  gap: 8px;
}

.catalog-menu-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-menu-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 2px;
}

.catalog-menu-group.open .catalog-menu-chevron {
  transform: rotate(225deg);
}

.catalog-menu-accordion-body {
  display: none;
}

.catalog-menu-group.open .catalog-menu-accordion-body {
  display: grid;
  gap: 8px;
}

.catalog-menu-copy {
  background: #ffffff;
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 0;
  padding: 14px 16px;
}

.catalog-menu-copy h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.catalog-menu-copy p {
  color: var(--muted);
  max-width: 520px;
  font-size: 13px;
}

.catalog-menu-shortcuts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-menu-actions,
.catalog-menu-subcategories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-menu-action,
.catalog-menu-subcategory {
  border: 1px solid rgba(17,17,17,0.14);
  border-radius: 0;
  padding: 9px 14px;
  background: #ffffff;
  color: var(--dark);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.catalog-menu-action:hover,
.catalog-menu-subcategory:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.catalog-menu-empty {
  padding: 14px 16px;
  border: 1px dashed rgba(17,17,17,0.18);
  border-radius: 0;
  color: var(--muted);
  background: #ffffff;
}

.map-card iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  pointer-events: auto;
}

.catalog-shortcut {
  border: 1px solid rgba(44,42,61,0.1);
  border-radius: 0;
  padding: 8px 12px;
  background: #fff;
  color: var(--dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.catalog-shortcut:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.brand { 
  font-weight:800; letter-spacing:0.5px; font-size:22px; 
  display:inline-flex; align-items:center; gap:10px; 
  transition: transform 0.25s ease, font-size 0.25s ease;
}
.brand-logo { width:28px; height:28px; border-radius:8px; box-shadow: var(--shadow); object-fit: contain; }
.brand-badge { width:28px; height:28px; border-radius:8px; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: var(--shadow); }

.btn {
  --btn-bg: linear-gradient(135deg, var(--primary), var(--accent));
  --btn-color: #fff; --btn-shadow: 0 10px 18px rgba(58, 125, 88, 0.25);
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:10px 16px; border-radius:0; background:var(--btn-bg); color:var(--btn-color);
  border:0; cursor:pointer; font-weight:800; text-decoration:none; box-shadow:var(--btn-shadow);
  transform: translateY(0); transition: var(--transition);
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0); filter: saturate(0.95); }
.btn:disabled,
.catalog-card-action:disabled,
.modal-btn-primary:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
  pointer-events: none;
}
.btn.secondary {
  --btn-bg: rgba(255,255,255,0.85); --btn-color: var(--dark);
  border:1px solid rgba(44,42,61,0.12); box-shadow: 0 6px 16px rgba(44,42,61,0.12);
}
.btn.small { padding:8px 12px; border-radius:0; }

.welcome .btn,
.welcome .btn.secondary {
  text-decoration: none;
}

.welcome .btn.secondary {
  background: rgba(255,255,255,0.95);
}

.header-utility-links .btn,
.header-nav-panel .btn {
  --btn-bg: #ffffff;
  --btn-color: var(--dark);
  --btn-shadow: 0 8px 20px rgba(44,42,61,0.08);
  border: 1px solid rgba(44,42,61,0.12);
}

.header-utility-links .btn.active,
.header-nav-panel .btn.active {
  --btn-bg: #ffffff;
  --btn-color: #111111;
  box-shadow: inset 0 -3px 0 #111111, 0 8px 20px rgba(44,42,61,0.08);
}

.burger {
  display:none; width:42px; height:42px; border-radius:0; border:1px solid rgba(44,42,61,0.12);
  background:#fff; box-shadow: var(--shadow); align-items:center; justify-content:center; cursor:pointer; transition: var(--transition);
}
.burger span, .burger::before, .burger::after {
  content:""; display:block; width:20px; height:2px; background: var(--dark); border-radius:2px; transition: var(--transition);
}
.burger::after { transform: translateY(6px); }
.burger.active span { background: transparent; }
.burger.active::before { transform: rotate(45deg); }
.burger.active::after { transform: rotate(-45deg); }

body.header-scrolled .header-topbar {
  padding-bottom: 4px;
}

body.header-scrolled .brand {
  transform: translateY(-1px);
  font-size: 20px;
}

.catalog-menu-mobile-head {
  display: none;
}

.catalog-menu-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(44,42,61,0.12);
  border-radius: 0;
  background: #fff;
  color: var(--dark);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 18px;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(640px, calc(100vw - 32px));
  padding: 8px;
  transform: translateX(-50%);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(255,255,255,0.42)),
    rgba(255,255,255,0.58);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(17,17,17,0.18), inset 0 1px 0 rgba(255,255,255,0.72);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.mobile-bottom-nav::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 21px;
  pointer-events: none;
  background: radial-gradient(circle at 22% 12%, rgba(255,255,255,0.82), transparent 38%);
  opacity: 0.72;
}

.mobile-bottom-link {
  position: relative;
  z-index: 1;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 16px !important;
  background: rgba(255,255,255,0.28);
  color: var(--dark);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  line-height: 1.05;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.mobile-bottom-link:last-child {
  border-right: 1px solid rgba(255,255,255,0.34);
}

.mobile-bottom-link:hover {
  background: rgba(255,255,255,0.58);
  transform: translateY(-1px);
}

.mobile-bottom-link.active {
  color: #111111;
  background: rgba(255,255,255,0.74);
  box-shadow: inset 0 0 0 1px rgba(17,17,17,0.08), 0 8px 20px rgba(17,17,17,0.08);
}

.mobile-bottom-link[aria-disabled="true"] {
  color: var(--muted);
}

.mobile-bottom-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.mobile-bottom-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-bottom-link[href="/#favorites"] .mobile-bottom-icon svg,
.mobile-bottom-link[href="/favorites"] .mobile-bottom-icon svg,
.mobile-bottom-link[href="/favorites.html"] .mobile-bottom-icon svg {
  color: #e53935;
  fill: #e53935;
  stroke: #e53935;
}

.mobile-bottom-link[href="/contacts"] {
  color: #e53935;
}

.mobile-bottom-link[href="/contacts"] .mobile-bottom-icon svg {
  color: #e53935;
  fill: #e53935;
  stroke: #e53935;
}

.mobile-bottom-link[href="/contacts"] .mobile-bottom-icon svg circle {
  fill: #ffffff;
  stroke: #ffffff;
}

.mobile-bottom-link[href="/auth.html"] .mobile-bottom-icon svg {
  opacity: 0;
}

.mobile-bottom-link[href="/auth.html"] .mobile-bottom-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #111111;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5Zm0 2c-4.42 0-8 2.24-8 5v2h16v-2c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5Zm0 2c-4.42 0-8 2.24-8 5v2h16v-2c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mobile-bottom-badge {
  position: absolute;
  top: -8px;
  right: -11px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #d32f2f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  display: none;
}

.cart-notification {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 10050;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 14px 18px;
  background: #111111;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 34px rgba(17,17,17,0.26);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  animation: cartToastIn 0.24s ease both;
}

.ui-notice {
  position: fixed;
  right: 18px;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 10060;
  padding: 10px 14px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cart-notification.is-hiding {
  animation: cartToastOut 0.24s ease both;
}

@keyframes cartToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes cartToastOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
}

@media (max-width: 1024px) {
  .cart-notification {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .ui-notice {
    right: 16px;
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .burger,
  .header-nav-panel {
    display: none !important;
  }

  .bottom-menu-slider {
    display: none !important;
  }

  .header-utility-links {
    display: none !important;
  }

  .mobile-utility-links {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .header-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
  }

  .mobile-utility-links {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    overflow: visible;
  }

  .mobile-utility-links::-webkit-scrollbar {
    display: none;
  }

  .mobile-utility-links .btn {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-bottom-nav {
    display: grid !important;
  }

  .chat-fab {
    bottom: calc(var(--bottom-nav-clearance) + 10px);
  }

  .header-toolbar {
    grid-template-columns: 156px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
  }

  .catalog-menu-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.welcome { text-align:center; padding:54px 0 28px; }
.welcome h1 {
  font-size: clamp(26px, 4vw, 38px); margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 0.4px;
}
.welcome p { color: var(--muted); max-width:720px; margin: 0 auto 18px; }

.type-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:22px 0 10px; }
.type-title { display:inline-flex; align-items:center; gap:10px; font-weight:800; font-size:20px; }
.type-dot { width:10px; height:10px; border-radius:999px; background: linear-gradient(135deg, var(--secondary), var(--accent)); box-shadow: var(--shadow); }
.type-actions { display:flex; gap:8px; }

/* СЛАЙДЕР */
.slider {
  position:relative; border-radius:0;
  background: rgba(255,255,255,0.6); border:1px solid rgba(44,42,61,0.06); box-shadow: var(--shadow);
  overflow:hidden;
}
.viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 14px;
  -webkit-overflow-scrolling: touch;
}
.viewport::-webkit-scrollbar { display: none; }
.slides {
  display:flex; gap:14px; padding:14px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card {
  width:260px; flex:0 0 auto; border-radius:0; overflow:hidden; background: var(--card);
  border:1px solid rgba(44,42,61,0.06); box-shadow: 0 8px 18px rgba(44,42,61,0.08);
  transition: var(--transition);
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 28px rgba(44,42,61,0.12); }
.card img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; background:#fff; }
.pad {
  padding: 12px 14px 14px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  flex: 1 1 auto;
}
.card-copy {
  display: grid;
  align-content: start;
  gap: 6px;
}
.meta { font-size:12px; color: var(--muted); margin-bottom:6px; }
.name {
  font-weight:800;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price {
  display:flex;
  gap:8px;
  align-items: baseline;
  width: 100%;
}
.price-block {
  margin-top: auto;
  min-height: 58px;
  padding-top: 12px;
  border-top: 1px solid rgba(44,42,61,0.08);
}
.price-now { font-weight:800; font-size: 18px; }
.price-old { text-decoration: line-through; color: #b2adbf; font-weight: 600; }

/* Карточка товара и кнопка в корзину */
.grid .card {
  display: flex;
  flex-direction: column;
}

.grid .pad {
  display: flex;
  flex-direction: column;
}
#grid {
  align-items: stretch;
}
#grid .card-text-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
#grid .card-copy,
#grid .price-block {
  width: 100%;
}
#grid .price-block {
  margin-top: auto;
}

.grid .btn.small {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.grid .btn.small:hover {
  background: #333;
}

.grid .catalog-card-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  text-align: center;
}

.nav-btn {
  position:absolute; top:50%; transform: translateY(-50%);
  width:40px; height:40px; border-radius:0; border:0; cursor:pointer;
  background: rgba(255,255,255,0.95); box-shadow: var(--shadow);
  transition: var(--transition); display:grid; place-items:center;
  z-index: 5;
}
.nav-btn:hover { transform: translateY(calc(-50% - 1px)) scale(1.03); }
.nav-prev { left:10px; } .nav-next { right:10px; }
.nav-btn svg { width:18px; height:18px; }

.contacts { margin: 28px 0 48px; }
.contacts .card { width:auto; }
.contacts-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 760px) {
  .card { width:210px; }
  .contacts { padding-bottom: 24px; }
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.contact-box { display: grid; gap: 6px; background: rgba(255,255,255,0.7); border:1px solid rgba(44,42,61,0.06); border-radius:16px; padding:16px; box-shadow: var(--shadow); }
.contact-label { color: var(--muted); font-size:12px; }
.contact-value { font-weight:800; }
.contact-link {
  color: var(--dark);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.about-section {
  margin: 8px 0 22px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.about-copy,
.about-facts {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.about-copy h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.about-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.about-map-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.about-fact {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 86px;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  background: #ffffff;
}

.about-fact strong {
  font-size: 20px;
  line-height: 1;
}

.about-fact span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.about-page {
  display: grid;
  gap: 24px;
  padding: 28px 0 44px;
}

.about-section-head {
  display: grid;
  gap: 6px;
}

.about-section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.about-section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  font-size: 14px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.about-hero-copy,
.about-hero-card {
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 0;
  background: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.about-hero-copy h1 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 36px);
}

.about-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.about-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.about-hero-card {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}

.about-hero-stat {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 0;
  background: #fafafa;
}

.about-hero-stat strong {
  font-size: 20px;
  line-height: 1.1;
}

.about-hero-stat span {
  font-size: 12px;
  color: var(--muted);
}

.about-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.about-store-card {
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
}

.about-store-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.about-store-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.about-store-body h3 {
  margin: 0;
  font-size: 18px;
}

.about-store-body p {
  margin: 0;
  color: #333333;
  font-size: 14px;
}

.about-store-meta {
  color: var(--muted);
  font-size: 13px;
}

.about-store-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.about-reviews {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(54, 54, 58, 0.94), rgba(26, 26, 30, 0.9)),
    rgba(35, 35, 39, 0.92);
  color: #f4f4f4;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(24px) saturate(1.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
  overflow: hidden;
}

.home-reviews {
  margin: 24px 0 30px;
}

.about-reviews .about-section-head h2 {
  color: #ffffff;
}

.about-reviews .about-section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.about-reviews-actions .btn.secondary {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.about-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.about-reviews-slider {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  padding: 18px 16px 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 18px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.about-reviews-slider::before,
.about-reviews-slider::after {
  content: '';
  display: none;
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(12px);
  opacity: 0.55;
}

.about-reviews-slider::before {
  width: 150px;
  height: 150px;
  top: -42px;
  right: -28px;
  background: rgba(255, 255, 255, 0.06);
}

.about-reviews-slider::after {
  width: 120px;
  height: 120px;
  left: -26px;
  bottom: -44px;
  background: rgba(255, 255, 255, 0.05);
}

.about-reviews-slider .viewport {
  position: relative;
  z-index: 1;
  scroll-padding-left: 8px;
  scroll-padding-right: 8px;
}

.about-review-slides {
  padding: 14px 52px 14px 14px;
  align-items: flex-start;
}

.about-review-card {
  width: min(100%, 380px);
  flex: 0 0 min(100%, 380px);
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(36, 36, 40, 0.82), rgba(22, 22, 26, 0.58));
  padding: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 10px;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  position: relative;
  overflow: hidden;
}

.about-review-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
  pointer-events: none;
}

.about-review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.about-review-author {
  font-size: 18px;
  line-height: 1.1;
  color: #f4f4f4;
}

.about-review-score {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.about-review-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f5c74f;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.about-review-star {
  opacity: 0.25;
}

.about-review-star.is-full {
  opacity: 1;
}

.about-review-rating-value {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #f4f4f4;
  font-size: 12px;
  font-weight: 800;
}

.about-review-date {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.about-review-excerpt {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.about-review-card.is-expanded .about-review-excerpt {
  display: none;
}

.about-review-details {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.about-review-details summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #f4f4f4;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.about-review-details summary::-webkit-details-marker {
  display: none;
}

.about-review-details summary:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.about-review-full {
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
  white-space: pre-line;
}

.about-empty {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 0;
  padding: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.about-reviews-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.about-rating-badge {
  display: flex;
  justify-content: center;
  margin: 4px 0 0;
}

.about-rating-badge .yandex-rating-badge,
.site-footer-rating .yandex-rating-badge {
  display: block;
  width: min(100%, 520px);
  max-width: 100%;
  height: 54px;
  border: 0;
}

@media (max-width: 768px) {
  .about-reviews-slider {
    padding: 14px 12px 16px;
    border-radius: 0;
  }

  .about-review-slides {
    padding: 12px 8px 12px 12px;
  }

  .about-review-card {
    width: min(100%, 86vw);
    flex-basis: min(100%, 86vw);
    padding: 16px;
  }

  .about-review-author {
    font-size: 16px;
  }

  .about-review-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 4;
  }

  .about-reviews-slider .nav-btn {
    display: none !important;
  }

  .about-rating-badge,
  .site-footer-rating {
    width: 100%;
  }

  .about-rating-badge .yandex-rating-badge,
  .site-footer-rating .yandex-rating-badge {
    width: 100%;
    height: 54px;
  }
}

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-hero-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-store-grid {
    grid-template-columns: 1fr;
  }

  .about-reviews-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .about-hero-card {
    grid-template-columns: 1fr;
  }
}

.map-card {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.7);
  border:1px solid rgba(44,42,61,0.06);
  border-radius:16px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.cat-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
  overflow: visible;
}

.cat-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cat-icons {
  display: flex;
  gap: 14px;
  overflow: visible;
  overflow-x: visible;
  overflow-y: visible;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: auto;
  padding: 6px 2px 10px;
  scrollbar-width: auto;
  width: max-content;
}

.cat-icons::-webkit-scrollbar { display: initial; }

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  transition: var(--transition);
  flex: 0 0 160px;
  min-height: 180px;
  padding: 16px 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(44,42,61,0.08);
  box-shadow: 0 10px 24px rgba(44,42,61,0.08);
  scroll-snap-align: start;
}

.cat-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.cat-item span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  line-height: 1.25;
  font-size: 14px;
}

.cat-item:hover {
  transform: translateY(-3px);
}

/* Чат виджет */
.chat-fab{
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(var(--bottom-nav-clearance) + 12px);
  z-index: 9990;
  width: 58px;
  height: 50px;
  border: 1px solid rgba(17,17,17,.08);
  cursor: pointer;
  background: rgba(255,255,255,.94);
  color: #111;
  font-size: 0;
  box-shadow: 0 16px 34px rgba(17,17,17,.18);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chat-fab::before,
.chat-fab::after{
  content:"";
  position:absolute;
  background:#111;
  pointer-events:none;
}
.chat-fab::before{
  left:16px;
  top:14px;
  width:26px;
  height:18px;
  border-radius:10px;
}
.chat-fab::after{
  left:22px;
  top:28px;
  width:10px;
  height:10px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.chat-fab:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(17,17,17,.22);
  background:#fff;
}

@media (max-width: 640px) {
  .chat-fab {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(var(--bottom-nav-clearance) + env(safe-area-inset-bottom) + 8px) !important;
    width: 52px;
    height: 46px;
    z-index: 9991;
  }
}

@media (max-width: 380px) {
  .chat-fab {
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--bottom-nav-clearance) + env(safe-area-inset-bottom) + 6px) !important;
    width: 48px;
    height: 42px;
  }

  .chat-fab::before {
    left: 13px;
    top: 12px;
  }

  .chat-fab::after {
    left: 19px;
    top: 26px;
  }
}

.chat-modal{
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 60;
}
.chat-modal.open{ display: flex; }

.chat-dialog{
  position: relative;
  width: min(420px, 96%); background: var(--card); border-radius: 18px;
  border:1px solid rgba(44,42,61,0.08); box-shadow: var(--shadow); padding: 18px;
}
.chat-close{
  position: absolute; right: 18px; top: 14px; background: #fff; border:1px solid rgba(44,42,61,0.12);
  width:32px; height:32px; border-radius:10px; cursor:pointer;
}
.chat-sub{ color: var(--muted); margin: 6px 0 12px; }
.chat-form label{ display:block; margin-bottom: 10px; }
.chat-form input, .chat-form textarea{
  width:100%; padding:10px 12px; border-radius:12px; border:1px solid rgba(44,42,61,0.14);
  background:#fff; outline:none;
}
.chat-form input:focus, .chat-form textarea:focus{ box-shadow: 0 0 0 4px var(--ring); }
.chat-form .btn{ width:100%; margin-top: 6px; }
.chat-note{ color: var(--muted); font-size: 12px; margin-top: 8px; }
.chat-status{ margin-top:10px; font-weight:700; }

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

.assistant-chat-dialog{
  width:min(460px, 96vw);
  max-height:min(640px, calc(100vh - 32px));
  display:flex;
  flex-direction:column;
  gap:10px;
  border-radius:10px;
  padding:18px;
}

.assistant-chat-dialog h3{
  margin:0;
  padding-right:42px;
  font-size:20px;
  line-height:1.2;
}

.assistant-chat-dialog .chat-sub{
  margin:0;
  font-size:13px;
  line-height:1.35;
}

.assistant-messages{
  min-height:240px;
  max-height:360px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  background:#f6f7f9;
  border:1px solid rgba(44,42,61,0.08);
  border-radius:8px;
}

.assistant-message{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:86%;
}

.assistant-message-user{
  align-self:flex-end;
  align-items:flex-end;
}

.assistant-message-bot{
  align-self:flex-start;
}

.assistant-message-bubble{
  padding:10px 12px;
  border-radius:8px;
  font-size:14px;
  line-height:1.4;
  color:var(--dark);
  background:#fff;
  border:1px solid rgba(44,42,61,0.08);
}

.assistant-message-user .assistant-message-bubble{
  color:#fff;
  background:#071d33;
  border-color:#071d33;
}

.assistant-products{
  display:grid;
  gap:6px;
}

.assistant-product-link{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px 10px;
  color:var(--dark);
  text-decoration:none;
  background:#fff;
  border:1px solid rgba(44,42,61,0.1);
  border-radius:8px;
}

.assistant-product-link:hover{
  border-color:rgba(7,29,51,0.35);
}

.assistant-product-link span{
  font-size:13px;
  font-weight:700;
  line-height:1.25;
}

.assistant-product-link small{
  color:var(--muted);
  font-size:12px;
  line-height:1.25;
}

.assistant-chat-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:end;
}

.assistant-input-wrap{
  display:block;
}

.assistant-input-wrap textarea{
  width:100%;
  min-height:44px;
  max-height:110px;
  resize:vertical;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(44,42,61,0.14);
  background:#fff;
  color:var(--dark);
  outline:none;
}

.assistant-input-wrap textarea:focus{
  box-shadow:0 0 0 4px var(--ring);
}

.assistant-send{
  height:44px;
  padding:0 14px;
  border:0;
  border-radius:8px;
  background:#071d33;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.assistant-send:disabled{
  cursor:not-allowed;
  opacity:.65;
}

.chat-status[data-state="error"]{
  color:#c92a2a;
}

.chat-status[data-state="loading"]{
  color:var(--muted);
  font-size:13px;
}

@media (max-width: 560px){
  .chat-modal{
    align-items:flex-end;
    padding:10px;
  }

  .assistant-chat-dialog{
    width:100%;
    max-height:calc(100vh - 84px);
    padding:14px;
    border-radius:10px;
  }

  .assistant-chat-dialog h3{
    font-size:18px;
  }

  .assistant-messages{
    min-height:220px;
    max-height:calc(100vh - 310px);
    padding:10px;
  }

  .assistant-message{
    max-width:92%;
  }

  .assistant-chat-form{
    grid-template-columns:1fr;
  }

  .assistant-send{
    width:100%;
  }
}

/* Bottom Menu Slider */
.bottom-menu-slider {
  position: relative;
  background: #ffffff;
  border-top: 1px solid rgba(44, 42, 61, 0.08);
  padding: 12px 0;
  overflow: hidden;
  margin-top: 20px;
}

.bottom-menu-scroll {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.bottom-menu-scroll::-webkit-scrollbar {
  height: 4px;
}

.bottom-menu-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.bottom-menu-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.bottom-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  min-width: 70px;
  text-align: center;
  text-decoration: none;
  color: #111111;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.bottom-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.bottom-menu-icon {
  font-size: 24px;
  display: block;
}

.bottom-menu-label {
  font-size: 11px;
  font-weight: 600;
  color: #686868;
}

.bottom-menu-item:hover .bottom-menu-label {
  color: #111111;
}

/* Catalog specific styles */
.title {
  text-align: center;
  padding: 28px 0 14px;
}
.title h1 {
  font-size: clamp(24px, 4vw, 34px);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.title p { color: var(--muted); }

.subcategory-filter-bar {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.subcategory-filter-bar.active {
  display: flex;
}

.subcategory-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgba(44,42,61,0.1);
  border-radius: 0;
  background: rgba(255,255,255,0.86);
  color: var(--dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.subcategory-filter-chip.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.mobile-filter-rail-wrap {
  display: none;
}

.mobile-filter-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  padding: 4px 0 6px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}

.mobile-filter-rail::-webkit-scrollbar {
  display: none;
}

.mobile-filter-pill {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 10px 14px;
  border: 1px solid rgba(44,42,61,0.1);
  border-radius: 0;
  background: rgba(255,255,255,0.92);
  color: var(--dark);
  text-align: left;
  box-shadow: 0 8px 18px rgba(44,42,61,0.08);
  cursor: pointer;
}

.mobile-filter-pill.active {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.mobile-filter-pill.active .mobile-filter-pill-label,
.mobile-filter-pill.active .mobile-filter-pill-value {
  color: #ffffff;
}

.mobile-filter-pill-label {
  font-size: 12px;
  color: var(--muted);
}

.mobile-filter-pill-value {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-filter-sheet {
  display: none;
}

.mobile-filter-sheet.open {
  display: block;
}

.mobile-filter-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44,42,61,0.38);
  z-index: 69;
}

.mobile-filter-sheet-dialog {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(112px + env(safe-area-inset-bottom));
  z-index: 70;
  background: #fff;
  border-radius: 0;
  padding: 14px 14px 16px;
  box-shadow: 0 -24px 60px rgba(44,42,61,0.22);
  max-height: min(58vh, calc(100dvh - 210px), 520px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-filter-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.mobile-filter-sheet-head h3 {
  font-size: 22px;
  font-weight: 800;
}

.mobile-filter-sheet-close {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--dark);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.mobile-filter-sheet-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px 4px;
}

.mobile-filter-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-filter-option {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid rgba(44,42,61,0.1);
  background: rgba(255,255,255,0.94);
  color: var(--dark);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mobile-filter-option-color {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-filter-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(44,42,61,0.16);
  flex: 0 0 18px;
}

.mobile-filter-swatch-clear {
  background: linear-gradient(135deg, #ffffff, #ececec);
}

.mobile-filter-option.is-clear {
  color: var(--muted);
}

.mobile-price-form {
  display: grid;
  gap: 12px;
}

.mobile-price-field {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 0;
  box-shadow: 0 8px 18px rgba(44,42,61,0.06);
}

.mobile-price-field span {
  font-size: 12px;
  color: var(--muted);
}

.mobile-price-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.filters {
  position: sticky;
  top: 118px;
  z-index: 5;
  margin: 12px 0 16px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(44,42,61,0.06);
  border-radius: 0;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.filters-toggle-bar {
  display: none;
  justify-content: flex-end;
  margin: 14px 0 10px;
}

.filters-toggle-btn {
  min-width: 180px;
}

.primary-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.primary-filter-card {
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid rgba(44,42,61,0.06);
  border-radius: 0;
  box-shadow: 0 6px 14px rgba(44,42,61,0.08);
}

.primary-filter-card-minimal {
  padding: 10px 12px;
  border: 1px solid rgba(44,42,61,0.08);
  box-shadow: none;
}

.primary-filter-card.is-inactive {
  opacity: 0.72;
}

.primary-filter-card.is-hidden {
  display: none;
}

.primary-filter-card.is-wide {
  grid-column: 1 / -1;
}

.primary-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.primary-filter-head span {
  font-size: 12px;
  color: var(--muted);
}

.primary-filter-head strong {
  font-size: 13px;
}

.primary-filter-sliders {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.primary-range {
  width: 100%;
  accent-color: #111111;
}

.dual-range-wrap {
  position: relative;
  height: 26px;
  margin-top: 6px;
}

.dual-range-track,
.dual-range-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 999px;
}

.dual-range-track {
  background: rgba(17, 17, 17, 0.18);
}

.dual-range-fill {
  background: #111111;
}

.dual-range-input {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.dual-range-wrap .dual-range-input:first-of-type {
  z-index: 2;
}

.dual-range-wrap .dual-range-input:last-of-type {
  z-index: 3;
}

.dual-range-input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}

.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #111111;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.24);
  pointer-events: auto;
  cursor: pointer;
  margin-top: -6px;
}

.dual-range-input::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

.dual-range-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #111111;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.24);
  pointer-events: auto;
  cursor: pointer;
}

.primary-filter-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  display: none;
}

.primary-filter-select {
  display: grid;
  gap: 10px;
}

.primary-filter-select label {
  font-size: 13px;
  color: var(--muted);
}

.primary-filter-select-input {
  min-height: 36px;
}

.field-brand,
.field-collection {
  display: grid;
}

.filters.filters-collapsed {
  display: none;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: start;
  justify-content: center;
  min-width: 0;
}

.field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 7px 9px;
  background: var(--card);
  border: 1px solid rgba(44,42,61,0.06);
  border-radius: 0;
  box-shadow: 0 6px 14px rgba(44,42,61,0.08);
  min-width: 0;
}

.field-wide {
  width: 100%;
}

.field-category,
.field-subcategory {
  width: 100%;
}

.dynamic-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dynamic-field {
  width: 100%;
  justify-content: space-between;
}

.dynamic-field[data-filter-name="Цвет арматуры"],
.dynamic-field[data-filter-name="Цвет плафона"] {
  min-width: 0;
}

.field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.input,
.select {
  font: inherit;
  color: var(--dark);
  min-width: 0;
}

.filters .select,
.filters .input,
.primary-filter-select-input {
  appearance: none;
  border: 1px solid rgba(44,42,61,0.1);
  background: #ffffff;
  outline: none;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 0 !important;
  box-shadow: none;
}

.filters .select,
.primary-filter-select-input {
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, #111111 50%),
    linear-gradient(135deg, #111111 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.input[type="number"] { width: 110px; }
.field:focus-within { box-shadow: 0 0 0 6px var(--ring); }

#catalogFiltersPanel .actions,
.catalog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.catalog-actions {
  align-items: stretch;
}

.catalog-actions .btn {
  min-height: 42px;
}

.main-content {
  display: block;
  margin: 20px 0;
  min-width: 0;
}

.categories-sidebar {
  display: none;
}

.categories-title {
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(44,42,61,0.1);
}

.categories-list {
  list-style: none;
}

.category-item {
  margin-bottom: 8px;
}

.category-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  color: var(--dark);
}

.category-btn:hover,
.category-btn.active {
  background: #111111;
  color: white;
}

.content-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  grid-column: 1;
  grid-row: 1;
}

.grid .card {
  width: 100%;
  min-width: 0;
  height: 100%;
  border-radius: 0;
}

.grid .card img {
  aspect-ratio: 4 / 3;
}

.grid .pad {
  display: flex;
  /* Bottom Menu Slider */
  .bottom-menu-slider {
    display: none !important;
  }
  }

  .primary-filter-sliders {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }

  #grid {
    gap: 6px;
  }

  #grid .card img {
    aspect-ratio: 9 / 10;
    object-fit: contain;
  }

  #grid .pad {
    padding: 8px 8px 9px;
    gap: 4px;
  }

  #grid .card-copy {
    gap: 2px;
  }

  #grid .meta {
    display: none;
  }

  #grid .name {
    font-size: 12px;
    line-height: 1.14;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #grid .price-block {
    min-height: 40px;
    padding-top: 6px;
  }

  #grid .price-now {
    font-size: 14px;
  }

  #grid .catalog-card-action {
    margin-top: 4px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .related-products-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .catalog-menu-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    padding: 12px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.26) !important;
    backdrop-filter: saturate(1.1) blur(12px);
    z-index: 999 !important;
    overscroll-behavior: contain;
  }

  .catalog-menu-panel:not(.open) {
    display: none !important;
  }

  .catalog-menu-panel.open {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
  }

  .catalog-menu-mobile-head {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-bottom: 4px;
  }

  .catalog-menu-layout {
    display: grid;
    grid-template-columns: minmax(152px, 40%) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(760px, calc(100vw - 24px)) !important;
    height: calc(100dvh - 24px) !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 16px 16px 24px !important;
    border-radius: 0 !important;
    box-shadow: 0 18px 44px rgba(44,42,61,0.14) !important;
    overflow: hidden !important;
    background: #ffffff !important;
    gap: 14px;
  }

  .catalog-menu-sidebar {
    display: contents;
  }

  .catalog-menu-title {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    margin: 0;
  }

  .catalog-menu-content {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
    display: grid;
    min-height: 0;
    overflow: auto;
    padding-top: 52px;
  }

  .catalog-menu-mobile-search {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    align-items: center;
    padding: 2px 0 8px;
  }

  .catalog-menu-mobile-input {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(44,42,61,0.08);
    border-radius: 0;
    background: rgba(243,243,248,0.92);
    font-size: 14px;
  }

  .catalog-menu-mobile-submit {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 0;
    background: #11101a;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
  }

  .catalog-menu-list {
    grid-column: 1;
    grid-row: 3;
    align-self: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    margin-top: 42px;
    padding-right: 4px;
    padding-bottom: 10px;
    min-height: 0;
    overscroll-behavior: contain;
  }

  .catalog-menu-group {
    gap: 0;
    border-bottom: 1px solid rgba(44,42,61,0.08);
  }

  .catalog-menu-link {
    font-size: 15px;
    font-weight: 700;
    padding: 14px 4px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: var(--dark);
  }

  .catalog-menu-link.active,
  .catalog-menu-link:hover {
    background: transparent;
    color: var(--dark);
    border-color: transparent;
    transform: none;
  }

  .catalog-menu-accordion-body {
    display: none;
    gap: 8px;
    padding: 0 0 12px 14px;
  }

  .catalog-menu-group.open .catalog-menu-accordion-body {
    display: grid;
  }

  .catalog-menu-subcategory,
  .catalog-menu-action {
    width: 100%;
    text-align: left;
    border-radius: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
  }

  .catalog-menu-subcategory-all {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
  }

  .content-area {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters,
  .categories-sidebar,
  .filters-toggle-bar {
    display: none;
  }

  .mobile-filter-rail-wrap {
    display: block;
    position: static;
    top: auto;
    z-index: 12;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255,255,255,0.92));
    padding: 6px 0 4px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  .mobile-filter-rail {
    width: max-content;
    min-width: 100%;
    max-width: none;
  }

  .main-content,
  .content-area,
  .title,
  .subcategory-filter-bar,
  .mobile-filter-rail-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .subcategory-filter-bar.active {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .subcategory-filter-chip {
    flex: 0 0 auto;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 88px;
  }

  .container {
    width: min(1120px, calc(100% - 16px));
  }

  .burger {
    display: none !important;
  }

  .header-topbar {
    padding-top: 4px;
    padding-bottom: 2px;
  }


  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand {
    font-size: 13px;
    white-space: nowrap;
  }

  .brand-logo {
    width: 18px;
    height: 18px;
  }

  .header-toolbar {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
    padding-bottom: 6px;
  }

  .mobile-utility-links {
    gap: 8px;
  }

  .mobile-utility-links .btn {
    padding: 6px 8px;
    font-size: 12px;
    min-height: 32px;
    flex: 0 0 auto;
  }

  .brand {
    font-size: 15px;
    gap: 8px;
  }

  .brand-logo {
    width: 20px;
    height: 20px;
  }

  .catalog-toggle {
    height: 100%;
    min-height: 34px;
    justify-content: flex-start;
    border-radius: 0;
    padding: 5px 8px;
    gap: 4px;
    font-size: 12px;
    line-height: 1;
  }

  .catalog-toggle-label {
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0;
  }

  .catalog-toggle-icon,
  .catalog-toggle-icon::before,
  .catalog-toggle-icon::after {
    width: 12px;
    height: 1.5px;
  }

  .catalog-toggle-icon {
    flex-shrink: 0;
  }

  .catalog-toggle-icon::before {
    top: -4px;
  }

  .catalog-toggle-icon::after {
    top: 4px;
  }

  .header-search-form {
    grid-template-columns: minmax(0, 1fr) 36px;
    min-height: 34px;
    column-gap: 6px;
    padding: 0;
  }

  .header-search-input {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1.1;
    box-shadow: none;
  }

  .header-search-icon,
  .header-search-submit {
    font-size: 16px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    box-shadow: none;
  }
  .mobile-filter-pill {
    min-width: 98px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .mobile-filter-pill-label {
    font-size: 10px;
  }

  .mobile-filter-pill-value {
    font-size: 11px;
  }

  .title {
    text-align: left;
    padding-top: 6px;
  }

  .grid { grid-template-columns: repeat(2, 1fr); }

  .row {
    justify-content: stretch;
  }

  .field {
    width: calc(50% - 5px);
    flex-wrap: wrap;
  }

  .dynamic-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    width: 100%;
  }

  .actions .btn {
    flex: 1 1 160px;
  }

  .mobile-bottom-nav {
    left: 12px;
    right: 12px;
    bottom: 10px;
    width: auto;
    transform: none;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 18px;
    gap: 4px;
  }

  .mobile-bottom-link {
    min-height: 40px;
    font-size: 12px;
    padding: 6px 4px;
    border-radius: 12px;
  }

  .chat-fab {
    right: 14px;
    bottom: calc(var(--bottom-nav-clearance) + env(safe-area-inset-bottom) + 6px);
    width: 54px;
    height: 48px;
  }

  .catalog-menu-layout {
    width: calc(100vw - 16px) !important;
    height: calc(100dvh - 16px) !important;
    padding: 12px 12px 18px !important;
  }

  .site-footer {
    padding-top: 22px;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer-bottom-bar {
    min-height: 56px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 10px 0;
  }
}

@media (max-width: 640px) {
  .header-utility-links .btn:last-child {
    display: none;
  }
}

@media (max-width: 460px) {
  .grid { grid-template-columns: repeat(2, 1fr); }

  .header-search-form {
    gap: 8px;
    padding: 0;
  }

  .catalog-toggle {
    min-width: 84px;
    padding: 6px 8px;
  }

  .catalog-toggle-label {
    font-size: 13px;
  }

  .catalog-menu-layout {
    grid-template-columns: minmax(124px, 42%) minmax(0, 1fr);
    width: calc(100vw - 16px) !important;
    padding: 12px 12px 16px !important;
  }

  .catalog-menu-link {
    font-size: 15px;
  }

  .related-products-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-product-card {
    flex-direction: column;
  }

  .related-product-card img {
    width: 100%;
    height: 120px;
  }

    .grid:not(#grid) { grid-template-columns: 1fr; }
  .field {
    width: 100%;
  }

  .dynamic-filters {
    grid-template-columns: 1fr;
  }

  .cat-card {
    padding: 18px 14px;
  }

  .cat-item {
    flex-basis: 102px;
    min-height: 116px;
    padding: 14px 10px;
  }

  .cat-item img {
    width: 44px;
    height: 44px;
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  .mobile-filter-options {
    grid-template-columns: 1fr;
  }
}

/* Вкладки */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  flex: 1 0 auto;
}

.tab-link {
  transition: all 0.3s ease;
}

.tab-link.active {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  color: white !important;
}

/* ========================================
   МОДАЛЬНОЕ ОКНО ТОВАРА
======================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  overflow-x: hidden;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 1300px;
  width: min(100%, 1300px);
  max-height: 98vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalPopIn 0.22s ease;
  transform-origin: center center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 60; /* keep above image */
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
  transform: rotate(90deg);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
  min-width: 0;
}

/* Галерея */
.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.modal-main-image {
  width: 100%;
  aspect-ratio: 1;
  background: #ffffff;
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 18px;
}

.modal-main-image img {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
}

.modal-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  color: #2c2a3d;
  box-shadow: 0 12px 28px rgba(44,42,61,0.16);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 3;
}

.modal-gallery-nav:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.04);
}

.modal-gallery-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.modal-gallery-nav span {
  font-size: 28px;
  line-height: 1;
}

.modal-gallery-prev {
  left: 12px;
}

.modal-gallery-next {
  right: 12px;
}

.modal-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.modal-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  padding: 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.modal-thumbnail:hover {
  border-color: var(--primary);
}

.modal-thumbnail.active {
  border-color: var(--primary);
}

.modal-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

.image-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
}

.image-viewer.active {
  display: block;
}

.image-viewer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 25, 0.88);
  backdrop-filter: blur(8px);
}

.image-viewer-dialog {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  margin: 0;
}

.image-viewer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  touch-action: pinch-zoom;
}

.image-viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: pinch-zoom;
  transition: transform 0.18s ease;
  transform-origin: center center;
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: #1f2333;
  box-shadow: 0 12px 28px rgba(0,0,0,0.24);
  display: grid;
  place-items: center;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.image-viewer-prev {
  left: 18px;
}

.image-viewer-next {
  right: 18px;
}

.product-page {
  padding: 28px 0 48px;
}

.product-page-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.product-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.product-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.product-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: start;
}

.product-page-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.product-page-main {
  position: relative;
  background: #fff;
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 20px;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.product-page-main img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  cursor: zoom-in;
}

.product-page-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.product-page-thumb {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.product-page-thumb.active {
  border-color: var(--primary);
}

.product-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-page-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding-bottom: calc(var(--bottom-nav-clearance) + 12px);
}

.product-page-title {
  font-size: 34px;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-page-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
}

.product-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.product-page-section {
  margin-top: 22px;
}

.product-page-section h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.product-page-meta-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 18px;
  padding: 18px;
}

.product-page-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.product-page-description {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 18px;
  padding: 18px;
}

.product-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.product-spec {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(44,42,61,0.08);
  border-radius: 16px;
  padding: 14px 16px;
}

.product-spec-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.product-spec-value {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Информация о товаре */
.modal-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.modal-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.modal-info h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2c2a3d;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e0e0e0;
  gap: 12px;
  min-width: 0;
}

.detail-label {
  color: #666;
  flex-shrink: 0;
  margin-right: 20px;
}

.detail-value {
  color: #2c2a3d;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
  margin: 10px 0;
}

.modal-price-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.modal-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Microsoft Sans Serif', Tahoma, sans-serif;
}

.modal-stock {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  background: #f0f9ff;
  border-radius: 8px;
  font-size: 14px;
  color: #0066cc;
}

.stock-indicator {
  width: 10px;
  height: 10px;
  background: #4CAF50;
  border-radius: 50%;
  flex-shrink: 0;
}

.modal-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-action-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-action-btn:hover {
  border-color: var(--primary);
  background: rgba(58, 125, 88, 0.05);
  transform: translateY(-2px);
}

.modal-action-btn.active {
  border-color: #111111;
  background: rgba(17, 17, 17, 0.08);
}

.modal-action-btn[data-modal-action="favorite"] {
  border-color: #e0e0e0;
  background: #ffffff;
}

.modal-action-btn[data-modal-action="favorite"] svg path {
  fill: none;
  stroke: currentColor;
}

.modal-action-btn[data-modal-action="favorite"].active {
  border-color: rgba(229, 57, 53, 0.22);
  background: rgba(229, 57, 53, 0.08);
}

.modal-action-btn[data-modal-action="favorite"].active svg,
.modal-action-btn[data-modal-action="favorite"].active svg path {
  color: #e53935;
  fill: #e53935;
  stroke: #e53935;
}

.modal-action-btn svg {
  color: #666;
  transition: color 0.3s ease;
}

.modal-action-btn:hover svg {
  color: var(--primary);
}

.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}

.share-sheet.open {
  display: flex;
}

.share-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, .38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.share-sheet-dialog {
  position: relative;
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(17, 17, 17, .08);
  box-shadow: 0 20px 54px rgba(17, 17, 17, .18);
  border-radius: 14px !important;
}

.share-sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, .12);
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.share-sheet h3 {
  margin: 0;
  padding-right: 42px;
  font-size: 22px;
  line-height: 1.2;
}

.share-sheet-subtitle {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.share-sheet-actions {
  display: grid;
  gap: 10px;
}

.share-sheet-action {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 17, 17, .12);
  background: #fff;
  color: var(--dark);
  cursor: pointer;
  text-align: left;
}

.share-sheet-action-primary {
  color: #fff;
  background: #111;
  border-color: #111;
}

.share-sheet-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, .06);
}

.share-sheet-action-primary .share-sheet-icon {
  background: rgba(255, 255, 255, .16);
}

.share-sheet-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.share-sheet-action strong,
.share-sheet-action small {
  display: block;
}

.share-sheet-action strong {
  font-size: 15px;
  line-height: 1.2;
}

.share-sheet-action small {
  margin-top: 3px;
  color: rgba(17, 17, 17, .58);
  font-size: 12px;
  line-height: 1.25;
}

.share-sheet-action-primary small {
  color: rgba(255, 255, 255, .72);
}

.share-sheet-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

body.share-sheet-open .mobile-bottom-nav,
body.share-sheet-open .chat-fab {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@media (min-width: 720px) {
  .share-sheet {
    align-items: center;
  }
}

@media (max-width: 560px) {
  .share-sheet {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .share-sheet-dialog {
    border-radius: 16px 16px 0 0 !important;
  }
}

.modal-more-link {
  text-align: center;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modal-more-link:hover {
  background: var(--primary);
  color: white;
}

.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid rgba(44, 42, 61, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.compare-grid {
  display: block;
  width: 100%;
}

.compare-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}


.cat-carousel {
  margin-top: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cat-carousel .viewport {
  scroll-padding-left: 52px;
  scroll-padding-right: 52px;
}

.cat-carousel .slides {
  padding: 14px 52px 14px 14px;
}

.cat-carousel .nav-btn {
  top: calc(50% + 8px);
}

@media (max-width: 768px) {
  .cat-carousel .nav-btn {
    display: none !important;
  }

  .cat-carousel .slides {
    padding: 14px;
  }
}
.compare-table th,
.compare-table td {
  border-bottom: 1px solid rgba(44, 42, 61, 0.08);
  vertical-align: top;
  padding: 12px;
}

.compare-table thead th {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 2;
}

.compare-sticky-col {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 1;
  min-width: 180px;
  text-align: left;
  font-weight: 800;
}

.compare-mini-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 180px;
  padding-top: 12px;
}

.compare-mini-card-link {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.compare-mini-card-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(44, 42, 61, 0.08);
}

.compare-mini-card-copy {
  display: grid;
  gap: 4px;
}

.compare-mini-card-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compare-mini-card-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

.compare-mini-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.18);
}

.compare-table td {
  min-width: 180px;
  font-size: 14px;
}

.compare-cell-diff {
  background: #e8f6e8;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .compare-table {
    min-width: 860px;
  }

  .compare-sticky-col {
    min-width: 160px;
  }

  .compare-table td {
    min-width: 160px;
  }
}

@media (max-width: 768px) {
  .compare-table-wrap {
    padding: 8px;
    border-radius: 12px;
  }

  .compare-table {
    min-width: 700px;
  }

  .compare-table th,
  .compare-table td {
    padding: 8px;
  }

  .compare-table thead th,
  .compare-sticky-col {
    position: static;
  }

  .compare-sticky-col {
    min-width: 130px;
    font-size: 13px;
  }

  .compare-mini-card {
    min-width: 140px;
    padding-top: 0;
  }

  .compare-mini-card-link img {
    border-radius: 10px;
  }

  .compare-mini-card-title {
    font-size: 12px;
  }

  .compare-mini-card-price {
    font-size: 12px;
  }

  .compare-mini-remove {
    width: 22px;
    height: 22px;
    font-size: 15px;
    top: 6px;
    right: 6px;
  }

  .compare-table td {
    min-width: 140px;
    font-size: 13px;
  }

  .compare-table-actions {
    justify-content: stretch;
  }

  .compare-table-actions .btn {
    width: 100%;
  }
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes modalPopIn {
  from {
    transform: scale(0.98);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .modal {
    align-items: flex-start;
    padding: 8px;
  }

  .modal-content {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    margin: 0;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 14px;
  }

  .modal-info h2 {
    font-size: 20px;
  }

  .modal-price {
    font-size: 28px;
  }

  .detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .detail-value {
    text-align: left;
  }

  .modal-main-image img {
    max-height: 38vh;
  }
}

/* Make modal fully usable on most phones and small tablets */
@media (max-width: 900px) {
  .modal {
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
  }

  .modal-content {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin: 0;
    border-radius: 10px;
    padding: 0;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }

  .modal-main-image {
    aspect-ratio: 4/5;
    max-height: 42vh; /* tighter cap so details remain visible */
    overflow: hidden;
  }

  .modal-gallery-nav {
    width: 38px;
    height: 38px;
  }

  .modal-gallery, .modal-info { width: 100%; }

  .modal-thumbnails { gap: 8px; padding: 6px 4px; }
  .modal-thumbnail { width: 56px; height: 56px; }

  .modal-info { padding: 0 4px; }
  .modal-info h2 { font-size: 18px; margin-bottom: 4px; }

  .detail-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .detail-label { font-size: 13px; color: #666; margin-right:0; }
  .detail-value { font-size: 15px; text-align: left; }

  .modal-btn-primary { padding: 14px 12px; font-size: 15px; }

  .modal-actions { justify-content: flex-start; gap: 8px; }

  .modal-more-link { display:block; width:100%; }

  #modalPrimaryAction {
    order: 8;
  }

  .modal-more-link {
    order: 9;
  }

  .modal-actions {
    order: 10;
  }

  .modal-related {
    order: 11;
  }

  .modal-related .related-products-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .modal-related .related-product-card {
    flex: 0 0 min(72vw, 260px);
    flex-direction: column;
    scroll-snap-align: start;
  }

  .modal-related .related-product-card img {
    width: 100%;
    height: 128px;
    object-fit: contain;
  }

  /* Allow the modal to scroll internally while keeping header/footer visible */
  .modal-content { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal-overlay { padding: 12px; }

  .product-page-grid {
    grid-template-columns: 1fr;
  }

  .product-page-title {
    font-size: 28px;
  }

  .product-page-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Ensure detail table remains readable on very small screens */
@media (max-width: 380px) {
  .modal-main-image { max-height: 36vh; }
  .modal-info h2 { font-size: 16px; }
  .detail-value { font-size: 14px; }
  .modal-thumbnail { width: 48px; height: 48px; }
  .modal-body { padding: 12px; }

  .image-viewer-dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
  }

  .image-viewer-stage {
    padding: 16px;
  }

  .image-viewer-nav {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

  .product-page-grid {
    grid-template-columns: 1fr;
  }

  .product-page-card {
    padding: 16px;
    border-radius: 18px;
  }

  .product-page-main {
    min-height: 280px;
    padding: 14px;
  }

  .product-page-main img {
    max-height: 44vh;
  }

  .product-page-thumb {
    width: 62px;
    height: 62px;
  }

  .product-page-title {
    font-size: 26px;
  }

  .product-specs-grid {
    grid-template-columns: 1fr;
  }
}

/* Доп. мобильные правки для маленьких экранов */
@media (max-width: 480px) {
  .container { width: 96%; }

  .catalog-toggle {
    min-width: 72px;
  }

  .header-search-form {
    grid-template-columns: minmax(0, 1fr) 16px;
    padding: 4px 8px 4px 10px;
  }

  .hero-search {
    width: 100%;
    gap: 10px;
  }

  .hero-search-input {
    min-width: 100%;
    flex-basis: 100%;
  }

  nav { gap:8px; }
  header nav { top: 56px; left: 8px; right: 8px; padding: 10px; }

  .btn { padding: 10px 12px; font-size: 14px; border-radius: 0; }
  .btn.small { padding:6px 10px; }

  #grid {
    gap: 6px;
  }

  #grid .card {
    min-height: 100%;
  }

  #grid .card img {
    aspect-ratio: 9 / 10;
    object-fit: contain;
  }

  #grid .pad {
    padding: 8px 8px 9px;
    gap: 4px;
  }

  #grid .meta {
    display: none;
  }

  #grid .name {
    font-size: 12px;
    line-height: 1.16;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #grid .price-block {
    min-height: 40px;
    padding-top: 6px;
  }

  #grid .price-now {
    font-size: 14px;
  }

  #grid .catalog-card-action {
    margin-top: 4px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .title p,
  .hero p,
  .catalog-menu-copy p {
    display: none;
  }

  .welcome { padding: 32px 0 18px; }
  .welcome h1 { font-size: 22px; }
  .welcome p { font-size: 14px; }

  .title h1 { font-size: 20px; }

  .filters { position: static; top: auto; padding: 10px; }

  .field { padding: 10px; }
  .field label { width: 100%; }
  .input[type="number"], .select, .input { width: 100%; }

  .main-content { gap: 12px; }

  .categories-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .categories-list::-webkit-scrollbar { display: none; }

  .category-item {
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .category-btn {
    white-space: nowrap;
  }

  .modal-body { padding: 16px; gap: 18px; }
  .modal-main-image { aspect-ratio: 4/5; max-height: 38vh; }
  .modal-thumbnail { width: 60px; height: 60px; }
  .modal-info h2 { font-size: 18px; }
  .modal-price { font-size: 24px; }

  .product-page {
    padding: 16px 0 28px;
  }

  .product-page-card {
    padding: 14px;
  }

  .subcategory-filter-bar {
    gap: 8px;
    margin-bottom: 14px;
  }

  .subcategory-filter-chip {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .product-page-main {
    min-height: 220px;
    border-radius: 16px;
  }

  .product-page-main img {
    max-height: 36vh;
  }

  .product-page-actions {
    flex-direction: column;
  }

  .product-page-actions > * {
    width: 100%;
  }

  .related-products-head {
    display: grid;
    align-items: start;
  }

  .related-products-hint {
    text-align: left;
  }

  .related-products-track {
    grid-template-columns: 1fr;
  }

  .related-product-card {
    gap: 8px;
    padding: 8px;
  }

  .related-product-card img {
    width: 58px;
    height: 58px;
  }

  .related-product-name {
    font-size: 12px;
    line-height: 1.22;
  }

  .product-page-title {
    font-size: 22px;
    line-height: 1.12;
  }

  .product-page-meta-card {
    padding: 14px;
    border-radius: 16px;
  }

  .product-page-thumbs {
    gap: 8px;
  }

  .product-page-thumb {
    width: 54px;
    height: 54px;
  }

  .detail-row { font-size: 13px; }
  .detail-label { margin-right: 8px; font-weight:700; }

  .chat-fab {
    width: 54px;
    height: 48px;
    right: 14px;
    bottom: calc(var(--bottom-nav-clearance) + env(safe-area-inset-bottom) + 6px);
  }

  .categories-sidebar { width: 100%; padding: 12px; }

  .grid:not(#grid) { grid-template-columns: 1fr; }

  footer .bar { padding: 12px 0; font-size: 13px; }

  /* Fix close button to viewport on very small screens so it never gets hidden by large images */
  .modal-close {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 99999;
    background: rgba(255,255,255,0.95);
    color: #222;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  }

  /* Tighter image constraints for very narrow phones */
  .modal-main-image img {
    max-height: 35vh;
    max-width: 100%;
    width: auto;
    height: auto;
  }
}

.mobile-bottom-nav {
  position: fixed !important;
  display: grid !important;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 10000;
}

.page-captcha-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.page-captcha-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 17, 17, 0.12);
}

.page-captcha-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.page-captcha-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-captcha-status {
  min-height: 18px;
  color: #d32f2f;
  font-size: 13px;
}

body > main.container,
.tab-content > main.container {
  padding-bottom: var(--bottom-nav-clearance);
}

@media (max-width: 640px) {
  :root {
    --bottom-nav-clearance: 132px;
  }

  body {
    padding-bottom: var(--bottom-nav-clearance);
  }

  .mobile-bottom-nav {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    padding: 8px !important;
    gap: 4px !important;
    border-radius: 18px !important;
    transform: none !important;
  }

  .mobile-bottom-nav::before {
    border-radius: 17px;
  }

  .mobile-bottom-link {
    min-height: 40px;
    padding: 6px 4px;
    gap: 4px;
    font-size: 12px;
    line-height: 1.05;
    border-radius: 12px !important;
    min-width: 0;
    letter-spacing: 0;
  }

  .mobile-bottom-icon,
  .mobile-bottom-link svg {
    width: 24px;
    height: 24px;
  }

  .mobile-bottom-badge {
    top: -8px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
  }

  .site-footer {
    padding-top: 14px;
  }

  .site-footer-grid {
    grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .site-footer-brandblock,
  .site-footer-column {
    gap: 5px;
    min-width: 0;
  }

  .site-footer-brand {
    gap: 5px;
    font-size: 12px;
    line-height: 1.1;
  }

  .site-footer-brand .brand-logo {
    width: 16px;
    height: 16px;
  }

  .site-footer-text {
    max-width: none;
    font-size: 9px;
    line-height: 1.25;
  }

  .site-footer-column h3 {
    font-size: 8px;
    letter-spacing: 0.04em;
    margin-bottom: 1px;
  }

  .site-footer-link {
    font-size: 9px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .site-footer-bottom {
    margin-top: 10px;
  }

  .site-footer-bottom-bar {
    min-height: 36px;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    text-align: left;
    font-size: 9px;
  }

  .utility-about-link,
  .utility-phone-link {
    font-size: 11px;
  }

  .utility-about-link {
    min-height: 26px;
    padding: 0 8px;
  }

  .mobile-filter-sheet-dialog {
    bottom: calc(112px + env(safe-area-inset-bottom));
    max-height: min(56vh, calc(100dvh - 214px));
    padding: 12px;
  }

  .chat-fab {
    right: 14px;
    bottom: calc(var(--bottom-nav-clearance) + env(safe-area-inset-bottom) + 4px);
    width: 50px;
    height: 44px;
  }

  .mobile-filter-sheet-head h3 {
    font-size: 20px;
  }

  .mobile-filter-sheet-close {
    width: 36px;
    height: 36px;
    font-size: 30px;
  }

  .mobile-filter-options {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .mobile-filter-option {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 13px;
  }
}

.photo-search-input {
  display: none;
}

.header-search-form.has-photo-search {
  grid-template-columns: minmax(0, 1fr) 54px 54px;
}

.catalog-menu-mobile-search.has-photo-search {
  grid-template-columns: minmax(0, 1fr) 40px 40px;
}

.photo-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
}

.photo-search-button:hover {
  background: #f6f6f6;
}

.photo-search-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-search-form-button {
  width: 54px;
  min-width: 54px;
  height: 54px;
}

.catalog-menu-mobile-search .photo-search-form-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  box-shadow: none;
}

.search-with-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: stretch;
}

.search-with-photo .input {
  min-width: 0;
}

.photo-search-filter-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  box-shadow: none;
}

.photo-search-status {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  color: #444444;
  font-size: 14px;
  font-weight: 700;
}

.photo-search-status.show {
  display: block;
}

.photo-search-status.loading {
  border-color: rgba(17, 17, 17, 0.22);
}

.photo-search-status.success {
  border-color: rgba(46, 125, 50, 0.25);
  color: #1b5e20;
}

.photo-search-status.empty,
.photo-search-status.error {
  border-color: rgba(211, 47, 47, 0.24);
  color: #b71c1c;
}

@media (max-width: 768px) {
  .header-search-form.has-photo-search {
    grid-template-columns: minmax(0, 1fr) 34px 34px;
    min-height: 34px;
    column-gap: 6px;
    padding: 0;
  }

  .photo-search-form-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    box-shadow: none;
  }

  .photo-search-button svg {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 480px) {
  .header-search-form.has-photo-search {
    grid-template-columns: minmax(0, 1fr) 34px 34px;
    gap: 6px;
    padding: 0;
  }

  .photo-search-form-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .search-with-photo {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .photo-search-filter-button {
    width: 38px;
    min-width: 38px;
  }
}

body.photo-search-open {
  overflow: hidden;
}

.photo-search-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  padding: 18px;
}

.photo-search-modal.open {
  display: block;
}

.photo-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.photo-search-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 36px));
  min-height: 0;
  max-height: calc(100dvh - 36px);
  margin: 0 auto;
  padding: 14px 18px 18px;
  background: #ffffff;
  color: #071a30;
  box-shadow: 0 22px 70px rgba(17, 17, 17, 0.18);
  overflow: auto;
}

.photo-search-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #9aa3ad;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.photo-search-close:hover {
  color: #111111;
}

.photo-search-head {
  padding-right: 46px;
}

.photo-search-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.12;
}

#photoSearchResultCount {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  background: #f0f2f5;
  color: #071a30;
  font-size: 15px;
  font-weight: 800;
}

#photoSearchResultCount:empty {
  display: none;
}

.photo-search-start {
  display: grid;
  gap: 16px;
  margin-top: 6px;
}

.photo-search-start[hidden],
.photo-search-results-view[hidden] {
  display: none !important;
}

.photo-search-form {
  margin: 0;
}

.photo-search-dropzone {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  border: 1px dashed rgba(17, 17, 17, 0.24);
  background: #ffffff;
}

.photo-search-dropzone.drag-over {
  border-color: #071a30;
  background: #f2f4f6;
}

.photo-search-upload-btn,
.photo-search-primary-action,
.photo-search-secondary-action {
  min-height: 36px;
  border: 1px solid #071a30;
  padding: 7px 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.photo-search-upload-btn,
.photo-search-primary-action {
  background: #071a30;
  color: #ffffff;
}

.photo-search-secondary-action {
  background: #ffffff;
  color: #071a30;
}

.photo-search-dropzone span {
  color: #2f3540;
  font-size: 14px;
}

.photo-search-sample-block {
  display: grid;
  gap: 10px;
  padding: 0 0 2px;
}

.photo-search-sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-search-sample-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #303744;
}

.photo-search-sample-head a,
.photo-search-samples-empty a {
  color: #071a30;
  font-weight: 800;
  text-decoration: none;
}

.photo-search-sample-head a:hover,
.photo-search-samples-empty a:hover {
  text-decoration: underline;
}

.photo-search-samples {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.photo-search-samples-loading,
.photo-search-samples-empty {
  grid-column: 1 / -1;
  color: #686868;
  font-size: 13px;
}

.photo-search-sample {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  border: 0;
  padding: 0;
  background: #f2f3f5;
  overflow: hidden;
  cursor: pointer;
}

.photo-search-sample img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-search-results-view {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.photo-search-sidebar {
  display: grid;
  gap: 9px;
  align-self: start;
  position: sticky;
  top: 0;
}

.photo-search-preview-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f2f4f6;
}

.photo-search-crop-stage {
  position: relative;
  width: 100%;
  display: block;
  background: #888888;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  min-height: 112px;
  max-height: 230px;
}

.photo-search-crop-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 230px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-search-selection {
  position: absolute;
  border: 3px solid #071a30;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.photo-search-selection span {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #071a30;
  background: #ffffff;
}

.photo-search-selection span:nth-child(1) {
  top: -7px;
  left: -7px;
}

.photo-search-selection span:nth-child(2) {
  top: -7px;
  right: -7px;
}

.photo-search-selection span:nth-child(3) {
  bottom: -7px;
  left: -7px;
}

.photo-search-selection span:nth-child(4) {
  bottom: -7px;
  right: -7px;
}

.photo-search-crop-hint {
  color: #4f5966;
  font-size: 11px;
  line-height: 1.35;
}

.photo-search-side-actions {
  display: grid;
  gap: 6px;
}

.photo-search-side-filter {
  display: grid;
  gap: 7px;
  padding: 0 4px;
}

.photo-search-side-filter h3 {
  margin: 0;
  font-size: 15px;
}

.photo-search-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.photo-search-filter-chips button,
.photo-search-filter-chips span {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #e1e6eb;
  background: #ffffff;
  color: #071a30;
  font: inherit;
  font-size: 12px;
}

.photo-search-filter-chips button {
  cursor: pointer;
}

.photo-search-filter-chips button.active,
.photo-search-filter-chips button:hover {
  border-color: #071a30;
  background: #071a30;
  color: #ffffff;
}

.photo-search-result-area {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.photo-search-result-area h3 {
  margin: 2px 0 2px;
  font-size: 19px;
}

.photo-search-category-chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.photo-search-category-chip {
  min-height: 54px;
  display: inline-grid;
  grid-template-columns: 44px auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #e5eaf0;
  background: #ffffff;
  color: #5c6572;
  font: inherit;
  cursor: pointer;
}

.photo-search-category-chip.active {
  background: #f0f2f5;
  color: #071a30;
  border-color: #f0f2f5;
}

.photo-search-category-chip img {
  width: 44px;
  height: 38px;
  object-fit: contain;
}

.photo-search-modal-status {
  display: none;
  min-height: 22px;
  color: #66717e;
  font-size: 13px;
  font-weight: 700;
}

.photo-search-modal-status.show {
  display: block;
}

.photo-search-modal-status.error,
.photo-search-modal-status.empty {
  color: #b71c1c;
}

.photo-search-modal-status.success {
  color: #071a30;
}

.photo-search-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.photo-search-product-card {
  display: grid;
  grid-template-rows: 122px minmax(72px, auto);
  gap: 8px;
  border: 0;
  background: #ffffff;
  color: #071a30;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.photo-search-product-card:hover .photo-search-product-name {
  text-decoration: underline;
}

.photo-search-product-image {
  width: 100%;
  height: 122px;
  display: grid;
  place-items: center;
  background: #ffffff;
  overflow: hidden;
}

.photo-search-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.photo-search-product-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.photo-search-product-name {
  font-size: 12px;
  line-height: 1.25;
  color: #071a30;
  overflow-wrap: anywhere;
}

.photo-search-product-meta {
  color: #707782;
  font-size: 12px;
}

.photo-search-product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.photo-search-product-bottom strong {
  font-size: 15px;
  line-height: 1;
}

.photo-search-product-bottom em {
  color: #70b932;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.photo-search-empty {
  padding: 24px;
  border: 1px dashed #d7dde4;
  color: #66717e;
}

@media (max-width: 1180px) {
  .photo-search-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  }
}

@media (max-width: 860px) {
  .photo-search-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 12px;
  }

  .photo-search-dropzone {
    display: grid;
    justify-items: stretch;
    text-align: center;
  }

  .photo-search-samples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-search-results-view {
    grid-template-columns: 1fr;
  }

  .photo-search-sidebar {
    position: static;
  }

  .photo-search-product-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 14px 10px;
  }

  .photo-search-product-card {
    grid-template-rows: 112px minmax(68px, auto);
  }

  .photo-search-product-image {
    height: 112px;
  }
}

@media (max-width: 520px) {
  .photo-search-modal {
    padding: 8px;
  }

  .photo-search-dialog {
    width: calc(100vw - 16px);
    min-height: 0;
    max-height: calc(100dvh - 16px);
    padding: 10px 10px 76px;
  }

  .photo-search-head h2 {
    font-size: 20px;
  }

  .photo-search-close {
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    font-size: 28px;
  }

  .photo-search-dropzone {
    min-height: 98px;
    gap: 8px;
    padding: 12px;
  }

  .photo-search-upload-btn,
  .photo-search-primary-action,
  .photo-search-secondary-action {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .photo-search-sample-head {
    display: grid;
    gap: 4px;
  }

  .photo-search-sample-head h3 {
    font-size: 14px;
  }

  .photo-search-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-search-results-view {
    gap: 12px;
  }

  .photo-search-preview-panel {
    padding: 8px;
  }

  .photo-search-crop-stage {
    min-height: 96px;
    max-height: 30vh;
  }

  .photo-search-crop-stage img {
    max-height: 30vh;
  }

  .photo-search-side-actions {
    grid-template-columns: 1fr 1fr;
  }

  .photo-search-side-filter h3 {
    font-size: 13px;
  }

  .photo-search-result-area h3 {
    font-size: 16px;
  }

  .photo-search-category-chip {
    min-height: 42px;
    grid-template-columns: 34px auto;
    padding: 6px 8px;
    font-size: 12px;
  }

  .photo-search-category-chip img {
    width: 34px;
    height: 28px;
  }

  .photo-search-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .photo-search-product-card {
    grid-template-rows: 96px minmax(64px, auto);
  }

  .photo-search-product-image {
    height: 96px;
  }

  .photo-search-product-name {
    font-size: 12px;
  }

  .photo-search-product-bottom {
    display: grid;
    align-items: start;
  }

  .photo-search-product-bottom strong {
    font-size: 15px;
  }
}

.contacts-page {
  display: grid;
  gap: 22px;
  padding: 28px 0 46px;
}

.contacts-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 18px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.contacts-hero-copy {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.contacts-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.contacts-hero p {
  margin: 0;
  color: #5f5f5f;
  font-size: 15px;
}

.contacts-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contacts-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contacts-channel-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  color: #111111;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.06);
}

.contacts-channel-card:hover {
  border-color: rgba(17, 17, 17, 0.32);
}

.contacts-channel-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #f7f7f7;
  color: #111111;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.contacts-channel-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.contacts-channel-copy span {
  color: #666666;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contacts-channel-copy strong {
  color: #111111;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.contacts-channel-copy em {
  color: #666666;
  font-size: 13px;
  font-style: normal;
  line-height: 1.3;
}

.contacts-map-section {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.contacts-map-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.contacts-map-head h2 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.15;
}

.contacts-map-head p {
  margin: 0;
  color: #666666;
  font-size: 14px;
}

.contacts-map-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.contacts-store-list {
  display: grid;
  gap: 12px;
}

.contacts-store-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.05);
}

.contacts-store-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.contacts-store-card p,
.contacts-store-card span {
  margin: 0;
  color: #666666;
  font-size: 14px;
}

.contacts-store-card a {
  color: #111111;
  font-weight: 800;
  text-decoration: none;
  width: fit-content;
}

.contacts-store-card a:hover {
  text-decoration: underline;
}

.contacts-map-card {
  min-height: 430px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.05);
}

.contacts-map-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

@media (max-width: 920px) {
  .contacts-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contacts-map-layout {
    grid-template-columns: 1fr;
  }

  .contacts-store-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .contacts-page {
    gap: 16px;
    padding: 16px 0 96px;
  }

  .contacts-hero,
  .contacts-map-head {
    display: grid;
    align-items: start;
  }

  .contacts-hero p,
  .contacts-map-head p {
    font-size: 14px;
  }

  .contacts-hero-actions {
    justify-content: stretch;
  }

  .contacts-hero-actions .btn,
  .contacts-map-head .btn {
    width: 100%;
  }

  .contacts-channel-grid,
  .contacts-store-list {
    grid-template-columns: 1fr;
  }

  .contacts-channel-card {
    min-height: 98px;
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 12px;
  }

  .contacts-channel-icon {
    width: 50px;
    height: 50px;
    font-size: 14px;
  }

  .contacts-channel-copy strong {
    font-size: 15px;
  }

  .contacts-map-card,
  .contacts-map-card iframe {
    min-height: 340px;
  }
}
