/**
 * LỚP 3: SINGLE-BDS CSS (SEO Center Standard)
 * Chỉ tải trên trang chi tiết Bất động sản
 */

.bds-detail-article {
  padding: 1.5rem 0 2.5rem 0;
  background-color: #ffffff;
}

/* LAYOUT 7 : 3 CÂN ĐỐI CHUẨN (FLEXBOX CHỐNG LỖI TẤT CẢ TRÌNH DUYỆT) */
.bds-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 800px) {
  .bds-detail-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2.25rem;
  }
  .bds-detail-main {
    flex: 0 0 62%;
    width: 62%;
    max-width: 62%;
    min-width: 0;
  }
  .bds-detail-sidebar {
    display: block !important;
    flex: 0 0 35%;
    width: 35%;
    max-width: 35%;
    min-width: 280px;
    position: -webkit-sticky;
    position: sticky;
    top: 130px;
    align-self: flex-start;
    z-index: 20;
  }
}

.bds-detail-main,
.bds-detail-sidebar {
  min-width: 0;
}

.bds-detail-title {
  font-size: 1.85rem;
  line-height: 1.3;
  color: var(--color-text-dark);
  margin-bottom: 0.75rem;
}

.bds-detail-submeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.submeta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.submeta-item svg {
  color: var(--color-primary);
}

/* GALLERY */
.bds-gallery-wrap {
  margin-bottom: 2.25rem;
}
.bds-main-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: var(--shadow-card);
  margin-bottom: 0.85rem;
}
.bds-main-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  transition: opacity 0.3s ease;
  display: block;
}

.bds-thumbs-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.bds-thumb-btn {
  flex: 0 0 95px;
  height: 68px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.bds-thumb-btn.is-active, .bds-thumb-btn:hover {
  border-color: var(--color-primary);
}
.bds-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* SPECS GRID (SEMANTIC <DL> WITH DIV HEADING) */
.bds-specs-section {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.25rem;
}
.specs-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--color-text-dark);
}
.bds-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .bds-specs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.spec-box dt {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-weight: var(--font-weight-semibold);
}
.spec-box dd {
  font-size: 1.05rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-dark);
  margin-left: 0;
}

/* 2 TABS: MÔ TẢ & THIẾT KẾ (CHUẨN HÌNH 3) */
.bds-product-tabs {
  margin: 2.25rem 0;
}
.bds-tab-nav {
  display: flex;
  gap: 6px;
  border-bottom: 2.5px solid var(--color-primary);
  margin-bottom: 1.75rem;
  padding-bottom: 0;
}
.bds-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #e0f2fe;
  color: #0369a1;
  outline: none;
  font-family: inherit;
}
.bds-tab-btn:hover {
  background: #bae6fd;
  color: #0284c7;
}
.bds-tab-btn.is-active {
  background: var(--color-primary);
  color: #ffffff;
}
.bds-tab-panels {
  position: relative;
}
.bds-tab-panel {
  display: none;
}
.bds-tab-panel.is-active {
  display: block;
  animation: bdsTabFadeIn 0.25s ease-in-out;
}
@keyframes bdsTabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CONTENT BODY */
.bds-content-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-main);
  margin-bottom: 2rem;
}
.bds-content-body h2,
.bds-content-body h3,
.bds-content-body .bds-content-heading {
  font-size: 1.35rem;
  font-weight: 700;
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
  margin: 2rem 0 1rem 0;
  color: var(--color-primary);
  line-height: 1.4;
}
.bds-content-body p {
  margin-bottom: 1.25rem;
}
.bds-content-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.bds-content-body li {
  margin-bottom: 0.5rem;
}
.bds-content-body img,
.bds-content-body .bds-content-figure img,
.bds-content-body figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.bds-content-body .bds-content-figure,
.bds-content-body figure {
  margin: 1.5rem 0;
  text-align: center;
}

