/* ================================
   PROPERTY DETAIL PAGE STYLES
   PropiedadesVE Design System v2
================================ */

/* ================================
   CSS VARIABLES
================================ */
:root {
  /* Palette */
  --primary: #1A3C6E;
  --primary-light: #2A5494;
  --primary-dark: #0F2440;
  --accent: #F59E0B;
  --accent-hover: #D97706;
  --success: #16A34A;
  --danger: #EF4444;

  /* Surfaces */
  --bg-page: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-muted: #F3F4F6;
  --border: #E5E7EB;
  --border-light: #F0F0F0;

  /* Text */
  --text-primary: #111827;
  --text-body: #4B5563;
  --text-muted: #9CA3AF;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --transition: all 0.2s ease;
}

/* ================================
   RESET & BASE
================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-body);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================================
   HEADER (fallback — nav.css overrides)
================================ */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo span {
  color: var(--accent);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--bg-muted);
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.mobile-menu.show { display: flex; }
.mobile-menu-link {
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}
.mobile-menu-link:last-child { border-bottom: none; }

/* ================================
   BUTTONS
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-body);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ================================
   MAIN CONTENT
================================ */
.main-content {
  padding: 24px 0 60px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  padding: 8px 0;
  display: inline-block;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb i {
  font-size: 0.65rem;
}

/* Layout */
.property-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ================================
   PROPERTY MAIN
================================ */
.property-main {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 32px;
}

/* Header */
.property-header {
  margin-bottom: 24px;
}

.property-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-operation {
  background: var(--primary);
  color: white;
}

.badge-type {
  background: var(--bg-muted);
  color: var(--text-body);
}

.property-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.property-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
  padding-right: 8px;
}

.property-location i {
  color: var(--text-muted);
}

/* Price */
.property-price-section {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.property-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.price-period {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Features — horizontal strip with dividers */
.property-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-right: 1px solid var(--border-light);
  flex: 1;
  min-width: 0;
}

.feature-item:last-child {
  border-right: none;
}

.feature-icon {
  width: 42px;
  height: 42px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--primary);
  flex-shrink: 0;
}

.feature-info {
  display: flex;
  flex-direction: column;
}

.feature-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* Sections */
.property-section {
  margin-bottom: 32px;
}

.property-section:last-child {
  margin-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-title i {
  color: var(--primary);
}

/* Description */
.property-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-body);
}

/* Details Grid — alternating rows */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  overflow: hidden;
  overflow-wrap: break-word;
}

.detail-item:nth-child(odd) {
  background: var(--bg-muted);
}

.detail-item:nth-child(even) {
  background: var(--bg-card);
}

.detail-item:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}
.detail-item:nth-child(2) {
  border-radius: 0 var(--radius-sm) 0 0;
}

.detail-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 0;
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.amenity-item.active {
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-primary);
}

.amenity-item.active i {
  color: var(--accent);
}

.amenity-item i {
  font-size: 1.1rem;
}

/* ================================
   SIDEBAR
================================ */
.property-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 24px;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.sidebar-title i {
  color: var(--primary);
}

/* Map */
.property-map {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}

/* Publisher info */
.publisher-info,
.publish-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.publisher-info i,
.publish-date i {
  color: var(--primary);
}

/* Contact buttons in sidebar */
.contact-btn {
  margin-bottom: 10px;
}

.btn-whatsapp {
  background: #25d366;
  color: white;
  border: 2px solid #25d366;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  color: white;
}

.no-contact-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
  .property-layout {
    grid-template-columns: 1fr;
  }

  .property-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-card {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .property-main {
    padding: 24px;
  }

  .property-title {
    font-size: 1.4rem;
  }

  .property-price {
    font-size: 1.75rem;
  }

  .property-features {
    flex-wrap: wrap;
  }

  .feature-item {
    flex: 1 1 calc(50% - 1px);
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
  }

  .feature-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .detail-item {
    flex-direction: column;
    gap: 4px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .feature-item {
    flex: 1 1 100%;
  }

  .amenities-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    min-width: 100%;
  }
}

/* ================================
   IMAGE SKELETON LOADER
================================ */
.image-skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================
   STICKY CONTACT BAR
================================ */
.sticky-contact {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: white;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  gap: 12px;
}
.sticky-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  min-height: 48px;
}
.sticky-btn-call {
  background: var(--bg-muted);
  color: var(--primary);
}
.sticky-btn-whatsapp {
  background: #25d366;
  color: white;
}
@media (max-width: 768px) {
  .sticky-contact {
    display: flex;
    bottom: calc(66px + env(safe-area-inset-bottom));
  }
  .property-sidebar { padding-bottom: 140px; }
}

/* ================================
   BOTTOM NAV
================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 6px 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  min-height: 48px;
  min-width: 48px;
  transition: color 0.2s ease;
}
.bottom-nav-item i {
  font-size: 1.35rem;
  line-height: 1;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--accent);
}
@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .property-sidebar { padding-bottom: 140px; }
}

/* ================================
   PROPERTY IMAGE GALLERY
================================ */

