/* ========================================
   МАРКЕТ РОЗ — style.css
   ======================================== */

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  corner-shape: squircle;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* iOS Safari: fix border-radius clipping on elements with overflow */
.build-panel,
.popular-panel,
.product-card,
.slider,
.footer,
.advantages-card,
.search-popup {
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  -webkit-backface-visibility: hidden;
}

body {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  min-height: 100vh;

  font-family: 'Onest', sans-serif;
  background: var(--gray-bg);
  color: var(--black);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ===== CSS VARIABLES ===== */
:root {
  --white: #FFFFFF;
  --black: #000000;
  --red: #FF0000;
  --red-btn: #E41616;
  --gray-text: #828282;
  --gray-sub: #848484;
  --gray-light: #F1F1F1;
  --gray-bg: #EDEDED;
  --gray-border: #EEEEEE;
  --dark: #181818;
  --separator: rgba(0, 0, 0, 0.04);
  --icon-stroke: #33363F;
}

/* =========================================
   HEADER
   ========================================= */
.header {
  position: sticky;
  top: 0;

  width: 100%;
  max-width: 1400px;
  padding: 12px 24px;
  
  display: flex; align-items: center; gap: 24px;

  background: var(--white);
  border-radius: 0 0 48px 48px;
  z-index: 100;
  
  -webkit-box-shadow: 0px 1px 0px 0px var(--gray-light);
  -moz-box-shadow: 0px 1px 0px 0px var(--gray-light);
  box-shadow: 0px 1px 0px 0px var(--gray-light);
}

.header__logo-full img {height: 24px;}

/* Полный логотип (десктоп) */
.header__logo-short {
  display: none;
}

/* Строка поиска — внешний контейнер */
.header__search-row {
  flex: 1; display: flex; align-items: stretch; gap: 8px;

  min-width: 0;
  height: 60px;
}

/* Поле ввода поиска */
.header__search {
  flex: 1; display: flex; align-items: center;
  
  min-width: 0;

  background: var(--gray-light);
  border-radius: 32px;
  padding: 0 24px;
}

.header__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 13px;
  color: var(--black);
  min-width: 0;
}

.header__search-input::placeholder {
  color: var(--gray-text);
}

.header__search-btn {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  padding: 0;
  background: none; border: none; cursor: pointer;
}

.header__search-icon {
  width: 24px;
  height: 24px;
}

/* Иконки хедера */
.header__icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;

  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}

.header__icon-btn img {
  width: 32px;
  height: 32px;
}

/* Корзина с бейджем */
.header__cart {
  position: relative;
  display: flex; align-items: center; flex-shrink: 0;
}

.header__cart-badge {
  position: absolute;
  top: -11px; right: -11px;
  width: 20px; height: 20px;
  
  display: flex; align-items: center; justify-content: center;
  
  border-radius: 50%;
  background: var(--red);
}

.header__cart-badge span {
  padding-left: 0.5px;
  color: var(--white); font-family: 'Onest', sans-serif; font-weight: 900; font-size: 12px; line-height: 8px; text-align: center;
}

/* =========================================
   MESSENGER POPUP
   ========================================= */
.messenger-popup {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 120px;
  width: 320px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  z-index: 200;
  overflow: hidden;
  animation: popup-fade-in 0.2s ease;
}

.messenger-popup.open {
  display: block;
}

@keyframes popup-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.messenger-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
}

.messenger-popup__title {
  font-family: 'Onest', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--black);
}

.messenger-popup__close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-text);
  transition: background 0.15s;
}

.messenger-popup__close:hover {
  background: #e0e0e0;
}

.messenger-popup__list {
  display: flex;
  flex-direction: column;
  padding: 4px 12px 16px;
}

.messenger-popup__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--black);
  transition: background 0.15s;
}

.messenger-popup__item:hover {
  background: var(--gray-light);
}

.messenger-popup__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.messenger-popup__name {
  flex: 1;
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: 15px;
}

.messenger-popup__arrow {
  flex-shrink: 0;
  color: var(--gray-text);
}

