/* Общая компактная шапка для трёх тестовых вариантов. */
.home-page--with-countdown .site-header {
  height: 88px;
  grid-template-rows: 88px;
}

.home-page--with-countdown .site-header > .main-nav,
.home-page--with-countdown .site-header .header-actions {
  display: none;
}

.home-page--with-countdown .mobile-menu-toggle {
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #352617;
  border: 1px solid rgba(53, 38, 23, 0.24);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.home-page--with-countdown .mobile-menu-toggle:hover,
.home-page--with-countdown .mobile-menu-toggle:focus-visible {
  background: rgba(53, 38, 23, 0.06);
}

/* Меню остаётся рабочим и на широком экране, где мы прячем мелкие ссылки. */
.home-page--with-countdown .mobile-site-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  min-width: 320px;
  min-height: 100svh;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #352617;
  background: #f8f7f3;
}

.home-page--with-countdown .mobile-site-menu__top {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(53, 38, 23, 0.16);
}

.home-page--with-countdown .mobile-site-menu__close {
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #352617;
  cursor: pointer;
}

.home-page--with-countdown .mobile-site-menu__links {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

.home-page--with-countdown .mobile-site-menu__links a {
  min-height: 60px;
  padding: 13px 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(53, 38, 23, 0.14);
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.02;
}

.home-page--with-countdown .mobile-site-menu__contacts {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Базовая версия счётчика: заметная промополоса. */
.price-countdown {
  position: sticky;
  z-index: 55;
  top: 0;
  width: 100%;
  min-height: 82px;
  margin: 0;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  color: #352617;
  background: rgba(238, 234, 227, 0.97);
  box-shadow: 0 3px 14px rgba(53, 38, 23, 0.08);
  backdrop-filter: blur(8px);
  text-align: center;
}

.countdown-layout--promo .site-header,
.countdown-layout--line .site-header {
  position: relative;
  top: auto;
}

.price-countdown__label {
  max-width: 270px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.price-countdown__units {
  display: flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.price-countdown__unit {
  width: 68px;
  min-height: 60px;
  padding: 5px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(53, 38, 23, 0.11);
  border-radius: 6px;
  background: #f8f7f3;
  box-shadow: 0 4px 12px rgba(53, 38, 23, 0.08);
}

.price-countdown__number {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 31px;
  font-weight: 600;
  line-height: 0.8;
}

.price-countdown__caption {
  margin-top: 7px;
  color: #727737;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-countdown__separator {
  color: #7c8040;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 27px;
  line-height: 1;
  transform: translateY(-5px);
}

/* Вариант 1: логотип, счётчик и кнопка меню находятся в одном ряду. */
.countdown-layout--header .site-header {
  position: sticky;
  top: 0;
  z-index: 55;
  height: 96px;
  margin-bottom: -96px;
  grid-template-rows: 96px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(248, 247, 243, 0.66);
  box-shadow: 0 8px 26px rgba(53, 38, 23, 0.09);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
  backdrop-filter: blur(20px) saturate(118%);
}

.countdown-layout--header .header-top {
  gap: 24px;
}

.countdown-layout--header .header-top > .brand {
  margin-right: auto;
}

.countdown-layout--header .price-countdown {
  position: static;
  flex: 0 1 610px;
  width: auto;
  min-height: 0;
  padding: 0;
  gap: 18px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.countdown-layout--header .price-countdown__label {
  max-width: 190px;
  font-size: 18px;
}

.countdown-layout--header .price-countdown__units {
  gap: 6px;
}

.countdown-layout--header .price-countdown__unit {
  width: 54px;
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 5px 16px rgba(53, 38, 23, 0.07);
}

.countdown-layout--header .mobile-menu-toggle {
  border-color: rgba(53, 38, 23, 0.2);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.countdown-layout--header .price-countdown__number {
  font-size: 27px;
}

.countdown-layout--header .price-countdown__caption {
  margin-top: 6px;
  font-size: 8px;
}

.countdown-layout--header .price-countdown__separator {
  font-size: 22px;
}

@media (min-width: 1181px) {
  .countdown-layout--header .site-header {
    height: 150px;
    margin-bottom: -150px;
    grid-template-rows: 96px 54px;
    transition: height 0.24s ease, margin-bottom 0.24s ease, grid-template-rows 0.24s ease;
  }

  .countdown-layout--header .site-header > .main-nav {
    height: 54px;
    padding: 0 2px;
    display: flex;
    grid-row: 2;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.38);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.01em;
    overflow: hidden;
    opacity: 1;
    transition: height 0.2s ease, opacity 0.16s ease, transform 0.2s ease;
  }

  .countdown-layout--header .site-header > .main-nav a {
    position: relative;
    padding: 8px 0;
  }

  .countdown-layout--header .site-header > .main-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 1px;
    background: currentColor;
    opacity: 0;
    transform: scaleX(0.45);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .countdown-layout--header .site-header > .main-nav a:hover::after,
  .countdown-layout--header .site-header > .main-nav a:focus-visible::after {
    opacity: 0.55;
    transform: scaleX(1);
  }

  .countdown-layout--header .mobile-menu-toggle {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.16s ease, visibility 0.16s ease;
  }

  .countdown-layout--header:not(.countdown-header--scrolled) .mobile-menu-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .countdown-layout--header.countdown-header--scrolled .site-header {
    height: 96px;
    margin-bottom: -96px;
    grid-template-rows: 96px 0;
  }

  .countdown-layout--header.countdown-header--scrolled .site-header > .main-nav {
    height: 0;
    border-top-color: transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }

  .countdown-layout--header.countdown-header--scrolled .mobile-menu-toggle {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* Вариант 3: узкая контрастная строка без карточек. */
.countdown-layout--line .price-countdown {
  min-height: 54px;
  padding: 7px 22px;
  gap: 24px;
  color: #fff;
  background: rgba(124, 128, 64, 0.98);
  box-shadow: 0 3px 14px rgba(53, 38, 23, 0.16);
}

.countdown-layout--line .price-countdown__label {
  max-width: none;
  font-size: 19px;
  white-space: nowrap;
}

.countdown-layout--line .price-countdown__units {
  gap: 13px;
}

.countdown-layout--line .price-countdown__unit {
  width: auto;
  min-height: 0;
  padding: 0;
  flex-direction: row;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.countdown-layout--line .price-countdown__number {
  font-size: 25px;
  line-height: 1;
}

.countdown-layout--line .price-countdown__caption {
  margin: 4px 0 0;
  color: #fff;
  font-size: 9px;
  opacity: 0.78;
}

.countdown-layout--line .price-countdown__separator {
  color: rgba(255, 255, 255, 0.62);
  font-size: 20px;
  transform: none;
}

@media (max-width: 900px) {
  .countdown-layout--header .site-header {
    height: 160px;
    margin-bottom: -160px;
    padding-inline: 22px;
    grid-template-rows: 160px;
  }

  .countdown-layout--header .header-top {
    height: 160px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 72px 88px;
    gap: 0;
  }

  .countdown-layout--header .header-top > .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .countdown-layout--header .mobile-menu-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .countdown-layout--header .price-countdown {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }
}

@media (max-width: 700px) {
  .home-page--with-countdown .site-header {
    height: 72px;
    padding-inline: 18px;
    grid-template-rows: 72px;
  }

  .home-page--with-countdown .site-header .brand img {
    width: min(238px, 66vw);
  }

  .price-countdown {
    min-height: 100px;
    padding: 9px 8px 10px;
    flex-direction: column;
    gap: 7px;
  }

  .price-countdown__label {
    max-width: none;
    font-size: 17px;
    white-space: nowrap;
  }

  .price-countdown__units {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }

  .price-countdown__unit {
    width: 57px;
    min-height: 50px;
    padding: 5px 4px 4px;
  }

  .price-countdown__number {
    font-size: 27px;
  }

  .price-countdown__caption {
    margin-top: 6px;
    font-size: 8px;
  }

  .price-countdown__separator {
    font-size: 22px;
    transform: translateY(-4px);
  }

  .countdown-layout--header .site-header {
    height: 164px;
    margin-bottom: -164px;
    padding-inline: 18px;
    grid-template-rows: 164px;
  }

  .countdown-layout--header .header-top {
    height: 164px;
    grid-template-rows: 72px 92px;
  }

  .countdown-layout--header .price-countdown {
    flex-direction: column;
    gap: 5px;
  }

  .countdown-layout--header .price-countdown__label {
    max-width: none;
    font-size: 15px;
    white-space: nowrap;
  }

  .countdown-layout--header .price-countdown__unit {
    width: 52px;
    min-height: 47px;
  }

  .countdown-layout--line .price-countdown {
    min-height: 52px;
    padding: 6px 10px;
    flex-direction: row;
    gap: 12px;
  }

  .countdown-layout--line .price-countdown__label {
    font-size: 14px;
    line-height: 0.95;
    white-space: normal;
  }

  .countdown-layout--line .price-countdown__units {
    width: auto;
    gap: 6px;
  }

  .countdown-layout--line .price-countdown__unit {
    width: auto;
    min-height: 0;
    padding: 0;
  }

  .countdown-layout--line .price-countdown__number {
    font-size: 20px;
  }

  .countdown-layout--line .price-countdown__caption {
    margin-top: 2px;
    font-size: 7px;
  }

  .countdown-layout--line .price-countdown__separator {
    font-size: 15px;
    transform: none;
  }

  .countdown-layout--line .price-countdown__separator:nth-last-child(2),
  .countdown-layout--line .price-countdown__unit:last-child {
    display: none;
  }
}

@media (max-width: 360px) {
  .price-countdown__label {
    font-size: 15px;
  }

  .price-countdown__unit {
    width: 51px;
  }

  .countdown-layout--line .price-countdown__label {
    font-size: 13px;
  }

  .countdown-layout--line .price-countdown__unit {
    width: auto;
  }
}
