/* Overrides mobile/tablet para a página de detalhes do imóvel */

@media (max-width: 1024px) {
  .details-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .details-grid > * {
    width: 100%;
  }

  .details-grid > .property-header {
    order: 1;
  }

  .details-sidebar {
    order: 2;
    display: contents;
    position: static;
  }

  .property-info-card {
    order: 2;
  }

  .details-main {
    order: 3;
    gap: 24px;
  }

  .property-map {
    padding: 20px 16px;
  }

  .property-map-wrapper {
    padding-top: 65%;
    border-radius: 12px;
  }

  .details-main .property-description {
    order: 1;
  }

  .details-main .property-features {
    order: 2;
  }

  .details-main .property-amenities {
    order: 3;
  }

  .details-main .property-map {
    order: 4;
  }

  .contact-card {
    order: 4;
    gap: 12px;
  }

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

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

@media (max-width: 768px) {
  .gallery-section > .container {
    padding: 0;
  }

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

  .gallery-carousel-viewport {
    min-height: clamp(260px, 78vw, 460px);
    border-radius: 0;
    position: relative;
  }

  .gallery-page {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 0;
  }

  .gallery-page-item {
    border-radius: 0;
  }

  .gallery-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    z-index: 2;
  }

  .gallery-carousel-nav svg {
    width: 22px;
    height: 22px;
  }

  .gallery-carousel-nav.prev {
    left: 12px;
  }

  .gallery-carousel-nav.next {
    right: 12px;
  }

  .gallery-carousel-nav:hover,
  .gallery-carousel-nav:focus-visible {
    transform: translateY(-50%) scale(1.05);
  }

  .gallery-carousel-nav:disabled {
    transform: translateY(-50%);
  }

  .gallery-section {
    padding: 24px 0;
  }

  .gallery-main-image {
    aspect-ratio: 4 / 3;
  }

  .gallery-nav-btn {
    width: 36px;
    height: 36px;
  }

  .gallery-nav-btn.prev {
    left: 8px;
  }

  .gallery-nav-btn.next {
    right: 8px;
  }

  .gallery-photo-counter {
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .gallery-thumbnails-track {
    grid-auto-columns: minmax(120px, 1fr);
  }

  .gallery-thumbs-nav {
    width: 36px;
    height: 36px;
  }

  .gallery-thumbnail {
    border-width: 2px;
  }

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

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

  .amenities-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .details-sidebar {
    display: contents;
  }

  .lightbox-btn {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .lightbox-btn.prev {
    left: 16px;
  }

  .lightbox-btn.next {
    right: 16px;
  }

  .lightbox img {
    max-width: 95vw;
    max-height: 85vh;
  }
}

/* Ajustes de compartilhamento para mobile */
.contact-share {
  margin: 0;
  padding: 24px 0 0;
}

.share-buttons {
  gap: 24px;
}

.btn-share {
  width: 48px;
  height: 48px;
}

.btn-share svg {
  width: 24px;
  height: 24px;
}
