/* SWMO Residential — mobile-first Zillow-style polish */
@media (max-width: 768px) {
  .site-zillow.site-premium {
    --header-h: 48px;
    padding-top: var(--header-h);
  }

  /* —— Header —— */
  .site-zillow .site-header {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  }
  .site-zillow .header-kw-link {
    display: none;
  }

  .site-zillow .header-wrap {
    gap: 0.5rem;
    padding: 0 0.65rem;
  }
  .site-zillow .logo,
  .site-zillow .logo-lg {
    font-size: 0.88rem;
  }
  .site-zillow .header-phone-link {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.4rem;
    margin-left: auto;
  }
  .site-zillow .header-cta {
    display: none;
  }
  .site-zillow .nav-toggle {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
  }
  .site-zillow .header-nav {
    padding: 0.85rem 1rem 1rem;
    gap: 0.85rem;
  }
  .site-zillow .header-nav a {
    font-size: 0.95rem;
    padding: 0.35rem 0;
  }

  /* —— Hero (~40% shorter) —— */
  .site-zillow .hero-zillow {
    padding: 0.6rem 0 0.7rem;
  }
  .site-zillow .hero-zillow .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .site-zillow .hero-zillow h1 {
    font-size: 1.22rem;
    line-height: 1.2;
    margin: 0 0 0.25rem;
  }
  .site-zillow .hero-zillow .hero-lead {
    font-size: 0.8rem;
    line-height: 1.35;
    margin: 0 0 0.55rem;
    max-width: none;
  }
  .hero-search-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
  }
  .hero-search-bar input {
    grid-column: 1 / -1;
    font-size: 16px;
    padding: 0.5rem 0.6rem;
    min-height: 42px;
  }
  .hero-search-bar select,
  .hero-search-bar .btn {
    min-height: 40px;
    font-size: 0.82rem;
    padding: 0.4rem 0.5rem;
  }
  .hero-search-bar .btn {
    grid-column: 1 / -1;
  }
  .hero-cta-row {
    gap: 0.35rem;
    margin-bottom: 0.25rem;
  }
  .hero-cta-row .btn,
  .hero-cta-row .btn-outline-navy {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.42rem 0.5rem;
    text-align: center;
    border-radius: 999px;
  }
  .hero-rating {
    font-size: 0.72rem;
    margin: 0.2rem 0 0;
  }

  /* —— Search results toolbar —— */
  .search-results {
    padding: 0.5rem 0 1rem;
  }
  .search-results > .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
  }
  .results-count {
    font-size: 0.92rem;
    line-height: 1.25;
  }
  .results-area {
    font-size: 0.72rem;
    margin-top: 0.1rem;
  }
  .results-sub {
    display: none;
  }
  .results-toolbar-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }
  .results-toolbar-filters select {
    width: 100%;
    min-height: 36px;
    font-size: 0.72rem;
    padding: 0.32rem 0.2rem;
    border-radius: 8px;
  }

  /* Map / list toggle */
  .explorer-view-tabs {
    display: flex;
    margin-bottom: 0.45rem;
    border: 1px solid var(--zillow-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
  }
  .explorer-view-tabs .view-tab {
    flex: 1;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
  }
  .explorer-view-tabs .view-tab.is-active {
    background: var(--navy);
    color: var(--white);
  }
  .mobile-map-toggle {
    display: none !important;
  }

  /* Explorer */
  .zillow-explorer {
    min-height: 0;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(7, 21, 38, 0.06);
  }
  .zillow-explorer:not(.show-map-mobile) .zillow-map-col {
    display: none;
  }
  .zillow-explorer.show-map-mobile .zillow-list-col {
    display: none;
  }
  .zillow-explorer.show-map-mobile .zillow-map-col {
    display: block;
  }
  .zillow-list-col {
    border-left: none;
    border-top: none;
  }
  .homes-list--zillow {
    padding: 0.35rem 0;
    gap: 0.85rem;
    max-height: none;
  }

  /* Property cards — stacked, image-first */
  .zillow-card {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
  }
  .zillow-card-photo-btn {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
  .zillow-card-photo-btn img {
    width: 100%;
    min-height: 0;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }
  .zillow-card-body {
    padding: 0.5rem 0.65rem 0.6rem;
  }
  .zillow-card-price {
    font-size: 1rem;
  }
  .zillow-card-address {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .zillow-card-meta {
    font-size: 0.72rem;
  }
  .zillow-card-actions {
    margin-top: 0.35rem;
  }
  .zillow-card-actions .btn-sm {
    font-size: 0.68rem;
    padding: 0.28rem 0.45rem;
  }
  .zillow-card-actions--dual .btn-gold-outline,
  .zillow-card-actions .btn-gold-outline {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .zillow-card--skeleton .card-skel-thumb {
    aspect-ratio: 16 / 10;
    background: linear-gradient(90deg, #e8ecf0 25%, #f4f6f8 50%, #e8ecf0 75%);
    background-size: 200% 100%;
    animation: skel-shimmer 1s ease-in-out infinite;
  }
  .zillow-card--skeleton .card-skel-line {
    height: 0.65rem;
    margin: 0.35rem 0.65rem;
    border-radius: 4px;
    background: #e8ecf0;
  }
  .zillow-card--skeleton .card-skel-line.short {
    width: 55%;
  }
  @keyframes skel-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
  }

  .homes-list-more {
    font-size: 0.8rem;
    padding: 0.5rem;
    margin: 0.25rem 0.45rem 0.5rem;
  }

  .featured-band--carousel {
    padding: 0.75rem 0 0.85rem;
  }
  .featured-band--carousel > .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .featured-band--carousel h2 {
    font-size: 0.95rem;
  }
  /* Carousel sizing — listing-cards-mobile.css */

  .homes-pagination {
    padding: 0.75rem;
  }

  /* Trust / Brandon / Reviews — compact */
  .trust-band {
    padding: 1rem 0;
  }
  .trust-band .section-title {
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
  }
  .trust-grid--three {
    gap: 0.5rem;
  }
  .trust-card {
    padding: 0.65rem 0.75rem;
  }
  .trust-card h3 {
    font-size: 0.88rem;
    margin: 0 0 0.2rem;
  }
  .trust-card p {
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.35;
  }

  .brandon-band {
    padding: 1rem 0;
  }
  .brandon-band-inner {
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    text-align: left;
  }
  .brandon-photo {
    width: 72px;
    height: 72px;
    margin: 0;
  }
  .brandon-band h2 {
    font-size: 1.05rem;
    margin: 0 0 0.1rem;
  }
  .brandon-meta {
    font-size: 0.72rem;
    margin: 0 0 0.35rem;
  }
  .brandon-bio {
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0 0 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .brandon-band .btn {
    font-size: 0.78rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
  }

  .reviews-band-footer {
    padding: 1rem 0 1.25rem;
  }
  .reviews-compact h2 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }
  .reviews-compact-head {
    margin-bottom: 0.65rem;
    gap: 0.5rem;
  }
  .reviews-big-score {
    font-size: 1.35rem;
  }
  .reviews-wall--three .reviews-wall-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.6rem;
    padding-bottom: 0.25rem;
    grid-template-columns: unset;
    max-width: none;
  }
  .reviews-wall--three .review-card {
    flex: 0 0 min(82vw, 260px);
    scroll-snap-align: start;
    padding: 0.65rem 0.75rem;
    text-align: left;
  }
  .reviews-wall--three .review-text {
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0.35rem 0;
  }
  .reviews-wall--three .review-card-foot {
    font-size: 0.72rem;
  }

  .list-status {
    font-size: 0.78rem;
    padding: 0.35rem 0;
  }

  .list-scroll-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
  }

  .site-footer--compliant,
  .site-footer--minimal {
    padding: 0.85rem 0;
  }
  .site-footer--compliant .footer-fair {
    font-size: 0.62rem;
    line-height: 1.35;
  }
  .idx-search-disclaimer {
    font-size: 0.62rem;
  }
}

@media (max-width: 400px) {
  .site-zillow .header-phone-link {
    display: none;
  }
  .hero-cta-row .btn,
  .hero-cta-row .btn-outline-navy {
    flex: 1 1 100%;
  }
}
