/* 2026-11-09: listing gap repair and mobile app presentation only. */
.listing-detail-primary,
.listing-detail-side {
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}
.listing-detail-side > .listing-detail-summary { position: static; }
/* Keep feedback in the left column and let the page grid own section spacing. */
.listing-detail-page .listing-rating-section,
.listing-detail-page .listing-report-section { margin: 0; min-width: 0; }
.listing-detail-page .listing-rating-card h2 { margin: 0 0 12px; }
.listing-detail-page .listing-rating-card p { margin: 8px 0 0; }
.listing-detail-shell > .contextual-cta { margin-block: 0; }
.listing-detail-shell > .related-listings-section { margin-top: 0; }
.site-header-pro .mobile-app-search { display: none !important; }

@media (max-width: 820px) {
  /* Keep the existing destinations, account permissions and footer. */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-header-pro,
  .nav-shell-pro { height: 64px; }
  .site-header-pro .nav-shell-pro { width: calc(100% - 24px); gap: 6px; }
  .site-header-pro .brand-pro { gap: 7px; flex-shrink: 0; }
  .site-header-pro .brand-logo-mark { width: 30px; height: 30px; }
  .site-header-pro .brand-identity { display: grid; }
  .site-header-pro .brand-pro .brand-wordmark { display: block; font-size: 12px; }
  .site-header-pro .brand-signature,
  .site-header-pro .nav-actions-pro > .lang-switch { display: none; }
  .site-header-pro .nav-actions-pro { gap: 3px; margin-left: auto; }
  .site-header-pro .nav-icon-button,
  .site-header-pro .mobile-menu-pro > summary { width: 38px; height: 42px; min-width: 38px; }
  .site-header-pro .mobile-app-search { display: grid !important; place-items: center; }
  .mobile-menu-pro[open]::before { inset: 64px 0 0; }
  .site-header-pro .mobile-nav-panel { top: 64px; height: calc(100dvh - 64px); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { background: #082e43; border-color: #315466; box-shadow: 0 -5px 24px #082e4318; }
  .mobile-bottom-item { color: #c5d8df !important; font-size: 10px; font-weight: 650; }
  .mobile-bottom-item.is-active:not(.mobile-bottom-sell) { color: #ffdc38 !important; background: transparent; }
  .mobile-bottom-item.is-active:not(.mobile-bottom-sell)::after { content: ''; position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: #ffdc38; }
  .mobile-bottom-sell > span:last-child { color: #ffdc38; font-size: 10px; }
  .mobile-bottom-sell-core { width: 50px; height: 50px; border: 3px solid #082e43; border-radius: 17px; box-shadow: none; }
  .mobile-bottom-badge { border-color: #082e43; }
  .mobile-bottom-avatar { background: #1e607a; }
  .mobile-bottom-item:focus-visible { outline-color: #ffdc38; }

  /* A direct search / category / listings feed, without slideshow banners. */
  .home-refresh { display: flex; flex-direction: column; padding-bottom: 20px; }
  .home-refresh > section { order: 5; }
  .home-refresh > .hero-carousel { display: none !important; }
  .home-refresh > .home-search-area { order: 1; margin-top: 0; padding-top: 14px; }
  .home-refresh > .home-categories { order: 2; padding-top: 6px; padding-bottom: 8px; }
  .home-refresh > #latest-listings { order: 3; }
  .home-refresh > .home-value-strip { order: 4; margin-top: 20px; }
  .home-refresh .container { width: calc(100% - 28px); }
  .home-refresh .home-search { display: grid; grid-template-columns: calc(50% - 4px) minmax(0,1fr) 44px; gap: 8px; padding: 10px; border-radius: 16px; box-shadow: none; }
  .home-refresh .home-search label { padding: 5px 8px; margin: 0; border: 0; border-radius: 10px; background: #f3f7fa; }
  .home-refresh .home-search .home-search-keyword { grid-column: 1/3; grid-row: 1; border: 1px solid #b9cedb; background: #fff; }
  .home-refresh .home-search label:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  .home-refresh .home-search label:nth-of-type(3) { grid-column: 2/4; grid-row: 2; }
  .home-refresh .home-search label span { font-size: 10px; margin-bottom: 2px; }
  .home-refresh .home-search input,
  .home-refresh .home-search select { height: 34px; background: transparent; font-size: 16px; }
  .home-refresh .home-search .button { grid-column: 3; grid-row: 1; min-height: 54px; padding: 0; gap: 0; margin: 0; border-radius: 11px; font-size: 0; }
  .home-refresh .home-search .button > span { font-size: 23px; }
  .home-refresh .home-search-caption { padding: 9px 2px; font-size: 10px; gap: 4px; }
  .home-refresh .home-search-caption > span { display: none; }
  .home-refresh .home-section-heading.compact { margin-bottom: 8px; flex-direction: row; align-items: center; gap: 8px; }
  .home-refresh .home-section-heading.compact h2 { font-size: 16px; max-width: 235px; }
  .home-refresh .home-section-heading.compact > a { font-size: 10px; white-space: normal; text-align: right; }
  .home-refresh .home-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; overflow: visible; padding-bottom: 0; }
  .home-refresh .home-category-grid a { min-height: 76px; padding: 4px 1px; }
  .home-refresh .home-category-grid span { width: 46px; height: 46px; margin-bottom: 7px; border-radius: 15px; font-size: 23px; }
  .home-refresh .home-category-grid strong { font-size: 10px; line-height: 1.35; }
  .home-refresh .home-surface { margin-top: 10px; padding: 18px 10px; border-radius: 18px; }
  .home-refresh .home-section { padding-top: 22px; padding-bottom: 10px; }
  .home-refresh .home-section-heading { margin-bottom: 15px; gap: 9px; }
  .home-refresh .home-section-heading h2 { font-size: 23px; }
  .home-refresh .home-section-heading p { font-size: 12px; line-height: 1.5; margin-top: 6px; }
  .home-refresh .home-surface .home-section-heading p { display: none; }
  .home-refresh .home-section-heading > a { font-size: 11px; }
  .home-refresh .public-listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .home-refresh .public-listing-card { border-radius: 13px; box-shadow: none; min-width: 0; }
  .home-refresh .public-listing-cover { aspect-ratio: 1 / 1; }
  .home-refresh .public-listing-card-body { padding: 10px; }
  .home-refresh .public-listing-card h3 { font-size: 13px; }
  .home-refresh .public-listing-price-row strong { font-size: 16px; overflow-wrap: anywhere; }
  .home-refresh .public-listing-meta { font-size: 10px; overflow-wrap: anywhere; }

  /* Preserve the phone reading order while desktop columns flow independently. */
  .listing-detail-page { padding: 14px 0 30px; }
  .listing-detail-shell { width: calc(100% - 24px); gap: 14px; grid-template-columns: minmax(0,1fr); }
  .listing-detail-shell > * { min-width: 0; }
  .listing-detail-grid { gap: 14px; grid-template-columns: minmax(0,1fr); }
  .listing-detail-primary,
  .listing-detail-side { display: contents; }
  .listing-detail-grid .listing-gallery { grid-row: 1; }
  .listing-detail-grid .listing-detail-summary { grid-row: 2; }
  .listing-detail-grid .listing-description-card { grid-row: 3; }
  .listing-detail-grid .listing-facts-card { grid-row: 4; }
  .listing-detail-page .listing-gallery { min-width: 0; padding: 8px; border-radius: 18px; }
  .listing-detail-page .listing-main-image { height: auto; min-height: 0; aspect-ratio: 1/1; border-radius: 12px; }
  .listing-detail-page .listing-thumbnails { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; overscroll-behavior-x: contain; }
  .listing-detail-page .listing-thumb { flex: 0 0 62px; width: 62px; height: 62px; }
  .listing-detail-page .listing-detail-summary,
  .listing-detail-page .listing-description-card,
  .listing-detail-page .listing-facts-card { padding: 18px; border-radius: 18px; min-width: 0; }
  .listing-detail-page .listing-detail-summary h1 { font-size: 23px; line-height: 1.3; letter-spacing: -.5px; overflow-wrap: anywhere; }
  .listing-detail-page .listing-detail-price strong { font-size: 27px; }
  .listing-detail-page .listing-seller-card { grid-template-columns: 44px minmax(0,1fr) auto; }
  .listing-detail-page .listing-seller-card strong { overflow-wrap: anywhere; }
  .listing-detail-page .listing-contact-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
  .listing-detail-page .listing-contact-buttons .contact-button { flex: 1 1 90px; min-height: 46px; padding: 10px; font-size: 14px; }
  .listing-detail-page .listing-description-text { overflow-wrap: anywhere; }
  .listing-detail-page .conversion-trust-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .listing-detail-page .listing-facts-card dd { overflow-wrap: anywhere; }
  .listing-detail-page .listing-video-player video { max-width: 100%; height: auto; }
  .footer.footer-african-identity { padding-bottom: 24px; }
  .footer.footer-african-identity .footer-grid-expanded { gap: 24px 16px; }
  .footer.footer-african-identity .footer-bottom { gap: 12px; }
}

@media (max-width: 360px) {
  .site-header-pro .brand-pro .brand-wordmark { font-size: 10px; }
  .site-header-pro .brand-pro { gap: 5px; }
  .site-header-pro .nav-actions-pro { gap: 2px; }
  .mobile-bottom-item { font-size: 9px; }
  .home-refresh .home-category-grid strong { font-size: 9px; letter-spacing: -.15px; overflow-wrap: normal; }
  .listing-detail-page .listing-detail-summary,
  .listing-detail-page .listing-description-card,
  .listing-detail-page .listing-facts-card { padding: 14px; }
}
