/* THEVORA AD DETAIL PAGE */

.detail-page {
  --dp-bg: #fff7f6;
  --dp-white: #fff;
  --dp-pink: #e8a5b5;
  --dp-pink-light: #fff0f3;
  --dp-pink-dark: #a84f6a;
  --dp-text: #392b31;
  --dp-muted: #786970;
  --dp-border: #f0dce1;
  background: var(--dp-bg);
  color: var(--dp-text);
}

.detail-page *,
.detail-page *::before,
.detail-page *::after {
  box-sizing: border-box;
}

.detail-main {
  width: min(1000px, 100%);
  margin-inline: auto;
  padding: 20px 20px 50px;
}

/* BREADCRUMB */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 5px 0 20px;
  color: var(--dp-muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--dp-pink-dark);
  text-decoration: none;
}

/* LOADING */
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--dp-muted);
  text-align: center;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--dp-border);
  border-top-color: var(--dp-pink-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ERROR */
.detail-error {
  padding: 60px 20px;
  text-align: center;
}

.detail-error h1 {
  font-size: 24px;
  margin-bottom: 12px;
}

/* CONTENT LAYOUT */
.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* GALLERY */
.detail-gallery {
  position: sticky;
  top: 20px;
}

.gallery-main {
  overflow: hidden;
  border-radius: 16px;
  background: #f8e8ec;
  aspect-ratio: 3 / 4;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 16px;
}

.gallery-no-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fff0f3, #f4dce4);
  border-radius: 16px;
  color: var(--dp-muted);
  font-size: 14px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: #e5a6b6 #fbecef;
}

.thumb-btn {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  transition: border-color 0.15s;
}

.thumb-btn.is-active {
  border-color: var(--dp-pink-dark);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* AD INFO */
.detail-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-plan-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  background: #fff0d9;
  color: #80531b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.detail-title {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--dp-muted);
  font-size: 13px;
}

.meta-name {
  font-weight: 700;
  color: var(--dp-text);
}

.meta-sep {
  color: var(--dp-pink);
}

/* CONTACT BUTTONS */
.detail-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.contact-call {
  background: #fee2e2;
  color: #b91c1c;
}

.contact-whatsapp {
  background: #dcfce7;
  color: #15803d;
}

.contact-telegram {
  background: #dbeafe;
  color: #1d4ed8;
}

.no-contact {
  color: var(--dp-muted);
  font-size: 13px;
}

/* DESCRIPTION & LOCATION */
.detail-section-heading {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--dp-pink-dark);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.detail-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #57434c;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-location {
  margin: 0;
  font-size: 14px;
  color: var(--dp-muted);
}

/* DISCLAIMER */
.detail-disclaimer {
  padding: 14px;
  border: 1px dashed var(--dp-border);
  border-radius: 10px;
  background: #fff;
}

.detail-disclaimer p {
  margin: 0;
  font-size: 12px;
  color: var(--dp-muted);
  line-height: 1.6;
}

/* BACK BUTTON */
.back-btn {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
  background: #fff;
  color: var(--dp-pink-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.back-btn:hover {
  background: var(--dp-pink-light);
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .detail-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-gallery {
    position: static;
  }

  .gallery-main {
    aspect-ratio: 4 / 3;
    max-height: 320px;
  }

  .detail-main {
    padding: 13px 12px 40px;
  }

  .detail-title {
    font-size: 20px;
  }

  .contact-btn {
    flex: 1 1 120px;
    justify-content: center;
  }
}

/* Fix: Keep hidden elements hidden */
.detail-page [hidden] {
  display: none !important;
}

/* Show complete ad image without zoom or cropping */
.detail-page .gallery-main {
  aspect-ratio: auto;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8e8ec;
  overflow: hidden;
}

.detail-page .gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 700px) {
  .detail-page .gallery-main {
    height: 320px;
  }
}

/* ================================
   SIMILAR ADS SECTION
================================ */

.similar-ads-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--dp-border);
}

.similar-ads-section .section-heading {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 800;
  color: var(--dp-text);
}

.similar-ads-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.similar-ad-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--dp-border);
  text-decoration: none;
  color: var(--dp-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.similar-ad-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(168, 79, 106, 0.12);
}

.similar-ad-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f8e8ec;
}

.similar-ad-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.similar-ad-no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff0f3, #f4dce4);
  display: grid;
  place-items: center;
}

.similar-ad-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.similar-ad-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: #fff0d9;
  color: #80531b;
  padding: 3px 7px;
  border-radius: 4px;
  align-self: flex-start;
}

.similar-ad-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 700px) {
  .similar-ads-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ================================
   POPULAR CITIES SECTION
================================ */

.other-cities-section {
  margin-top: 48px;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--dp-border);
  border-radius: 16px;
}

.other-cities-section h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--dp-text);
}

.other-cities-section > p {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--dp-muted);
}

.city-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.city-links a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 20px;
  background: var(--dp-pink-light);
  color: var(--dp-pink-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--dp-border);
  transition: background 0.15s, transform 0.1s;
}

.city-links a:hover {
  background: var(--dp-pink);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .other-cities-section {
    padding: 20px 16px;
  }
}

/* ================================
   SEO BOTTOM CONTENT
================================ */

.seo-bottom-content {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--dp-border);
  color: var(--dp-muted);
  font-size: 14px;
  line-height: 1.8;
}

.seo-bottom-content h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  color: var(--dp-text);
}

.seo-bottom-content h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dp-text);
}

.seo-bottom-content p {
  margin: 0 0 14px;
}

.seo-bottom-content strong {
  color: var(--dp-text);
  font-weight: 600;
}