/**
 * ÖMARKT 2.0 — R1 Phase 1.
 * Local, feature-flagged presentation only. Brand tokens come from R0.
 */

.om-v2-enabled {
  overflow-x: hidden;
  background: var(--om-v2-color-canvas);
}

.om-v2-enabled * {
  box-sizing: border-box;
}

.om-v2-enabled :where(a, button, input, select, textarea):focus-visible {
  outline: 0;
  box-shadow: var(--om-v2-focus-ring);
}

.om-v2-skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 99999;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border-radius: var(--om-v2-radius-control);
  background: var(--om-v2-color-heading);
  color: #fff;
  font-weight: 700;
}

.om-v2-skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* Header and navigation */
.om-v2-enabled .site-header {
  position: relative;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 var(--om-v2-color-border);
}

.om-v2-enabled .header-navbar {
  width: min(100% - 2rem, var(--om-v2-container));
  min-height: 4.75rem;
  margin-inline: auto;
  padding-inline: 0;
}

.om-v2-enabled .header-logo img {
  width: auto;
  max-height: 2.75rem;
}

.om-v2-enabled .header-navbar__menu > ul {
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

.om-v2-enabled .header-navbar__end {
  min-width: 0;
  flex-wrap: nowrap;
}

.om-v2-enabled .header-navbar__menu {
  min-width: 0;
  margin-right: var(--om-v2-space-4);
}

.om-v2-enabled .header-navbar__menu > ul > li > a,
.om-v2-enabled .header-navbar__actions a {
  min-height: var(--om-v2-tap-target);
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: var(--om-v2-radius-control);
  color: var(--om-v2-color-heading);
  font-size: var(--om-v2-text-sm);
  font-weight: 700;
  white-space: nowrap;
}

.om-v2-enabled .header-navbar__menu > ul > li > a:hover,
.om-v2-enabled .header-navbar__actions a:hover {
  background: var(--om-v2-color-brand-soft);
  color: var(--om-v2-color-brand-hover);
}

.om-v2-enabled .header-navbar__actions .hp-menu__item--listing-submit > a,
.om-v2-enabled .header-navbar__actions .hp-listing-submit-link {
  border: 1px solid var(--om-v2-color-brand);
  background: var(--om-v2-color-brand);
  color: #fff;
}

.om-v2-enabled .header-navbar__burger > a {
  width: var(--om-v2-tap-target);
  height: var(--om-v2-tap-target);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--om-v2-color-border);
  border-radius: var(--om-v2-radius-control);
  color: var(--om-v2-color-heading);
  font-size: 1.15rem;
}

/* Search-first homepage */
.om-v2-enabled .om-v2-home-hero {
  min-height: auto;
  border: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(239, 61, 61, 0.09), transparent 32%),
    linear-gradient(135deg, #fff 0%, #f8f9fb 100%);
  color: var(--om-v2-color-body);
}

.om-v2-enabled .om-v2-home-hero::before {
  display: none;
}

.om-v2-enabled .om-v2-home-hero .header-hero__content {
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(3.5rem, 8vw, 7rem);
}

.om-v2-enabled .om-v2-home-hero__copy {
  max-width: 48rem;
  margin-bottom: var(--om-v2-space-8);
}

