:root {
  --brand: #ff2636;
  --brand-dark: #e51d2e;
  --ink: #202124;
  --muted: #70737a;
  --line: #e6e7e9;
  --soft: #f7f7f8;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(25, 26, 30, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #7f7f7f;
}

button, input, select { font: inherit; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.demo-bar {
  padding: 7px 16px;
  background: #1f2024;
  color: #fff;
  text-align: center;
  font-size: 11px;
  letter-spacing: .11em;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav {

  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-mark {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: 5px solid var(--brand);
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 0;
  position: relative;
}

.brand-mark::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.brand-text {
  color: #222328;
  font-size: 21px;
  letter-spacing: -.7px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: auto;
  font-size: 13px;
  font-weight: 600;
  color: #54565c;
}

.top-links a:hover { color: var(--brand); }

.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-btn,
.ghost-btn {
  border: 0;
  background: transparent;
  color: #3f4147;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 700;
}

.link-btn:hover,
.ghost-btn:hover { background: var(--soft); }

.sell-btn,
.search-btn {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  border-radius: 9px;
  transition: .2s ease;
}

.sell-btn {
  padding: 11px 22px;
  margin-left: 4px;
}

.sell-btn:hover,
.search-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
  border: 0;
  background: var(--soft);
  border-radius: 9px;
  font-size: 20px;
  width: 42px;
  height: 42px;
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7f7 0%, #fff 55%, #fff5ef 100%);
  border-bottom: 1px solid #f0eded;
}

.hero-inner {
  min-height: 400px;
  padding: 70px 0;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 65px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  max-width: 550px;
  font-size: clamp(44px, 5.2vw, 72px);
  line-height: .99;
  letter-spacing: -4px;
}

.hero h1 span { color: var(--brand); }

.hero-text {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
  margin: 24px 0 0;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .65;
}

.blob-one {
  width: 330px;
  height: 330px;
  background: #ffd4d8;
  right: -100px;
  top: -120px;
}

.blob-two {
  width: 260px;
  height: 260px;
  background: #ffe5d1;
  left: -120px;
  bottom: -140px;
}

.search-card {
  padding: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  border-radius: 22px;
  border: 1px solid rgba(230,231,233,.9);
}

.search-card label {
  display: block;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 800;
  color: #4d4f55;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  border: 1px solid #dcdde0;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  transition: .2s ease;
}

.input-shell:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,38,54,.08);
}

.input-shell .icon {
  font-size: 20px;
  color: #777a81;
}

