/*
Theme Name: BDS Astra Child
Template: astra
Author: BĐS Trang Minh
Version: 0.1.0
*/

:root {
  --bds-ink: #17202a;
  --bds-muted: #667085;
  --bds-line: #d9e1e8;
  --bds-soft: #f4f7f8;
  --bds-brand: #0f766e;
  --bds-accent: #b42318;
  --bds-gold: #c97716;
  --bds-panel: #ffffff;
}

body {
  background: #eef3f4;
  color: var(--bds-ink);
  overflow-x: hidden;
}

#masthead {
  display: none;
}

.bds-site-banner {
  display: block;
  width: 100%;
  line-height: 0;
}

.bds-site-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* Detail pages: hide the big hero banner and keep just the topbar + gallery,
   so attention stays on the listing instead of scrolling past branding. */
body.single-post .bds-site-banner {
  display: none;
}

.bds-topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 4px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: #eef3f4;
}

.bds-topbar-brand {
  font-weight: 800;
  color: var(--bds-brand);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}

.bds-topbar-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-right: auto;
}

.bds-topbar-menu a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.bds-topbar-menu a:hover,
.bds-topbar-menu a.is-active {
  background: #e8f5f2;
  color: var(--bds-brand);
}

.bds-topbar-search {
  display: flex;
  align-items: center;
  flex: 1 1 220px;
  max-width: 320px;
}

.bds-topbar-search input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--bds-line);
  border-radius: 999px 0 0 999px;
  border-right: none;
  font-size: 13px;
  background: white;
  color: var(--bds-ink);
}

.bds-topbar-search input:focus {
  outline: none;
  border-color: var(--bds-brand);
}

.bds-topbar-search button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--bds-line);
  border-radius: 0 999px 999px 0;
  background: var(--bds-brand);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bds-lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.bds-lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--bds-line);
  background: white;
  color: var(--bds-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.bds-lang-switch a.is-active {
  background: var(--bds-brand);
  border-color: var(--bds-brand);
  color: white;
}

.bds-status-ribbon {
  position: absolute;
  top: 14px;
  left: -34px;
  z-index: 2;
  width: 150px;
  padding: 5px 0;
  transform: rotate(-40deg);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: white;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bds-status-ribbon.is-rented {
  background: var(--bds-gold);
}

.bds-status-ribbon.is-sold {
  background: var(--bds-accent);
}

.bds-status-ribbon.is-unavailable {
  background: #667085;
}

.bds-card-media {
  position: relative;
  overflow: hidden;
}

.bds-card.is-rented .bds-card-media img,
.bds-card.is-sold .bds-card-media img,
.bds-card.is-unavailable .bds-card-media img {
  filter: grayscale(70%);
  opacity: 0.75;
}

.bds-status-banner {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bds-status-banner.is-rented {
  background: var(--bds-gold);
}

.bds-status-banner.is-sold {
  background: var(--bds-accent);
}

.bds-status-banner.is-unavailable {
  background: #667085;
}

.bds-translation-note {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bds-soft);
  color: var(--bds-muted);
  font-size: 13px;
  font-style: italic;
}

.site-content .ast-container,
.ast-container {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding-left: 0;
  padding-right: 0;
}

body.ast-narrow-container .site-content > .ast-container,
body.ast-separate-container.ast-narrow-container .site-content > .ast-container {
  max-width: none !important;
}

#primary,
.site-main {
  width: 100%;
  margin: 0;
}

body.ast-right-sidebar #primary,
body.ast-left-sidebar #primary,
body.ast-separate-container.ast-right-sidebar #primary,
body.ast-separate-container.ast-left-sidebar #primary {
  width: 100%;
  max-width: none;
  border: 0;
  padding: 0;
}

body.ast-right-sidebar #secondary,
body.ast-left-sidebar #secondary,
.widget-area.secondary {
  display: none;
}

.site-content {
  background: transparent;
}

.bds-shell {
  width: min(100%, 1240px) !important;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px 48px;
  overflow-x: hidden;
}

.bds-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--bds-line);
  margin-bottom: 20px;
}

.bds-eyebrow {
  color: var(--bds-brand);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.bds-page-head h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 6px 0 8px;
  max-width: 820px;
}

.bds-page-head p {
  color: var(--bds-muted);
  margin: 0;
  max-width: 720px;
}

.bds-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bds-stat {
  min-width: 96px;
  padding: 12px 14px;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  background: white;
  text-align: center;
}

.bds-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.bds-filter-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  background: white;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bds-filter-bar a:hover,
.bds-filter-bar a.is-active {
  border-color: rgba(15, 118, 110, 0.35);
  background: #e8f5f2;
  color: var(--bds-brand);
}

