:root {
  --blue: #4674B8;
  --green: #6FB353;
  --black: #212121;
  --gray: #7C8C96;
  --gray-border: #EBEBEB;
  --gray-label: #6C6C6C;
  --gray-menu-bg: #F0F4F5;
  --red: #E73838;
  --white: #FFFFFF;
  --content-width: 1594px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

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

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

/* Shared fluid container: full desktop width, shrinks with a side gutter,
   never causes horizontal overflow. */
.site-header__inner,
.hero,
.features,
.special-offers {
  width: min(var(--content-width), calc(100% - 80px));
  margin-left: auto;
  margin-right: auto;
}

/* ===== HEADER ===== */

.site-header {
  width: 100%;
  background: var(--white);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 90px;
}

.logo {
  display: block;
  width: 82px;
  height: 50px;
  flex-shrink: 0;
}

.logo img {
  width: 100%;
  height: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-left: auto;
}

.main-nav {
  display: flex;
  height: 40px;
}

.main-nav__item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--white);
}

.main-nav__item img {
  width: 20px;
  height: 20px;
}

.main-nav__item--rent {
  width: 140px;
  justify-content: center;
  padding: 10px 14px;
  background: var(--green);
  border-radius: 10px 0 0 10px;
}

.main-nav__group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--blue);
  border-radius: 0 10px 10px 0;
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 38px;
  flex-shrink: 0;
  background: var(--blue);
  border-radius: 10px;
  color: var(--white);
  font-size: 14px;
}

/* Compact header (tablet & mobile): "Войти" + hamburger, hidden on desktop */
.nav-compact {
  display: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-compact__login {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--blue);
  border-radius: 10px;
  color: var(--white);
  font-size: 14px;
  white-space: nowrap;
}

.nav-compact__login img {
  width: 20px;
  height: 20px;
}

.nav-compact__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 10px;
  background: var(--gray-menu-bg);
  border: none;
  border-radius: 10px;
}

.nav-compact__menu-btn img {
  width: 20px;
  height: 20px;
}

.nav-compact__dropdown {
  width: min(var(--content-width), calc(100% - 80px));
  margin: 0 auto 16px;
  flex-direction: column;
  gap: 8px;
}

.nav-compact__dropdown:not([hidden]) {
  display: flex;
}

@media (min-width: 768px) {
  .nav-compact__dropdown {
    display: none !important;
  }
}

.nav-compact__dropdown .main-nav__item--rent,
.nav-compact__dropdown .main-nav__item--bookings,
.nav-compact__dropdown .main-nav__item--favorites {
  width: 100%;
  border-radius: 10px;
  justify-content: flex-start;
  padding: 12px 16px;
  font-size: 15px;
}

.nav-compact__dropdown .main-nav__item--bookings,
.nav-compact__dropdown .main-nav__item--favorites {
  background: var(--blue);
}

/* ===== HERO ===== */

.hero {
  position: relative;
  height: 400px;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

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

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 24px;
}

.hero__title {
  font-family: 'PT Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--black);
  text-align: center;
  max-width: 1054px;
  text-wrap: balance;
}

.hero__subtitle {
  font-family: 'PT Sans', Arial, sans-serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--gray);
  text-align: center;
  margin-top: 4px;
}

.search-bar {
  width: 100%;
  max-width: 1054px;
  height: 56px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0px 6px 20px 0px rgba(6, 27, 45, 0.04);
}

.search-bar__inner {
  display: flex;
  align-items: center;
  height: 44px;
  margin: 6px 7px;
}

.search-field {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 12px 16px 11px;
  border-right: 1px solid var(--gray-border);
  color: var(--gray);
  font-size: 18px;
  overflow: hidden;
}

.search-field span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-field--where {
  flex: 540 1 0;
  min-width: 0;
  position: relative;
  overflow: visible;
  cursor: pointer;
}

.where-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 292px;
  background: var(--white);
  border: 1px solid #F0F4F5;
  border-radius: 20px;
  padding: 24px 30px;
  box-shadow: 0px 4px 6px rgba(6, 27, 45, 0.08);
  flex-direction: column;
  gap: 16px;
  z-index: 20;
  cursor: default;
}

.where-dropdown:not([hidden]) {
  display: flex;
}

.where-dropdown__label {
  font-size: 14px;
  color: #7C8C96;
  margin: 0 0 12px;
}

.where-dropdown__group + .where-dropdown__group {
  border-top: 1px solid var(--gray-border);
  padding-top: 16px;
}

.where-dropdown__item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 18px;
  color: var(--black);
  text-align: left;
  cursor: pointer;
}

.where-dropdown__item + .where-dropdown__item {
  margin-top: 12px;
}

.where-dropdown__item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.where-dropdown__item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-field--dates {
  flex: 200 1 0;
  min-width: 0;
  position: relative;
  overflow: visible;
  cursor: pointer;
}

.search-field--guests {
  flex: 227 1 0;
  min-width: 0;
  padding-left: 16px;
  padding-right: 8px;
  border-right: none;
  position: relative;
  overflow: visible;
  cursor: pointer;
}

/* ---------- Даты dropdown ---------- */

