/* WordPress integration-only adjustments layered after the approved prototype stylesheet. */
.ag-home-frame { width: min(100%, var(--ag-public-frame-max)); }
.ag-home-service-button { text-decoration: none; }
.ag-home-input--date { position: relative; }
.ag-home-input--date input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--color-deep-navy); font: inherit; font-weight: var(--font-weight-semibold); }
.ag-home-input--date input::-webkit-calendar-picker-indicator { margin: 0; cursor: pointer; }
.ag-home-date-control { min-width: 0; width: 100%; min-height: calc(var(--control-touch-target) - 2px); padding: 0; border: 0; background: transparent; color: var(--color-deep-navy); font: inherit; font-weight: var(--font-weight-semibold); text-align: left; white-space: nowrap; cursor: pointer; }
.ag-home-date-control[hidden] { display: none; }
.ag-home-date-control--awaiting-return { color: var(--color-brand-gold); }
.ag-home-input--date:focus-within { border-color: var(--color-caspian-blue); box-shadow: var(--control-focus-ring); }
.ag-home-date-control:focus-visible { outline: 0; }
.ag-home-datepicker-anchor { position: fixed !important; width: 1px !important; height: 1px !important; pointer-events: none; opacity: 0; }
.ag-home-page .flatpickr-calendar { z-index: calc(var(--z-modal, 1000) + 1); max-width: calc(100vw - 24px); overflow: hidden; border: var(--border-subtle); border-radius: var(--radius-lg); background: var(--color-warm-white); box-shadow: var(--shadow-md); }
.ag-home-page .flatpickr-months, .ag-home-page .flatpickr-weekdays { background: var(--color-light-gray); }
.ag-home-page .flatpickr-current-month, .ag-home-page .flatpickr-monthDropdown-months, .ag-home-page .flatpickr-weekday, .ag-home-page .flatpickr-day { color: var(--color-deep-navy); }
.ag-home-page .flatpickr-prev-month, .ag-home-page .flatpickr-next-month { display: grid; min-width: 44px; min-height: 44px; place-items: center; color: var(--color-deep-navy); }
.ag-home-page .flatpickr-prev-month:hover svg, .ag-home-page .flatpickr-next-month:hover svg, .ag-home-page .flatpickr-prev-month:focus-visible svg, .ag-home-page .flatpickr-next-month:focus-visible svg { fill: var(--color-brand-gold); }
.ag-home-page .flatpickr-day.today:not(.selected):not(.startRange):not(.endRange) { border-color: var(--color-brand-gold); }
.ag-home-page .flatpickr-day.selected, .ag-home-page .flatpickr-day.startRange, .ag-home-page .flatpickr-day.endRange, .ag-home-page .flatpickr-day.selected:hover, .ag-home-page .flatpickr-day.startRange:hover, .ag-home-page .flatpickr-day.endRange:hover { border-color: var(--color-brand-gold); background: var(--color-brand-gold); color: var(--color-deep-navy); }
.ag-home-page .flatpickr-day.inRange, .ag-home-page .flatpickr-day.prevMonthDay.inRange, .ag-home-page .flatpickr-day.nextMonthDay.inRange { border-color: var(--color-sand); background: var(--color-sand); box-shadow: -5px 0 0 var(--color-sand), 5px 0 0 var(--color-sand); color: var(--color-deep-navy); }
.ag-home-vehicle-link { display: block; width: 100%; height: 100%; color: inherit; text-decoration: none; }
.ag-home-vehicle-title-link { color: inherit; text-decoration: none; }
.ag-home-vehicle-title-link:hover, .ag-home-vehicle-title-link:focus-visible { color: var(--color-caspian-blue); }
.ag-home-vehicle-media .ag-home-media-fallback { display: block; width: 100%; height: 100%; }
.ag-home-vehicle-media .ag-vehicle-card__favorite { pointer-events: none; }
.ag-home-cta { background-image: linear-gradient(90deg, color-mix(in srgb, var(--color-deep-navy) 88%, transparent), color-mix(in srgb, var(--color-deep-navy) 58%, transparent)), var(--ag-home-cta-image, url("../../images/footer-img.webp")); }

@media (max-width: 767px) {
  .ag-home-input--date input { font-size: clamp(12px, 3.4vw, 14px); }
  .ag-home-date-control { font-size: clamp(12px, 3.4vw, 14px); }
  .ag-home-page .flatpickr-calendar { width: calc(100vw - 24px) !important; }
  .ag-home-page .flatpickr-rContainer, .ag-home-page .flatpickr-days, .ag-home-page .dayContainer { width: 100% !important; min-width: 0 !important; max-width: none !important; }
  .ag-home-page .flatpickr-day { max-width: none; height: 44px; line-height: 44px; }
}

