:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #111111;
  --surface-2: #161616;
  --text: #f5f5f5;
  --subtle: #a1a1a1;
  --accent: #ffdd00;
  --accent-soft: rgba(255, 221, 0, 0.16);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --market-surface: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  --market-text: #f7f7f7;
  --market-muted: #b8b8b8;
  --market-border: rgba(255,255,255,0.08);
  --market-highlight: #9ef0bc;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(255, 221, 0, 0.12), transparent 28%),
    linear-gradient(180deg, #090909 0%, #030303 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-copy {
  display: grid;
  gap: 0.18rem;
}

.brand-copy strong {
  font-size: 1.1rem;
}

.brand-copy small {
  color: var(--subtle);
}

.brand-logo {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.download-cta {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.download-cta small,
.hero-download-note {
  color: #d8d8d8;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.download-button {
  box-shadow: 0 16px 40px rgba(255, 221, 0, 0.22);
}

.store-button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.04rem;
  min-width: 220px;
  line-height: 1.1;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 1.425rem;
}

.store-button span {
  font-size: 1.425rem;
  line-height: 1.05;
  font-weight: 800;
}

.store-button small {
  font-size: 1.165rem;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 1;
}

.button.store-button span,
.button.store-button small {
  color: #181818;
}

.store-button-disabled {
  opacity: 0.48;
  pointer-events: none;
  cursor: default;
}

.button-secondary.store-button-disabled {
  background: rgba(255,255,255,0.05);
  color: rgba(245,245,245,0.88);
}

.topnav a {
  color: var(--text);
  text-decoration: none;
  position: relative;
  font-weight: 600;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--accent);
}

main {
  flex: 1;
  padding: 1.25rem;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  background: rgba(18, 18, 18, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.02;
  margin: 0;
}

.hero p {
  color: var(--subtle);
  max-width: 720px;
  font-size: 0.94rem;
  line-height: 1.55;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-download-actions {
  align-items: stretch;
}

.hero-download-note {
  margin: 0;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
  font-size: 0.9rem;
}

.button {
  background: var(--accent);
  color: #181818;
}

.button-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.contact-status {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  color: var(--subtle);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 0 0.55rem;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-title small {
  color: var(--subtle);
  font-size: 0.82rem;
}

.select-row {
  margin-top: 0.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.marketplace-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  align-items: start;
}

.advertiser-card {
  overflow: hidden;
  padding: 0;
  height: 100%;
}

.marketplace-card {
  background: var(--market-surface);
  border: 1px solid var(--market-border);
  border-radius: 1rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.marketplace-card-clickable {
  cursor: pointer;
}

.marketplace-card-clickable:hover,
.marketplace-card-clickable:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

.card-media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  object-fit: cover;
  background: #101010;
}

.card-media-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  place-items: center;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 221, 0, 0.16), rgba(255,255,255,0.03));
  color: var(--market-text);
  font-weight: 700;
  text-align: center;
}

.card-copy {
  display: grid;
  gap: 0.32rem;
  padding: 0.82rem 0.86rem 0.92rem;
  color: var(--market-text);
}

.marketplace-kicker {
  margin: 0;
  color: var(--market-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.marketplace-title {
  margin: 0;
  color: var(--market-text);
  font-size: 0.96rem;
  line-height: 1.35;
  min-height: 2.55em;
  font-weight: 700;
}

.marketplace-location {
  margin: 0.05rem 0 0;
  color: var(--market-muted);
  font-size: 0.86rem;
}

.marketplace-description {
  margin: 0.2rem 0 0;
  color: var(--market-text);
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 2.45em;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marketplace-highlight {
  margin: 0.25rem 0 0;
  color: var(--market-highlight);
  font-size: 0.8rem;
  line-height: 1.35;
}

.marketplace-actions {
  display: flex;
  margin-top: 0.5rem;
}

.marketplace-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.marketplace-whatsapp:hover,
.marketplace-whatsapp:focus-visible {
  background: #1fb659;
}

.panel-inline {
  margin-top: 1rem;
}

.detail-media {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 1rem;
  background: #121212;
}

.detail-shell {
  display: grid;
  gap: 1.25rem;
}

.detail-hero-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1.4rem;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.detail-hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 221, 0, 0.18), rgba(255, 255, 255, 0.04));
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.detail-avatar-wrap {
  position: absolute;
  left: 50%;
  bottom: -2.9rem;
  width: 6.2rem;
  height: 6.2rem;
  margin-left: -3.1rem;
  border-radius: 50%;
  background: #ffffff;
  padding: 0.24rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.detail-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.detail-content {
  padding-top: 4.25rem;
  text-align: center;
}

.detail-title {
  margin: 0.7rem 0 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
}

.detail-description {
  margin-top: 1rem;
  line-height: 1.8;
  color: var(--text) !important;
}

.detail-city {
  margin-top: 1rem;
  font-weight: 800;
  color: var(--subtle) !important;
}

.detail-address {
  margin-top: 0.7rem;
  color: var(--subtle) !important;
}

.detail-actions,
.detail-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 1.35rem;
}

.detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 0.9rem 1.1rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.detail-action-primary {
  background: var(--accent);
  color: #181818;
  border-color: transparent;
}

.detail-action-whatsapp {
  background: #25d366;
  color: #ffffff;
  border-color: transparent;
}

.detail-action-whatsapp:hover,
.detail-action-whatsapp:focus-visible {
  background: #1fb659;
  color: #ffffff;
}

.card,
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.4rem;
  padding: 1.6rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
}