.dates-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--white);
  border: 1px solid #F0F4F5;
  border-radius: 24px;
  box-shadow: 0px 4px 6px rgba(6, 27, 45, 0.08);
  z-index: 20;
  cursor: default;
  overflow: hidden;
  width: max-content;
  max-width: min(1054px, 92vw);
}

.dates-dropdown__body {
  display: flex;
}

.dates-dropdown__months {
  flex-shrink: 0;
  width: 108px;
  max-height: 328px;
  overflow-y: auto;
  background: #F0F4F5;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px 10px;
}

.dates-dropdown__month-item {
  font-size: 14px;
  color: #303030;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.dates-dropdown__month-item:hover,
.dates-dropdown__month-item--active {
  background: rgba(70, 116, 184, 0.12);
}

.dates-nav-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 24px;
  min-width: 0;
}

.dates-nav {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0F4F5;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.dates-nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.dates-dropdown__calendars {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  min-width: 0;
}

.dates-calendar {
  width: 267px;
  flex-shrink: 0;
  padding: 0 24px;
  scroll-snap-align: start;
}

.dates-calendar__header {
  font: 700 18px/1.2 Arial, sans-serif;
  color: #333;
  text-align: center;
  height: 21px;
  margin-bottom: 16px;
}

.dates-weekdays {
  display: flex;
}

.dates-weekdays span {
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 14px Arial, sans-serif;
  color: rgba(51, 51, 51, 0.5);
}

.dates-weekdays span.weekend {
  color: #FF3B30;
}

.dates-days {
  display: flex;
  flex-wrap: wrap;
}

.dates-day {
  width: 14.2857%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 16px Arial, sans-serif;
  color: #333;
  cursor: pointer;
  border-radius: 8px;
}

.dates-day--out {
  color: #E0E0E0;
  cursor: default;
}

.dates-day--weekend {
  color: #E73838;
}

.dates-day--in-range {
  background: rgba(111, 179, 83, 0.2);
}

.dates-day--edge {
  background: #6FB353;
  color: var(--white);
}

.dates-day:not(.dates-day--out):not(.dates-day--edge):hover {
  background: #F0F4F5;
}

.dates-dropdown__footer {
  padding: 12px 24px 24px;
  display: flex;
  justify-content: center;
}

.dates-dropdown__done {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: var(--white);
  font: 700 16px Arial, sans-serif;
  padding: 14px 22px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}

/* ---------- Размещение dropdown ---------- */

.guests-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 300px;
  background: var(--white);
  border: 1px solid #F0F4F5;
  border-radius: 25px;
  box-shadow: 0px 4px 6px rgba(6, 27, 45, 0.08);
  padding: 24px 0;
  z-index: 20;
  cursor: default;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.guests-dropdown:not([hidden]) {
  display: flex;
}

.guests-dropdown__rooms {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.guests-room + .guests-room {
  border-top: 1px solid var(--gray-border);
  margin-top: 8px;
  padding-top: 8px;
}

.guests-room__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 14px;
  color: var(--gray);
}

.guests-room__title span.guests-room__remove {
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
}

.guests-counter-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-border);
}

.guests-room > .guests-counter-row:last-of-type {
  border-bottom: none;
}

.guests-counter-row__label {
  flex: 1 1 0;
  min-width: 0;
}

.guests-counter-row__label div:first-child {
  font-size: 18px;
  color: var(--black);
}

.guests-counter-row__label div:last-child {
  font-size: 16px;
  color: var(--gray);
}

.guests-counter {
  display: flex;
  align-items: center;
}

.guests-counter button {
  background: #F0F4F5;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--black);
  line-height: 1;
}

.guests-counter button:disabled {
  opacity: 0.4;
  cursor: default;
}

.guests-counter span {
  width: 32px;
  text-align: center;
  font-size: 18px;
  color: var(--black);
}

.guests-ages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--gray-border);
}

.guests-room > .guests-ages:last-of-type {
  border-bottom: none;
}

.guests-age-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guests-age-row select {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--gray);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 18px;
  color: var(--black);
  background: var(--white);
  font-family: inherit;
}

.guests-age-row__remove {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray);
}

.guests-dropdown__add {
  color: var(--blue);
  font-size: 16px;
  cursor: pointer;
  padding: 0 24px;
  align-self: flex-start;
}

.guests-dropdown__done {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: var(--white);
  font: 700 16px Arial, sans-serif;
  padding: 14px 22px;
  border-radius: 8px;
  cursor: pointer;
  width: calc(100% - 48px);
}

.search-bar__submit {
  width: 64px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  border: none;
  border-radius: 15px;
}

.search-bar__submit img {
  width: 24px;
  height: 24px;
}

