/* Sahibinden.com-Inspired Detail Page Styling - Permanent Specs Table & Framed Image */

/* Fix navbar overlap for breadcrumbs */
.breadcrumb-hero {
  padding-top: 110px !important;
  padding-bottom: 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs .separator {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Listing Title Box */
.listing-title-header {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.listing-title-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.listing-meta-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.listing-meta-sub span strong {
  color: var(--gold);
}

/* Main Top 2-Column Section: Left Main Content Column, Right Sticky Sidebar */
.detail-main-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

/* Left Column: Gallery + Description + Features */
.detail-left-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* Left Photo Gallery Container */
.gallery-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  padding: 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Reduced & Compact Framed Viewport for Photo */
.main-image-viewport {
  position: relative;
  width: 100%;
  height: 400px;
  max-height: 55vh;
  background: #0b0b0b;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.main-image-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s ease-in-out;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
  font-size: 1.1rem;
}

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

.gallery-prev { left: 0.65rem; }
.gallery-next { right: 0.65rem; }

.gallery-counter-badge {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 5;
}

.gallery-status-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: var(--gold);
  color: var(--bg-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  z-index: 5;
}

/* Horizontal Scrollable Thumbnail Carousel */
.thumb-carousel-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-top: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg-secondary);
}

.thumb-carousel-container::-webkit-scrollbar {
  height: 5px;
}

.thumb-carousel-container::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

.thumb-item {
  flex: 0 0 75px;
  height: 55px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: var(--transition);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item.active, .thumb-item:hover {
  opacity: 1;
  border-color: var(--gold);
}

/* Right Side: ALWAYS VISIBLE & STICKY Specs & Price Container */
.specs-side-table-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.price-header-box {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--gold);
}

.price-header-box .price-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
}

.price-header-box .price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Always Visible Key-Value Table */
.sahibinden-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sahibinden-table tr {
  border-bottom: 1px solid var(--border);
}

.sahibinden-table tr:last-child {
  border-bottom: none;
}

.sahibinden-table td {
  padding: 0.45rem 0.25rem;
  vertical-align: middle;
}

.sahibinden-table td.spec-name {
  color: var(--text-muted);
  font-weight: 500;
  width: 50%;
}

.sahibinden-table td.spec-val {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  width: 50%;
}

.sahibinden-table td.spec-val.highlight {
  color: var(--gold);
}

/* Sidebar Agent Card - STICKY PANEL */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 95px;
  align-self: start;
}

.agent-store-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.store-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.store-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.store-info-text .store-company {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
}

.store-info-text .agent-name-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.2rem 0;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.agent-contact-btns {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-phone-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.btn-phone-call:hover {
  filter: brightness(1.1);
}

.btn-whatsapp-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.btn-whatsapp-chat:hover {
  background: #1ebc57;
}

/* Bottom Full-Width Sections (Açıklama & Özellikler) */
.detail-bottom-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.detail-box-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.box-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.desc-bullet-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem 0;
}

.desc-bullet-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.desc-bullet-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.85rem;
}

.authorized-banner {
  background: rgba(212, 175, 55, 0.12);
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1.15rem;
  border-radius: 4px;
  color: var(--text-primary);
  margin-top: 1.25rem;
  font-size: 0.92rem;
}

.feature-category {
  margin-bottom: 1.35rem;
}

.feature-category:last-child {
  margin-bottom: 0;
}

.feature-cat-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.feature-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.65rem;
}

.feature-check-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-secondary);
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.feature-check-badge svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* Fullscreen Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 100001;
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  transition: var(--transition);
  z-index: 100001;
}

.lightbox-nav-btn:hover {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.4rem 1.25rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 100001;
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .detail-main-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
  }
  .main-image-viewport {
    max-height: 360px;
  }
}

@media (max-width: 576px) {
  .main-image-viewport {
    max-height: 260px;
    aspect-ratio: 4 / 3;
  }
  .feature-badges-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