/* Homepage public polish v2 — keep the approved editorial hero, refine the supporting marketplace UI. */
.ag-home-page {
  --ag-home-polish-border: #e1e7ed;
  --ag-home-polish-muted: #6f7d8b;
  --ag-home-polish-control: #fbf9f7a6;
  --ag-home-polish-shadow: 0 7px 22px rgba(26, 56, 85, .045);
}

.ag-home-main {
  row-gap: 30px;
}

.ag-home-search {
  border-color: var(--ag-home-polish-border);
  background: #fff;
  box-shadow: 0 10px 30px rgba(21, 45, 68, .08);
}

.ag-home-input {
  border-color: #d8e0e7;
  border-radius: 10px;
  background: var(--ag-home-polish-control);
  transition: border-color var(--ag-transition-fast), background-color var(--ag-transition-fast), box-shadow var(--ag-transition-fast);
}

.ag-home-input:hover {
  border-color: #c8d3dc;
  background: #fff;
}

.ag-home-input:focus-within,
.ag-home-input--date:focus-within {
  border-color: #1682bd;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(22, 130, 189, .14);
}

.ag-home-section {
  gap: 14px;
}

.ag-home-section-header h2 {
  color: #10233b;
  letter-spacing: -.012em;
}

.ag-home-section-header p {
  margin-top: 3px;
  color: var(--ag-home-polish-muted);
}

.ag-home-section-header a {
  color: #b86f18;
  font-weight: 650;
  transition: color var(--ag-transition-fast), transform var(--ag-transition-fast);
}

.ag-home-section-header a:hover,
.ag-home-section-header a:focus-visible {
  color: #8f5413;
  transform: translateX(2px);
}

.ag-home-category-track {
  gap: 12px;
}

.ag-home-category-card {
  border-color: var(--ag-home-polish-border);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--ag-home-polish-shadow);
  transition: transform var(--ag-transition-fast), border-color var(--ag-transition-fast), box-shadow var(--ag-transition-fast);
}

.ag-home-category-card:hover {
  border-color: color-mix(in srgb, var(--color-brand-gold) 30%, var(--ag-home-polish-border));
  box-shadow: 0 10px 26px rgba(26, 56, 85, .075);
  transform: translateY(-2px);
}

.ag-home-category-card::before {
  background: linear-gradient(180deg, rgb(255 255 255 / 97%) 0%, rgb(255 255 255 / 91%) 34%, rgb(255 255 255 / 68%) 50%, rgb(255 255 255 / 9%) 76%);
}

.ag-home-category-card h3 {
  min-width: 0;
  color: #10233b;
  font-weight: 650;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.ag-home-category-card p {
  color: #5f6d7b;
}

.ag-home-vehicle-track {
  gap: 14px;
}

.ag-home-bottom-benefits {
  gap: 12px;
}

.ag-home-bottom-benefits article {
  min-width: 0;
  min-height: 122px;
  gap: 12px;
  padding: 17px;
  border: 1px solid #e6ded3;
  border-radius: 14px;
  background: #fbf7f0;
  box-shadow: 0 4px 14px rgba(48, 39, 27, .035);
}

.ag-home-bottom-benefits__icon {
  inline-size: 36px;
  block-size: 36px;
  background: #fff7ea;
}

.ag-home-bottom-benefits__icon .ag-home-icon {
  inline-size: 20px;
  block-size: 20px;
}

.ag-home-bottom-benefits h2 {
  color: #10233b;
  font-size: clamp(16px, 1.08vw, 18px);
  font-weight: 650;
  line-height: 1.28;
}

.ag-home-bottom-benefits p {
  margin-top: 5px;
  color: #5d6875;
  font-size: clamp(12px, .83vw, 14px);
  line-height: 1.48;
}

.ag-home-cta {
  min-height: 104px;
  padding: 20px 28px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background-position: center 56%;
  box-shadow: 0 10px 28px rgba(18, 35, 50, .11);
}

.ag-home-cta h2 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.12;
}

.ag-home-cta p {
  margin-top: 4px;
  color: rgba(255, 255, 255, .88);
  line-height: 1.45;
}

.ag-home-cta .ag-button {
  min-width: 132px;
}