.search-bar__submit span {
  display: none;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

/* ===== FEATURES ===== */

.features {
  margin-top: 42px;
  margin-bottom: 0;
  display: flex;
  gap: 26px;
}

.feature {
  width: 514px;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.feature__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  border-radius: 8px;
}

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

.feature__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.feature__title {
  font-family: 'PT Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
  text-align: center;
}

.feature__text {
  font-size: 18px;
  line-height: 1.2;
  color: var(--gray);
  text-align: center;
  max-width: 402px;
}

/* ===== SPECIAL OFFERS ===== */

.special-offers {
  margin-top: 60px;
  padding-bottom: 100px;
}

.special-offers__title {
  font-family: 'PT Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
  text-align: center;
  margin-bottom: 44px;
}

.cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.card {
  width: min(379px, calc((100% - 78px) / 4));
  flex-direction: column;
  gap: 12px;
}

.card:not([hidden]) {
  display: flex;
}

.card__image {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
}

.card__image a {
  display: block;
  width: 100%;
  height: 100%;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: none;
  border-radius: 6px;
}

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

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

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.card__rating-stars {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card__rating-stars img {
  width: 14px;
  height: 14px;
}

.card__type {
  font-size: 12px;
  color: var(--gray-label);
  margin-left: 4px;
  white-space: nowrap;
}

.card__reviews {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__reviews-count {
  font-size: 12px;
  color: var(--blue);
  white-space: nowrap;
}

.card__rating-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 6px 12px;
  background: var(--green);
  border-radius: 6px;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
}

.card__price {
  font-size: 16px;
  color: var(--black);
}

.card__price b {
  font-size: 18px;
  font-weight: 700;
}

.card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.card__amenities--wrap {
  height: auto;
}

.amenity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 14px;
  color: var(--blue);
  white-space: nowrap;
}

.amenity img {
  width: 16px;
  height: 16px;
}

.card__last-places {
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--red);
}

.btn-outline {
  display: block;
  width: fit-content;
  margin: 40px auto 0;
  padding: 15px 24px 16px;
  background: transparent;
  border: 1px solid var(--blue);
  border-radius: 10px;
  color: var(--blue);
  font-weight: 700;
  font-size: 18px;
}

/* =====================================================================
   RESPONSIVE BREAKPOINTS — four states, matching the four device frames
   Figma actually ships for this screen (desktop, tablet landscape 1170,
   tablet portrait 784, mobile 360):

   >=1200px   desktop          — full layout, fluid between 1920 and 1200,
                                  8 cards / row of 4
   992-1199   tablet landscape — same header/nav/search/features as desktop
                                  just tighter, 6 cards / row of 3
   768-991    tablet portrait  — still the full (non-compact) nav + a
                                  single-row search bar, but icon-left
                                  features and 4 cards / row of 2
   <=767      mobile           — compact "Войти" + hamburger nav, stacked
                                  search bar, icon-left features,
                                  4 cards / row of 1
   ===================================================================== */

/* ---------- 768–1199px: shared by both tablet tiers ---------- */
@media (max-width: 1199px) and (min-width: 768px) {
  .site-header__inner,
  .hero,
  .features,
  .special-offers {
    width: min(1094px, calc(100% - 48px));
  }

  .site-header__inner {
    height: 70px;
  }

  .hero__title,
  .hero__subtitle {
    font-size: 32px;
  }

  .hero__subtitle {
    margin-top: 0;
  }
}

/* ---------- 992–1199px: tablet landscape (Figma ref: 1170) ---------- */
@media (max-width: 1199px) and (min-width: 992px) {
  .card {
    width: calc((100% - 26px * 2) / 3);
  }

  .special-offers .card:nth-child(n + 7) {
    display: none;
  }
}

/* ---------- <=991px: tablet portrait + mobile share icon-left features
   and a 4-card limit ---------- */
@media (max-width: 991px) {
  .features {
    flex-direction: column;
    gap: 24px;
  }

  .feature {
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 0;
    gap: 12px;
  }

  .feature__body {
    align-items: flex-start;
    flex: 1;
    min-width: 0;
  }

  .feature__title {
    font-size: 18px;
  }

  .feature__text {
    font-size: 16px;
  }

  .feature__title,
  .feature__text {
    text-align: left;
    max-width: none;
    width: 100%;
  }

  .special-offers__title {
    font-size: 28px;
    margin-bottom: 28px;
  }

  .special-offers .card:nth-child(n + 5) {
    display: none;
  }
}

/* ---------- 768–991px: tablet portrait (Figma ref: 784) ---------- */
@media (max-width: 991px) and (min-width: 768px) {
  .hero__title,
  .hero__subtitle {
    font-size: 24px;
  }

  .search-field--where {
    flex: 297 1 0;
  }

  .search-field--dates {
    flex: 178 1 0;
  }

  .search-field--guests {
    flex: 198 1 0;
  }

  .card {
    width: calc(50% - 13px);
  }
}

/* ---------- <=767px: mobile (Figma ref: 360) ---------- */
@media (max-width: 767px) {
  .header-right {
    display: none;
  }

  .nav-compact {
    display: flex;
  }

  .site-header__inner {
    height: 84px;
  }

  .hero__title {
    font-size: 26px;
    line-height: 1.15;
  }

  .hero__subtitle {
    font-size: 18px;
    margin-top: 0;
  }

  .hero__content {
    padding: 0 12px;
    gap: 16px;
  }

  .search-bar {
    height: auto;
    border-radius: 16px;
  }

  .search-bar__inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    margin: 0;
    padding: 6px;
    gap: 0;
  }

  .search-field {
    width: 100% !important;
    flex: none;
    height: auto;
    border-right: none !important;
    border-bottom: 1px solid var(--gray-border);
    padding: 12px 14px;
  }

  .where-dropdown {
    width: 100%;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    padding: 20px;
  }

  .dates-dropdown {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    top: calc(100% + 8px);
  }

  .dates-dropdown__months {
    display: none;
  }

  .dates-nav-row {
    padding: 16px 8px;
    gap: 2px;
  }

  .dates-calendar {
    width: calc(100vw - 130px);
    max-width: 267px;
    padding: 0 8px;
  }

  .guests-dropdown {
    left: 0;
    right: 0;
    width: 100%;
    top: calc(100% + 8px);
  }

  .search-bar__submit {
    width: 100%;
    height: auto;
    margin-top: 8px;
    padding: 14px 22px;
    border-radius: 8px;
  }

  .search-bar__submit span {
    display: inline;
  }

  .features {
    margin-top: 32px;
  }

  .special-offers {
    margin-top: 40px;
    padding-bottom: 56px;
  }

  .card {
    width: 100%;
  }

  .btn-outline {
    width: 100%;
  }
}

