/* ═══════════════════════════════════════════
   ANNONCE SINGLE — Premium Property Page
   ═══════════════════════════════════════════ */

.single-page {
  padding-top: 80px;
  background: var(--dark);
  min-height: 100vh;
}

/* ── GALLERY SECTION ── */
.gallery-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 6px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-main:hover img {
  transform: scale(1.03);
}

.gallery-side {
  position: relative;
  overflow: hidden;
}
.gallery-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-side:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,17,23,0.4) 0%, transparent 50%);
  pointer-events: none;
}

.gallery-count-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(200, 169, 110, 0.3);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}
.gallery-count-btn:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}
.gallery-count-btn svg {
  flex-shrink: 0;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.1);
}

.lightbox-main {
  position: relative;
  width: 80vw;
  max-width: 1000px;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  animation: lbFadeIn 0.3s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s;
  z-index: 10;
}
.lightbox-arrow:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}
.lightbox-arrow.lb-prev { left: -70px; }
.lightbox-arrow.lb-next { right: -70px; }

.lightbox-counter {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  letter-spacing: 3px;
  z-index: 10;
}

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  overflow-x: auto;
  max-width: 80vw;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.lightbox-thumbs::-webkit-scrollbar { height: 4px; }
.lightbox-thumbs::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

.lb-thumb {
  flex: 0 0 72px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.4;
  border: 2px solid transparent;
  transition: all 0.3s;
}
.lb-thumb.active {
  opacity: 1;
  border-color: var(--gold);
}
.lb-thumb:hover {
  opacity: 0.8;
}
.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── CONTENT LAYOUT ── */
.property-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

/* ── PROPERTY HEADER ── */
.property-header {
  margin-bottom: 32px;
}
.property-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.p-badge-status {
  background: rgba(200, 169, 110, 0.15);
  color: var(--gold);
  border: 1px solid rgba(200, 169, 110, 0.25);
}
.p-badge-ref {
  background: rgba(138, 143, 168, 0.1);
  color: var(--muted);
  border: 1px solid rgba(138, 143, 168, 0.15);
}

.property-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.property-location-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.property-location-row svg {
  color: var(--gold);
  flex-shrink: 0;
}

.property-price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 20px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(200, 169, 110, 0.12) 0%, rgba(200, 169, 110, 0.04) 100%);
  border: 1px solid rgba(200, 169, 110, 0.2);
  border-radius: 12px;
}
.property-price-tag .price-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
}
.property-price-tag .price-unit {
  font-size: 14px;
  color: var(--muted);
}

/* ── SPECS STRIP ── */
.specs-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
}
.spec-item {
  background: var(--dark2);
  padding: 22px 16px;
  text-align: center;
  transition: background 0.3s;
}
.spec-item:hover {
  background: var(--dark3);
}
.spec-icon {
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}
.spec-value {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.spec-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── DESCRIPTION ── */
.description-section {
  margin-bottom: 36px;
}
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 500;
}
.description-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  white-space: pre-line;
  max-height: 280px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.5s ease;
}
.description-text.expanded {
  max-height: 3000px;
}
.description-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--dark), transparent);
  pointer-events: none;
  transition: opacity 0.3s;
}
.description-text.expanded::after {
  opacity: 0;
}

.desc-toggle {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.desc-toggle:hover {
  color: #fff;
}

/* ── DETAILS GRID ── */
.details-grid-section {
  margin-bottom: 36px;
}
.details-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.detail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--dark2);
  border-radius: 10px;
  border: 1px solid rgba(200, 169, 110, 0.06);
  transition: border-color 0.3s;
}
.detail-row:hover {
  border-color: rgba(200, 169, 110, 0.2);
}
.detail-row-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(200, 169, 110, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.detail-row-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.detail-row-value {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

/* ── SIDEBAR ── */
.property-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}

.sidebar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: #fff;
  margin-bottom: 20px;
}