@media (max-width: 1023px) {
  .ag-home-category-track,
  .ag-home-vehicle-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .ag-home-category-track::-webkit-scrollbar,
  .ag-home-vehicle-track::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 767px) {
  .ag-home-main {
    row-gap: 24px;
  }

  .ag-home-search {
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(21, 45, 68, .075);
  }

  .ag-home-section {
    gap: 11px;
  }

  .ag-home-section-header {
    row-gap: 3px;
  }

  .ag-home-section-header h2 {
    max-width: 14em;
    font-size: clamp(20px, 5.5vw, 23px);
    line-height: 1.14;
  }

  .ag-home-section-header p {
    font-size: 12px;
    line-height: 1.4;
  }

  .ag-home-section-header a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 4px;
    font-size: 12px;
  }

  .ag-home-category-track,
  .ag-home-vehicle-track {
    padding-bottom: 2px;
    scroll-padding-inline: var(--space-sm);
    scrollbar-width: none;
  }

  .ag-home-category-track::-webkit-scrollbar,
  .ag-home-vehicle-track::-webkit-scrollbar {
    display: none;
  }

  .ag-home-category-card {
    border-radius: 13px;
    box-shadow: 0 4px 14px rgba(26, 56, 85, .045);
  }

  .ag-home-category-card h3 {
    padding: 9px 7px 10px;
    font-size: 11px;
    line-height: 1.28;
  }

  .ag-home-category-media {
    height: 84px;
  }

  .ag-home-bottom-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .ag-home-bottom-benefits article {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    min-height: 0;
    padding: 12px;
    border-radius: 13px;
  }

  .ag-home-bottom-benefits__icon {
    inline-size: 31px;
    block-size: 31px;
  }

  .ag-home-bottom-benefits__icon .ag-home-icon {
    inline-size: 18px;
    block-size: 18px;
  }

  .ag-home-bottom-benefits h2 {
    font-size: clamp(13px, 3.7vw, 15px);
    line-height: 1.24;
  }

  .ag-home-bottom-benefits p {
    margin-top: 4px;
    color: #64707d;
    font-size: clamp(10px, 2.9vw, 12px);
    line-height: 1.38;
  }

  .ag-home-cta {
    min-height: 168px;
    gap: 14px;
    padding: 18px;
    border-radius: 15px;
    background-image: linear-gradient(180deg, rgba(17, 35, 53, .84), rgba(17, 35, 53, .67)), var(--ag-home-cta-image, url("../../images/footer-img.webp"));
    background-position: center;
  }

  .ag-home-cta h2 {
    font-size: 22px;
  }

  .ag-home-cta p {
    max-width: 26em;
    font-size: 12px;
  }

  .ag-home-cta .ag-button {
    min-height: 46px;
  }
}

@media (max-width: 359px) {
  .ag-home-bottom-benefits {
    grid-template-columns: 1fr;
  }

  .ag-home-bottom-benefits article {
    grid-template-columns: auto minmax(0, 1fr);
  }
}


/* Available homepage categories are clear destinations; upcoming ones stay deliberately quiet. */
.ag-home-category-card--available {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  will-change: transform;
}

.ag-home-category-card--available:hover {
  border-color: color-mix(in srgb, var(--color-brand-gold) 48%, var(--ag-home-polish-border));
  box-shadow: 0 16px 34px rgba(26, 56, 85, .13);
  transform: translateY(-5px);
}

.ag-home-category-card--available:hover .ag-home-category-image {
  transform: scale(1.045);
}

.ag-home-category-card--available:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-caspian-blue) 48%, transparent);
  outline-offset: 3px;
}

.ag-home-category-card--available .ag-home-category-image {
  transition: transform 360ms cubic-bezier(.2, .75, .25, 1);
}

.ag-home-category-card--coming {
  opacity: .74;
  filter: saturate(.78);
}

.ag-home-category-card--coming:hover {
  border-color: var(--ag-home-polish-border);
  box-shadow: var(--ag-home-polish-shadow);
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ag-home-category-card--available,
  .ag-home-category-card--available .ag-home-category-image {
    transition: none;
  }

  .ag-home-category-card--available:hover,
  .ag-home-category-card--available:hover .ag-home-category-image {
    transform: none;
  }
}

/* Homepage city selector reuses the catalogue searchable-combobox behaviour. */
.ag-home-input--city {
  position: relative;
  overflow: visible;
}

.ag-home-input--city > select {
  width: 100%;
  min-width: 0;
  min-height: calc(var(--control-touch-target) - 2px);
  padding: 0 30px 0 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent url("../../icons/partner-ui/chevron-down.svg") right 2px center / 13px 13px no-repeat;
  color: var(--color-deep-navy);
  box-shadow: none;
  font: inherit;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}

.ag-home-input--city > select:focus-visible {
  outline: 0;
}

.ag-home-input--city.is-enhanced .ag-catalog-city-native {
  display: none;
}