.input-shell input,
.input-shell select {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-btn {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
}

.section {
  padding: 64px 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -1px;
}

.see-all {
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.category-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 18px 10px 16px;
  display: grid;
  justify-items: center;
  gap: 11px;
  color: #35373c;
  font-size: 12px;
  font-weight: 700;
  min-height: 120px;
  transition: .2s ease;
}

.category-card:hover {
  border-color: #ffc3c8;
  box-shadow: 0 10px 28px rgba(29,29,33,.08);
  transform: translateY(-3px);
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff1f2;
  display: grid;
  place-items: center;
  font-size: 27px;
}

.muted-section {
  background: var(--soft);
}

.chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.chip {
  border: 1px solid #dedfe2;
  color: #55575d;
  background: #fff;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chip:hover,
.chip.active {
  background: #fff0f1;
  color: var(--brand);
  border-color: #ffbcc2;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4e5e7;
  border-radius: 16px;
  transition: .2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(26,27,31,.09);
}

.product-visual {
  aspect-ratio: 1 / .8;
  display: grid;
  place-items: center;
  font-size: 72px;
  position: relative;
}

.product-visual::after {
  content: "♡";
  position: absolute;
  right: 13px;
  bottom: 11px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  font-size: 21px;
  color: #555;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.bg-a { background: linear-gradient(135deg, #ffe7b7, #fff6df); }
.bg-b { background: linear-gradient(135deg, #dcecff, #f2f7ff); }
.bg-c { background: linear-gradient(135deg, #e6d9ff, #f7f1ff); }
.bg-d { background: linear-gradient(135deg, #daf2dd, #f0faf2); }
.bg-e { background: linear-gradient(135deg, #ffe0dc, #fff3f1); }
.bg-f { background: linear-gradient(135deg, #e6e6e6, #fafafa); }
.bg-g { background: linear-gradient(135deg, #ffe2f0, #fff5fa); }
.bg-h { background: linear-gradient(135deg, #d7f2f1, #f1fbfb); }

.product-body { padding: 14px 14px 15px; }

.seller-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #777a80;
  font-size: 11px;
  margin-bottom: 10px;
}

.product-title {
  margin: 0 0 7px;
  font-size: 14px;
  line-height: 1.35;
  min-height: 38px;
  font-weight: 600;
}

.price {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.condition {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state h3 {
  color: var(--ink);
  margin: 8px 0 6px;
}

.empty-icon { font-size: 42px; }

footer {
  border-top: 1px solid var(--line);
  padding: 52px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.footer-grid strong { color: var(--ink); }

.footer-brand { margin-bottom: 5px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: #232429;
  color: #fff;
  padding: 11px 16px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 100;
  font-size: 13px;
}

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

@media (max-width: 1000px) {
  .top-links { display: none; }
  .account-actions { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { max-width: 720px; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .container { width: min(100% - 28px, 1180px); }
  .demo-bar { font-size: 9px; }
  .nav { min-height: 62px; }
  .account-actions { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .mobile-menu {
    border-top: 1px solid var(--line);
    padding: 14px;
    background: #fff;
  }
  .mobile-menu.open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mobile-menu a {
    background: var(--soft);
    padding: 11px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
  }
  .mobile-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    margin-top: 6px;
  }
  .hero-inner { min-height: 0; padding: 46px 0; }
  .hero h1 { letter-spacing: -2.5px; }
  .search-card { padding: 18px; border-radius: 18px; }
  .section { padding: 46px 0; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 25px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .product-visual { font-size: 54px; }
  .product-title { font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 420px) {
  .brand-text { font-size: 19px; }
  .section-heading { flex-direction: column; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .seller-row { display: block; }
  .seller-row span:last-child { display: block; margin-top: 2px; }
}

/* App update modal — fixed, responsive, no dismiss controls */
.update-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100dvh;
  background: rgba(246, 247, 249, 0.97);
  overflow-y: auto;
}

.update-modal {
  width: 100%;
  max-width: 430px;
  margin: auto;
  padding: 34px 30px 26px;
  background: #ffffff;
  border: 1px solid #e7e8eb;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(20, 22, 26, 0.16);
  text-align: center;
}

.update-logo-wrap {
  width: 100%;
  min-height: 58px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-logo {
  display: block;
  max-width: 190px;
  width: auto;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}

.update-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid #ffd1d5;
  border-radius: 999px;
  background: #fff2f3;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.update-modal h2 {
  margin: 0;
  color: #202124;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.9px;
}

.update-copy {
  max-width: 340px;
  margin: 14px auto 22px;
  color: #71757d;
  font-size: 14px;
  line-height: 1.6;
}

.update-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.update-download:hover {
  background: var(--brand-dark);
}

.update-download:active {
  transform: translateY(1px);
}

.update-note {
  margin: 15px auto 0;
  color: #9a9da4;
  font-size: 10px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .update-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .update-modal {
    max-width: none;
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .update-logo {
    max-width: 170px;
    max-height: 52px;
  }

  .update-modal h2 {
    font-size: 24px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .update-overlay {
    align-items: flex-start;
  }

  .update-modal {
    margin: 12px auto;
  }
}


/* Logo safety: external SVG/PNG cannot stretch or affect page layout */
.update-logo-wrap {
  width: 100%;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  contain: layout paint;
}

.update-logo {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: min(220px, 82%) !important;
  max-height: 100px !important;
  object-fit: contain !important;
  flex: 0 0 auto;
}

.update-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 220px;
  height: 48px;
  padding: 0 18px;
  border: 1px solid #e3e5e8;
  border-radius: 10px;
  background: #f7f8f9;
  color: #8b9098;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
}

@media (max-width: 520px) {
  .update-logo-wrap {
    height: 64px;
    min-height: 64px;
    max-height: 64px;
  }

  .update-logo {
    max-width: min(190px, 80%) !important;
    
  }
}


/* Page-level logo editor */
.demo-bar {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10001;
}

.logo-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 7px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
  text-transform: none;
}

.logo-picker:hover {
  background: rgba(255,255,255,.18);
}

.logo-picker input {
  display: none;
}

.site-brand {
  min-width: 180px;
  height: 56px;
  display: inline-flex;
  align-items: center;
}

.site-logo {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 220px !important;
  max-height: 48px !important;
  object-fit: contain !important;
}

.site-logo-footer {
  max-width: 165px !important;
  max-height: 38px !important;
}

/* The page editor remains clickable while the prototype modal is visible. */
.update-overlay {
  top: 36px;
  min-height: calc(100dvh - 36px);
}

@media (max-width: 720px) {
  .demo-bar {
    min-height: 44px;
    gap: 9px;
    padding: 6px 10px;
  }

  .update-overlay {
    top: 44px;
    min-height: calc(100dvh - 44px);
  }

  .site-logo {
    max-width: 250px !important;
    max-height: 70px !important;
  }
}
