/* =========================================================
   Sephora Real Estate — Responsive
   Breakpoints: 320, 375, 390, 430, 768, 1024, 1440, 1920
   ========================================================= */

@media (max-width: 1200px) {
  .property-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-card--wide {
    grid-column: span 1;
  }

  .feature-grid,
  .area-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .nav__list {
    display: none;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav__cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav.is-open {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 88vw);
    background: var(--white);
    box-shadow: -12px 0 40px rgba(11, 31, 51, 0.18);
    z-index: 1200;
    padding: 5.5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .nav.is-open .nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav.is-open .nav__link {
    padding: 0.85rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--soft);
  }

  .nav.is-open .nav__cta {
    display: inline-flex;
    width: 100%;
  }

  .nav-overlay.is-active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 51, 0.45);
    z-index: 1100;
  }

  body.nav-open {
    overflow: hidden;
  }

  .search-panel__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-cards,
  .property-grid,
  .service-grid,
  .commercial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-band,
  .contact-strip,
  .rating-block,
  .detail-layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .detail-gallery__main {
    grid-row: auto;
    min-height: 320px;
  }

  .detail-gallery__thumbs {
    grid-template-columns: repeat(4, 1fr);
  }

  .inquiry-sidebar {
    position: static;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item--large {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 260px;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .hero__content {
    padding-bottom: 8rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 68px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .topbar__left span {
    max-width: 42vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: auto;
  }

  .hero__content {
    padding: 3.25rem 0 7rem;
  }

  .hero__title {
    max-width: none;
  }

  .hero__meta {
    gap: 0.85rem;
  }

  .hero__divider {
    display: none;
  }

  .search-panel-wrap {
    margin-top: -3.5rem;
  }

  .search-panel__grid,
  .action-cards,
  .property-grid,
  .feature-grid,
  .steps,
  .area-grid,
  .service-grid,
  .commercial-grid,
  .form-grid,
  .detail-meta,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-band__list {
    grid-template-columns: 1fr;
  }

  .about-band__media {
    min-height: 280px;
  }

  .rating-block {
    padding: 1.5rem;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-gallery__thumbs {
    display: flex;
    overflow-x: auto;
    gap: 0.55rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .detail-gallery__thumbs button {
    flex: 0 0 42%;
    scroll-snap-align: start;
  }

  .whatsapp-float {
    bottom: 4.75rem;
    right: 1rem;
  }

  .whatsapp-float__label {
    display: none;
  }

  .mobile-action-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 980;
    background: var(--white);
    border-top: 1px solid var(--soft);
    box-shadow: 0 -6px 24px rgba(11, 31, 51, 0.08);
  }

  .mobile-action-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 64px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
  }

  .mobile-action-bar a:nth-child(2) {
    background: var(--teal);
    color: var(--white);
  }

  body {
    padding-bottom: 72px;
  }

  .page-hero {
    padding: 3rem 0 2.5rem;
  }

  .contact-actions .btn,
  .cta-band__actions .btn,
  .hero__actions .btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .brand__logo {
    width: 150px;
  }

  .hero__title {
    font-size: 2.15rem;
  }

  .property-card__actions {
    flex-direction: column;
  }

  .property-card__actions .btn {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item--large {
    grid-column: span 2;
  }
}

@media (max-width: 375px) {
  .topbar {
    font-size: 0.75rem;
  }

  .btn {
    padding-inline: 1.1rem;
  }

  .rating-score__value {
    font-size: 3.2rem;
  }
}

@media (min-width: 1440px) {
  :root {
    --container: 1240px;
  }

  .property-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .property-grid.property-grid--home {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1920px) {
  :root {
    --container: 1320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