.ag-home-input--city .ag-catalog-city-combobox {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.ag-home-input--city .ag-catalog-city-combobox__input {
  width: 100%;
  min-width: 0;
  min-height: calc(var(--control-touch-target) - 2px);
  padding: 0 30px 0 0;
  border: 0;
  background: transparent;
  color: var(--color-deep-navy);
  box-shadow: none;
  font: inherit;
  font-weight: var(--font-weight-semibold);
  text-overflow: ellipsis;
  cursor: text;
}

.ag-home-input--city .ag-catalog-city-combobox__input:focus {
  outline: 0;
  box-shadow: none;
}

.ag-home-input--city .ag-catalog-city-combobox__toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  min-height: calc(var(--control-touch-target) - 2px);
  padding: 0;
  border: 0;
  background: transparent url("../../icons/partner-ui/chevron-down.svg") center / 13px 13px no-repeat;
  cursor: pointer;
  transition: transform var(--ag-transition-fast);
}

.ag-home-input--city .ag-catalog-city-combobox.is-open .ag-catalog-city-combobox__toggle {
  transform: rotate(180deg);
}

.ag-home-input--city .ag-catalog-city-combobox__listbox {
  position: absolute;
  z-index: calc(var(--z-dropdown, 100) + 1);
  top: calc(100% + 9px);
  left: calc(-1 * (20px + var(--space-sm)));
  width: calc(100% + 20px + var(--space-sm));
  min-width: 240px;
  max-height: 264px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #d8e0e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 35, 59, .14);
}

.ag-home-input--city .ag-catalog-city-combobox__listbox[hidden] {
  display: none;
}

.ag-home-input--city .ag-catalog-city-combobox__option {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #283d52;
  font: 500 13px/1.35 var(--font-ui);
  text-align: left;
  cursor: pointer;
}

.ag-home-input--city .ag-catalog-city-combobox__option:hover,
.ag-home-input--city .ag-catalog-city-combobox__option.is-active {
  background: #f1f6f8;
  color: #156f9c;
}

.ag-home-input--city .ag-catalog-city-combobox__option[aria-selected="true"] {
  color: #10233b;
  font-weight: 700;
}

.ag-home-input--city .ag-catalog-city-combobox__option[aria-selected="true"]::before {
  content: "";
  width: 6px;
  height: 10px;
  margin: -2px 10px 0 2px;
  border-right: 2px solid #6f946f;
  border-bottom: 2px solid #6f946f;
  transform: rotate(45deg);
}

.ag-home-input--city .ag-catalog-city-combobox__empty {
  display: block;
  padding: 12px;
  color: var(--ag-home-polish-muted);
  font-size: 12px;
}

@media (max-width: 767px) {
  .ag-home-input--city .ag-catalog-city-combobox__listbox {
    left: calc(-1 * (20px + var(--space-sm)));
    width: calc(100% + 20px + var(--space-sm));
    min-width: 0;
  }
}


/* Homepage category carousel: show exactly six full cards on desktop; later cards stay outside the viewport until horizontal scroll. */
.ag-home-category-carousel {
  position: relative;
  min-width: 0;
}

.ag-home-category-card--places .ag-home-category-image,
.ag-home-category-card--beauty .ag-home-category-image {
  filter: saturate(.9) brightness(.96) contrast(.95);
}

.ag-home-category-prev,
.ag-home-category-next {
  display: none;
}

@media (min-width: 1024px) {
  .ag-home-category-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }

  .ag-home-category-track::-webkit-scrollbar {
    display: none;
  }

  .ag-home-category-card {
    flex: 0 0 calc((100% - 60px) / 6);
    scroll-snap-align: start;
  }

  .ag-home-category-prev,
  .ag-home-category-next {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid #d9e0e6;
    border-radius: 50%;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 8px 22px rgb(16 35 59 / 18%);
    color: var(--color-deep-navy);
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity var(--ag-transition-fast), transform var(--ag-transition-fast), box-shadow var(--ag-transition-fast);
  }

  .ag-home-category-prev {
    left: -18px;
  }

  .ag-home-category-next {
    right: -18px;
  }

  .ag-home-category-prev span,
  .ag-home-category-next span {
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("../../icons/partner-ui/chevron-right.svg") center / contain no-repeat;
    mask: url("../../icons/partner-ui/chevron-right.svg") center / contain no-repeat;
  }

  .ag-home-category-prev span {
    transform: rotate(180deg);
  }

  .ag-home-category-prev:hover,
  .ag-home-category-prev:focus-visible,
  .ag-home-category-next:hover,
  .ag-home-category-next:focus-visible {
    box-shadow: 0 10px 26px rgb(16 35 59 / 24%);
    transform: translateY(-50%) scale(1.05);
  }

  .ag-home-category-prev:focus-visible,
  .ag-home-category-next:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-caspian-blue) 42%, transparent);
    outline-offset: 2px;
  }

  .ag-home-category-prev[hidden],
  .ag-home-category-next[hidden] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-home-category-track {
    scroll-behavior: auto;
  }

  .ag-home-category-prev,
  .ag-home-category-next {
    transition: none;
  }
}