.om-v2-enabled .om-v2-home-hero h1 {
  max-width: 48rem;
  margin: 0 0 var(--om-v2-space-4);
  color: var(--om-v2-color-heading);
  font-size: clamp(2.3rem, 4.7vw, 4.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.om-v2-enabled .om-v2-home-hero__copy > p:last-child {
  max-width: 42rem;
  margin: 0;
  color: var(--om-v2-color-body-secondary);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.om-v2-eyebrow {
  margin: 0 0 var(--om-v2-space-2);
  color: var(--om-v2-color-brand);
  font-size: var(--om-v2-text-xs);
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.om-v2-enabled .om-v2-home-search {
  max-width: 66rem;
  padding: var(--om-v2-space-3);
  border: 0;
}

.om-v2-enabled .om-v2-home-search .om-v2-field-group {
  position: relative;
}

.om-v2-enabled .om-v2-home-search .om-v2-field {
  border-color: transparent;
  background: var(--om-v2-color-canvas);
  font-size: 1rem;
}

.om-v2-enabled .om-v2-home-search .om-v2-field:hover {
  border-color: var(--om-v2-color-border-strong);
}

.om-v2-enabled .om-v2-home-search .om-v2-search__submit {
  min-width: 8.5rem;
  min-height: 3.25rem;
  align-self: end;
  font-size: 1rem;
}

.om-v2-enabled .site-content {
  padding-top: 0;
}

.om-v2-enabled .om-v2-home {
  padding: clamp(2.5rem, 5vw, 5rem) 0;
}

.om-v2-home-section {
  margin-bottom: clamp(3rem, 6vw, 5.75rem);
}

.om-v2-enabled .om-v2-section-header h2,
.om-v2-enabled .om-v2-how h2,
.om-v2-enabled .om-v2-home-cta h2 {
  color: var(--om-v2-color-heading);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.om-v2-text-link,
.om-v2-card-cta {
  color: var(--om-v2-color-brand);
  font-size: var(--om-v2-text-sm);
  font-weight: 800;
  text-decoration: none;
}

.om-v2-text-link:hover,
.om-v2-card-cta:hover {
  color: var(--om-v2-color-brand-hover);
}

.om-v2-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--om-v2-space-4);
}

.om-v2-category-tile {
  min-width: 0;
  min-height: 5.75rem;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--om-v2-space-3);
  padding: var(--om-v2-space-4);
  border: 1px solid var(--om-v2-color-border);
  border-radius: var(--om-v2-radius-card);
  background: #fff;
  color: var(--om-v2-color-heading);
  box-shadow: var(--om-v2-shadow-card);
  text-decoration: none;
  transition: border-color var(--om-v2-transition), box-shadow var(--om-v2-transition), transform var(--om-v2-transition);
}

.om-v2-category-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 61, 61, 0.35);
  box-shadow: var(--om-v2-shadow-card-hover);
  color: var(--om-v2-color-heading);
}

.om-v2-category-tile__mark {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--om-v2-color-brand-soft);
  color: var(--om-v2-color-brand);
  font-size: 1rem;
  font-weight: 800;
}

.om-v2-category-tile strong,
.om-v2-category-tile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.om-v2-category-tile small {
  margin-top: 0.2rem;
  color: var(--om-v2-color-muted);
  font-size: var(--om-v2-text-xs);
}

.om-v2-how {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.5fr);
  gap: var(--om-v2-space-12);
  align-items: start;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border-radius: var(--om-v2-radius-panel);
  background: var(--om-v2-color-heading);
  color: #fff;
}

.om-v2-enabled .om-v2-how h2 {
  margin: 0;
  color: #fff;
}

.om-v2-how__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--om-v2-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.om-v2-how__steps li > span {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--om-v2-space-4);
  border-radius: 50%;
  background: var(--om-v2-color-brand);
  color: #fff;
  font-weight: 800;
}

.om-v2-how__steps strong,
.om-v2-how__steps small {
  display: block;
}

.om-v2-how__steps small {
  margin-top: var(--om-v2-space-1);
  color: #cfd5df;
}

.om-v2-home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--om-v2-space-8);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid rgba(239, 61, 61, 0.16);
  border-radius: var(--om-v2-radius-panel);
  background: var(--om-v2-color-brand-soft);
}

.om-v2-home-cta h2,
.om-v2-home-cta p {
  margin-top: 0;
}

.om-v2-home-cta p:last-child {
  margin-bottom: 0;
}

/* Shared card system: HivePress blocks and existing custom search results. */
.om-v2-enabled :where(.hp-row, .omarkt-search-results-grid) {
  row-gap: var(--om-v2-space-6);
}

.om-v2-enabled .omarkt-search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--om-v2-space-6);
}

