/* ============================================================
 * 0576fy.cn - P1 Detail Page Enhancements
 * Premium listing detail page with immersive design
 * ============================================================ */

/* --- Breadcrumb --- */
.fy-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.fy-detail-breadcrumb a {
  color: var(--fy-text-muted, #6b7280);
  text-decoration: none;
  transition: color 0.2s;
}
.fy-detail-breadcrumb a:hover {
  color: var(--fy-primary, #2563eb);
}
.fy-detail-breadcrumb span:last-child {
  color: var(--fy-text, #1a1a2e);
  font-weight: 500;
}
.fy-detail-breadcrumb__sep {
  color: #d1d5db;
  font-size: 10px;
}

/* --- Detail Container (override HivePress defaults) --- */
.fy-detail-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* --- Section Title --- */
.fy-detail-section {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fy-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fy-section-title__icon {
  font-size: 22px;
}

/* --- Parameter Grid --- */
.fy-param-group {
  margin-bottom: 24px;
}
.fy-param-group:last-child {
  margin-bottom: 0;
}
.fy-group-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fy-primary, #2563eb);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fy-group-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fy-primary, #2563eb);
}
.fy-param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.fy-param-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  transition: all 0.2s;
}
.fy-param-item:hover {
  background: #f0f5ff;
  border-color: #bfdbfe;
}
.fy-param-label {
  font-size: 12px;
  color: var(--fy-text-muted, #6b7280);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fy-param-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--fy-text, #1a1a2e);
}

/* Highlight price and key info */
.fy-param-item--highlight {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #93c5fd;
}
.fy-param-item--highlight .fy-param-value {
  color: var(--fy-primary, #2563eb);
  font-size: 18px;
}

/* --- Contact Card (Enhanced) --- */
.fy-contact-card {
  background: linear-gradient(135deg, #fff, #f8fafc);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(37,99,235,0.06);
  border: 1px solid #e5e7eb;
  position: sticky;
  top: 20px;
}
.fy-contact-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.fy-contact-card__profile-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.fy-contact-card__profile-link:hover .fy-contact-card__name {
  color: var(--fy-primary, #2563eb);
}
.fy-contact-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--fy-primary, #2563eb), var(--fy-primary-dark, #1d4ed8));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.fy-contact-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.fy-contact-card__info {
  flex: 1;
  min-width: 0;
}
.fy-contact-card__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
  line-height: 1.3;
}
.fy-contact-card__role {
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.fy-contact-card__role::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}
.fy-contact-card__price {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fy-price-label {
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
  font-weight: 500;
}
.fy-price-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--fy-primary, #2563eb);
}
.fy-contact-card__phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--fy-primary, #2563eb);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  transition: all 0.2s;
}
.fy-contact-card__phone-btn:hover {
  background: var(--fy-primary-dark, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
  color: #fff;
}
.fy-contact-card__phone-btn svg {
  flex-shrink: 0;
}
.fy-contact-card__book-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--fy-primary, #2563eb);
  color: var(--fy-primary, #2563eb);
  border-radius: 12px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.fy-contact-card__book-btn:hover {
  background: var(--fy-primary, #2563eb);
  color: #fff;
}
.fy-contact-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
}

/* --- Floating Mobile Contact --- */
.fy-mobile-contact-bar {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px;
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  align-items: center;
  gap: 10px;
}
.fy-mobile-contact-bar__price {
  flex: 1;
  min-width: 0;
}
.fy-mobile-contact-bar__price strong {
  font-size: 18px;
  color: var(--fy-primary, #2563eb);
  font-weight: 800;
}
.fy-mobile-contact-bar__price small {
  font-size: 12px;
  color: var(--fy-text-muted, #6b7280);
  display: block;
}
.fy-mobile-contact-bar__tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--fy-primary, #2563eb);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.fy-mobile-contact-bar__book {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1.5px solid var(--fy-primary, #2563eb);
  color: var(--fy-primary, #2563eb);
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Share Section --- */
.fy-detail-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
.fy-detail-share__label {
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
}
.fy-detail-share__btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--fy-text-muted, #6b7280);
  text-decoration: none;
}
.fy-detail-share__btn:hover {
  background: var(--fy-primary, #2563eb);
  color: #fff;
}
.fy-detail-share__copied {
  font-size: 12px;
  color: #10b981;
  opacity: 0;
  transition: opacity 0.3s;
}
.fy-detail-share__copied.show {
  opacity: 1;
}

/* --- Related Listings --- */
.fy-related-section {
  margin-top: 32px;
}
.fy-related-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
  margin: 0 0 16px;
}

/* --- Description Block --- */
.fy-detail-desc {
  line-height: 1.8;
  color: var(--fy-text, #1a1a2e);
  font-size: 15px;
}
.fy-detail-desc p {
  margin: 0 0 12px;
}
.fy-detail-desc p:last-child {
  margin-bottom: 0;
}

/* --- Gallery Enhancement (overlay HivePress gallery) --- */
.hp-listing--view-page .hp-listing__images {
  border-radius: 16px !important;
  overflow: hidden;
}
.hp-listing--view-page .hp-listing__images img {
  border-radius: 0 !important;
}

/* --- Layout: Two Column on Desktop --- */
@media (min-width: 768px) {
  .fy-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
  }
  .fy-detail-main {
    min-width: 0;
  }
  .fy-detail-sidebar {
    position: sticky;
    top: 20px;
  }
}

/* --- Mobile: Show floating bar, hide sidebar contact --- */
@media (max-width: 767px) {
  .fy-detail-page {
    padding: 0 16px 100px; /* space for floating bar */
  }
  .fy-detail-section {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .fy-param-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .fy-param-item {
    padding: 10px 12px;
  }
  .fy-param-value {
    font-size: 14px;
  }
  .fy-mobile-contact-bar {
    display: flex;
  }
  .fy-contact-card {
    display: none; /* Hide sidebar card on mobile */
  }
  .fy-detail-layout {
    display: block;
  }
}

/* ===== 房源视频展示 ===== */
.fy-listing-videos-block {
    margin-top: 24px;
}
.fy-listing-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.fy-listing-video-item {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fy-listing-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.fy-listing-video-item video {
    width: 100%;
    height: auto;
    display: block;
    background: #1a1a1a;
    max-height: 320px;
}
@media (max-width: 640px) {
    .fy-listing-videos-grid {
        grid-template-columns: 1fr;
    }
}