/* EXPERT CARD */
.bds-expert-card {
  background: linear-gradient(135deg, #fff8f3 0%, #ffffff 100%);
  border: 1px solid rgba(211, 84, 0, 0.25);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  margin-top: 2rem;
}
.expert-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.expert-desc {
  color: var(--color-text-main);
  margin-bottom: 1.25rem;
}
.expert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   PRICE CARDS: MOBILE HERO & DESKTOP STICKY SIDEBAR
   ========================================================================== */

.bds-price-card {
  background: #ffffff;
  border-radius: 14px;
  box-sizing: border-box;
}

/* 1. TRÊN MOBILE (< 800px): HIỂN THỊ NGAY DƯỚI GALLERY, THIẾT KẾ ĐẸP HIỆN ĐẠI (CHUẨN CELLPHONES) */
@media (max-width: 799px) {
  .bds-detail-sidebar {
    display: none !important;
  }
  .bds-price-card-mobile {
    display: block !important;
    background: linear-gradient(145deg, #ffffff 0%, #fffbf7 100%);
    border: 1.5px solid #fed7aa;
    padding: 1.15rem 1.25rem;
    margin: 1.25rem 0 2rem 0;
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.06);
  }
}

/* 2. TRÊN DESKTOP (>= 800px): ẨN MOBILE CARD, HIỂN THỊ SIDEBAR CỐ ĐỊNH 30% */
@media (min-width: 800px) {
  .bds-price-card-mobile {
    display: none !important;
  }
  .bds-detail-sidebar {
    display: block !important;
  }
  .bds-price-card-desktop {
    display: block !important;
    position: sticky;
    top: 130px;
    border: 1.5px solid #ea580c;
    padding: 1.65rem;
    box-shadow: 0 10px 30px rgba(211, 84, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 20;
  }
}

/* HEADER KHỐI GIÁ */
.card-price-header {
  border-bottom: 1px solid #fed7aa;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.card-price-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.price-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.price-status-badge {
  background: #ecfdf5;
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}
.price-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.price-big {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #c2410c;
  line-height: 1.15;
}
@media (max-width: 799px) {
  .price-big {
    font-size: 1.55rem;
  }
}
.discount-pill {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  display: inline-block;
  line-height: 1.3;
}
.price-strike {
  display: block;
  color: #94a3b8;
  font-size: 0.88rem;
  margin-top: 0.25rem;
  text-decoration: line-through;
}

/* HỘP ƯU ĐÃI (BENEFIT BOX) */
.card-benefit-box {
  background: #fff7ed;
  border: 1px dashed #fdba74;
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #9a3412;
}
.benefit-badge-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.benefit-badge-text strong {
  display: block;
  color: #ea580c;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

/* NÚT THAO TÁC (CTA GROUP) */
.card-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.card-cta-group .btn {
  height: 46px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}
.card-cta-group .btn-primary {
  background: var(--gradient-brand, linear-gradient(to right, var(--mainColor, #d35400) 0%, #e67e22 50%, #a04000 100%));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(211, 84, 0, 0.3);
}
.card-cta-group .btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(211, 84, 0, 0.4);
  transform: translateY(-1px);
}
.card-cta-group .btn-teal {
  background: #0068ff;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.25);
}
.card-cta-group .btn-teal:hover {
  background: #0056d6;
  box-shadow: 0 6px 18px rgba(0, 104, 255, 0.35);
  transform: translateY(-1px);
}

/* NÚT THAO TÁC TRÊN MOBILE: 2 CỘT GỌN GÀNG ĐẸP MẮT */
.card-cta-group-mobile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.card-cta-group-mobile .btn {
  height: 42px;
  font-size: 0.88rem;
  padding: 0 0.5rem;
}

/* CHECKLIST CAM KẾT SIDEBAR DESKTOP */
.sidebar-trust-checklist {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.trust-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #475569;
  font-weight: 500;
}
.trust-check-item svg {
  flex-shrink: 0;
}
.btn-block {
  width: 100%;
}

/* RELATED BDS SECTION (CÙNG DỰ ÁN - ZERO BORDER LINE, LIỀN MẠCH TRẮNG) */
.related-bds-section {
  background-color: #ffffff;
  border-top: none;
  padding: 2rem 0 4rem 0;
}
.related-bds-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
}
.related-bds-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.related-bds-subtitle {
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.related-bds-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .related-bds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .related-bds-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