/* Homepage realty quick-search polish: reuse shared controls without changing plugin GET contracts. */
.ag-home-search-panel--realty,
.ag-home-search-panel--realty .ag-home-realty-form,
.ag-home-search-panel--realty .ag-field {
  min-width: 0;
}

.ag-home-search-panel--realty .ag-home-realty-form {
  width: 100%;
  max-width: 100%;
  align-items: end;
}

.ag-home-search-panel--realty .ag-home-submit {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline: 14px;
  white-space: nowrap;
}

.ag-home-search-panel--realty .ag-home-input {
  min-width: 0;
  overflow: visible;
}

.ag-home-search-panel--realty .ag-home-input > input[type="date"],
.ag-home-search-panel--realty .ag-home-input > input[type="time"],
.ag-home-search-panel--realty .ag-home-realty-date-display {
  min-width: 0;
  width: 100%;
  min-height: calc(var(--control-touch-target) - 2px);
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-deep-navy);
  box-shadow: none;
  font: inherit;
  font-weight: var(--font-weight-semibold);
}

.ag-home-search-panel--realty .ag-home-input > input[type="date"],
.ag-home-search-panel--realty .ag-home-realty-date-display {
  cursor: pointer;
}

.ag-home-search-panel--realty .ag-home-input > input[type="time"] {
  cursor: pointer;
}

.ag-home-search-panel--realty .ag-home-input > input[type="date"]:focus,
.ag-home-search-panel--realty .ag-home-input > input[type="time"]:focus,
.ag-home-search-panel--realty .ag-home-realty-date-display:focus {
  outline: 0;
  box-shadow: none;
}

.ag-home-realty-calendar {
  z-index: calc(var(--z-modal, 1000) + 2);
}

.ag-home-realty-select-control {
  position: relative;
}

.ag-home-realty-select-native {
  display: none;
}