@media (max-width: 768px) {
  .messenger-popup {
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* =========================================
   MAIN — основной контент
   ========================================= */
.main {
  display: flex; align-items: stretch; gap: 12px;

  width: 100%;
  max-width: 1400px;
  min-width: 0;

  margin: 0 auto;
  overflow-x: clip;
}

/* =========================================
   PANEL — общие стили панелей
   ========================================= */
.panel {
  padding: 32px 24px;

  display: flex; flex-direction: column; gap: 16px;

  background: var(--white);
}

.panel__title {font-family: 'Onest', sans-serif; font-weight: 700; font-size: 20px; line-height: 14px; color: var(--black);}

.panel__separator {width: 100%; height: 1px; background: var(--separator); flex-shrink: 0;}

/* =========================================
   SECTION — секция с лейблом
   ========================================= */
.section {display: flex; flex-direction: column; gap: 12px;}

.section__label {
  font-family: 'Onest', sans-serif; font-weight: 400; font-size: 14px; line-height: 10px; color: var(--black);
  opacity: 0.64;
}

/* =========================================
   CHIPS — выбор тегов/фильтров
   ========================================= */
/* --- Scroll-row обёртка со стрелками --- */
.scroll-row {
  position: relative;
  display: flex;
  align-items: center;
}

.scroll-row__arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 32px; height: 32px;
  display: none; align-items: center; justify-content: center;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  padding: 0;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.scroll-row__arrow img { width: 16px; height: 16px; }
.scroll-row__arrow--left { left: -4px; }
.scroll-row__arrow--right { right: -4px; }
.scroll-row__arrow.visible { display: flex; }

.chips {
  display: flex; align-items: center; gap: 24px;
  padding: 8px 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  font-family: 'Onest', sans-serif; font-weight: 700; font-size: 16px; line-height: 11px; text-align: center; color: var(--black);
  touch-action: manipulation;

  white-space: nowrap;
  user-select: none;

  cursor: pointer;
  opacity: 0.24;
  transition: opacity 0.2s;
}

.chip:hover {
  opacity: 0.64;
}

.chip.active {
  opacity: 1;
}

/* =========================================
   BUILD PANEL — «Собрать букет»
   ========================================= */
.build-panel {
  width: 540px;
  flex-shrink: 0;
  border-radius: 48px;
}

.build-panel form {
  display: flex; flex-direction: column; gap: 16px;
}

/* --- Карточки стран --- */
.country-cards {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.country-cards::-webkit-scrollbar { display: none; }

.country-card {
  width: 120px;
  min-width: 120px;
  padding: 12px;

  display: flex; flex-direction: column; align-items: center; gap: 8px;

  border-radius: 24px;

  cursor: pointer;
  transition: background 0.2s;
}

.country-card.active {
  background: var(--gray-bg);
}

.country-card:not(.active) .country-card__name {
  opacity: 0.42;
}

.country-card:not(.active) .country-card__icon {
  opacity: 0.42;
}

.country-card__icon {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

.country-card__info {
  width: 100%;
  display: flex; flex-direction: column; gap: 6px;
}

.country-card__name {
  font-family: 'Onest', sans-serif; font-weight: 500; font-size: 14px; line-height: 10px; color: var(--black);
  transition: opacity 0.2s;
}

.country-card__price {
  font-family: 'Onest', sans-serif; font-weight: 700; font-size: 16px; line-height: 11px;
  color: var(--black);
}

/* --- Счетчик количества --- */
.counter {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;

  background: var(--gray-bg);
  border-radius: 24px;

  overflow: hidden;
}

.counter__btn {
  padding: 0 16px;
  height: 48px;

  display: flex; justify-content: center; align-items: center;

  background: var(--gray-bg);
  border: none;
  border-radius: 12px;

  transition: background 0.15s;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.counter__btn:hover {
  background: #e0e0e0;
}

.counter__btn img {width: 24px; height: 24px;}

.counter__input {
  width: 60px; border: none; outline: none; background: transparent;
  font-family: 'Onest', sans-serif; font-weight: 600; font-size: 16px;
  line-height: 11px; text-align: center; color: var(--black);
  -moz-appearance: textfield; appearance: textfield;
  touch-action: manipulation;
}
.counter__input::-webkit-outer-spin-button,
.counter__input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}

/* --- Карточки упаковки --- */
.packaging-cards {
  display: flex;
  border-radius: 24px;
  overflow: hidden;
}

.packaging-card {
  padding: 8px 12px;
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 24px;
}

.packaging-card.active {
  background: var(--gray-bg);
}

.packaging-card:not(.active) .packaging-card__img {
  opacity: 0.42;
}

.packaging-card:not(.active) .packaging-card__name {
  opacity: 0.42;
}

.packaging-card__img {
  width: 80px; height: 80px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.packaging-card__info {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
}

.packaging-card__name {
  font-family: 'Onest', sans-serif; font-weight: 500; font-size: 14px; line-height: 10px; text-align: center; color: var(--black);
  transition: opacity 0.2s;
}

.packaging-card__price {font-family: 'Onest', sans-serif; font-weight: 700; font-size: 16px; line-height: 11px; text-align: center; color: var(--black);}

/* --- Кнопка «Заказать» --- */
.order-btn {
  width: 100%; height: 56px; min-height: 56px;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  background: var(--red-btn);
  border-radius: 24px;
  transition: background 0.15s;
  touch-action: manipulation;
}

.order-btn:hover {
  background: #c91212;
}

.order-btn__text,
.order-btn__price {font-family: 'Onest', sans-serif; font-weight: 600; font-size: 20px; line-height: 14px; text-align: center; color: var(--white);}

.order-btn__old-price {
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 14px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
  margin-left: 4px;
}

/* =========================================
   POPULAR PANEL — «Популярное»
   ========================================= */
.popular-panel {
  flex: 1;
  width: 100%;
  min-width: 0;
  border-radius: 48px;
}

/* --- Сетка товаров --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Карточка товара --- */
.product-card {
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 24px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
}

/* Зона изображения */
.product-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--gray-light);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Бейдж скидки */
.product-card__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px;
  background: var(--red);
  border-radius: 12px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  color: var(--white);
  z-index: 2;
}

/* Тело карточки — название и подпись */
.product-card__body {
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 12px;
}

.product-card__title {font-family: 'Onest', sans-serif; font-weight: 600; font-size: 16px; line-height: 11px; color: var(--black);}

.product-card__subtitle {font-family: 'Onest', sans-serif; font-weight: 400; font-size: 14px; line-height: 10px; color: var(--gray-sub);}

/* Подвал карточки — кнопка покупки */
.product-card__footer {
  display: flex; flex-direction: column;
  padding: 12px;
  margin-top: auto;
}

.product-card__buy-btn {
  width: 100%;
  height: 64px;
  touch-action: manipulation;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  background: var(--red);
  border-radius: 24px;
  transition: background 0.15s;
}

.product-card__buy-btn:hover {
  background: #dd0000;
}

.product-card__buy-btn img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.product-card__prices {display: flex; flex-direction: column; align-items: flex-start; gap: 6px;}

.product-card__current-price {font-family: 'Onest', sans-serif; font-weight: 600; font-size: 20px; line-height: 14px; color: var(--white);}

.product-card__old-price {font-family: 'Onest', sans-serif; font-weight: 400; font-size: 16px; line-height: 11px; color: var(--white); text-decoration: line-through;}

/* =========================================
   PROMO PANEL — Преимущества + Слайдер
   ========================================= */
.promo-panel {
  flex: 1;
  min-width: 0;
  border-radius: 48px;
  gap: 16px;
  overflow: hidden;
}

/* --- Преимущества --- */
.advantages {
  display: flex;
  gap: 12px;
}

.advantage-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--gray-light);
  border-radius: 24px;
  min-width: 0;
}

.advantage-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 16px;
  flex-shrink: 0;
}