/* =====================================================================
   SEARCH RESULTS PAGE (поиск.html)
   ===================================================================== */

.search-page {
  width: min(var(--content-width), calc(100% - 80px));
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 14px;
  white-space: nowrap;
}

.breadcrumb__item {
  color: var(--gray);
}

.breadcrumb__item--link {
  color: var(--blue);
}

/* ---------- filter / view toolbar ---------- */

.search-toolbar {
  margin-top: 32px;
  background: var(--gray-menu-bg);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-toolbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-toolbar__filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  color: var(--black);
  white-space: nowrap;
}

.filter-btn img {
  width: 20px;
  height: 20px;
}

.filter-btn__badge {
  background: var(--gray-menu-bg);
  color: var(--gray);
  border-radius: 4px;
  padding: 4px;
  font-size: 14px;
  line-height: 1;
  min-width: 16px;
  text-align: center;
}

.filter-btn--active {
  background: var(--blue);
  color: var(--white);
}

.filter-btn--active .filter-btn__badge {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* ---------- Filters panel ---------- */

.filters-panel {
  align-items: flex-start;
  gap: 24px;
}

.filters-panel:not([hidden]) {
  display: flex;
}

.filters-panel__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-card__title {
  margin: 0;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--black);
}

.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.filter-checkbox input {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.filter-checkbox__box {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--gray-menu-bg);
  border: 1px solid rgba(124, 140, 150, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-checkbox__box img {
  width: 18px;
  height: 18px;
  opacity: 0;
}

.filter-checkbox input:checked + .filter-checkbox__box {
  background: var(--blue);
  border-color: var(--blue);
}

.filter-checkbox input:checked + .filter-checkbox__box img {
  opacity: 1;
}

.filter-checkbox__label {
  font-size: 16px;
  color: var(--black);
}

/* price range slider */

.price-slider-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-slider {
  position: relative;
  height: 12px;
}

.price-slider__track,
.price-slider__range {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  transform: translateY(-50%);
}

.price-slider__track {
  left: 0;
  right: 0;
  background: var(--gray-border);
}

.price-slider__range {
  background: var(--blue);
}

.price-slider__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

.price-slider__input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: transparent;
  height: 12px;
}

.price-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(6, 27, 45, 0.15);
  cursor: pointer;
  margin-top: 0;
}

.price-slider__input::-moz-range-track {
  background: transparent;
  height: 12px;
}

.price-slider__input::-moz-range-thumb {
  pointer-events: all;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(6, 27, 45, 0.15);
  cursor: pointer;
}

.price-fields {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price-field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  padding: 12px 14px;
}

.price-field__label {
  font-size: 14px;
  color: var(--gray);
  flex-shrink: 0;
}

.price-field input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--black);
  background: transparent;
  -moz-appearance: textfield;
}

.price-field input::-webkit-outer-spin-button,
.price-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 1199px) {
  .filters-panel {
    flex-wrap: wrap;
  }

  .filters-panel__col {
    flex: 1 1 calc(50% - 12px);
  }
}

@media (max-width: 767px) {
  .filters-panel {
    flex-direction: column;
  }

  .filters-panel__col {
    flex: 1 1 auto;
  }
}

.view-tabs {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.view-tabs__item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 8px;
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  color: var(--black);
  white-space: nowrap;
}

.view-tabs__item img {
  width: 20px;
  height: 20px;
}

.view-tabs__item--active {
  border-color: var(--blue);
}

.toolbar-search {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  height: 40px;
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  max-width: 777px;
}

.toolbar-search__field {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1px solid var(--gray-border);
  font-size: 14px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 0;
}

.toolbar-search__field span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar-search__field:first-child {
  flex-grow: 2;
}

.toolbar-search__field--guests {
  border-right: none;
}

.toolbar-search__field--guests b {
  font-weight: 400;
}

.toolbar-search__submit {
  width: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border: none;
}

.toolbar-search__submit img {
  width: 20px;
  height: 20px;
}

/* ---------- results: card list + map ---------- */

.search-results {
  margin-top: 26px;
  padding-bottom: 80px;
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

.search-results__list {
  flex: 1 1 0;
  min-width: 0;
  height: 784px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 26px;
}

.search-results__list .card {
  width: calc(50% - 13px);
}

.search-results__map {
  flex: 1 1 0;
  min-width: 0;
  height: 784px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gray-menu-bg);
}

.map-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-expand-btn {
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid #ebf4f5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--black);
  box-shadow: 0px 6px 10px 0px rgba(6, 27, 45, 0.04);
}