/* 0-image empty state */
.gallery-empty {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}
.gallery-placeholder {
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.gallery-placeholder i { font-size: 3rem; color: var(--border); }

/* Single-image hero */
.gallery-single { margin-bottom: 1.5rem; }
.gallery-hero-full {
  display: block;
  width: 100%;
  height: 440px;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius-md);
}
.gallery-hero-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-hero-full:hover img { transform: scale(1.02); }

/* Grid wrap — desktop grid visible, mobile hidden */
.gallery-grid-wrap { margin-bottom: 1.5rem; }
.gallery-grid-wrap .gallery-mobile { display: none; }

/* Airbnb-style 4-col × 2-row grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 230px);
  gap: 4px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gallery-tile-hero {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

/* Individual tile */
.gallery-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-muted);
}
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.gallery-tile:hover img { transform: scale(1.04); }

/* "+N fotos" overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  pointer-events: none;
}

/* Mobile: single hero + pill button */
.gallery-hero-mobile {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius-md);
}
.gallery-hero-mobile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-mobile { position: relative; }
.gallery-mobile-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ================================
   GALLERY LIGHTBOX
================================ */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox[hidden] { display: none; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

/* ================================
   GALLERY RESPONSIVE
================================ */
@media (max-width: 767px) {
  .gallery-grid-wrap .gallery-grid { display: none; }
  .gallery-grid-wrap .gallery-mobile { display: block; }
  .gallery-hero-full { height: 260px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .gallery-grid { grid-template-rows: repeat(2, 190px); }
}


/* ================================
   PRICE BADGES (shared)
================================ */
.property-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.price-badge--down {
  background: #dcfce7;
  color: #16A34A;
}

.price-badge--up {
  background: #fff7ed;
  color: var(--accent);
}

.price-badge-detail {
  font-weight: 500;
  font-size: 0.75rem;
  opacity: 0.85;
}


/* ================================
   PRICE INSIGHTS CARD
================================ */
.price-insights-card {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin-top: 16px;
}

.price-insights-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-insights-title i {
  font-size: 1.1rem;
}


/* ================================
   MARKET POSITION BAR
================================ */
.market-position {
  margin-bottom: 16px;
}

.market-position-label {
  font-size: 0.85rem;
  color: var(--text-body);
  margin-bottom: 12px;
}

.market-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.market-bar-min,
.market-bar-max {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 60px;
}

.market-bar-max {
  text-align: right;
}

.market-bar {
  flex: 1;
  height: 8px;
  background: linear-gradient(90deg, #dcfce7, #fef3c7, #fed7aa);
  border-radius: var(--radius-pill);
  position: relative;
}

.market-bar-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.market-bar-marker-dot {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.market-bar-marker-label {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.market-bar-avg {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  z-index: 1;
}

.market-bar-avg-line {
  width: 2px;
  height: 16px;
  background: var(--text-muted);
  opacity: 0.5;
}

.market-comparison {
  margin-top: 16px;
  margin-bottom: 8px;
}

.market-comparison-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
}

.market-comparison--below {
  background: #dcfce7;
  color: #16A34A;
}

.market-comparison--above {
  background: #fff7ed;
  color: var(--accent);
}

.market-comparison--avg {
  background: var(--bg-muted);
  color: var(--text-body);
}

.market-sample {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}


/* ================================
   PRICE HISTORY TIMELINE
================================ */
.price-history-details {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}

.price-history-toggle {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  list-style: none;
}

.price-history-toggle::-webkit-details-marker {
  display: none;
}

.price-history-toggle::after {
  content: '\F282';
  font-family: 'bootstrap-icons';
  margin-left: auto;
  transition: transform 0.2s;
}

details[open] > .price-history-toggle::after {
  transform: rotate(180deg);
}

.price-timeline {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.price-timeline-entry {
  position: relative;
  padding: 0 0 20px 20px;
}

.price-timeline-entry:last-child {
  padding-bottom: 0;
}

.price-timeline-dot {
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--bg-page);
}

.price-timeline-entry--current .price-timeline-dot {
  background: var(--primary);
  width: 14px;
  height: 14px;
  left: -8px;
  top: 3px;
}

.price-timeline-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-timeline-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.price-timeline-entry--current .price-timeline-price {
  color: var(--primary);
  font-size: 1rem;
}

.price-timeline-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.price-timeline-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.price-timeline-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}

.price-timeline-change--down {
  background: #dcfce7;
  color: #16A34A;
}

.price-timeline-change--up {
  background: #fff7ed;
  color: var(--accent);
}

@media (max-width: 767px) {
  .price-insights-card {
    padding: 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .market-bar-container {
    flex-wrap: wrap;
    gap: 6px;
  }

  .market-bar-min,
  .market-bar-max {
    min-width: auto;
    font-size: 0.7rem;
  }
}

/* ================================
   VIDEO TOUR
================================ */
.btn-video-tour {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  width: 100%;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}
.btn-video-tour:hover {
  opacity: 0.9;
  color: white;
}