.advantage-card__icon svg {
  width: 24px;
  height: 24px;
}

.advantage-card__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advantage-card__title {
  font-family: 'Onest', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: var(--black);
}

.advantage-card__desc {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.3;
  color: var(--gray-text);
}

/* --- Слайдер --- */
.promo-slider {
  position: relative;
  flex: 1;
  min-height: 220px;
  border-radius: 32px;
  overflow: hidden;
}

.promo-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.promo-slider__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.promo-slider__slide.active {
  opacity: 1;
  pointer-events: auto;
}

.promo-slider__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 40%, transparent 75%);
  pointer-events: none;
}

.promo-slider__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 55%;
  z-index: 3;
}

.promo-slider__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.promo-slider__title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.15;
  color: var(--white);
}

.promo-slider__desc {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
}

.promo-slider__desc strong {
  color: var(--white);
  font-weight: 700;
}

.promo-slider__btn {
  display: inline-flex;
  align-self: flex-start;
  padding: 14px 28px;
  background: var(--white);
  border-radius: 16px;
  font-family: 'Onest', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--black);
  transition: background 0.2s, transform 0.2s;
  margin-top: 4px;
}

.promo-slider__btn:hover {
  background: var(--gray-light);
  transform: translateY(-1px);
}

.promo-slider__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.promo-slider__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

/* Стрелки слайдера */
.promo-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}

.promo-slider__arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.promo-slider__arrow img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.promo-slider__arrow--left { left: 24px; }
.promo-slider__arrow--right { right: 24px; }

/* Точки слайдера */
.promo-slider__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.promo-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.25s, width 0.25s;
}

.promo-slider__dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--white);
}

/* =========================================
   POPULAR SECTION — блок товаров ниже main
   ========================================= */
.popular-section {
  width: 100%;
  max-width: 1400px;
  overflow-x: clip;
}

.popular-section .popular-panel {
  width: 100%;
  border-radius: 48px;
}

.popular-section .products-grid {
  grid-template-columns: repeat(5, 1fr);
}

/* =========================================
   FILTERS BAR — фильтры блока товаров
   ========================================= */
.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.filter-group--collections {
  flex: 1;
  min-width: 0;
  flex-shrink: 1;
}

.filter-group__label {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 10px;
  color: var(--black);
  opacity: 0.64;
}