.map-expand-btn img {
  width: 20px;
  height: 20px;
}

.map-zoom {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  border-radius: 12px;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: #2c6d12;
  color: var(--white);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  box-shadow: 0px 4px 6px 0px rgba(6, 27, 45, 0.12);
  white-space: nowrap;
  cursor: pointer;
}

.map-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #2c6d12;
}

.map-pin--active {
  background: var(--blue);
}

.map-pin--active::after {
  border-top-color: var(--blue);
}

.map-pin--rooms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-pin__rooms {
  background: var(--white);
  color: var(--black);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 400;
}

.map-popup {
  position: absolute;
  transform: translate(0, 0);
  width: 314px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0px 6px 20px 0px rgba(6, 27, 45, 0.08);
  overflow: hidden;
}

.map-popup__image {
  position: relative;
  height: 172px;
}

.map-popup__image a {
  display: block;
  width: 100%;
  height: 100%;
}

.map-popup__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-popup__image-actions {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
}

.map-popup__image-actions button {
  width: 28px;
  height: 28px;
  background: var(--white);
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-popup__image-actions img {
  width: 18px;
  height: 18px;
}

.map-popup__body {
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-popup__title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.map-popup__price {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
  white-space: nowrap;
}

.map-popup__meta {
  font-size: 12px;
  color: var(--gray);
  text-align: right;
}

.map-popup__rooms-left {
  font-size: 12px;
  color: var(--red);
  text-align: right;
}

.map-toggle-btn {
  display: none;
  margin: 0 auto 60px;
  padding: 16px 24px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
}

/* ---------- search page responsive ---------- */

@media (max-width: 1199px) and (min-width: 768px) {
  .search-page {
    width: min(1094px, calc(100% - 48px));
  }
}

@media (max-width: 991px) {
  .search-toolbar__filters .filter-btn {
    display: none;
  }

  .view-tabs {
    display: flex;
  }

  .search-results {
    flex-direction: column;
  }

  .search-results__list {
    flex: none;
    width: 100%;
    height: auto;
    overflow-y: visible;
  }

  .search-results__map {
    flex: none;
    display: none;
  }

  .map-toggle-btn {
    display: block;
  }

  .search-results--map-only .search-results__list {
    display: none;
  }

  .search-results--map-only .search-results__map {
    display: block;
    width: 100%;
    height: 600px;
  }

  .card {
    width: calc(50% - 13px);
  }
}

@media (max-width: 767px) {
  .search-page {
    width: min(var(--content-width), calc(100% - 32px));
  }

  .breadcrumb {
    margin-top: 16px;
  }

  .search-toolbar {
    margin-top: 20px;
  }

  .search-toolbar__row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .toolbar-search {
    flex: none;
    max-width: none;
  }

  .toolbar-search__field {
    padding: 0 10px;
    font-size: 13px;
  }

  .toolbar-search__field:first-child {
    flex-grow: 1;
  }

  .card,
  .search-results__list .card {
    width: 100%;
  }

  .search-results__list .card:nth-child(n + 5) {
    display: none;
  }

  .map-popup {
    width: calc(100% - 24px);
    max-width: 314px;
  }
}

/* =====================================================================
   BOOKING PAGE (бронирование.html)
   ===================================================================== */

.booking-page {
  width: min(var(--content-width), calc(100% - 80px));
  margin: 0 auto;
  padding-bottom: 100px;
}

.breadcrumb__icon {
  width: 14px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.booking-title {
  margin-top: 24px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
}

.booking-dates-mobile {
  display: none;
  margin-top: 8px;
  font-size: 16px;
  color: var(--gray);
}

.room-tabs {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.room-tabs__item {
  padding: 8px 16px;
  background: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  color: var(--blue);
}

.room-tabs__item--active {
  background: var(--blue);
  color: var(--white);
}

.booking-layout {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  margin-top: 32px;
}

.booking-content {
  flex: 1054 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.booking-summary {
  flex: 514 1 0;
  min-width: 280px;
  max-width: 514px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}

/* ---------- hotel card ---------- */

.hotel-card {
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--white);
  border-radius: 20px;
  padding: 12px 26px 12px 12px;
}

.hotel-card__image {
  width: 460px;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #d9d9d9;
}

.hotel-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotel-card__info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 320px;
}

.hotel-card__name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hotel-card__name {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
  margin: 0;
}

.hotel-card__stars {
  width: 58px;
  height: 18px;
}

.hotel-card__address {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.2;
  color: var(--gray);
}

.hotel-card__details {
  background: var(--gray-menu-bg);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hotel-card__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hotel-card__detail-label {
  font-size: 16px;
  color: var(--gray);
}

.hotel-card__detail-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
}

/* ---------- form sections (shared: contacts / guests / services / wishes) ---------- */

.form-section {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-section__head--row {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.form-section__head-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-section__title {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
  margin: 0;
}

.form-section__subtitle {
  font-size: 18px;
  line-height: 1.2;
  color: var(--gray);
  margin: 0;
}

.form-row {
  display: flex;
  gap: 24px;
}

.form-field {
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--gray-menu-bg);
}

.form-field:not([hidden]) {
  display: flex;
}

.form-field--filled {
  background: var(--white);
  border: 1px solid var(--gray);
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.form-field__label {
  font-size: 14px;
  color: var(--gray);
  opacity: .6;
  margin-bottom: -2px;
}

.form-field__input {
  border: none;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 18px;
  color: var(--black);
  outline: none;
  width: 100%;
  padding: 0;
}

.form-field__input--placeholder-only {
  color: var(--black);
}

.form-field__input--placeholder-only::placeholder {
  color: var(--gray);
  opacity: .6;
}

.form-field__textarea {
  resize: none;
  height: 64px;
  font-family: Arial, sans-serif;
  line-height: 1.2;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 10px 14px;
  background: var(--blue);
  border: none;
  border-radius: 10px;
  color: var(--white);
  font-size: 14px;
}

.btn-add img {
  width: 20px;
  height: 20px;
}

/* ---------- additional services ---------- */

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--gray-menu-bg);
  border-radius: 12px;
  padding: 20px;
}

.service-row--expanded {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 24px;
}

.service-row__main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 260px;
  min-width: 0;
}

.service-row__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.service-row__title {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
  white-space: nowrap;
}

.service-row__divider {
  width: 1px;
  align-self: stretch;
  background: var(--gray-border);
}

.service-row__price {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--blue);
  white-space: nowrap;
}

.service-row--expanded .service-row__price {
  margin-right: auto;
}

.service-row__btn {
  flex-shrink: 0;
  margin-left: auto;
  padding: 14px 22px;
  border-radius: 8px;
  background: var(--blue);
  border: none;
  color: var(--white);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.service-row__btn--added {
  background: var(--white);
  border: 2px solid #28569a;
  color: var(--blue);
  padding: 12px 20px;
}

.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.time-slot {
  padding: 14px 22px;
  border: 2px solid #28569a;
  border-radius: 8px;
  background: var(--white);
  font-size: 14px;
  color: rgba(0, 0, 0, 0.69);
  white-space: nowrap;
}

.time-slot span {
  color: rgba(0, 0, 0, 0.4);
}

.time-slot--active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.time-slot--active span {
  color: var(--white);
}

.time-slot--next {
  width: 36px;
  padding: 14px;
  background: var(--blue);
  color: var(--white);
  border: none;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- wishes / chevron ---------- */

.chevron-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-menu-bg);
  border: none;
  border-radius: 8px;
  transform: rotate(180deg);
  transition: transform 0.2s;
}

.chevron-btn img {
  width: 20px;
  height: 20px;
}

.chevron-btn--collapsed {
  transform: rotate(0deg);
}

/* ---------- sidebar summary ---------- */

.summary-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.summary-card__nights {
  font-size: 18px;
  color: var(--gray);
  margin: 0;
}

.summary-card__range {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
  margin: 4px 0 0;
}

.summary-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  color: var(--black);
}

