.merchant-page-content {
  min-width: 0;
  color: var(--ink);
}

.merchant-page-content *,
.merchant-page-content *::before,
.merchant-page-content *::after {
  box-sizing: border-box;
}

.merchant-page-content button,
.merchant-page-content input,
.merchant-page-content select {
  font: inherit;
}

.merchant-page-content button {
  cursor: pointer;
}

.search-row {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 10px;
}

.search {
  display: flex;
  height: 44px;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 3px 12px rgba(22, 54, 97, .04);
}

.search svg {
  flex: 0 0 auto;
  color: #36577e;
}

.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.locate {
  display: inline-flex;
  width: 88px;
  min-height: 44px;
  flex: 0 0 88px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 3px 12px rgba(22, 54, 97, .04);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.locate-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.statusline {
  position: fixed;
  z-index: 20;
  bottom: 86px;
  left: 50%;
  width: min(calc(100% - 28px), 390px);
  margin: 0;
  padding: 9px 12px;
  transform: translate(-50%, 6px);
  border-radius: 10px;
  background: rgba(28, 49, 76, .92);
  box-shadow: 0 6px 18px rgba(15, 38, 67, .18);
  color: white;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.statusline.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.statusline[hidden] {
  display: none;
}

.filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 2px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar,
.carousel::-webkit-scrollbar,
.nearby-list::-webkit-scrollbar {
  display: none;
}

.pill {
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  color: #294566;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.filter-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.merchant-page-content .pill {
  position: relative;
  top: auto;
  left: auto;
  z-index: auto;
  align-self: auto;
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 13px;
}

.result-badge {
  position: absolute;
  top: -2px;
  right: -5px;
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: white;
  color: var(--blue);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

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

.type-select {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 14px;
}

.type-select select {
  max-width: 96px;
  min-width: 0;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.type-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--blue);
}

.map-shell {
  --merchant-map-safe-bottom: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 1px;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e8f2ee;
  box-shadow: 0 10px 26px rgba(15, 64, 120, .08);
}

.map {
  grid-area: 1 / 1;
  position: relative;
  height: auto;
  min-height: 315px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--card);
}

.map-canvas {
  width: 100%;
  height: 100%;
}

.map-message {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 10px;
  left: 12px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .94);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.map-message[hidden] {
  display: none;
}

.merchant-card {
  grid-area: 1 / 1;
  align-self: end;
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
  margin: 0 10px var(--merchant-map-safe-bottom);
  padding: 14px;
  border-radius: 17px;
  background: white;
  box-shadow: 0 8px 22px rgba(24, 56, 98, .11);
}

.merchant-card.empty {
  display: block;
}

.merchant-logo,
.merchant-logo-fallback {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--blue-soft);
}

.merchant-logo {
  width: 76px;
  height: 76px;
  display: block;
  object-fit: contain;
}

.merchant-logo-fallback {
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-size: 20px;
  font-weight: 900;
}

.merchant-copy,
.near-copy {
  min-width: 0;
}

.merchant-name {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--blue-dark);
  font-size: 17px;
  line-height: 1.28;
}

.merchant-name-block {
  min-width: 0;
  min-height: 2.56em;
}

.merchant-name-primary {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: normal;
  font-size: 16px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.merchant-name-block.has-secondary .merchant-name-primary {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.merchant-name-secondary {
  display: block;
  overflow: hidden;
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.28;
}

.merchant-summary {
  overflow: hidden;
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  line-height: 1.35;
}

.merchant-category {
  overflow: hidden;
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  line-height: 1.35;
}

.merchant-italian,
.merchant-meta {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.merchant-detail-lines {
  min-width: 0;
  grid-column: 1 / -1;
}

.info-line {
  display: grid;
  min-width: 0;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  margin-top: 3px;
  padding: 4px 0 0;
  border-top: 1px solid #edf1f6;
  color: #52667f;
  font-size: 10.5px;
  line-height: 1.42;
}

.info-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #334f6d;
  font-weight: 700;
  white-space: nowrap;
}

.info-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.info-value {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.address-lines {
  display: grid;
  gap: 2px;
  white-space: normal;
}

.address-line {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.action-link {
  align-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.carousel-wrap {
  grid-area: 2 / 1;
  position: relative;
  padding: 12px 10px 13px;
  border-top: 1px solid var(--line);
}

.carousel-wrap[hidden] {
  display: none;
}

.carousel-heading,
.nearby-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.carousel-heading h2,
.nearby-heading h2 {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 17px;
}

.carousel-heading span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.carousel {
  display: flex;
  min-width: 0;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel-frame {
  position: relative;
  min-width: 0;
}

.carousel img {
  display: block;
  width: 106px;
  height: 106px;
  flex: 0 0 106px;
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: zoom-in;
  object-fit: cover;
  scroll-snap-align: start;
}

.arrow {
  display: grid;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #cbdcf1;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 10px rgba(23, 47, 79, .16);
  color: var(--blue);
}

.arrow-icon {
  width: 16px;
  height: 16px;
}

.arrow.left {
  left: 0;
}

.arrow.right {
  right: 0;
}

.carousel-note {
  padding-top: 5px;
  color: #7c8ca1;
  font-size: 9px;
  opacity: .62;
  text-align: center;
}

.nearby {
  min-width: 0;
  margin-top: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--blue-dark);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.section-title::before {
  width: 4px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.nearby-list {
  display: flex;
  min-width: 0;
  gap: 10px;
  padding: 1px 1px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.near-card {
  display: grid;
  min-width: 0;
  flex: 0 0 224px;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-align: left;
  scroll-snap-align: start;
}

.near-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.near-logo,
.near-logo-fallback {
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--blue-soft);
}

.near-logo {
  width: 62px;
  height: 62px;
  display: block;
  object-fit: contain;
}

.near-logo-fallback {
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-size: 17px;
  font-weight: 900;
}

.near-card .merchant-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.merchant-empty {
  flex: 1 1 auto;
  margin: 0;
}

.merchant-marker {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 50% 50% 50% 6px;
  background: white;
  box-shadow: 0 5px 14px rgba(16, 45, 82, .25);
  transform: rotate(-45deg);
  transition: width 160ms ease, height 160ms ease;
}

.merchant-marker.active {
  width: 58px;
  height: 58px;
  background: var(--blue-dark);
}

.merchant-marker-logo,
.merchant-marker-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  transform: rotate(45deg);
}

.merchant-marker-logo {
  display: block;
  object-fit: contain;
}

.merchant-marker-fallback {
  position: relative;
  display: block;
  border: 1px solid #cbd5e1;
  background: #eef2f7;
}

.merchant-marker-fallback::before {
  position: absolute;
  inset: 10px;
  border: 2px solid #64748b;
  border-radius: 50%;
  content: "";
}

.merchant-marker.active .merchant-marker-logo,
.merchant-marker.active .merchant-marker-fallback {
  width: 46px;
  height: 46px;
}

.merchant-user-marker {
  width: 20px;
  height: 20px;
  border: 4px solid white;
  border-radius: 50%;
  background: #2f7df4;
  box-shadow: 0 0 0 16px rgba(47, 125, 244, .18);
}