.ag-home-realty-select-combobox {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.ag-home-realty-select-display {
  width: 100%;
  min-width: 0;
  min-height: calc(var(--control-touch-target) - 2px);
  padding: 0 30px 0 0;
  border: 0;
  background: transparent url("../../icons/partner-ui/chevron-down.svg") right 2px center / 13px 13px no-repeat;
  color: var(--color-deep-navy);
  box-shadow: none;
  font: inherit;
  font-weight: var(--font-weight-semibold);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.ag-home-realty-select-display:focus-visible {
  outline: 0;
}

.ag-home-realty-select-listbox {
  position: absolute;
  z-index: calc(var(--z-dropdown, 100) + 3);
  top: calc(100% + 9px);
  left: calc(-1 * (20px + var(--space-sm)));
  width: calc(100% + 20px + var(--space-sm));
  min-width: 220px;
  max-height: 264px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #d8e0e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 35, 59, .14);
}

.ag-home-realty-select-listbox[hidden] {
  display: none;
}

.ag-home-realty-select-option {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #283d52;
  font: 500 13px/1.35 var(--font-ui);
  text-align: left;
  cursor: pointer;
}

.ag-home-realty-select-option:hover,
.ag-home-realty-select-option.is-active {
  background: #f1f6f8;
  color: #156f9c;
}

.ag-home-realty-select-option[aria-selected="true"] {
  color: #10233b;
  font-weight: 700;
}

.ag-home-realty-select-option[aria-selected="true"]::before {
  content: "";
  width: 6px;
  height: 10px;
  margin: -2px 10px 0 2px;
  border-right: 2px solid #6f946f;
  border-bottom: 2px solid #6f946f;
  transform: rotate(45deg);
}

.ag-home-realty-count-field {
  min-width: 0;
}

.ag-home-realty-stepper {
  width: 100%;
  max-width: 168px;
}

.ag-home-realty-stepper .ag-number-stepper__control {
  min-height: var(--control-height);
  grid-template-columns: var(--control-touch-target) minmax(46px, 1fr) var(--control-touch-target);
  border-color: #d8e0e7;
  background: var(--ag-home-polish-control);
}

.ag-home-realty-stepper .ag-number-stepper__input {
  min-height: calc(var(--control-height) - 2px);
}

.ag-home-realty-stepper .ag-number-stepper__button {
  background: color-mix(in srgb, var(--color-light-gray) 72%, var(--color-warm-white));
}

@media (min-width: 1180px) {
  .ag-home-search-panel[data-ag-home-search-panel="excursion"] .ag-home-realty-form {
    grid-template-columns:
      minmax(190px, 1.15fr)
      minmax(155px, .82fr)
      minmax(190px, 1fr)
      minmax(145px, .62fr)
      minmax(210px, .98fr);
  }

  .ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-home-realty-form {
    grid-template-columns:
      minmax(220px, 1.22fr)
      minmax(155px, .82fr)
      minmax(155px, .82fr)
      minmax(145px, .62fr)
      minmax(210px, .98fr);
  }

  .ag-home-search-panel[data-ag-home-search-panel="transfer"] .ag-home-realty-form {
    grid-template-columns:
      minmax(170px, 1fr)
      minmax(170px, 1fr)
      minmax(145px, .78fr)
      minmax(125px, .62fr)
      minmax(145px, .62fr)
      minmax(210px, .96fr);
  }
}

@media (min-width: 768px) and (max-width: 1179px) {
  .ag-home-search-panel--realty .ag-home-realty-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ag-home-search-panel--realty .ag-home-submit {
    grid-column: auto;
  }
}

@media (max-width: 767px) {
  .ag-home-search-panel--realty .ag-home-realty-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .ag-home-search-panel--realty .ag-home-submit {
    grid-column: 1 / -1;
  }

  .ag-home-realty-stepper {
    max-width: 176px;
  }

  /* Number steppers match the 44px mobile fields and submit button. */
  .ag-home-realty-stepper .ag-number-stepper__control {
    min-height: var(--control-touch-target);
    height: var(--control-touch-target);
  }

  .ag-home-realty-stepper .ag-number-stepper__input {
    min-height: calc(var(--control-touch-target) - 2px);
  }

  .ag-home-search-panel--realty .ag-home-input > input[type="date"],
  .ag-home-search-panel--realty .ag-home-input > input[type="time"],
  .ag-home-search-panel--realty .ag-home-realty-date-display,
  .ag-home-realty-select-display {
    font-size: clamp(12px, 3.4vw, 14px);
  }

  .ag-home-realty-select-listbox {
    left: calc(-1 * (20px + var(--space-sm)));
    width: calc(100% + 20px + var(--space-sm));
    min-width: 0;
  }
}

/* Keep category hover framing above image/gradient layers and inside the clipped carousel track. */
.ag-home-category-card::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: border-color var(--ag-transition-fast);
}

.ag-home-category-card:hover,
.ag-home-category-card--available:hover {
  border-color: var(--ag-home-polish-border);
  transform: none;
}

.ag-home-category-card--available:hover::after {
  border-color: color-mix(in srgb, var(--color-brand-gold) 52%, var(--ag-home-polish-border));
}

.ag-home-category-card--available:focus-visible::after {
  border-color: color-mix(in srgb, var(--color-caspian-blue) 62%, transparent);
}


/* Homepage quick-search micro polish: stable panel height and readable date placeholders. */
.ag-home-search-panel--realty .ag-home-realty-date-display {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag-home-search-panel--realty .ag-home-realty-date-display::placeholder {
  color: var(--color-neutral);
  opacity: .82;
}

@media (min-width: 768px) {
  .ag-home-search-panel {
    min-height: 78px;
    align-content: end;
  }

  .ag-home-search-panel > .ag-home-search-form,
  .ag-home-search-panel .ag-home-realty-form {
    min-height: 78px;
    align-items: end;
  }
}

.ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field,
.ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field__controls,
.ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field__field {
  min-width: 0;
  width: 100%;
}

.ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field__display,
.ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field__display > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 1180px) {
  .ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-home-realty-form {
    grid-template-columns:
      minmax(250px, 1.18fr)
      minmax(430px, 1.8fr)
      minmax(150px, .62fr)
      minmax(220px, .95fr) !important;
  }

  .ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field__controls {
    grid-template-columns: repeat(2, minmax(205px, 1fr));
  }

  .ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-date-range-field__display {
    font-size: 13px;
  }
}

@media (min-width: 768px) and (max-width: 1179px) {
  .ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-home-realty-form {
    grid-template-columns:
      minmax(210px, 1fr)
      minmax(360px, 1.6fr)
      minmax(150px, .7fr) !important;
  }

  .ag-home-search-panel[data-ag-home-search-panel="housing"] .ag-home-submit {
    grid-column: 1 / -1;
  }
}

/* Выравнивание виджета поиска на десктопе (27.09, задача Анара): карточка по ширине
   секций main и по центру; четыре вкладки на всю ширину; в каждой вкладке строка
   «поля + кнопка» заполняет всю ширину — поля делят место поровну, кнопка фиксированной
   ширины у правого края; одинаковые высоты полей. Мобильная раскладка не тронута.
   Правила выше не меняются (их форма закреплена тестами) — перекрываются здесь. */
@media (min-width: 1024px) {
  .ag-home-hero .ag-home-search {
    width: calc(100% - (var(--space-4xl) * 2));
    max-width: none;
    margin-inline: auto;
  }

  .ag-home-search .ag-home-service-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ag-home-search .ag-home-service-slot--future {
    display: none;
  }

  /* Панель вкладки — на всю ширину карточки (не зависит от кэшированной копии home-prototype.css). */
  .ag-home-search .ag-home-search-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }

  .ag-home-search .ag-home-search-panel > form {
    display: flex;
    flex-wrap: nowrap;
    align-items: end;
    gap: var(--space-sm);
    width: 100%;
    max-width: none;
  }

  .ag-home-search .ag-home-search-panel > form > .ag-home-field {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }

  .ag-home-search .ag-home-search-panel > form > .ag-date-range-field {
    flex: 2 1 0;
  }

  .ag-home-search .ag-home-search-panel > form > .ag-home-submit {
    flex: 0 0 var(--home-search-submit-width, 236px);
    width: var(--home-search-submit-width, 236px);
    min-width: 0;
    max-width: none;
  }

  .ag-home-search .ag-home-input,
  .ag-home-search .ag-date-range-field__control,
  .ag-home-search .ag-number-stepper__control {
    min-height: var(--control-touch-target);
    height: var(--control-touch-target);
  }

  .ag-home-search .ag-home-realty-stepper {
    width: 100%;
    max-width: none;
  }

  .ag-home-search .ag-home-benefits-search {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Кнопка поиска во всех вкладках — той же высоты, что поля (07.10, задача Анара): у .ag-button
   высота --control-height (48px), у полей поиска --control-touch-target (44px); при align-self: end
   кнопка была на 4px выше полей. На телефоне кнопка во всю ширину — та же высота, что поля над ней. */
.ag-home-search .ag-home-submit {
  height: var(--control-touch-target);
  min-height: var(--control-touch-target);
}

/* Меню «Услуги» в шапке главной (27.09): шапка лежит внутри hero (isolation: isolate) с
   z-index 2, карточка поиска — 4, поэтому выпадающее меню (внутри контекста шапки)
   уходило под карточку. Шапка поднимается выше карточки — меню поверх всего контента. */
.ag-home-hero .ag-home-desktop-header {
  z-index: 5;
}


/* Homepage vehicle-card readability polish: keep the catalogue density, but make the homepage rail easier to scan. */
.ag-home-vehicle-track .ag-vehicle-card--catalog .ag-vehicle-card__specification,
.ag-home-vehicle-track .ag-vehicle-card--catalog .ag-catalog-availability,
.ag-home-vehicle-track .ag-vehicle-card--catalog .ag-catalog-period-total {
  font-size: 12px;
  line-height: 17px;
}

.ag-home-vehicle-track .ag-vehicle-card--catalog .ag-vehicle-card__price-unit,
.ag-home-vehicle-track .ag-vehicle-card--catalog .ag-catalog-deposit {
  font-size: 13px;
  line-height: 18px;
}


/* Desktop-only follow-up: one more readability step without enlarging mobile cards. */
@media (min-width: 768px) {
  .ag-home-vehicle-track .ag-vehicle-card--catalog .ag-vehicle-card__specification,
  .ag-home-vehicle-track .ag-vehicle-card--catalog .ag-catalog-availability,
  .ag-home-vehicle-track .ag-vehicle-card--catalog .ag-catalog-period-total {
    font-size: 13px;
    line-height: 18px;
  }

  .ag-home-vehicle-track .ag-vehicle-card--catalog .ag-vehicle-card__price-unit,
  .ag-home-vehicle-track .ag-vehicle-card--catalog .ag-catalog-deposit {
    font-size: 14px;
    line-height: 19px;
  }
}

/* Sprint 1: preserve the accepted four-tab layout until Requests is actually published,
   then switch only that runtime state to five equal service tabs. */
@media (min-width: 1024px) {
  .ag-home-search .ag-home-service-row--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ag-home-service-row--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Вкладка «Авиабилеты»: значок, поле города с подсказками (текстовое — без стрелки списка). */
.ag-home-icon--plane { --ag-home-icon: url("../../icons/icon-plane.svg"); }
.ag-home-icon--avia { --ag-home-icon: url("../../icons/service-avia.svg"); }
.ag-home-icon--jobs { --ag-home-icon: url("../../icons/service-jobs.svg"); }
.ag-home-icon--fitness { --ag-home-icon: url("../../icons/service-fitness.svg"); }
.ag-home-icon--esim { --ag-home-icon: url("../../icons/service-esim.svg"); }

.ag-home-search-panel--realty .ag-home-avia-place-input {
  padding-inline-end: 0;
  background-image: none;
  cursor: text;
}

.ag-home-search-panel--realty .ag-home-avia-place-input::placeholder {
  color: var(--color-neutral);
  font-weight: var(--font-weight-medium);
  opacity: 1;
}

.ag-home-avia-list-title {
  padding: 7px 11px 5px;
  color: var(--color-neutral);
  font: 600 12px/1.35 var(--font-ui);
}

@media (max-width: 767px) {
  .ag-home-service-row--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .ag-home-service-row--five .ag-home-service-button {
    padding-inline: 1px;
    font-size: clamp(var(--text-caption-size), 2.7vw, var(--text-small-size));
    line-height: 1.08;
    white-space: normal;
  }
}

/* Шесть вкладок (с «Авиабилетами», 07.10): шесть равных на десктопе и планшете, 3 × 2 на телефоне. */
@media (min-width: 1024px) {
  .ag-home-search .ag-home-service-row--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ag-home-service-row--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ag-home-service-row--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ag-home-service-row--six .ag-home-service-button {
    padding-inline: 2px;
    font-size: clamp(var(--text-caption-size), 2.9vw, var(--text-small-size));
    line-height: 1.1;
    white-space: normal;
  }
}


/* Seven live services; placed after --six so the existing modifiers keep their behaviour. */
.ag-home-search .ag-home-service-row--seven {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ag-home-search .ag-home-service-button {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 768px) {
  .ag-home-search .ag-home-service-row--seven {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .ag-home-search .ag-home-service-row--seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

/* Eight live services (fitness, 16.10); placed after --seven with equal specificity. 3 / 4 / 8 columns. */
.ag-home-search .ag-home-service-row--eight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .ag-home-search .ag-home-service-row--eight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 8 в ряд — от 1440px: на 1280 ячейка 137px, «Трудоустройство» не помещалась (dev 16.10); до 1440 — 4 × 2. */
@media (min-width: 1440px) {
  .ag-home-search .ag-home-service-row--eight {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* Nine live services (eSIM, 18.10); placed after --eight with equal specificity. 3 x 3 up to 1440px, 9 from 1440px. */
.ag-home-search .ag-home-service-row--nine {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .ag-home-search .ag-home-service-row--nine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .ag-home-search .ag-home-service-row--nine {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }

  .ag-home-search .ag-home-service-row--nine .ag-home-service-button {
    font-size: 13px;
    padding-inline: 6px;
  }
}

/* Shared service controls: two border widths surround the full touch target. */
.ag-home-search-panel.ag-home-search-panel--realty .ag-home-input {
  min-height: calc(var(--control-touch-target) + 2 * var(--border-width-sm));
  height: auto;
  padding-block: 0;
}

.ag-home-search-panel.ag-home-search-panel--realty .ag-home-realty-select-display,
.ag-home-search-panel.ag-home-search-panel--realty .ag-home-realty-select-option,
.ag-home-search-panel.ag-home-search-panel--realty .ag-home-submit {
  min-height: var(--control-touch-target);
  max-height: none;
}

.ag-home-search-panel.ag-home-search-panel--realty select.ag-home-realty-select-display {
  height: auto;
  appearance: none;
}

.ag-home-search-panel.ag-home-search-panel--realty .ag-home-realty-select-display:focus-visible,
.ag-home-search-panel.ag-home-search-panel--realty .ag-home-realty-select-option:focus-visible {
  outline: 2px solid var(--color-caspian-blue);
  outline-offset: 2px;
}

.ag-home-search-panel.ag-home-search-panel--realty .ag-home-realty-select-listbox {
  left: 0;
  width: 100%;
  min-width: 0;
}

.ag-home-search-panel.ag-home-search-panel--realty .ag-home-realty-select-option {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Mobile header clearance (06.10). Below 1024px the shared header is fixed (60px) and
   foundation.css reserves it with body padding-top, but the home frame padding shorthand
   above (.ag-home-page { padding: var(--space-sm) }) reset it to 8px: the hero started
   under the header and long titles (az/en at 414, every language at ~980 "desktop site"
   on a phone) lost their first line. Keep the frame inset below the header instead. */
@media (max-width: 1023px) {
  body.ag-home-page {
    padding-top: calc(var(--shell-header-height-mobile) + var(--space-sm));
  }
}