.om-v2-enabled .om-v2-listing-card {
  height: 100%;
  margin: 0;
  border: 1px solid var(--om-v2-color-border);
  border-radius: var(--om-v2-radius-card);
  background: #fff;
  box-shadow: var(--om-v2-shadow-card);
  transition: border-color var(--om-v2-transition), box-shadow var(--om-v2-transition), transform var(--om-v2-transition);
}

.om-v2-enabled .om-v2-listing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 61, 61, 0.3);
  box-shadow: var(--om-v2-shadow-card-hover);
}

.om-v2-enabled .om-v2-listing-card__media {
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f2f4f7, #e8ebf0);
}

.om-v2-enabled .om-v2-listing-card__media img,
.om-v2-enabled .om-v2-listing-card__media .hp-listing__image,
.om-v2-enabled .om-v2-listing-card__media .hp-listing__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.om-v2-enabled .om-v2-listing-card__body {
  padding: var(--om-v2-space-5);
}

.om-v2-enabled .om-v2-listing-card__title {
  min-height: 3.5rem;
  margin: var(--om-v2-space-2) 0;
  color: var(--om-v2-color-heading);
  font-size: 1.12rem;
  line-height: 1.45;
}

.om-v2-enabled .om-v2-listing-card__title a {
  color: inherit;
  text-decoration: none;
}

.om-v2-listing-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--om-v2-space-2) var(--om-v2-space-4);
  margin-top: var(--om-v2-space-3);
  color: var(--om-v2-color-muted);
  font-size: var(--om-v2-text-xs);
}

.om-v2-listing-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 2.6rem;
  margin: var(--om-v2-space-3) 0 0;
  color: var(--om-v2-color-body-secondary);
  font-size: var(--om-v2-text-sm);
}

.om-v2-enabled .om-v2-listing-card__footer {
  min-height: 4rem;
  margin-top: auto;
  padding: var(--om-v2-space-4) var(--om-v2-space-5);
  border-top: 1px solid var(--om-v2-color-border);
}

.om-v2-enabled .om-v2-listing-card__footer .hp-listing__actions--primary:empty {
  display: none;
}