.summary-card__row span:first-child {
  color: var(--gray);
}

.summary-card__divider {
  height: 1px;
  background: var(--gray-border);
}

.summary-card__total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.summary-card__total span:first-child {
  font-size: 16px;
  color: var(--gray);
}

.summary-card__total-value {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--blue);
}

.payment-methods {
  display: flex;
  gap: 24px;
}

.payment-method {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 80px;
  background: var(--white);
  border: 2px solid var(--gray);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 7px 0 0 16px;
  cursor: pointer;
}

.payment-method--active {
  border-color: var(--blue);
}

.payment-method__icon {
  width: 28px;
  height: 28px;
}

.payment-method__icon--sbp {
  margin-top: 1px;
}

.payment-method__label {
  margin-top: 11px;
  font-size: 13px;
  color: var(--black);
  text-align: left;
}

.payment-method__check {
  position: absolute;
  top: 7px;
  right: 16px;
  width: 29px;
  height: 28px;
  display: none;
}

.payment-method--active .payment-method__check {
  display: block;
}

.btn-pay {
  width: 100%;
  padding: 15px 24px 16px;
  background: var(--blue);
  border: none;
  border-radius: 10px;
  color: var(--white);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.summary-card__terms {
  font-size: 14px;
  line-height: 1.3;
  color: var(--gray);
  text-align: left;
  margin: 0;
}

.summary-card__terms a {
  color: var(--blue);
  text-decoration: underline;
}

.promo-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
}

/* ---------- booking page responsive ---------- */

@media (max-width: 1199px) and (min-width: 768px) {
  .booking-page {
    width: min(1094px, calc(100% - 48px));
  }
}