.card:hover {
  transform: translateY(-2px);
  transition: transform 180ms ease;
}

.card h3,
.panel h3 {
  margin: 0 0 0.45rem;
}

.card p,
.panel p,
.panel strong {
  color: var(--subtle);
  margin: 0;
}

.meta {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0 1.2rem;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.86rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.55rem;
}

.select-row label {
  font-size: 0.95rem;
  color: var(--subtle);
}

.select-row select {
  min-width: 220px;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0.8rem 0.9rem;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0.45rem 0 15px;
}

.search-row label {
  font-size: 0.95rem;
  color: var(--subtle);
}

.search-input-wrap {
  position: relative;
  width: min(460px, 100%);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.load-more-button {
  max-width: 240px;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  font-weight: 800;
}

.search-row input {
  max-width: 100%;
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  padding-right: 3rem;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  color: var(--subtle);
  font-size: 1rem;
  pointer-events: none;
}

.panel strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.65rem;
  color: #fff;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 2rem;
  color: var(--subtle);
  font-size: 0.95rem;
}

.login-form {
  display: grid;
  gap: 1rem;
  max-width: 500px;
}

input,
button,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 1rem 1.1rem;
  font: inherit;
}

button {
  border: none;
  background: var(--accent);
  color: #181818;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  opacity: 0.95;
}

@media (max-width: 920px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .topbar-cta,
  .download-cta {
    align-items: stretch;
  }
  .download-cta {
    justify-content: stretch;
  }
  .topnav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .topnav a {
    padding: 0.85rem 0.9rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
  }
  main {
    padding: 1rem;
  }
  .hero {
    padding: 1rem;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0.7rem 0.85rem;
  }
  .brand-logo {
    width: 2.6rem;
    height: 2.6rem;
  }
  .brand-copy strong {
    font-size: 0.96rem;
  }
  .brand-copy small {
    font-size: 0.72rem;
  }
  .hero {
    padding: 0.78rem 0.82rem;
    border-radius: 18px;
    gap: 0.52rem;
  }
  .hero h1 {
    font-size: 1.34rem;
    line-height: 1.08;
  }
  .hero p {
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .hero p:not(.hero-download-note) {
    max-width: none;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }
  .download-button,
  .topnav .button,
  .store-button {
    width: 100%;
  }
  .hero-actions > a:last-child {
    grid-column: 1 / -1;
  }
  .store-button,
  .button,
  .button-secondary {
    min-width: 0;
    padding: 0.7rem 0.82rem;
    font-size: 0.92rem;
  }
  .store-button span {
    font-size: 1.12rem;
  }
  .store-button small,
  .hero-download-note {
    font-size: 0.82rem;
  }
  .hero-download-note {
    opacity: 0.82;
  }
  .section-title {
    gap: 0.2rem;
    margin: 0.55rem 0 0.35rem;
  }
  .section-title h2 {
    font-size: 1.05rem;
  }
  .section-title small {
    font-size: 0.68rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .select-row {
    gap: 0.32rem;
    flex-direction: column;
    align-items: stretch;
  }
  .select-row label,
  .search-row label {
    font-size: 0.74rem;
  }
  .select-row select {
    min-width: auto;
    width: 100%;
    padding: 0.62rem 0.78rem;
    font-size: 0.78rem;
  }
  .search-row {
    gap: 0.32rem;
    flex-direction: column;
    align-items: stretch;
    margin: 0.28rem 0 12px;
  }
  .search-input-wrap {
    width: 100%;
  }
  .search-row input {
    max-width: 100%;
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
    font-size: 0.78rem;
  }
  .card-copy {
    padding: 0.72rem 0.72rem 0.82rem;
  }
  .marketplace-title {
    font-size: 0.9rem;
  }
  .marketplace-location,
  .marketplace-description,
  .marketplace-kicker {
    font-size: 0.76rem;
  }
  .marketplace-whatsapp {
    width: 100%;
    padding: 0.58rem 0.72rem;
  }
  .footer {
    padding: 1.4rem 1.2rem;
    font-size: 0.92rem;
  }
  .login-form {
    max-width: 100%;
  }
  .detail-avatar-wrap {
    width: 5.2rem;
    height: 5.2rem;
    margin-left: -2.6rem;
    bottom: -2.35rem;
  }
  .detail-content {
    padding-top: 3.5rem;
  }
  .detail-actions,
  .detail-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .detail-action,
  .detail-footer-actions .button-secondary {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