.om-v2-enabled .omarkt-search-card__category a,
.om-v2-enabled .hp-listing__categories a {
  color: var(--om-v2-color-brand);
  font-size: var(--om-v2-text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.om-v2-enabled .omarkt-search-card__offer {
  width: fit-content;
  margin-top: var(--om-v2-space-2);
  padding: 0.2rem 0.55rem;
  border-radius: var(--om-v2-radius-pill);
  background: var(--om-v2-color-canvas);
  color: var(--om-v2-color-body-secondary);
  font-size: var(--om-v2-text-xs);
  font-weight: 700;
}

.om-v2-enabled .omarkt-search-card__date,
.om-v2-enabled .omarkt-search-card__location {
  color: var(--om-v2-color-muted);
  font-size: var(--om-v2-text-xs);
}

.om-v2-enabled .omarkt-search-card__price {
  color: var(--om-v2-color-heading);
  font-weight: 800;
}

/* Listing detail shell, contact panel and related listings. */
.om-v2-enabled.single-hp_listing .site-content {
  padding-top: clamp(2rem, 4vw, 4rem);
}

.om-v2-enabled .om-v2-listing-page {
  align-items: flex-start;
}

.om-v2-enabled :where(.om-v2-listing-page__content, .single-hp_listing .hp-row.hp-listing--view-page > .hp-page__content) {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--om-v2-color-border);
  border-radius: var(--om-v2-radius-panel);
  background: #fff;
  box-shadow: var(--om-v2-shadow-card);
}

.om-v2-enabled :where(.om-v2-listing-page__content, .single-hp_listing .hp-row.hp-listing--view-page > .hp-page__content) > .hp-listing__title {
  margin-bottom: var(--om-v2-space-3);
  color: var(--om-v2-color-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.035em;
}

.om-v2-enabled :where(.om-v2-listing-page__content, .single-hp_listing .hp-row.hp-listing--view-page > .hp-page__content) .hp-listing__details--primary {
  margin-bottom: var(--om-v2-space-6);
  color: var(--om-v2-color-muted);
}

.om-v2-enabled :where(.om-v2-listing-page__content, .single-hp_listing .hp-row.hp-listing--view-page > .hp-page__content) .hp-listing__images {
  overflow: hidden;
  margin: var(--om-v2-space-6) 0;
  border-radius: var(--om-v2-radius-card);
  background: var(--om-v2-color-canvas);
}

.om-v2-enabled :where(.om-v2-listing-page__content, .single-hp_listing .hp-row.hp-listing--view-page > .hp-page__content) .hp-listing__description {
  color: var(--om-v2-color-body);
  font-size: 1rem;
  line-height: 1.7;
}

.om-v2-enabled :where(.om-v2-listing-page__sidebar, .single-hp_listing .hp-row.hp-listing--view-page > .hp-page__sidebar) {
  min-width: 0;
}

.om-v2-enabled :where(.om-v2-contact-panel, .single-hp_listing .hp-listing__actions--primary.hp-widget) {
  overflow: hidden;
  margin-bottom: var(--om-v2-space-5);
  padding: var(--om-v2-space-6);
  border: 1px solid var(--om-v2-color-border);
  border-radius: var(--om-v2-radius-panel);
  background: #fff;
  box-shadow: var(--om-v2-shadow-card-hover);
}

.om-v2-contact-panel__intro {
  padding-bottom: var(--om-v2-space-4);
  border-bottom: 1px solid var(--om-v2-color-border);
}

.om-v2-contact-panel__intro h2 {
  margin: 0 0 var(--om-v2-space-2);
  color: var(--om-v2-color-heading);
  font-size: 1.35rem;
}

.om-v2-contact-panel__intro p:last-child {
  margin: 0;
  color: var(--om-v2-color-muted);
  font-size: var(--om-v2-text-sm);
}

.om-v2-enabled .om-v2-contact-panel :where(.hp-listing__action--message, .hp-listing__action--website, a[href^="tel:"], a[href^="mailto:"]) {
  width: 100%;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--om-v2-space-2);
  margin-top: var(--om-v2-space-3);
  padding: 0 var(--om-v2-space-4);
  border: 1px solid var(--om-v2-color-brand);
  border-radius: var(--om-v2-radius-control);
  background: var(--om-v2-color-brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.om-v2-enabled .om-v2-contact-panel .hp-listing__action--report {
  display: inline-flex;
  margin-top: var(--om-v2-space-4);
  color: var(--om-v2-color-muted);
  font-size: var(--om-v2-text-xs);
}

.om-v2-enabled .om-v2-listing-page__sidebar .hp-vendor--view-block,
.om-v2-enabled .om-v2-listing-page__sidebar .widget {
  border-radius: var(--om-v2-radius-card);
}

.om-v2-enabled .om-v2-related-listings {
  margin-top: clamp(2.5rem, 5vw, 5rem);
  padding-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--om-v2-color-border);
}

.om-v2-enabled .om-v2-related-listings--custom {
  margin-top: 0;
  padding: clamp(2.5rem, 5vw, 5rem) 0;
  border-top: 1px solid var(--om-v2-color-border);
  background: #fff;
}

.om-v2-enabled .om-v2-related-listings > h2,
.om-v2-enabled .om-v2-related-listings .hp-section__title {
  color: var(--om-v2-color-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.om-v2-mobile-actions {
  display: none;
}

@media (max-width: 1100px) {
  .om-v2-enabled .header-navbar__menu > ul > li > a,
  .om-v2-enabled .header-navbar__actions a {
    padding-inline: 0.55rem;
    font-size: 0.79rem;
  }

  .om-v2-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1360px) {
  .om-v2-enabled .header-logo img {
    max-width: 6.75rem;
  }

  .om-v2-enabled .header-navbar__menu > ul > li > a,
  .om-v2-enabled .header-navbar__actions a {
    padding-inline: 0.42rem;
    font-size: 0.75rem;
  }

  .om-v2-enabled .header-navbar__menu {
    margin-right: var(--om-v2-space-2);
  }
}

@media (max-width: 1024px) {
  .om-v2-enabled .om-v2-home-search {
    grid-template-columns: 1fr 1fr auto;
  }

  .om-v2-enabled .omarkt-search-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .om-v2-how {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .om-v2-enabled {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .om-v2-enabled .header-navbar {
    width: min(100% - 1.25rem, var(--om-v2-container));
    min-height: 4rem;
  }

  .om-v2-enabled .header-logo img {
    max-width: 9.5rem;
    max-height: 2.3rem;
  }

  .om-v2-enabled .header-navbar__burger > ul {
    max-height: min(70vh, 32rem);
    overflow-y: auto;
    border-radius: 0 0 var(--om-v2-radius-card) var(--om-v2-radius-card);
    box-shadow: var(--om-v2-shadow-panel);
  }

  .om-v2-enabled .header-navbar__burger > ul a {
    min-height: var(--om-v2-tap-target);
    display: flex;
    align-items: center;
  }

  .om-v2-enabled .om-v2-home-hero .header-hero__content {
    padding: 2.75rem 0 3.5rem;
  }

  .om-v2-enabled .om-v2-home-hero h1 {
    font-size: clamp(2.05rem, 11vw, 3rem);
  }

  .om-v2-enabled .om-v2-home-search {
    grid-template-columns: 1fr;
    padding: var(--om-v2-space-3);
  }

  .om-v2-enabled .om-v2-home-search .om-v2-search__submit {
    grid-column: auto;
    width: 100%;
  }

  .om-v2-category-grid,
  .om-v2-enabled .omarkt-search-results-grid {
    grid-template-columns: 1fr;
  }

  .om-v2-category-tile {
    min-height: 4.75rem;
  }

  .om-v2-home-section {
    margin-bottom: 3.5rem;
  }

  .om-v2-enabled .om-v2-section-header {
    gap: var(--om-v2-space-3);
    margin-bottom: var(--om-v2-space-5);
  }

  .om-v2-how__steps {
    grid-template-columns: 1fr;
  }

  .om-v2-how__steps li {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    gap: 0 var(--om-v2-space-3);
  }

  .om-v2-how__steps li > span {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }

  .om-v2-home-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .om-v2-home-cta .om-v2-button {
    width: 100%;
  }

  .om-v2-enabled .om-v2-listing-card__media {
    aspect-ratio: 16 / 10;
  }

  .om-v2-enabled .om-v2-listing-page__content {
    padding: var(--om-v2-space-5);
    border-radius: var(--om-v2-radius-card);
  }

  .om-v2-enabled .om-v2-listing-page__sidebar .om-v2-contact-panel {
    margin-bottom: var(--om-v2-space-4);
  }

  .om-v2-enabled.single-hp_listing {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }

  .om-v2-enabled.single-hp_listing .om-v2-mobile-actions[data-ready="true"] {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    gap: var(--om-v2-space-2);
    padding: var(--om-v2-space-3) max(var(--om-v2-space-4), env(safe-area-inset-left)) calc(var(--om-v2-space-3) + env(safe-area-inset-bottom)) max(var(--om-v2-space-4), env(safe-area-inset-right));
    border-top: 1px solid var(--om-v2-color-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 28px rgba(31, 41, 55, 0.12);
    backdrop-filter: blur(10px);
  }

  .om-v2-mobile-actions__button {
    min-width: 0;
    min-height: 3rem;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--om-v2-space-2);
    padding: 0 var(--om-v2-space-4);
    border: 1px solid var(--om-v2-color-brand);
    border-radius: var(--om-v2-radius-control);
    background: var(--om-v2-color-brand);
    color: #fff;
    font-size: var(--om-v2-text-sm);
    font-weight: 800;
    text-decoration: none;
  }
}

@media (max-width: 390px) {
  .om-v2-enabled .om-v2-home-hero h1 {
    font-size: 2.05rem;
  }

  .om-v2-enabled .om-v2-home-search,
  .om-v2-enabled .om-v2-listing-card__body,
  .om-v2-enabled .om-v2-listing-card__footer {
    padding: var(--om-v2-space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .om-v2-enabled :where(.om-v2-category-tile, .om-v2-listing-card) {
    transform: none !important;
  }
}