@media (max-width: 991px) {
  .booking-dates-mobile {
    display: block;
  }

  .booking-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .booking-content {
    flex: none;
  }

  .booking-summary {
    flex: none;
    max-width: none;
    width: 100%;
    position: static;
  }

  .hotel-card {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .hotel-card__image {
    width: 100%;
    height: auto;
    aspect-ratio: 460 / 320;
  }

  .hotel-card__info {
    height: auto;
  }

  .form-row {
    flex-direction: column;
  }

  .service-row__title {
    font-size: 20px;
  }

  .form-section__title {
    font-size: 26px;
  }

  .hotel-card__name {
    font-size: 26px;
  }
}

@media (max-width: 767px) {
  .booking-page {
    width: min(var(--content-width), calc(100% - 32px));
  }

  .room-tabs {
    gap: 8px;
  }

  .breadcrumb {
    flex-wrap: wrap;
    white-space: normal;
    row-gap: 4px;
  }

  .service-row__main {
    flex-basis: 100%;
  }

  .payment-methods {
    gap: 12px;
  }

  .time-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .time-slot {
    padding: 10px 12px;
    font-size: 13px;
    text-align: center;
    justify-content: center;
  }

  .time-slot--next {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* =====================================================================
   HOTEL PAGE (отель.html)
   ===================================================================== */

.hotel-page {
  width: min(var(--content-width), calc(100% - 80px));
  margin: 0 auto;
  padding-bottom: 100px;
}

.hotel-page__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.breadcrumb__item--muted {
  color: var(--gray);
}

.hotel-page__actions {
  display: flex;
  gap: 12px;
}

.text-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--blue);
  font-size: 16px;
}

.text-btn img {
  width: 20px;
  height: 18px;
}

.text-btn--favorited {
  color: var(--red);
}

.text-link {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--blue);
  font-size: 18px;
  text-decoration: underline;
}

.section-title {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
  margin: 0;
}

/* ---------- layout: single column, sidebar inline; desktop = 2 columns ---------- */

.hotel-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-top: 26px;
}

.hotel-gallery-card,
.hotel-rooms,
.hotel-about-card,
.hotel-reviews-card,
.hotel-sidebar-top,
.hotel-sidebar-ratings {
  min-width: 0;
}

.hotel-gallery-card,
.hotel-about-card,
.hotel-reviews-card,
.room-card {
  background: var(--white);
  border-radius: 20px;
}

.hotel-gallery-card {
  padding: 12px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hotel-about-card,
.hotel-reviews-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hotel-rooms {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hotel-sidebar-top,
.hotel-sidebar-ratings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1200px) {
  .hotel-layout {
    grid-template-columns: 1fr 514px;
    align-items: start;
  }

  .hotel-gallery-card { grid-column: 1; grid-row: 1; }
  .hotel-rooms { grid-column: 1; grid-row: 2; }
  .hotel-about-card { grid-column: 1; grid-row: 3; }
  .hotel-reviews-card { grid-column: 1; grid-row: 4; }

  /* Both sidebar pieces sit in column 2, stacking in DOM order
     (top piece, then ratings) via grid auto-placement. */
  .hotel-sidebar-top,
  .hotel-sidebar-ratings {
    grid-column: 2;
  }

  .hotel-sidebar-top {
    position: sticky;
    top: 20px;
  }
}

/* Mobile only: match the Figma mobile flow — ratings move to after the
   room list instead of sitting with the map/dates/rules block. Tablet
   keeps everything in natural DOM order (grouped), so no override there. */
@media (max-width: 767px) {
  .hotel-gallery-card { order: 1; }
  .hotel-sidebar-top { order: 2; }
  .hotel-rooms { order: 3; }
  .hotel-sidebar-ratings { order: 4; }
  .hotel-about-card { order: 5; }
  .hotel-reviews-card { order: 6; }
}

/* ---------- gallery ---------- */

.hotel-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hotel-gallery__main {
  width: 100%;
  height: 412px;
  border-radius: 12px;
  overflow: hidden;
}

.hotel-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotel-gallery__thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.hotel-gallery__thumb {
  position: relative;
  width: 150px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.hotel-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotel-gallery__thumb--dim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* ---------- hotel header (title / rating / tags) ---------- */

.hotel-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px;
}

.hotel-header__type {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
}

.hotel-header__type img {
  width: 58px;
  height: 18px;
}

.hotel-header__name {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
  margin: 0;
}

.hotel-header__rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hotel-header__reviews-link {
  font-size: 14px;
  color: var(--blue);
}

.hotel-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.hotel-tags__all {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 43px;
  padding: 8px 16px;
  background: var(--blue);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-size: 16px;
  white-space: nowrap;
}

.hotel-tags__all img {
  width: 8px;
  height: 8px;
  transform: rotate(-90deg);
}

.hotel-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 43px;
  padding: 0 14px;
  background: var(--gray-menu-bg);
  border-radius: 10px;
  color: var(--blue);
  font-size: 16px;
  white-space: nowrap;
}

.hotel-tag img {
  width: 16px;
  height: 16px;
}

/* ---------- sidebar ---------- */

.sidebar-card {
  background: var(--white);
  border-radius: 20px;
  padding: 10px;
}

.sidebar-map__frame {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-map__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-map__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 61px;
  height: 61px;
  transform: translate(-50%, -70%);
}

