:root {
  --sky-50: #f0f7fc;
  --sky-100: #e3f0fa;
  --sky-200: #c5e0f5;
  --sky-300: #9ecae8;
  --sky-500: #6baed6;
  --sky-600: #4a96c4;
  --sky-700: #3d8bbe;
  --sky-900: #1e4d6b;

  --rose-100: #fdf0f6;
  --rose-200: #f9d5e5;
  --rose-400: #e8a4c4;
  --rose-500: #d97aaa;

  --mint-100: #edf9f3;
  --mint-200: #d4f0e4;
  --mint-400: #8fd4b5;
  --mint-500: #7bc4a8;

  --text: #2c3e50;
  --text-muted: #6b7c8f;
  --white: #ffffff;
  --shadow: 0 8px 32px rgba(61, 139, 190, 0.1);
  --shadow-hover: 0 16px 40px rgba(232, 164, 196, 0.22);

  --shell-header-h: 128px;
  --sticky-offset: var(--shell-header-h);
  --header-h: 72px;
  --filter-w: clamp(260px, 22vw, 320px);
  --gap: clamp(16px, 2vw, 28px);
  --pad-x: clamp(16px, 3vw, 48px);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
  cursor: pointer;
}

button {
  border: none;
  background: none;
}

/* ── Chifu-style header layout ── */
.shell-container {
  width: 100%;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.site-shell-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.top-bar {
  width: 100%;
  border-bottom: 1px solid #e5e7eb;
}

.top-bar__inner {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
}

.top-bar__menu-toggle {
  display: none;
}

.top-bar__links {
  display: none;
  align-items: center;
  gap: 16px;
  color: #6b7280;
}

.top-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.top-bar__link svg {
  width: 16px;
  height: 16px;
  color: var(--sky-500, #3b6fd9);
  flex-shrink: 0;
}

.top-bar__link:hover {
  color: var(--sky-600, #3b6fd9);
}

.top-bar__nav {
  display: none;
}

.top-bar__nav-link {
  display: none;
}

.top-bar__city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 13px;
}

.top-bar__city svg {
  width: 16px;
  height: 16px;
  color: var(--sky-500, #3b6fd9);
  flex-shrink: 0;
}

.top-bar__city strong {
  font-weight: 700;
  color: #4b5563;
}

.top-bar__city-change {
  color: var(--sky-600, #3b6fd9);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s;
}

.top-bar__city-change:hover {
  color: var(--sky-700, #2a5f8c);
}

.top-bar__sep {
  opacity: 0.35;
  color: #9ca3af;
  user-select: none;
}

.site-header {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.header-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding-top: 12px;
  padding-bottom: 12px;
}

.header-main-left {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
  min-width: 0;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: #4b5563;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.site-nav__link:hover {
  color: var(--sky-700, #2a5f8c);
}

.site-nav__link.is-active {
  color: var(--sky-700, #2a5f8c);
}

.site-nav__extras {
  display: none;
}

.site-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo__svg {
  display: block;
  width: clamp(132px, 16vw, 188px);
  height: auto;
  aspect-ratio: 304 / 105;
}

.header-main-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-contact {
  display: none;
  align-items: center;
  gap: 14px;
}

.header-contact__main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.header-contact__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.header-contact__icon svg {
  width: 18px;
  height: 18px;
}

.header-contact__phone {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.header-contact__email {
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.header-max-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.header-max-chat:hover {
  opacity: 0.92;
}

.header-max-chat__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.header-max-chat__icon img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.header-max-chat__bubble {
  margin: 0;
  max-width: clamp(248px, 20vw, 304px);
  padding: 6px 8px;
  border-radius: 8px 10px 10px 4px;
  background: linear-gradient(135deg, rgba(227, 240, 250, 0.95), rgba(237, 249, 243, 0.9));
  border: 1px solid rgba(203, 213, 225, 0.7);
  font-size: 10px;
  line-height: 1.34;
  font-weight: 500;
  color: #2c4a62;
}

@media (min-width: 769px) {
  .top-bar__links {
    display: inline-flex;
  }

  .site-nav {
    display: flex;
  }

  .site-nav-toggle {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .header-contact {
    display: flex;
  }
}

.catalog-page {
  width: 100%;
  min-height: calc(100vh - var(--shell-header-h));
}

.catalog-hero {
  width: 100%;
  position: relative;
}

.catalog-hero__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.catalog-hero__sub {
  margin: 0;
  max-width: 58ch;
  font-family: var(--font);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.catalog-hero__decor {
  display: none;
}

.catalog-toolbar {
  width: 100%;
  padding: 0 var(--pad-x) 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.catalog-toolbar__count {
  font-size: 14px;
}

.catalog-toolbar__count strong {
  font-weight: 700;
}

.filter-open-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.filter-open-btn svg {
  width: 18px;
  height: 18px;
}

.catalog-layout {
  width: 100%;
  display: grid;
  grid-template-columns: var(--filter-w) 1fr;
  gap: 0;
  align-items: start;
}

/* ── Filter ── */
.filter-panel {
  position: sticky;
  top: calc(var(--sticky-offset) + 12px);
  max-height: calc(100vh - var(--sticky-offset) - 24px);
  overflow-y: auto;
  padding: 0 var(--gap) clamp(24px, 3vw, 40px) clamp(16px, 2vw, 32px);
  scrollbar-width: thin;
}

.filter-panel__inner {
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 24px);
}

.filter-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  gap: 8px;
}

.filter-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.filter-reset {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 0.2s;
  margin-left: auto;
}

.filter-group {
  margin-bottom: 22px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group__title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-options.is-collapsed .filter-option:nth-child(n + 7) {
  display: none;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.filter-option input {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  margin: 0;
  flex-shrink: 0;
  transition: all 0.15s;
  position: relative;
}

.filter-option input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-option span {
  font-size: 14px;
  line-height: 1.3;
}

.filter-show-more {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.filter-close {
  display: none;
}

/* ── Products ── */
.products-area {
  width: 100%;
  padding: 0 var(--pad-x) clamp(32px, 5vw, 64px) var(--gap);
  min-width: 0;
}

.products-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--gap);
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.product-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(12px, 2vw, 20px);
  transition: transform 0.35s;
}

.product-card:hover .product-card__media img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 1;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(14px, 1.8vw, 18px);
  gap: 6px;
}

.product-card__name {
  margin: 0;
  font-size: clamp(14px, 1.5vw, 15px);
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__article {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product-card__subtitle {
  margin: 0;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  border-radius: var(--radius);
}

.products-empty__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.products-empty__text {
  margin: 0;
}

/* ── CTA ── */
.cta-section {
  width: 100%;
  padding: clamp(40px, 6vw, 80px) var(--pad-x);
  margin-top: clamp(16px, 3vw, 32px);
}

.cta-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: calc(var(--radius) + 4px);
}

.cta-card__title {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.cta-form {
  display: grid;
  gap: 12px;
}

.cta-form input,
.cta-form textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cta-form textarea {
  min-height: 80px;
  resize: vertical;
}

.cta-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cta-form__submit {
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-form__submit:hover {
  transform: translateY(-1px);
}

.cta-form__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

/* ── Footer ── */
.site-footer {
  width: 100%;
  padding: 32px var(--pad-x);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  transition: color 0.2s;
}

/* ── Overlay ── */
.filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  backdrop-filter: blur(4px);
}

.filter-backdrop.is-open {
  display: block;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 88vw);
    z-index: 210;
    max-height: 100vh;
    padding: 0;
    transform: translateX(-105%);
    transition: transform 0.3s ease;
  }

  .filter-panel.is-open {
    transform: translateX(0);
  }

  .filter-panel__inner {
    border-radius: 0;
    min-height: 100%;
    padding-top: 16px;
  }

  .filter-close {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }

  .filter-open-btn {
    display: inline-flex;
  }

  .products-area {
    padding-left: var(--pad-x);
  }
}

@media (max-width: 768px) {
  .site-header {
    overflow: visible;
  }

  .site-nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 2;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: var(--pad-x);
    right: var(--pad-x);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    z-index: 120;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__link {
    padding: 14px 18px;
    border-bottom: none;
    border-radius: 12px;
    font-size: 15px;
  }

  .site-nav__extras {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    margin-top: 2px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
  }

  .site-nav__extra-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #4b6478;
    transition: background 0.2s, color 0.2s;
  }

  .site-nav__extra-link svg {
    width: 18px;
    height: 18px;
    color: var(--sky-500, #3b6fd9);
    flex-shrink: 0;
  }

  .site-nav__extra-link:hover {
    color: #2a5f8c;
    background: rgba(227, 240, 250, 0.75);
  }

  .header-main-left {
    flex: 1;
    gap: 12px;
    position: relative;
  }

  .header-main-right {
    display: none;
  }

  .header-main-row {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: relative;
  }

  .site-shell-header {
    position: sticky;
  }

  .cta-card {
    grid-template-columns: 1fr;
  }

  .cta-form__row {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .product-card__body {
    padding: 12px;
  }

  .product-card__name {
    font-size: 13px;
  }
}