.bds-stat strong {
  display: block;
  font-size: 22px;
}

.bds-stat span {
  color: var(--bds-muted);
  font-size: 12px;
}

.bds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.bds-card {
  background: white;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
  align-items: stretch;
}

.bds-card-media {
  display: grid;
  place-items: center;
  min-height: 100%;
  background: #f8fafb;
  overflow: visible;
  position: relative;
  border-right: 1px solid var(--bds-line);
  padding: 12px;
}

.bds-card-media img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 336px;
  object-fit: contain;
  display: block;
  background: #f8fafb;
  border-radius: 6px;
}

.bds-media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--bds-muted);
  font-weight: 700;
}

.bds-card-body {
  padding: 15px 16px 17px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.bds-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bds-card-date {
  color: var(--bds-muted);
  font-size: 12px;
  white-space: nowrap;
}

.bds-code-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0b5ed7;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bds-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f5f2;
  color: var(--bds-brand);
  font-size: 12px;
  font-weight: 700;
}

.bds-badge.is-review {
  background: #fff1f0;
  color: var(--bds-accent);
}

.bds-badge.is-market {
  background: #eef4ff;
  color: #175cd3;
}

.bds-card h2 {
  font-size: 19px;
  line-height: 1.3;
  margin: 11px 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bds-card h2 a {
  color: var(--bds-ink);
  text-decoration: none;
}

.bds-card h2 a:hover {
  color: var(--bds-brand);
}

.bds-fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

.bds-fact-grid div,
.bds-detail-facts div {
  border: 1px solid #e6edf0;
  border-radius: 8px;
  background: #fbfdfe;
  padding: 9px 10px;
  min-width: 0;
}

.bds-fact-grid .is-wide {
  grid-column: 1 / -1;
}

.bds-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.bds-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f2f6f7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.bds-fact-grid span,
.bds-detail-facts span {
  display: block;
  color: var(--bds-muted);
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 3px;
}

.bds-fact-grid strong,
.bds-detail-facts strong {
  display: block;
  color: var(--bds-ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bds-card-excerpt {
  color: #475467;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bds-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.bds-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  flex: 1;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--bds-brand);
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bds-card-link:hover {
  background: #115e59;
  color: white;
}

.bds-card-hotline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  flex: 1;
  padding: 0 12px;
  border-radius: 8px;
  background: #c2410c;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.bds-card-hotline:hover {
  background: #9a3412;
  color: white;
}

.bds-card-fb-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  flex: 1;
  padding: 0 12px;
  border-radius: 8px;
  background: #0866ff;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.bds-card-fb-chat:hover {
  background: #0552cc;
  color: white;
}

.bds-hotline-icon {
  color: #facc15;
  flex-shrink: 0;
}

.bds-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--bds-muted);
  font-size: 13px;
  border-top: 1px solid #edf1f3;
  padding-top: 10px;
}

.bds-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) 340px;
  gap: 26px;
  align-items: start;
  justify-content: center;
}

.bds-single-card,
.bds-side-panel {
  background: white;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  min-width: 0;
}

.bds-single-card {
  padding: 28px;
}

.bds-single-card h1 {
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.28;
  margin: 10px 0 12px;
}

.bds-back-link {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--bds-brand);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bds-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.bds-info-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.bds-info-board div {
  border: 1px solid #e6edf0;
  border-radius: 8px;
  background: #fbfdfe;
  padding: 10px 11px;
  min-width: 0;
}

.bds-info-board span {
  display: block;
  color: var(--bds-muted);
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.bds-info-board strong {
  color: var(--bds-ink);
  display: block;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bds-featured img {
  float: left;
  width: min(46%, 360px);
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--bds-line);
  margin: 4px 20px 14px 0;
  background: #f8fafb;
}

.bds-content {
  font-size: 17px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.bds-content p {
  margin: 0 0 13px;
}

.bds-content .bds-imported-post > p:first-child {
  display: none;
}

.bds-content .bds-import-summary {
  display: none;
}

.bds-content h2 {
  clear: both;
  font-size: 22px;
  margin: 22px 0 10px;
}

.bds-content ul {
  margin: 0 0 16px 20px;
}

.bds-content li {
  margin: 0 0 8px;
}

.bds-content img {
  display: inline-block;
  float: left;
  width: auto;
  max-width: min(46%, 360px);
  height: auto;
  max-height: none;
  border-radius: 8px;
  border: 1px solid var(--bds-line);
  margin: 6px 20px 14px 0;
  background: #f8fafb;
}

.bds-content::after {
  clear: both;
  content: "";
  display: table;
}

.bds-content a {
  color: var(--bds-brand);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bds-side-panel {
  padding: 18px;
  position: sticky;
  top: 24px;
}

.bds-side-panel h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.bds-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-top: 16px;
}

.bds-field {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid #edf1f3;
  min-width: 0;
}

.bds-field span {
  color: var(--bds-muted);
  font-size: 12px;
}

.bds-field strong {
  font-size: 15px;
  overflow-wrap: break-word;
}

.bds-review-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
}

.bds-contact-box {
  position: relative;
  margin-top: 16px;
  padding: 20px 18px 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, #fdf8f0 0%, #f6ebdc 100%);
  border: 1px solid #e6d2ac;
  box-shadow: 0 10px 28px -14px rgba(120, 53, 15, 0.35);
  color: #6b3410;
  overflow: hidden;
}

.bds-contact-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b8860b, #d4af37 45%, #b8860b);
}