.sidebar-agent {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.agent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  flex-shrink: 0;
}
.agent-name {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}
.agent-role {
  font-size: 12px;
  color: var(--muted);
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1ebc5a;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
}
.btn-call {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
}
.btn-call:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-email {
  background: var(--dark3);
  color: var(--text);
}
.btn-email:hover {
  background: var(--gold);
  color: var(--dark);
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Contact Form */
.sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-form input,
.sidebar-form textarea {
  width: 100%;
  background: var(--dark3);
  border: 1px solid rgba(200, 169, 110, 0.1);
  padding: 13px 16px;
  border-radius: 10px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.3s;
}
.sidebar-form input:focus,
.sidebar-form textarea:focus {
  border-color: var(--gold);
}
.sidebar-form textarea {
  resize: vertical;
  min-height: 90px;
}
.sidebar-form .btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}
.sidebar-form .btn-submit:hover {
  background: var(--gold-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ── RELATED SECTION ── */
.related-section {
  padding: 60px 20px 100px;
  background: var(--dark);
  border-top: 1px solid var(--border);
  max-width: 1400px;
  margin: 0 auto;
}
.related-header {
  text-align: center;
  margin-bottom: 40px;
}
.related-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  color: var(--gold);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Related cards reuse annonces.css .property-card styles */

/* ── BACK LINK ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}
.back-link:hover {
  color: var(--gold);
  background: rgba(200, 169, 110, 0.08);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .lightbox-arrow.lb-prev { left: 10px; }
  .lightbox-arrow.lb-next { right: 10px; }
}

@media (max-width: 992px) {
  .property-layout {
    grid-template-columns: 1fr;
  }
  .property-sidebar {
    position: static;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 350px;
  }
  .gallery-side { display: none; }
  .gallery-main { grid-row: auto; }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .specs-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .property-title { font-size: 26px; }
  .property-price-tag .price-amount { font-size: 26px; }
  .gallery-grid { grid-template-rows: 260px; border-radius: 10px; }
  .related-grid { grid-template-columns: 1fr; }
  .details-list { grid-template-columns: 1fr; }
  .lightbox-main { width: 95vw; height: 60vh; }
  .lightbox-arrow { width: 40px; height: 40px; }
  .lightbox-arrow.lb-prev { left: 6px; }
  .lightbox-arrow.lb-next { right: 6px; }
}

/* Light Theme — Warm Cream & Gold */
html.light .single-page { background: var(--dark); }
html.light .back-link { color: #6B5D4F; }
html.light .back-link:hover { color: var(--gold); background: rgba(161,125,58,0.06); }
html.light .gallery-count-btn { background: rgba(251,248,243,0.92); color: #2C2418; border-color: rgba(161,125,58,0.15); }
html.light .gallery-count-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
html.light .property-title { color: #2C2418; }
html.light .property-price-tag { background: linear-gradient(135deg, rgba(161,125,58,0.1) 0%, rgba(161,125,58,0.04) 100%); border-color: rgba(161,125,58,0.18); }
html.light .specs-strip { background: rgba(161,125,58,0.08); }
html.light .spec-item { background: #FFFDF9; }
html.light .spec-item:hover { background: #F3EDE2; }
html.light .spec-value { color: #2C2418; }
html.light .description-text::after { background: linear-gradient(to top, var(--dark), transparent); }
html.light .detail-row { background: #FFFDF9; border-color: rgba(161,125,58,0.08); }
html.light .detail-row:hover { border-color: rgba(161,125,58,0.25); }
html.light .detail-row-icon { background: rgba(161,125,58,0.08); }
html.light .detail-row-value { color: #2C2418; }
html.light .sidebar-card { background: #FFFDF9; border-color: rgba(161,125,58,0.1); }
html.light .sidebar-card::before { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); }
html.light .sidebar-title { color: #2C2418; }
html.light .agent-name { color: #2C2418; }
html.light .sidebar-form input,
html.light .sidebar-form textarea { background: #F3EDE2; border-color: rgba(161,125,58,0.1); color: #2C2418; }
html.light .sidebar-form input:focus,
html.light .sidebar-form textarea:focus { border-color: var(--gold); }
html.light .btn-call { border-color: rgba(161,125,58,0.18); color: #2C2418; }
html.light .btn-call:hover { border-color: var(--gold); color: var(--gold); }
html.light .btn-email { background: #F3EDE2; color: #2C2418; }
html.light .btn-email:hover { background: var(--gold); color: #fff; }
html.light .lightbox { background: rgba(251,248,243,0.97); }
html.light .lightbox-close { color: #2C2418; }
html.light .lightbox-close:hover { background: rgba(44,36,24,0.06); }
html.light .lightbox-counter { color: #6B5D4F; }
html.light .lightbox-arrow { background: rgba(44,36,24,0.05); border-color: rgba(161,125,58,0.15); color: #2C2418; }
html.light .lightbox-arrow:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
html.light .lb-thumb { border-color: transparent; }
html.light .lb-thumb.active { border-color: var(--gold); }
html.light .related-section { border-top-color: rgba(161,125,58,0.1); }