/* --- Выпадающий список фильтра --- */
.filter-dropdown {
  position: relative;
  min-width: 120px;
}

.filter-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  background: var(--gray-light);
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  width: 100%;
}

.filter-dropdown__trigger:hover {
  background: #e4e4e4;
}

.filter-dropdown__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-dropdown__value {
  flex: 1;
  text-align: left;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-dropdown__arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.filter-dropdown.open .filter-dropdown__arrow {
  transform: rotate(180deg);
}

.filter-dropdown__list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 50;
  flex-direction: column;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-dropdown__list::-webkit-scrollbar { display: none; }

.filter-dropdown.open .filter-dropdown__list {
  display: flex;
}

.filter-dropdown__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.filter-dropdown__option:hover {
  background: var(--gray-light);
}

.filter-dropdown__option.selected {
  font-weight: 600;
  background: var(--gray-light);
}

.filter-dropdown__opt-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Чипсы-кнопки (подборки) --- */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  height: 48px;
  padding: 0 20px;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  border-radius: 16px;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  flex-shrink: 0;
}

.filter-chip:hover {
  background: #e0e0e0;
}

.filter-chip.active {
  background: var(--dark);
  color: var(--white);
}

/* --- Ценовой диапазон --- */
.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-range__input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  background: var(--gray-light);
  border-radius: 16px;
  padding: 0 16px;
}

.price-range__prefix {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--gray-text);
  flex-shrink: 0;
}

.price-range__input {
  width: 70px;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  -moz-appearance: textfield;
  appearance: textfield;
}
.price-range__input::-webkit-outer-spin-button,
.price-range__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-range__input::placeholder {
  color: var(--gray-text);
  font-weight: 400;
}

.price-range__currency {
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-text);
  flex-shrink: 0;
}

.price-range__dash {
  font-family: 'Onest', sans-serif;
  font-size: 15px;
  color: var(--gray-text);
  flex-shrink: 0;
}

/* =========================================
   FOOTER — подвал страницы
   ========================================= */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 16px 32px;
  width: 100%;
  max-width: 1400px;
  background: var(--dark);
  border-radius: 48px 48px 0 0;
  flex-wrap: wrap;
  margin-top: auto;
}

.footer__link {
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.275;
  color: var(--white);
  transition: opacity 0.2s;
}

.footer__link:hover {
  opacity: 0.7;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1280px) {
  .build-panel {
    width: 440px;
  }

  .popular-section .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .promo-slider__title {
    font-size: 22px;
  }
}

@media (max-width: 1024px) {
  .main {
    flex-direction: column;
  }

  .build-panel {
    width: 100%;
    border-radius: 32px;
  }

  .promo-panel {
    display: none;
  }

  .popular-panel {
    border-radius: 32px;
  }

  .popular-section .popular-panel {
    border-radius: 32px;
  }

  .popular-section .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .filters-bar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .filter-group {
    flex-shrink: 0;
  }

  .filter-group--collections {
    width: 100%;
    flex: unset;
  }
}

@media (max-width: 768px) {
  body {gap: 12px;}
  
  .header {
    gap: 12px;
    padding: 12px;
    border-radius: 0 0 32px 32px;
  }

  .header__logo-full {
    display: none;
  }

  .header__logo-short {
    display: block;
  }

  .header__search {gap: 8px; padding: 8px;}

  .header__search-row {
    height: 48px;
  }

  .panel {
    padding: 24px 12px;
  }

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

  .panel__title {font-size: 18px; line-height: 13px;}

  /* Фильтры — мобильная оптимизация */
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-group {
    width: 100%;
    flex-shrink: 0;
  }

  .filter-group--collections {
    flex: unset;
  }

  .price-range {
    width: 100%;
  }

  .price-range__input-wrap {
    flex: 1;
  }

  .price-range__input {
    width: 100%;
    min-width: 0;
  }

  .filter-dropdown {min-width: none;}
}

@media (max-width: 480px) {
  .popular-section .products-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 420px) {
  .packaging-card__img {width: 64px; height: 64px;}
}

/* ========================================
   GLOBAL MESSAGES (toast)
   ======================================== */
.global-messages {
  position: fixed;
  top: 100px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

.global-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 16px;
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  animation: msg-slide-in 0.3s ease;
}

@keyframes msg-slide-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.global-message--success {
  background: #E8F5E9;
  color: #2E7D32;
}

.global-message--error {
  background: #FFEBEE;
  color: #C62828;
}

.global-message--warning {
  background: #FFF3E0;
  color: #E65100;
}

.global-message--info {
  background: #E3F2FD;
  color: #1565C0;
}

.global-message__close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  line-height: 1;
}

.global-message__close:hover {
  background: rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .global-messages {
    top: 80px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}