.sidebar-map__expand {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 40px;
  height: 40px;
  background: var(--white);
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-map__expand img {
  width: 24px;
  height: 24px;
}

.sidebar-map__address {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 4px;
  font-size: 14px;
  color: var(--black);
}

.sidebar-map__address img:first-child {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-map__address span {
  flex: 1;
}

.sidebar-map__share {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sidebar-search {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.sidebar-search .form-field {
  width: 100%;
  min-height: 50px;
}

.btn-update {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  background: var(--blue);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}

.btn-update img {
  width: 20px;
  height: 20px;
}

.sidebar-ratings {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card__title {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
  margin: 0;
}

.ratings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.rating-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rating-item__row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--black);
}

.rating-item__row b {
  font-weight: 700;
}

.rating-item__bar {
  height: 5px;
  border-radius: 5px;
  background: var(--gray-border);
  overflow: hidden;
}

.rating-item__bar span {
  display: block;
  height: 100%;
  border-radius: 5px;
}

.btn-outline-full {
  width: 100%;
  padding: 15px 24px 16px;
  background: var(--blue);
  border: none;
  border-radius: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}

.sidebar-rules {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.rule-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-item__icon img {
  width: 12px;
  height: 12px;
}

.rule-item__icon--in {
  background: rgba(111, 179, 83, 0.25);
}

.rule-item__icon--out {
  background: rgba(255, 59, 48, 0.25);
  transform: rotate(180deg);
}

.rule-item__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--gray);
}

.rule-item__text b {
  color: var(--black);
  font-weight: 700;
}

/* ---------- rooms ---------- */

.hotel-rooms__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.room-filter-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 43px;
  padding: 8px 14px;
  background: var(--blue);
  border: none;
  border-radius: 15px;
  color: var(--white);
  font-size: 16px;
  white-space: nowrap;
}

.room-filter-pill img {
  width: 8px;
  height: 8px;
}

.toggle-switch {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 10px;
  background: var(--white);
  flex-shrink: 0;
}

.toggle-switch__knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  transition: left 0.15s;
}

.room-filter-pill--toggle[aria-pressed="true"] .toggle-switch__knob,
.room-filter-pill--toggle.is-on .toggle-switch__knob {
  left: 19px;
}

.room-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room-card__gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 14px;
}

.room-card__photo {
  width: 245px;
  height: 245px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.room-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-card__title {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
  margin: 0;
  text-transform: uppercase;
}

.room-card__subtitle {
  font-size: 16px;
  color: var(--black);
  margin: 0;
}

.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
}

.rate-row--border {
  border-bottom: 1px solid var(--gray-border);
}

.rate-row__info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rate-row__line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--black);
  white-space: nowrap;
}

.rate-row__line img {
  width: 16px;
  height: 16px;
}

.rate-row__line--good {
  color: var(--green);
}

.rate-row__price {
  display: flex;
  align-items: center;
  gap: 24px;
}

.rate-row__amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.rate-row__amount b {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--black);
}

.rate-row__amount span {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  background: var(--blue);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

/* ---------- about ---------- */

.hotel-about__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--gray);
}

.hotel-about__text b {
  color: var(--black);
  font-weight: 700;
}

.hotel-about-card--collapsed .hotel-about__text p:not(:first-child) {
  display: none;
}

/* ---------- reviews ---------- */

.hotel-reviews__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.reviews-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--blue);
  font-size: 16px;
}

.reviews-sort img {
  width: 8px;
  height: 8px;
  transform: rotate(180deg);
}

.review-card {
  background: var(--gray-menu-bg);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.review-card__person {
  display: flex;
  align-items: center;
  gap: 13px;
}

.review-card__avatar {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.review-card__avatar--letter {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--blue);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
}

.review-card__name {
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--black);
}

.review-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-card__date {
  font-size: 16px;
  color: var(--gray);
  white-space: nowrap;
}

.review-card__meta img {
  height: 18px;
  width: auto;
}

.review-card__text {
  font-size: 16px;
  line-height: 1.4;
  color: var(--gray);
  margin: 0;
}

/* ---------- hotel page responsive ---------- */

@media (max-width: 1199px) and (min-width: 768px) {
  .hotel-page {
    width: min(1094px, calc(100% - 48px));
  }
}

@media (max-width: 991px) {
  .hotel-header__name,
  .room-card__title,
  .section-title {
    font-size: 26px;
  }

  .hotel-gallery__main {
    height: 300px;
  }

  .ratings-grid {
    grid-template-columns: 1fr;
  }

  .rate-row {
    flex-direction: column;
    align-items: stretch;
  }

  .rate-row__price {
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  .hotel-page {
    width: min(var(--content-width), calc(100% - 32px));
  }

  .hotel-page__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-card__photo {
    width: 200px;
    height: 200px;
  }

  .rate-row__amount {
    align-items: flex-start;
    text-align: left;
  }
}

/* =====================================================================
   FAVORITES PAGE (избранное.html)
   ===================================================================== */

.favorites-page {
  width: min(var(--content-width), calc(100% - 80px));
  margin: 0 auto;
  padding-bottom: 100px;
}

.breadcrumb {
  margin-top: 20px;
}

.favorites-title {
  margin-top: 24px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--black);
}

.location-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.location-pill {
  padding: 8px 16px;
  background: var(--gray-menu-bg);
  border: none;
  border-radius: 8px;
  color: var(--blue);
  font-size: 16px;
}

.location-pill--active {
  background: var(--blue);
  color: var(--white);
}

.favorites-grid {
  margin-top: 32px;
}

.favorites-empty {
  margin-top: 32px;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--gray);
}

/* Unlike the homepage's special offers, favorites never hides cards —
   the list just reflows and scrolls; only the column count changes. */
@media (max-width: 1199px) and (min-width: 992px) {
  .favorites-grid .card {
    width: calc((100% - 26px * 2) / 3);
  }
}

@media (max-width: 767px) {
  .favorites-page {
    width: min(var(--content-width), calc(100% - 32px));
  }

  .favorites-grid .card:nth-child(n + 5) {
    display: none;
  }
}
