/* Listing Detail Page Styles - GastroHub (Clean White Redesign) */
.listing-detail-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-areas:
    "gallery sidebar"
    "specs sidebar"
    "info-gen sidebar"
    "description sidebar"
    "map sidebar";
  gap: 32px;
  align-items: start;
}

.listing-gallery-section {
  grid-area: gallery;
}
.listing-sidebar-section {
  grid-area: sidebar;
}
.listing-specs-section {
  grid-area: specs;
}
.listing-info-card-section {
  grid-area: info-gen;
}
.listing-description-section {
  grid-area: description;
}
.listing-map-section {
  grid-area: map;
}

.listing-gallery-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-premium);
}

.listing-image-main {
  width: 100%;
  height: 600px;
  object-fit: cover;
  background: var(--bg-light);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.listing-image-main:hover {
  opacity: 0.9;
}

.listing-thumbs-container {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.listing-thumb {
  width: 100px;
  height: 80px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: cover;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.listing-thumb:hover,
.listing-thumb.active {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.listing-info-card {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-premium);
  position: sticky;
  top: 100px;
}

.listing-price-tag {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.listing-title-main {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 16px;
}

.listing-section-clean {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.listing-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.spec-item-modern {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px 12px 25px;
  border-bottom: 1px dashed var(--border-light);
  position: relative;
  transition: background 0.2s ease;
}

.spec-item-modern::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 4px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  opacity: 0.8;
}

.spec-item-modern.info-spec::before {
  background: var(
    --primary
  ); /* Indigo-ish indigo-600 logic, but primary is safer */
}

.spec-item-modern:hover {
  background: var(--bg-alt);
}

.spec-item-modern:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.spec-value {
  color: var(--text-primary);
  font-weight: 600;
}

.btn-bomba {
  padding: 16px 24px;
  font-size: 16px;
  border-radius: var(--radius-lg);
  justify-content: center;
  width: 100%;
  margin-bottom: 12px;
}

@media (max-width: 1024px) {
  .listing-detail-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "sidebar"
      "specs"
      "info-gen"
      "description"
      "map";
    gap: 24px;
  }
  .listing-info-card {
    position: static;
  }
  .listing-image-main {
    height: 400px;
  }
}

@media (max-width: 600px) {
  .listing-info-card,
  .listing-section-clean {
    padding: 24px 16px;
  }
  .listing-image-main {
    height: 300px;
  }
}

/* Gallery Navigation Arrows */
.gallery-nav-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  opacity: 0;
}

[data-theme="dark"] .gallery-nav-btn {
  background: rgba(30, 41, 59, 0.7);
  border-color: var(--border);
}

.gallery-nav-container:hover .gallery-nav-btn {
  opacity: 1;
}

.gallery-nav-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.gallery-nav-prev {
  left: 20px;
}

.gallery-nav-next {
  right: 20px;
}

/* Image Lightbox */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.image-lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  z-index: 1;
}

.image-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  object-fit: contain;
  display: block;
}

.image-lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.image-lightbox-close:hover {
  background: rgba(30, 64, 175, 0.95);
}

.image-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.image-lightbox-arrow-left {
  left: -60px;
}

.image-lightbox-arrow-right {
  right: -60px;
}

@media (max-width: 768px) {
  .image-lightbox-arrow-left {
    left: 10px;
  }
  .image-lightbox-arrow-right {
    right: 10px;
  }
}
