* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #2d030b;
  --color-accent: #780d00;
  --color-gold: #cda27a;
  --color-text: #210201;
  --color-muted: #978080;
  --color-bg: #fbfbfb;
  --color-bg-soft: #f3f3f3;
  --color-border: #eceaea;

  --btn-h-sm: 40px;
  --btn-h-md: 48px;
  --btn-h-lg: 56px;

  --radius-sm: 4px;
  --radius-md: 8px;

  --font-display: "Behrens Antiqua", "Cormorant Garamond", Georgia, serif;
  --font-heading: "Dihjauti", Arial, sans-serif;
  --font-body: "Gill Sans Nova", Arial, sans-serif;
}

@font-face {
  font-family: 'Behrens Antiqua';
  src:
    url('/bitrix/templates/wines_template/fonts/behrens-antiqua.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/behrens-antiqua.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/behrens-antiqua.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gill Sans Nova';
  src: url('/bitrix/templates/wines_template/fonts/GillSansNova-Book.eot');
  src:
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Book.eot?#iefix') format('embedded-opentype'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Book.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Book.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Book.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Gill Sans Nova';
  src: url('/bitrix/templates/wines_template/fonts/GillSansNova-Italic.eot');
  src:
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Italic.eot?#iefix') format('embedded-opentype'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Italic.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Italic.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Gill Sans Nova';
  src: url('/bitrix/templates/wines_template/fonts/GillSansNova-Medium.eot');
  src:
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Medium.eot?#iefix') format('embedded-opentype'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Medium.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Medium.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Gill Sans Nova';
  src: url('/bitrix/templates/wines_template/fonts/GillSansNova-SemiBold.eot');
  src:
    url('/bitrix/templates/wines_template/fonts/GillSansNova-SemiBold.eot?#iefix') format('embedded-opentype'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-SemiBold.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-SemiBold.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Gill Sans Nova';
  src: url('/bitrix/templates/wines_template/fonts/GillSansNova-Bold.eot');
  src:
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Bold.eot?#iefix') format('embedded-opentype'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Bold.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Bold.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Gill Sans Nova';
  src: url('/bitrix/templates/wines_template/fonts/GillSansNova-BoldItalic.eot');
  src:
    url('/bitrix/templates/wines_template/fonts/GillSansNova-BoldItalic.eot?#iefix') format('embedded-opentype'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-BoldItalic.woff2') format('woff2'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-BoldItalic.woff') format('woff'),
    url('/bitrix/templates/wines_template/fonts/GillSansNova-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: 'Dihjauti';
  font-style: normal;
  font-weight: 400;
  src: local('Dihjauti Regular'), url('/bitrix/templates/wines_template/fonts/DihjautiRegular.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: italic;
  font-weight: 400;
  src: local('Dihjauti Italic'), url('/bitrix/templates/wines_template/fonts/DihjautiItalic.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: normal;
  font-weight: 700;
  src: local('Dihjauti Bold'), url('/bitrix/templates/wines_template/fonts/DihjautiBold.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: italic;
  font-weight: 700;
  src: local('Dihjauti Bold Italic'), url('/bitrix/templates/wines_template/fonts/DihjautiBoldItalic.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: normal;
  font-weight: 500;
  src: local('Dihjauti S Regular'), url('/bitrix/templates/wines_template/fonts/DihjautiSRegular.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: italic;
  font-weight: 500;
  src: local('Dihjauti S Italic'), url('/bitrix/templates/wines_template/fonts/DihjautiSItalic.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: normal;
  font-weight: 600;
  src: local('Dihjauti S Bold'), url('/bitrix/templates/wines_template/fonts/DihjautiSBold.woff') format('woff');
}


@font-face {
  font-family: 'Dihjauti';
  font-style: italic;
  font-weight: 600;
  src: local('Dihjauti S Bold Italic'), url('/bitrix/templates/wines_template/fonts/DihjautiSBoldItalic.woff') format('woff');
}


body {
  font-family: "Dihjauti", Arial, sans-serif;
  line-height: 1.6;
  color: #210201;
  background-color: #fbfbfb;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ===== Универсальный focus для всех текстовых input/textarea/select ===== */
/* При фокусе: бордер 1px #210201, цвет текста чёрный */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input:not([type]):focus,
textarea:focus,
select:focus {
  border: 1px solid #210201 !important;
  color: #000 !important;
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

/* Сохраняем чёрный текст, пока пользователь печатает (даже если потерял фокус — введённые символы тёмные) */
input[type="text"]:not(:placeholder-shown),
input[type="email"]:not(:placeholder-shown),
input[type="tel"]:not(:placeholder-shown),
input[type="number"]:not(:placeholder-shown),
input[type="search"]:not(:placeholder-shown),
input[type="password"]:not(:placeholder-shown),
input[type="url"]:not(:placeholder-shown),
input:not([type]):not(:placeholder-shown),
textarea:not(:placeholder-shown) {
  color: #000;
}

/* Layout components */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0px;
}


.container-narrow {
  width: 100%;

  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}

.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

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

.flex-between {
  justify-content: space-between;
}

.flex-start {
  justify-content: flex-start;
}

.flex-end {
  justify-content: flex-end;
}

.section {
  padding: 48px 0;
}

/* Header styles */
.header {
  background-color: #fbfbfb;
  width: 100%;
}

.header-top {
  background-color: #fbfbfb;
  padding: 10.5px 0;
  border-bottom: 1px solid #eceaea;
}

.header-top .container {
  padding: 0 150px;
}

.header-contact {
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  color: #210201;
}

.header-main {
  background-color: #2d030b;
  padding: 32px 0;
}

.header-logo {
  width: 240px;
  height: auto;
  cursor: pointer;
}

.header-actions {
  display: flex;
  gap: 48px;
  align-items: center;
}

.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fbfbfb;
  text-decoration: none;
}

.header-action img {
  width: 20px;
  height: 20px;
}

.header-action-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.cart-badge {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -9px;
  background-color: #fbfbfb;
  color: #060606;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count.is-empty {
  display: none;
}

.header-nav {
  background-color: #fbfbfb;
  padding: 16px 0;
  border-bottom: 1px solid #eceaea;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
}

.menu-button {
  background-color: var(--color-primary);
  color: var(--color-bg);
  height: var(--btn-h-sm);
  padding: 0 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  transition: background-color .2s ease;
}

.menu-button:hover {
  background-color: #370610;
}

.menu-button:active,
.menu-button[aria-expanded="true"],
body.menu-open .menu-button {
  background-color: #450813;
}

/* Стрелка ▼ — белая на тёмной кнопке, при открытом меню переворачивается */
.menu-button img {
  filter: brightness(0) invert(1);
  transition: transform .2s ease;
}

.menu-button[aria-expanded="true"] img,
body.menu-open .menu-button img {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  max-width: 880px;
  width: 100%;
  padding: 32px;
}

.menu__columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.menu__column {
  display: flex;
  flex-direction: column;
}

.menu__column:last-child {
  text-align: right;
}

.menu__column:last-child .menu__list {
  align-items: flex-end;
}

.menu__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.menu__group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 0px;
}

.menu__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 120%;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.menu__link {
  text-decoration: none;
  color: #060606;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 120%;
  display: block;
  white-space: nowrap;
  transition: color .2s ease;
}

.menu__link:hover {
  color: var(--color-accent);
}


.search-container {
  position: relative;
  width: 46%;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: var(--btn-h-sm);
  padding: 0 48px 0 16px;
  background-color: #EDEAEA;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 100%;
  color: var(--color-text);
  border: 1px solid transparent;
}

.search-input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.search-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-color: transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease;
}

.search-button:hover {
  background-color: rgba(45, 3, 11, 0.08);
}

.search-button:active {
  background-color: rgba(45, 3, 11, 0.15);
}

.search-button img {
  width: 16px;
  height: 16px;
}

.show-all-button {
  background-color: var(--color-primary);
  color: var(--color-bg);
  height: var(--btn-h-sm);
  padding: 0 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  transition: background-color .2s ease;
}

.show-all-button:hover {
  background-color: #370610;
}

.show-all-button:active,
.show-all-button[aria-expanded="true"],
body.show-all-open .show-all-button {
  background-color: #450813;
}

/* ===== Раскрывающийся блок «Показать все» ===== */
.show-all-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  width: 100%;
  max-width: 880px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.show-all-dropdown.is-open {
  display: block;
}

.show-all-dropdown__inner {
  padding: 32px;
}

.show-all-dropdown__header {
  text-align: center;
  margin-bottom: 32px;
}

.show-all-dropdown__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 120%;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.show-all-dropdown__subtitle {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 140%;
  color: var(--color-accent);
  max-width: 560px;
  margin: 0 auto;
}

/* Форма подписки */
.show-all-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 32px;
}

.show-all-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.show-all-form__label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 100%;
  color: var(--color-primary);
}

.show-all-form__input {
  height: var(--btn-h-sm);
  padding: 0 16px;
  background-color: var(--color-bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 100%;
  color: var(--color-muted);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.show-all-form__input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.show-all-form__input:focus {
  color: var(--color-text);
  border-color: var(--color-primary);
  outline: none;
}

.show-all-form__submit {
  height: var(--btn-h-sm);
  padding: 0 28px;
  background-color: var(--color-primary);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease;
}

.show-all-form__submit:hover {
  background-color: #3a0712;
}

.show-all-form__submit:active {
  background-color: #450813;
}

/* Два баннера-ссылки */
.show-all-banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.show-all-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #2d1a0f;
  /* плейсхолдер до подстановки картинки */
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.show-all-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.show-all-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.show-all-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url('/bitrix/templates/wines_template/images/modal_block_backgound.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  transition: background-image .25s ease;
}

.show-all-banner:hover::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url('/bitrix/templates/wines_template/images/modal_block_backgound.jpg');
}

.show-all-banner__label {
  position: relative;
  z-index: 2;
  padding: 10px 24px;
  background-color: var(--color-bg);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background-color .2s ease, color .2s ease;
}

.show-all-banner:hover .show-all-banner__label {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

/* Мобильная адаптация */
@media (max-width: 767px) {
  .show-all-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: none;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
  }

  .show-all-dropdown__inner {
    padding: 20px 16px 24px;
  }

  .show-all-dropdown__title {
    font-size: 20px;
  }

  .show-all-dropdown__subtitle {
    font-size: 14px;
  }

  .show-all-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .show-all-form__submit {
    width: 100%;
  }

  .show-all-banners {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .show-all-banner {
    height: 100px;
  }
}

/* Hero section */
.hero {
  position: relative;
  background-color: #f2f2f2;
  padding: 58px 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 550px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.hero-content {
  position: absolute;
  left: 64px;
  top: 64px;
  width: 100%;
  max-width: 480px;
  color: var(--color-bg);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  line-height: 110%;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 120%;
  color: var(--color-gold);
}

/* Product sections */
.products-section {
  background-color: #fbfbfb;
  padding: 48px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 41px;
  color: #2d030b;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 18px;
  font-family: "Behrens Antiqua", serif;
  font-weight: 400;
  line-height: 19px;
  color: #896246;
}

/* Swiper Styles */
.products-swiper,
.products-swiper-all-time,
.products-swiper-best-price {
  padding: 10px 60px;
  position: relative;
}

/* Wrapper Swiper'а — все slide одной высоты (по самой высокой) */
.swiper-wrapper {
  align-items: stretch;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  height: auto;
  /* растягивается до высоты wrapper, чтобы карточки в ряд были одной высоты */
  align-items: stretch;
}

.swiper-button-next,
.swiper-button-prev {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #fbfbfb;
  border: 1px solid #eceaea;
  transition: all 0.3s ease;
  color: #2d030b;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: #2d030b;
  color: #fbfbfb;
  border-color: #2d030b;
}

.swiper-button-prev {
  left: 0;
}

.swiper-button-next {
  right: 0;
}

.swiper-button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 auto;
}

.product-card {
  background-color: #fbfbfb;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 2px 6px 0px #00000040;
}

.product-image-container {
  position: relative;
  background-color: #fbfbfb;
  padding: 12px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  height: 28px;
  padding: 0 10px;
  background-color: var(--color-accent);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.favorite-icon img,
.favorite-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.favorite-icon:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.favorite-icon.is-active img,
.favorite-icon.is-active svg {
  filter: drop-shadow(0 0 0 #780d00);
}

.favorite-icon:active img {
  transform: scale(0.9);
}

.product-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  margin: 0 auto;
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-title {
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 21px;
  color: #2d030b;
  text-align: center;
  margin-bottom: 12px;
}

/* Ссылка-обёртка внутри заголовка — без подчёркивания, цвет наследуется */
.product-title__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ============================================================
   Уведомление «Товар добавлен в корзину» — в правом верхнем углу,
   без затемнения фона, появляется со слайд-анимацией.
   ============================================================ */
.cart-added-modal {
  position: fixed;
  top: 80px;
  /* отступ от верха (под header) */
  right: 16px;
  /* отступ от правого края */
  z-index: 2000;
  pointer-events: none;
  /* не блокирует контент под собой */
}

.cart-added-modal[hidden] {
  display: none !important;
}

/* Backdrop в режиме toast не нужен — визуально его прячем,
   но HTML оставляем (на случай если решат вернуть modal-режим) */
.cart-added-modal__backdrop {
  display: none;
}

.cart-added-modal__dialog {
  position: relative;
  width: calc(100vw - 32px);
  max-width: 480px;
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  /* сама плашка кликабельна (X, Перейти в корзину) */
  animation: cart-toast-in .25s ease-out;
}

@keyframes cart-toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-added-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.cart-added-modal__title {
  font-family: 'Dihjauti', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #060606;
  margin: 0;
}

.cart-added-modal__close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #060606;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s ease;
}

.cart-added-modal__close svg {
  width: 25px;
  height: 25px;
}

.cart-added-modal__close:hover {
  color: #780d00;
}

.cart-added-modal__body {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}

.cart-added-modal__image {
  width: 80px;
  height: 110px;
  object-fit: contain;
  flex-shrink: 0;
  background: #f5f5f5;
  border-radius: 4px;
  padding: 6px;
}

.cart-added-modal__info {
  flex: 1;
  min-width: 0;
}

.cart-added-modal__name {
  line-height: 1.3;
  color: #2d030b;
  margin-bottom: 16px;
  font-family: 'Dihjauti', sans-serif;
  font-weight: 700;
  font-style: Bold;
  font-size: 18px;
  line-height: 120%;
  letter-spacing: 0%;
}

.cart-added-modal__prices {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.cart-added-modal__price {
  font-family: 'Dihjauti', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #780d00;
}

.cart-added-modal__old-price {
  font-family: 'Dihjauti', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #978080;
  text-decoration: line-through;
}

.cart-added-modal__old-price:empty,
.cart-added-modal__price:empty {
  display: none;
}

.cart-added-modal__btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: #2d030b;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  font-family: 'Dihjauti', sans-serif;
  font-size: 14px;
  height: 40px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background-color .2s ease;
}

.cart-added-modal__btn:hover {
  background: #3a0712;
}

@media (max-width: 480px) {
  .cart-added-modal {
    top: 12px;
  }

  .cart-added-modal__dialog {
    padding: 20px;
  }

  .cart-added-modal__title {
    font-size: 16px;
  }

  .cart-added-modal__image {
    width: 64px;
    height: 88px;
  }

  .cart-added-modal__name {
    font-size: 14px;
  }

  .cart-added-modal__price {
    font-size: 18px;
  }

  .cart-added-modal__old-price {
    font-size: 14px;
  }

  .cart-added-modal__btn {
    padding: 14px;
    font-size: 13px;
  }
}

/* Имя товара — обрезаем до 2 строк с многоточием.
   Полное название доступно как tooltip через title-атрибут. */
.product-title__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Объём — всегда отдельной строкой под именем, без обрезки */
.product-title__volume {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  color: inherit;
}

.product-pricing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  /* прижимает блок цены к низу карточки */
  margin-bottom: 0;
  padding-top: 12px;
}

.price-section {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.current-price {
  font-size: 24px;
  font-family: "Behrens Antiqua", serif;
  font-weight: 400;
  line-height: 29px;
  color: #780d00;
}

.old-price-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.old-price {
  font-size: 18px;
  font-family: "Behrens Antiqua", serif;
  font-weight: 400;
  line-height: 22px;
  color: #978080;
}

.price-strikethrough {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #978080;
}

.ruble-icon {
  width: 16px;
  height: 24px;
  margin-top: 3px;
}

.ruble-icon-small {
  width: 12px;
  height: 17px;
  margin-top: -1px;
}

.add-to-cart-btn {
  background-color: var(--color-accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease;
}

.add-to-cart-btn:hover {
  background-color: #5a0a00;
}

.add-to-cart-btn:active {
  background-color: #420800;
}

.add-to-cart-btn img {
  width: 16px;
  height: 16px;
}

/* .add-to-cart-btn.is-added {
  background-color: #2f6f3f;
} */

/* Скрытие add-to-cart кнопки когда товар в корзине */
.add-to-cart-btn.is-hidden {
  display: none !important;
}

/* ===== Универсальный счётчик количества в карточке ===== */
/* Базовое состояние: счётчик скрыт, кнопка корзины видна */
.catalog-quantity-controls {
  display: none;
}

.catalog-quantity-controls.is-visible {
  display: inline-flex;
}

/* Внутри блока цены карточки (избранное, ЛК) — высота 40px как у кнопки корзины */
.product-pricing .catalog-quantity-controls {
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  background-color: #f3f3f3;
  border-radius: 4px;
  padding: 0 4px;
  height: 40px;
  min-width: 110px;
}

.product-pricing .catalog-quantity-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  /* border-radius: 50%; */
  color: var(--color-primary);
  cursor: pointer;
  transition: background-color .15s ease;
  padding: 0;
  flex-shrink: 0;
}

.product-pricing .catalog-quantity-btn:hover {
  background-color: rgba(45, 3, 11, 0.08);
}

.product-pricing .catalog-quantity-btn svg {
  width: 20px;
  height: 20px;
}

.product-pricing .catalog-quantity-value {
  flex: 1;
  text-align: center;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-primary);
  min-width: 36px;
  padding: 0 2px;
}

/* Advantages section */
.advantages-section {
  background-color: #fbfbfb;
  padding: 38px 0;
}

.advantages-grid {
  padding-top: 48px;
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 60px;
  max-width: 1140px;
  margin: 0 auto;
}

.advantage-item {
  text-align: center;
}

.advantage-icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.advantage-icon img,
.advantage-icon svg {
  width: 24px;
  height: 24px;
}

.advantage-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 120%;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.advantage-description {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
  color: var(--color-primary);
}

/* Sommelier section */
.sommelier-section {
  background-color: #F3F3F3;
  padding: 48px 0;
}

.sommelier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(366px, 1fr));
  gap: 18px;
  max-width: 1140px;
  margin: 0 auto;
}

.sommelier-card {
  position: relative;
  width: 366px;
  height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sommelier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.sommelier-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sommelier-card:hover::after {
  opacity: 1;
}

.sommelier-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.sommelier-card:hover .sommelier-image {
  transform: scale(1.04);
}

.sommelier-title {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 120%;
  color: var(--color-bg);
  z-index: 1;
}

/* Newsletter section */
.newsletter-section {
  background-color: #fbfbfb;
  padding: 48px;
}

.newsletter-form {
  max-width: 400px;
  margin: 0 auto;
  background-color: #F3F3F3;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.25);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  color: #2d030b;
  margin-bottom: 12px;
}

.form-input {
  width: 100%;
  height: var(--btn-h-sm);
  padding: 0 16px;
  background-color: var(--color-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 100%;
  color: var(--color-muted);
  transition: color .2s ease, border-color .2s ease;
}

.form-input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.form-input:focus {
  color: var(--color-text);
  outline: none;
  border-color: var(--color-primary);
}

.submit-btn {
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-bg);
  height: var(--btn-h-md);
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: background-color 0.25s ease;
}

.submit-btn:hover {
  background-color: #3a0712;
}

.submit-btn:active {
  background-color: #450813;
}

.privacy-text {
  font-size: 12px;
  font-family: "Gill Sans Nova", sans-serif;
  font-weight: 400;
  line-height: 14px;
  color: #978080;
  text-align: center;
}

.privacy-link {
  text-decoration: underline;
}

a {
  text-decoration: none;
}

/* Footer */
.footer {
  background-color: #2d030b;
  color: #fbfbfb;
  padding: 32px 0;
}

.footer a {
  color: white;
  text-decoration: none;
}

.footer-logo {
  width: 186px;
  height: 100px;
  margin: 0 auto 40px;
  display: block;
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 32px;
  margin-bottom: 32px;
}

.footer-section {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-direction: row;
}

.footer-section div {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-direction: column;
  gap: 12px;
}

.footer-section-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
  color: #cda27a;
  margin-bottom: 16px;
}

.footer-link {
  color: var(--color-bg);
  text-decoration: none;
  font-size: 18px;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 140%;
  transition: color 0.3s ease;
  max-width: 240px;
}

.footer-link:hover {
  color: var(--color-gold);
}

.footer-contact {
  display: flex;
  align-items: center;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-contact img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.footer-contact-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  color: #fbfbfb;
}

.footer-social {
  display: flex;
  flex-direction: row !important;
  gap: 24px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-top: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* background-color: rgba(251, 251, 251, 0.08); */
  /* border-radius: 50%; */
  transition: background-color 0.25s ease, transform 0.25s ease;
}

/* .footer-social a:hover {
  background-color: var(--color-gold);
  transform: translateY(-2px);
}

.footer-social a:active {
  background-color: #b6885f;
} */

.social-icon {
  width: auto;
  height: auto;
  /* width: 20px;
  height: 20px; */
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* .footer-social .social-vk svg,
.footer-social .social-max svg {
  color: var(--color-bg);
}

.footer-social a:hover .social-vk svg,
.footer-social a:hover .social-max svg,
.footer-social a:hover svg {
  color: var(--color-primary);
} */

.footer-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(236, 234, 234, 0.15);
  margin: 24px 0 16px;
}

.footer-copyright {
  font-size: 14px;
  font-family: "Gill Sans Nova", sans-serif;
  font-weight: 400;
  line-height: 13px;
  color: #896246;
  text-align: right;
}

.footer_contact_links {
  display: flex;
  flex-direction: column;
  align-items: flex-end !important;
}

.footer-mobile-nav {
  display: none;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2d030b;
  padding: 16px 0;
  z-index: 100;
}

.footer-nav-action {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.cart-badge-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge-footer .cart-count {
  position: absolute;
  top: -6px;
  right: -9px;
  background-color: #fbfbfb;
  color: #060606;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive media queries */
@media (max-width: 639px) {
  body {
    padding-bottom: 50px;
  }

  .section-header {
    margin-bottom: 8px;
  }

  .footer-section {
    gap: 24px;
  }

  .footer-section div {
    gap: 16px;
  }

  .container {
    padding: 0 12px;
  }

  .footer-logo {
    width: 50px;
    height: 60px;
    margin: 0 auto 32px;
  }

  .advantages-section {
    padding: 0px 0px 32px 0px;
  }

  .location_img {
    display: none;
  }

  .header-top {
    display: none;
  }

  .header-main .flex-between {
    justify-content: center;
  }

  .header-top .container {
    padding: 0;
    max-width: 100%;
  }

  .mt-2 {
    margin-top: 20px;
  }

  .newsletter-section {
    padding: 32px 0px 32px 0px;
  }

  .advantage-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .advantage-description {
    width: 240px;
  }

  .footer_contact_links {
    display: flex;
    flex-direction: column;
    align-items: center !important;
  }

  .footer-contact {
    gap: 20px;
  }

  .footer-mobile-nav {
    display: flex;
  }

  .header-contact {
    font-size: 12px;
    color: #999;
    display: block;
    text-align: left;
  }

  .header-contact:not(:first-child) {
    display: none;
  }

  .header-main {
    padding: 16px 0;
  }

  .header-actions {
    display: none;
    gap: 20px;
  }

  .header-logo {
    width: 100px;
    height: 53px;
  }

  .header-nav {
    padding: 12px 0;
  }

  .nav-content {
    width: 100%;
    flex-direction: row;
    gap: 8px;
    /* padding: 0 8px; */
    justify-content: flex-start;
  }

  .menu-button {
    padding: 0;
    width: 38px;
    height: 38px;
    font-size: 12px;
    white-space: nowrap;
    order: 2;
    justify-content: center;
    position: relative;
    background-color: #EDEAEA;
    border: 1px solid #EDEAEA;
    border-radius: 5px;
  }

  .menu-button span,
  .menu-button img {
    display: none;
  }

  .menu-button::before {
    content: "";
    width: 20px;
    height: 2px;
    background-color: #2d030b;
    box-shadow: 0 -6px 0 #2d030b, 0 6px 0 #2d030b;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .search-container {
    width: 1fr;
    order: 1;
    flex: 1;
  }

  .search-input {
    padding: 8px 12px;
    font-size: 14px;
  }

  .show-all-button {
    display: none;
  }

  .dropdown-menu {
    position: absolute;
    top: calc(100% + 0px);
    left: 0px;
    right: 0px;
    transform: none;
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    padding: 12px;
    max-height: auto;
    overflow-y: auto;
  }

  .menu__columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .menu__column {
    display: flex;
    flex-direction: column;
  }

  .menu__list {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
  }

  .menu__group ul {
    gap: 6px;
  }

  .menu__title {
    display: flex;
    font-size: 16px;
    margin-bottom: 8px;
  }

  .menu__link {
    font-size: 16px;
    margin-bottom: 0px;
  }

  /* ============================================================
     Расположение колонок меню по Figma (мобильная версия):
       строка 1: Вино (col 1, влево) + Крепкие напитки (col 2, вправо)
       строка 2: Слабоалкогольное — на всю ширину, влево
       строка 3: Мой аккаунт      — на всю ширину, влево
     ============================================================ */

  /* Col 2 (Крепкие напитки) — выравниваем содержимое вправо. */
  .menu__column:nth-child(2) {
    text-align: right;
    align-items: flex-end;
  }

  .menu__column:nth-child(2) .menu__list {
    align-items: flex-end;
  }

  /* Cols 3-4 (Слабоалкогольное, Мой аккаунт) — на всю ширину строки,
     каждая на своей. Принудительно влево, потому что у col 4 = :last-child
     стоит десктопный text-align: right из основного блока выше. */
  .menu__column:nth-child(n+3) {
    display: flex;
    grid-column: 1 / -1;
    text-align: left;
  }

  .menu__column:nth-child(n+3) .menu__list {
    align-items: flex-start;
  }

  .hero {
    text-align: center;
  }

  .hero-title {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 8px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-content {
    position: absolute;
    left: 50%;
    top: 25%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
  }

  .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .product-card {
    box-shadow: 0px 2px 6px 0px #00000040;
  }

  .section-title {
    font-size: 28px;
    line-height: 32px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .products-swiper,
  .products-swiper-all-time,
  .products-swiper-best-price {
    padding: 16px calc((100% - 280px) / 2) 16px;
  }

  .products-section .swiper-slide {
    width: 280px !important;
  }

  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0px;
  }

  .sommelier-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sommelier-card {
    width: 100%;
    height: 400px;
  }

  .footer-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .footer-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about_us_footer {
    margin-top: 0px !important;
  }

  .footer-section div {
    align-items: center;
  }

  .footer-section-title {
    margin-bottom: 0px !important;
    margin-top: 0px;
  }

  .footer-contact-text {
    font-family: 'Dihjauti', serif;
    font-weight: 700;
    font-style: Bold;
    font-size: 14px;
    line-height: 110.00000000000001%;
    letter-spacing: 0%;
  }

  .footer-link {
    text-align: center;
    font-size: 14px;
    font-family: 'Gill Sans Nova';
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    letter-spacing: 0%;
    text-align: center;
  }

  .footer-contact {
    justify-content: center;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .footer-contact img {
    margin-top: 0 !important;
  }

  .footer-contact img[alt="Телефон"] {
    margin-left: 0 !important;
    margin-top: 20px !important;
  }

  .footer-social {
    justify-content: center;
    margin-top: 12px;
  }

  .footer-copyright {
    text-align: center;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .header-logo {
    width: 250px;
    height: 56px;
  }

  .hero-title {
    font-size: 36px;
    line-height: 40px;
  }

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

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

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

@media (min-width: 768px) and (max-width: 1023px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

/* Interactive states (legacy hover-стили — теперь применяются через основные блоки .menu-button и .show-all-button наверху файла) */

.search-input:focus {
  outline: none;
}

.form-input:focus {
  outline: 2px solid #2d030b;
  outline-offset: 2px;
}

.header-action:hover {
  opacity: 0.8;
}


.disclaimer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  -webkit-transition-property: opacity;
  transition-property: opacity;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
  -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}

.disclaimer-modal.active {
  opacity: 1;
  pointer-events: all;
}

.disclaimer-modal__body {
  display: block;
  max-width: calc(100dvw - 24px);
  max-height: calc(100dvh - 24px);
  width: 406px;
  padding: 32px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px;
  background-color: #fbfbfb;
}

@media (max-width: 576px) {
  .disclaimer-modal__body {
    padding: 24px;
  }
}

.disclaimer-modal__content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 32px;
  max-height: calc(100dvh - 64px - 24px);
  overflow: auto;
}

@media (max-width: 576px) {
  .disclaimer-modal__content {
    gap: 16px;
    max-height: calc(100dvh - 48px - 24px);
  }
}

.disclaimer-modal__age {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 100%;
  text-align: center;
  color: #780d00;
}

@media (max-width: 576px) {
  .disclaimer-modal__age {
    font-size: 40px;
  }
}

.disclaimer-modal__title {
  margin: 0;
  font-family: "Gill Sans Nova", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 120%;
  text-align: center;
  color: #060606;
}

@media (max-width: 576px) {
  .disclaimer-modal__title {
    font-size: 16px;
  }
}

.disclaimer-modal__confirm {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.disclaimer-modal__confirm-button {
  display: inline-block;
  padding: 14px 24px 12px;
  font-family: "Dihjauti", sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 100%;
  text-transform: uppercase;
  color: #fbfbfb;
  border: none;
  border-radius: 4px;
  background-color: #2d030b;
  -webkit-transition: background-color ease-out 0.2s;
  transition: background-color ease-out 0.2s;
  cursor: pointer;
}

.disclaimer-modal__confirm-button:hover {
  background-color: #370610;
}

.disclaimer-modal__confirm-button:active {
  background-color: #450813;
}

/* Избранное */
.favorites-page {
  min-height: 640px;
}

.favorites-section {
  padding: 48px 0;
}

.favorites-header {
  text-align: left;
  margin-bottom: 32px;
}

.favorites-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  line-height: 110%;
  color: var(--color-primary);
  margin: 0;
}

.favorites-grid {
  min-height: 640px;
  align-content: flex-start;
}

.favorites-empty {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

/* Заголовок «Избранное» в пустом состоянии — крупный, центрированный, как в Figma */
.favorites-empty__title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  line-height: 110%;
  color: var(--color-primary);
  margin: 0 0 8px 0;
  text-align: center;
}

.favorites-empty__text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
  color: var(--color-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Кнопка «Перейти в каталог» — компактная uppercase под Figma */
.favorites-empty__btn {
  margin-top: 16px;
  text-transform: uppercase;
}

/* Базовая кнопка */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h-md);
  padding: 0 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
  border: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.btn--primary:hover {
  background-color: #3a0712;
}

.btn--primary:active {
  background-color: #450813;
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn--accent:hover {
  background-color: #5a0a00;
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn--ghost:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.btn--lg {
  height: var(--btn-h-lg);
  padding: 0 32px;
  font-size: 16px;
}

.btn--sm {
  height: var(--btn-h-sm);
  padding: 0 20px;
}

.btn--disabled,
.btn[disabled] {
  background-color: #c9c6c6 !important;
  color: var(--color-bg) !important;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 639px) {

  .favorites-page,
  .favorites-grid,
  .favorites-empty {
    min-height: 480px;
  }

  .favorites-title,
  .favorites-empty__title {
    font-size: 32px;
  }

  .favorites-empty__text {
    font-size: 14px;
    padding: 0 16px;
  }
}

/* Фирменный toast */
.bn-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  max-width: 360px;
  padding: 14px 20px;
  background-color: var(--color-primary);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 130%;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.bn-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* .bn-toast.is-success {
  background-color: #2f6f3f;
} */

.bn-toast.is-error {
  background-color: var(--color-accent);
}

@media (max-width: 639px) {
  .bn-toast {
    left: 12px;
    right: 12px;
    bottom: 72px;
    max-width: none;
  }
}

/* Header: анимация бургера в X (мобильная) */
@media (max-width: 639px) {
  body.menu-open .menu-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: none;
  }

  body.menu-open .menu-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #2d030b;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  /* На мобильной убираем тёмно-бордовую заливку открытой menu-button.
     Кнопка остаётся в светло-серой обводке независимо от состояния меню;
     индикатор открытия — только трансформация бургера в крестик (см. выше). */
  .menu-button:active,
  .menu-button[aria-expanded="true"],
  body.menu-open .menu-button {
    background-color: #EDEAEA;
    border-color: #EDEAEA;
  }
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ — общие правки ===== */
@media (max-width: 639px) {

  /* Закрепляем хедер при скролле */
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  /* Уменьшаем все базовые заголовки */
  .section-title {
    font-size: 24px;
    line-height: 120%;
  }

  .hero-title {
    font-size: 28px;
    line-height: 115%;
  }

  .hero-content {
    left: 50%;
    top: 111px;
    width: calc(100% - 32px);
    max-width: none;
  }

  /* Отступы между секциями */
  .section,
  .products-section,
  .advantages-section,
  .sommelier-section,
  .newsletter-section,
  .hero {
    padding: 32px 0;
  }

  /* Кнопка «Добавить в корзину» на карточке товара — закреплена внизу экрана */
  body.product-page-active {
    padding-bottom: 88px;
  }

  .product-view .order-card .add-to-cart,
  .product-view .order-card .product-quantity-controls {
    height: 36px;
    background-color: #210201;
  }

  /* Разделитель футера */
  .footer-divider {
    display: none;
    margin: 16px 0;
  }

  /* Модалка: ширина под контент, крупные иконки в панели мобильной */
  .disclaimer-modal__body {
    width: calc(100% - 24px);
    max-width: 400px;
  }

  .footer-mobile-nav img {
    width: 22px !important;
    height: 22px !important;
  }
}

/* Мобильная галерея — видны карточки слева и справа.
   ВАЖНО:
   — .favorites-grid убран — карточки идут вертикальным стеком (см. правило ниже)
   — .events-grid и .news-grid убраны — управляются своими css/events.css и
     css/news.css, иначе конфликт scroll-snap-align (center vs start) ломает
     прокрутку первой карточки на мобильной. */
@media (max-width: 639px) {

  .products-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 16px;
    gap: 12px;
  }

  .products-grid::-webkit-scrollbar {
    display: none;
  }

  .products-grid>* {
    flex: 0 0 calc(100vw - 80px);
    max-width: 280px;
    scroll-snap-align: center;
  }

  /* Избранное на мобильной — вертикальный стек full-width карточек как в Figma */
  .favorites-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .favorites-grid>* {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    scroll-snap-align: none;
  }

  /* Заголовок «Избранное» на мобильной — по центру (было left-align) */
  .favorites-title {
    text-align: center;
  }
}

/* Мобильные табы (ЛК, Вопросы/ответы) — без подложки, до края, выбранный по центру */
@media (max-width: 639px) {

  .tabs,
  .profile-tabs,
  .qa-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 -16px 16px;
    scroll-snap-type: x mandatory;
  }

  .tabs::-webkit-scrollbar,
  .profile-tabs::-webkit-scrollbar,
  .qa-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-item,
  .profile-tab,
  .qa-tab {
    flex-shrink: 0;
    padding: 12px 20px;
    scroll-snap-align: center;
  }

  /* История покупок + избранное: горизонтальная прокрутка */
  .account-favorites .products-grid,
  .account-orders .products-grid,
  .favorites .products-grid,
  .orders .products-grid {
    display: flex;
    overflow-x: auto;
    padding: 0 16px;
    gap: 12px;
    scroll-snap-type: x mandatory;
  }
}


@media (max-width: 639px) {
  .sommelier-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sommelier-card {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
  }

  /* Картинка — фоном через absolute, заполняет всю карточку */
  .sommelier-card .sommelier-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
  }

  /* Градиент поверх картинки */
  .sommelier-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60%;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.5) 35%,
        rgba(0, 0, 0, 0) 100%);
    z-index: 1;
    pointer-events: none;
  }

  /* Текст — абсолютно внизу, поверх градиента */
  .sommelier-card .sommelier-title,
  .sommelier-card .sommelier-description,
  .sommelier-card p {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  /* Если заголовок и описание лежат прямо в article — оборачиваем их позиционированием */
  .sommelier-card .sommelier-title {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 70px;
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    z-index: 2;
  }

  .sommelier-card .sommelier-description,
  .sommelier-card>p {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #fff;
    z-index: 2;
  }
}