/* SBK-UA-0273: owner-approved presentation. Historical CSS and source evidence
   remain intact; only this explicit presentation opts into the new geometry. */
.home-page .app-width { width: calc(100% - 48px); max-width: 1920px; margin-inline: auto; }
.home-page .home-promotion__browse {
  display: inline-flex; align-items: center; gap: 18px; align-self: flex-start;
  margin-top: 14px; padding: 10px 22px; border-radius: 999px;
  background: #e6f0ff; color: #171717; font-size: 14px; font-weight: 600;
}
:is(#discovery-feed, .discovery-feed) > article.home-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  height: auto; min-height: 0; max-height: none; min-width: 0; margin: 0;
  overflow: hidden; border: 0; border-radius: 12px; background: #fff;
  color: #171717; box-shadow: none; contain: none;
}
:is(#discovery-feed, .discovery-feed).is-packed > article.home-card { position: absolute; }
:is(#discovery-feed, .discovery-feed) > article.home-card[hidden] { display: none !important; }
.home-card .home-card__media {
  position: relative; flex: none; width: 100%; height: auto; aspect-ratio: 3 / 4;
  overflow: hidden; background: #eef1f3;
}
.home-card .home-card__media > img {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.home-card .home-card__media > img[hidden] { display: none; }
.home-card .feed-card__media-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 20px; background: #eef1f3; color: #606060; font-size: 14px;
}
.home-card .home-card__tools {
  position: absolute; z-index: 4; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.home-card .home-card__icon {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 10px;
  border: 0; border-radius: 50%; background: rgb(255 255 255 / 20%);
  box-shadow: none; backdrop-filter: blur(2px); cursor: pointer;
}
.home-card .home-card__icon--heart { color: #ed624f; }
.home-card .home-card__icon--share { color: #1681ff; }
.home-card .home-card__icon svg { width: 24px; height: 24px; }
.home-card .home-card__icon--heart.saved svg { fill: #ed624f; }
.home-card button.home-card__icon:hover { background: rgb(255 255 255 / 55%); }
.home-card[data-showcase-sample] .home-card__tools { pointer-events: none; }
.home-card[data-showcase-sample] .home-card__icon { cursor: default; }
:is(#discovery-feed, .discovery-feed) .home-card .sample-card__ribbon {
  position: absolute; z-index: 3; inset: auto auto 10px 10px; transform: none;
  width: auto; max-width: calc(100% - 20px); padding: 5px 10px;
  border-radius: 999px; background: rgb(255 255 255 / 20%); color: #171717;
  font-size: 12px; line-height: 18px; font-weight: 500; box-shadow: none;
  backdrop-filter: blur(2px); text-shadow: 0 0 3px rgb(255 255 255 / 85%);
}
.home-card .home-card__body {
  box-sizing: border-box; flex: none; display: grid; height: auto; min-width: 0;
  padding: 8px; grid-auto-rows: auto; align-content: start; gap: 2px;
  background: #fff; color: #171717;
}
:is(#discovery-feed, .discovery-feed) .home-card h3.home-card__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; box-sizing: border-box; height: auto; min-height: 0; max-height: 51px;
  order: 0; margin: 0; padding: 0; font-size: 15px; line-height: 17px; font-weight: 600;
  text-wrap: initial; color: #171717; text-shadow: none;
}
.home-card .home-card__main-link { color: #171717; text-decoration: none; }
.home-card .home-card__main-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.home-card .home-card__main-link:focus-visible { outline: none; }
.home-card .home-card__main-link:focus-visible::after { outline: 3px solid #1268f3; outline-offset: -3px; border-radius: 12px; }
.home-card .home-card__icon:focus-visible { outline: 3px solid #1268f3; outline-offset: 2px; background: #fff; }
.home-card .home-card__price {
  display: flex; align-items: center; min-width: 0; overflow: hidden;
  color: #171717; font-size: 16px; line-height: 18px; font-weight: 650;
}
.home-card .home-card__destination { display: inline-flex; align-items: center; gap: 6px; }
.home-card .home-card__destination svg { width: 16px; height: 16px; }
.home-card .home-card__price.home-card__description { font-size: 14px; line-height: 20px; color: #606060; font-weight: 400; }
.home-card .home-card__stats {
  display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden;
  color: #171717; font-size: 11px; line-height: 14px; white-space: nowrap;
}
.home-card .home-card__stats > span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.home-card .home-card__stats svg { width: 14px; height: 14px; flex: 0 0 14px; }
.home-card .home-card__location { flex: 0 1 auto; max-width: 32%; }
.home-card .home-card__rating, .home-card .home-card__reviews { flex: 0 0 auto; }
.home-card .home-card__location > span { overflow: hidden; text-overflow: ellipsis; }
.home-card .home-card__location svg, .home-card .home-card__destination svg { color: #1681ff; }
.home-card .home-card__rating svg { color: #edaa00; fill: #edaa00; }
.home-card .home-card__reviews svg { color: #00b9c8; }
.home-card .home-card__unrated { color: #606060; overflow: hidden; text-overflow: ellipsis; }
.home-card .home-card__author { display: flex; align-items: center; gap: 4px; min-width: 0; color: #171717; font-size: 11px; }
.home-card .home-card__avatar {
  display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px;
  border-radius: 50%; background: #e6f0ff; color: #171717; font-size: 10px;
}
.home-card .home-card__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-card .home-card__credit { color: #606060; font-size: 12px; }
.home-card .home-card__ad-label { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; background: #fff0b9; color: #171717; font-size: 12px; line-height: 18px; }
@media (max-width: 599px) {
  .home-page .app-width { width: calc(100% - 24px); }
  .home-page .home-promotion__browse { margin-top: 10px; padding: 8px 16px; }
}
@media (prefers-reduced-transparency: reduce) {
  .home-card .home-card__icon, :is(#discovery-feed, .discovery-feed) .home-card .sample-card__ribbon { background: #fff; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .home-card .home-card__icon, :is(#discovery-feed, .discovery-feed) .home-card .sample-card__ribbon { background: #fff; }
}

.home-page .card-type-tabs__tab { color: #171717; border: 0; border-radius: 999px; }
.home-page .card-type-tabs__tab.is-active { color: #171717; background: #e6f0ff; box-shadow: none; }
.home-page .feed-filter-trigger { color: #171717; }
.home-page .home-promotion__description, .home-page .home-promotion__disclosure { color: #606060; }

/* Compact first-party promotion from the approved home sketch. */
.home-page .home-promotion__creative { display: flex; height: 190px; block-size: 190px; padding: 0; background: #fff; color: #171717; border-radius: 12px; }
.home-page .home-promotion__creative::before, .home-page .home-promotion__creative::after { display: none; }
.home-page .home-promotion__image { inset: 0 0 0 auto; inline-size: 40%; width: 40%; height: 100%; block-size: 100%; object-fit: cover; object-position: center; }
.home-page .home-promotion__copy { box-sizing: border-box; inline-size: 60%; width: 60%; max-width: none; padding: 34px 22px 16px; background: #fff; }
.home-page .home-promotion__headline { max-inline-size: none; color: #171717; font-size: 28px; line-height: 1.15; font-weight: 700; text-wrap: initial; }
.home-page .home-promotion__description { max-inline-size: none; margin-top: 8px; color: #606060; font-size: 14px; line-height: 1.4; }
.home-page .home-promotion__disclosure { inset: 10px auto auto 22px; padding: 0; background: none; color: #606060; font-size: 11px; font-weight: 400; }
.home-page .home-promotion__browse { margin-top: 12px; }
.home-page .home-discovery-banner__title { color: #171717; font-size: clamp(22px,2.1vw,30px); }
.home-page .home-filters > .feed-filter-trigger { color: #171717; background: #fff; }
@media (max-width: 979px) {
  .home-page .home-promotion__creative { height: 210px; block-size: 210px; }
  .home-page .home-promotion__headline { font-size: 24px; }
}
@media (max-width: 599px) {
  .home-page .home-promotion__image { display: none; }
  .home-page .home-promotion__copy { inline-size: 100%; width: 100%; padding: 34px 16px 14px; }
  .home-page .home-promotion__disclosure { left: 16px; }
  .home-page .home-promotion__headline { font-size: 24px; }
}

.home-page .home-feed-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.home-page .home-feed-toolbar .card-type-tabs { min-width: 0; max-width: 100%; }
.home-page .home-filter-control { position: relative; margin-left: auto; }
@media (max-width: 979px) { .home-page .home-promotion__creative { height: 240px; block-size: 240px; } }

/* The summary stays in its own layout box, including without JavaScript. */
.home-page .home-feed-toolbar .card-type-tabs { inline-size: auto; max-inline-size: 100%; }
.home-page .home-feed-toolbar .card-type-tabs:has(.card-type-tabs__tab:focus-visible) { flex-wrap: nowrap; overflow-x: auto; }
.home-page .home-filters > .feed-filter-trigger { position: static; inset: auto; inline-size: max-content; margin-inline-start: auto; }
.home-page .home-filter-control:has(.home-filters[open]) { grid-column: 1 / -1; width: 100%; margin-inline-start: 0; }

.home-page .home-feed-toolbar { align-items: start; }
.home-page .home-feed-toolbar .card-type-tabs:has(.card-type-tabs__tab:focus-visible) { flex-wrap: wrap; overflow-x: visible; }

.home-page .home-filter-form { scroll-padding-block-end: 88px; }
.home-page .home-filter-form :is(button,select,input,a) { scroll-margin-block: 88px; }

/* SBK-UA-0277: even native grid rows. Zero selects the existing JS grid fallback;
   responsive column count belongs to --home-columns. Shared JS stays unchanged. */
.discovery-feed {
  --dense-columns: 0; --home-columns: 1; --dense-gap: 10px;
  grid-template-columns: repeat(var(--home-columns), minmax(0, 1fr));
  gap: var(--dense-gap); align-items: stretch;
}
@media (min-width: 360px) { .discovery-feed { --home-columns: 2; } }
@media (min-width: 600px) { .discovery-feed { --home-columns: 3; --dense-gap: 12px; } }
@media (min-width: 980px) { .discovery-feed { --home-columns: 4; } }
@media (min-width: 1200px) { .discovery-feed { --home-columns: 5; } }
@media (min-width: 1680px) { .discovery-feed { --home-columns: 6; } }
@media (min-width: 1920px) { .discovery-feed { --home-columns: 7; } }
