/* Photo-led browsing and listing details. Shared account pages keep their own layout. */
.marketplace-page {
  --canvas: #fff;
  --line: #ececee;
  --ink: #232326;
  --muted: #74747b;
  --sidebar-width: 248px;
  --header-height: 80px;
}

.marketplace-page [hidden] { display: none !important; }
.marketplace-page button:focus-visible,
.marketplace-page a:focus-visible,
.product-card-button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}
.marketplace-page .topbar {
  grid-template-columns: var(--sidebar-width) minmax(180px, 640px) auto;
  gap: 24px;
  padding: 0 28px 0 22px;
  background: #fff;
}
.marketplace-page .brand-copy strong { font-size: 20px; letter-spacing: -.6px; }
.marketplace-page .brand-copy small { font-size: 10px; color: var(--muted); }
.marketplace-page .market-search {
  width: 100%;
  height: 44px;
  margin: 0;
  border: 1px solid #e9e9ec;
  border-radius: 999px;
  padding: 0 18px;
  background: #f7f7f8;
}
.marketplace-page .topbar-actions { justify-content: flex-end; }
.marketplace-page .sidebar { padding: 30px 16px; background: #fcfcfc; }
.marketplace-page .sidebar-heading { padding: 0 8px; }
.marketplace-page .sidebar-heading h1 { font-size: 23px; }
.marketplace-page .eyebrow { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.marketplace-page .side-link { font-size: 13px; }
.marketplace-page .side-icon { background: transparent; }
.marketplace-page .side-link.active { background: #f2f2f3; color: var(--ink); }
.marketplace-page .create-listing-button { height: 44px; border-radius: 12px; box-shadow: none; }
.marketplace-page .sidebar-section { padding-top: 22px; }
.marketplace-page .section-label { color: #818189; font-size: 10px; letter-spacing: 1px; }
.marketplace-page .location-permission-card { padding: 10px; border-radius: 12px; }
.marketplace-page .location-permission-copy strong { font-size: 11px; }
.marketplace-page .location-permission-copy small { white-space: normal; line-height: 1.5; }
.marketplace-page .category-link { height: 44px; gap: 8px; font-size: 13px; font-weight: 500; }
.marketplace-page .category-link:hover { background: #f2f3ef; color: #30372e; }
.marketplace-page .category-link.active { background: #edf2e7; color: #50664a; }
.marketplace-page .market-content { padding: 36px 36px 60px; max-width: 1700px; }
.market-intro {
  position: relative;
  min-height: 202px;
  margin-bottom: 24px;
  padding: 27px 310px 27px 30px;
  overflow: hidden;
  border: 1px solid #eee7d9;
  border-radius: 20px;
  background: #faf6ed;
}
.intro-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #68755b; font-size: 10px; font-weight: 650; line-height: 1.5; }
.intro-eyebrow i { width: 6px; height: 6px; flex-shrink: 0; border-radius: 6px 0 6px 0; background: #7c956d; transform: rotate(-25deg); }
.market-intro .banner-copy h2 { margin: 10px 0 8px; font-size: clamp(25px, 2.35vw, 35px); font-weight: 650; letter-spacing: -1px; line-height: 1.2; text-wrap: balance; color: #30372e; }
.market-intro .banner-copy p { color: #7c7b6f; font-size: 12px; line-height: 1.6; }
.market-mascot { position: absolute; right: 12px; bottom: 0; display: block; width: 290px; height: 203px; pointer-events: none; }
.intro-sell { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 12px; border: 1px solid #e7d9c4; border-radius: 8px; color: #766448; background: #fffdf8; font-size: 11px; font-weight: 650; cursor: pointer; }
.intro-sell:hover { border-color: #b8a17b; background: #fff; }
.intro-sell svg { width: 15px; }
.category-rail { display: flex; gap: 9px; overflow-x: auto; padding: 0 0 22px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.category-rail::-webkit-scrollbar { display: none; }
.category-pill { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; min-height: 44px; padding: 0 15px; border: 1px solid #e6e8e3; border-radius: 10px; background: #fff; color: #50564e; font-size: 12px; font-weight: 500; cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.category-pill svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.65; }
.category-pill:hover { border-color: #b7b7bd; background: #fafafa; }
.category-pill.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.marketplace-page .market-section { padding-top: 26px; }
.marketplace-page .content-heading { align-items: center; margin-bottom: 20px; }
.marketplace-page .content-heading h2 { font-size: 23px; letter-spacing: -.6px; }
.marketplace-page .content-kicker { margin-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .5px; }
.marketplace-page .browse-location-search > span { display: none; }
.marketplace-page .browse-location-search { width: 200px; }
.marketplace-page .location-search-box { border-color: var(--line); border-radius: 9px; }
.marketplace-page .location-search-box input { font-weight: 450; }
.marketplace-page .location-search-box input::placeholder { font-weight: 400; color: #85858c; }
.marketplace-page .location-pill { border-radius: 9px; }
.marketplace-page .sort-row { align-items: center; margin-bottom: 23px; gap: 12px; }
.marketplace-page .quick-filters { flex: 1; min-width: 0; gap: 6px; }
.marketplace-page .filter-chip { height: 34px; border-color: transparent; color: #74747b; font-size: 12px; padding: 0 13px; background: #f7f7f8; }
.marketplace-page .filter-chip.active { background: #fff0f0; color: #b92128; }
.marketplace-page .filter-chip:hover { border-color: #e8c5c7; }
.marketplace-page .type-select { display: none; }
.marketplace-page .filter-open-button { display: flex; height: 36px; flex: 0 0 auto; border-color: #e4e4e7; border-radius: 9px; font-size: 11px; }
.marketplace-page .product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 18px; align-items: start; }
.marketplace-page .product-image-wrap { border-radius: 12px; aspect-ratio: auto; background: transparent; box-shadow: none; }
.marketplace-page .product-image-wrap::after { display: none; }
.marketplace-page .product-image { width: 100%; height: auto; object-fit: contain; transform: none; }
.marketplace-page .product-card-button:hover .product-image { transform: none; filter: brightness(.97); }
.marketplace-page .product-info { padding: 11px 1px 0; }
.marketplace-page .product-price { font-size: 21px; letter-spacing: -.6px; font-weight: 750; }
.marketplace-page .product-title { font-size: 13px; margin: 5px 0 7px; color: #4d4d54; }
.marketplace-page .product-location { color: #808087; font-size: 11px; }
.marketplace-page .favorite-button { top: 10px; right: 10px; width: 34px; height: 34px; opacity: 1; transform: none; box-shadow: 0 1px 5px #00000014; }
.marketplace-page .favorite-button svg { width: 18px; height: 18px; }
.marketplace-page .condition-badge { display: none; }
.marketplace-page .free-badge { bottom: 9px; left: 9px; }
.card-photo-count { position: absolute; bottom: 9px; right: 9px; display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; color: white; background: #0008; font-size: 10px; }
.card-photo-count svg { width: 12px; height: 12px; }
.marketplace-page .loading-card .product-image-wrap { aspect-ratio: 1; background: #f1f1f3; }

/* The listing scrolls as one page; only the photo viewer fills the screen. */
.marketplace-page .detail-view { display: block; overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.listing-header { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 12px max(28px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: #fffffff5; backdrop-filter: blur(12px); }
.marketplace-page .detail-close { position: static; width: auto; height: 42px; padding: 0 13px 0 8px; display: flex; gap: 8px; border-radius: 9px; color: var(--ink); box-shadow: none; background: #fff; font-size: 12px; }
.marketplace-page .detail-close:hover { background: #f5f5f6; }
.listing-header-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 750; letter-spacing: -.3px; }
.listing-header-brand img { display: block; flex-shrink: 0; }
.detail-layout { max-width: 1240px; margin: 0 auto; padding: 32px 28px 48px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr); align-items: start; gap: 40px; }
.marketplace-page .detail-gallery { display: block; min-height: 0; max-height: none; overflow: visible; background: transparent; }
.marketplace-page .detail-panel { overflow: visible; border: 0; }
.marketplace-page .detail-scroll { height: auto; padding: 0; overflow: visible; }
.marketplace-page .detail-tag { border: 1px solid #ededf0; background: #fafafa; color: #67676f; border-radius: 6px; font-size: 11px; font-weight: 500; }
.marketplace-page .detail-panel h2 { margin: 14px 0 12px; font-size: 28px; line-height: 1.3; letter-spacing: -.7px; overflow-wrap: anywhere; }
.marketplace-page .detail-price { font-size: 32px; letter-spacing: -.9px; margin: 0 0 12px; }
.marketplace-page .detail-meta { font-size: 12px; line-height: 1.65; color: var(--muted); }
.marketplace-page .detail-actions { grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin: 22px 0 26px; }
.marketplace-page .detail-actions .primary-action { grid-column: 1 / -1; height: 49px; margin-bottom: 2px; border-radius: 12px; }
.marketplace-page .secondary-action { width: 100%; height: 42px; padding: 0 10px; gap: 7px; border: 1px solid #e9e9ec; border-radius: 10px; background: #fff; font-size: 12px; }
.marketplace-page .secondary-action span { display: inline; }
.marketplace-page .secondary-action svg { width: 17px; height: 17px; }
.marketplace-page .secondary-action:hover { background: #f7f7f8; }
.marketplace-page .secondary-action.saved { color: var(--red); background: var(--red-soft); }
.listing-more-wrap { position: relative; }
.more-dots { font-size: 23px; line-height: 0; font-weight: 800; letter-spacing: 1px; margin-top: -7px; }
.listing-more-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 10; min-width: 170px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 32px #00000014; }
.listing-more-menu button { width: 100%; padding: 12px; text-align: left; border: 0; border-radius: 8px; font-size: 12px; background: white; cursor: pointer; }
.listing-more-menu button:hover { background: #f7f7f8; }
.marketplace-page .seller-card { padding: 20px 0; }
.marketplace-page .seller-avatar { border-radius: 50%; background: #f5eeee; color: #9c4d50; }
.marketplace-page .detail-section { margin-top: 25px; }
.marketplace-page .detail-section h3 { font-size: 14px; margin-bottom: 14px; }
.marketplace-page .detail-specs { gap: 8px; }
.marketplace-page .detail-specs dt { font-size: 11px; }
.marketplace-page .detail-specs dd { font-size: 12px; }
.marketplace-page .description { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.marketplace-page .safety-note { margin-top: 24px; border: 1px solid #f0f0f2; background: #fafafa; }
.marketplace-page .sticky-message { display: none; }

@media (min-width: 1600px) {
  .marketplace-page .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .marketplace-page { --sidebar-width: 220px; }
  .marketplace-page .topbar { gap: 14px; }
  .marketplace-page .market-content { padding: 28px 24px 50px; }
  .marketplace-page .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intro-sell { display: none; }
  .market-intro { min-height: 182px; padding-right: 245px; padding-left: 24px; }
  .market-mascot { right: 4px; width: 235px; height: 165px; }
  .detail-layout { gap: 28px; grid-template-columns: minmax(0, 1.2fr) minmax(310px, 1fr); }
}
@media (max-width: 900px) {
  .marketplace-page { --header-height: 120px; }
  .marketplace-page .topbar { height: var(--header-height); grid-template-columns: 1fr auto; grid-template-rows: 58px 48px; gap: 0 12px; padding: 0 18px 14px; }
  .marketplace-page .market-search { grid-column: 1 / -1; grid-row: 2; height: 42px; }
  .marketplace-page .market-search kbd { display: none; }
  .marketplace-page .brand-copy strong { font-size: 18px; }
  .marketplace-page .brand-copy small { display: none; }
  .marketplace-page .market-content { margin-left: 0; padding: 26px 22px 40px; }
  .marketplace-page .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .marketplace-page .mobile-listing-button { width: 38px; height: 38px; padding: 0; justify-content: center; flex: 0 0 auto; border-radius: 50%; }
  .marketplace-page .mobile-listing-button span { display: none; }
  .marketplace-page .topbar-actions .panda-language-toggle { position: static; min-width: 38px; height: 38px; padding: 0 7px; border-radius: 10px; box-shadow: none; font-size: 11px; white-space: nowrap; flex: 0 0 auto; }
  .marketplace-page .topbar-actions { gap: 7px; }
  .marketplace-page .brand-copy strong { font-size: 16px; }
  .marketplace-page .login-button { font-size: 12px; white-space: nowrap; border-radius: 999px; box-shadow: none; }
  .detail-layout { display: block; max-width: 700px; padding: 20px 24px 110px; }
  .listing-header { min-height: 60px; padding: 8px 18px; padding-top: max(8px, env(safe-area-inset-top)); }
  .marketplace-page .detail-gallery { margin-bottom: 26px; }
  .marketplace-page .detail-scroll { padding: 0; }
  .marketplace-page .detail-actions .primary-action { display: none; }
  .marketplace-page .sticky-message { position: fixed; z-index: 9; bottom: 0; display: flex; align-items: center; gap: 24px; padding: 12px max(20px, calc((100vw - 652px) / 2)) max(12px, env(safe-area-inset-bottom)); background: #fffffff5; }
  .sticky-price { min-width: 60px; display: flex; flex-direction: column; gap: 3px; }
  .sticky-price small { font-size: 10px; color: var(--muted); }
  .sticky-price strong { font-size: 22px; line-height: 1.2; letter-spacing: -.5px; }
  .marketplace-page .sticky-message button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 12px; font-size: 14px; }
}
@media (max-width: 640px) {
  .marketplace-page .market-content { padding: 22px 16px 40px; }
  .market-intro { min-height: 178px; margin-bottom: 20px; padding: 20px 144px 22px 19px; border-radius: 16px; }
  .market-intro .banner-copy { max-width: none; }
  .intro-eyebrow { max-width: 200px; font-size: 8px; }
  .market-intro .banner-copy h2 { font-size: 25px; margin: 10px 0 8px; letter-spacing: -.7px; }
  .market-intro .banner-copy p { max-width: 200px; font-size: 11px; line-height: 1.6; }
  .market-mascot { right: -17px; bottom: 0; width: 155px; height: 109px; }
  .intro-sell { display: none; }
  .category-rail { margin-right: -16px; padding-right: 16px; padding-bottom: 18px; gap: 7px; }
  .category-pill { min-height: 39px; padding: 0 12px; border-radius: 10px; font-size: 11px; }
  .marketplace-page .market-section { padding-top: 20px; }
  .marketplace-page .content-heading { gap: 14px; margin-bottom: 15px; }
  .marketplace-page .content-heading h2 { font-size: 21px; }
  .marketplace-page .location-tools { gap: 8px; }
  .marketplace-page .browse-location-search { width: auto; }
  .marketplace-page .location-pill { font-size: 11px; max-width: 150px; }
  .marketplace-page .sort-row { display: flex; gap: 7px; margin-bottom: 18px; }
  .marketplace-page .quick-filters { margin: 0; gap: 5px; }
  .marketplace-page .filter-chip { padding: 0 11px; height: 33px; font-size: 11px; }
  .marketplace-page .filter-open-button { margin: 0; width: auto; padding: 0 10px; height: 33px; }
  .marketplace-page .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .marketplace-page .product-image-wrap { border-radius: 10px; }
  .marketplace-page .product-price { font-size: 19px; }
  .marketplace-page .product-title { font-size: 12px; }
  .marketplace-page .product-location { font-size: 10px; }
  .marketplace-page .favorite-button { width: 32px; height: 32px; top: 8px; right: 8px; }
  .detail-layout { padding: 0 0 110px; }
  .marketplace-page .detail-gallery { margin: 0 0 24px; }
  .marketplace-page .detail-panel { padding: 0 20px; }
  .marketplace-page .detail-panel h2 { font-size: 25px; margin: 12px 0 10px; }
  .marketplace-page .detail-price { font-size: 30px; }
  .marketplace-page .detail-actions { margin: 20px 0 23px; }
  .marketplace-page .secondary-action { height: 44px; }
  .listing-header-brand { font-size: 13px; }
  .marketplace-page .detail-close { font-size: 11px; padding-left: 0; }
}
@media (max-width: 380px) {
  .marketplace-page .topbar { padding-left: 12px; padding-right: 12px; column-gap: 8px; }
  .marketplace-page .topbar-actions { gap: 5px; }
  .marketplace-page .brand { gap: 6px; }
  .marketplace-page .brand-copy strong { font-size: 14px; }
  .marketplace-page .brand-mark { width: 30px; height: 30px; }
  .marketplace-page .login-button { padding: 0 9px; font-size: 11px; }
  .marketplace-page .mobile-listing-button { width: 34px; height: 34px; }
  .marketplace-page .topbar-actions .panda-language-toggle { min-width: 34px; height: 34px; padding: 0 5px; }
  .marketplace-page .topbar-actions > a.round-action { width: 30px; height: 34px; }
  .market-intro { padding-right: 124px; padding-left: 16px; }
  .market-intro .banner-copy h2 { font-size: 23px; }
  .market-mascot { width: 136px; height: 95px; right: -20px; }
}
@media (prefers-reduced-motion: reduce) {
  .marketplace-page *, .marketplace-page *::before, .marketplace-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.marketplace-page img.brand-mark { background: transparent; border-radius: 0; box-shadow: none; }