.bds-contact-box strong {
  display: block;
  margin-bottom: 8px;
  color: #7a1f1f;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.bds-contact-box p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #7a5a3a;
}

.bds-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c0392b, var(--bds-accent));
  color: white;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 6px 16px -6px rgba(180, 35, 24, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bds-action:not(.is-secondary):hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -8px rgba(180, 35, 24, 0.6);
}

.bds-action.is-secondary {
  background: #fffdf9;
  color: #7a1f1f;
  border: 1px solid #d9b98a;
  box-shadow: none;
  font-weight: 700;
}

.bds-action.is-secondary:hover {
  background: #fbf0d9;
  border-color: #b8860b;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -10px rgba(184, 134, 11, 0.5);
}

.bds-action.is-facebook {
  background: linear-gradient(135deg, #1d6ff2, #0b4fc9);
  box-shadow: 0 6px 16px -6px rgba(11, 79, 201, 0.55);
}

.bds-action.is-facebook:hover {
  background: linear-gradient(135deg, #1d6ff2, #0b4fc9);
  box-shadow: 0 10px 22px -8px rgba(11, 79, 201, 0.6);
}

.bds-action.is-disabled {
  opacity: 0.72;
}

.bds-footer {
  margin-top: 24px;
  border-top: 1px solid var(--bds-line);
  background: white;
  color: var(--bds-muted);
  font-size: 14px;
}

.bds-footer .bds-shell {
  padding-top: 18px;
  padding-bottom: 18px;
}

.bds-section-title {
  font-size: 22px;
  margin: 24px 0 10px;
}

.bds-gallery-viewer {
  clear: both;
  margin-top: 18px;
}

.bds-gallery-stage {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 14px;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  background: #f8fafb;
}

.bds-gallery-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--bds-line);
  background: white;
}

.bds-gallery-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.bds-gallery-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  background: white;
  color: var(--bds-ink);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.bds-gallery-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.bds-gallery-count {
  color: var(--bds-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.bds-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 2px 0 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.bds-gallery-thumb {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  padding: 3px;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.bds-gallery-thumb.is-active {
  border-color: var(--bds-brand);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.18);
}

.bds-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
  background: #f8fafb;
}

.bds-single-card img,
.bds-card img {
  max-width: 100%;
}

@media (max-width: 860px) {
  .bds-page-head,
  .bds-single-layout {
    grid-template-columns: 1fr;
  }

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

  .bds-card {
    grid-template-columns: minmax(150px, 40%) minmax(0, 1fr);
  }

  .bds-stats {
    justify-content: flex-start;
  }

  .bds-side-panel {
    position: static;
  }

  .bds-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bds-single-card,
  .bds-side-panel {
    padding: 14px;
  }

  .bds-detail-facts {
    grid-template-columns: 1fr;
  }

  .bds-info-board {
    grid-template-columns: 1fr 1fr;
  }

  .bds-card h2 {
    min-height: 0;
  }

  .bds-featured img,
  .bds-content img {
    float: none;
    display: block;
    width: auto;
    max-width: 100%;
    max-height: none;
    margin: 12px auto 16px;
  }
}

@media (max-width: 520px) {
  .bds-page-head h1 {
    font-size: 28px;
  }

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

  .bds-card {
    grid-template-columns: 1fr;
  }

  .bds-card-media {
    border-right: 0;
    border-bottom: 1px solid var(--bds-line);
    padding: 10px;
  }

  .bds-card-media img {
    max-height: 420px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
  }

  .bds-fact-grid {
    grid-template-columns: 1fr;
  }

  .bds-single-card h1 {
    font-size: 22px;
  }

  .bds-info-board {
    grid-template-columns: 1fr;
  }

  .bds-gallery-stage {
    min-height: 260px;
    padding: 8px;
  }

  .bds-gallery-stage img {
    max-height: 70vh;
  }

  .bds-gallery-thumb {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }
}
