
/*
  Layout wrapper
  - v2.2.7 "full-bleed" breakout (100vw) can look too wide / off-center depending on theme containers.
  - Use a balanced centered layout instead: keep header/footer from theme, but constrain content.
*/
.bdsdd-fullbleed{
  position:relative;
  width:100%;
  margin:0;
  padding:0 clamp(16px, 2vw, 28px);
  box-sizing:border-box;
}
/* Always allow plugin UI to use full available width; internal container controls max width */
.bdsdd-fullbleed.alignwide{
  max-width:none;
  margin-left:0;
  margin-right:0;
}

/* v2.3.50: Block themes may constrain alignwide inside .is-layout-constrained.
   Break out ONLY the plugin wrapper inside MAIN (header/footer untouched). */
body.bdsdd-main-fullwidth .is-layout-constrained > .bdsdd-fullbleed.alignwide{
  max-width:none !important;
  width:100vw;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
}
body.bdsdd-main-fullwidth{
  overflow-x:clip;
}
.bdsdd-container{
  max-width:var(--bdsdd-container-max, 1240px);
  margin:0 auto;
}

/* Only widen the MAIN area on selected pages (header/footer untouched) */
body.bdsdd-main-fullwidth :where(#primary.site-main, main.site-main, .wp-site-blocks > main){
  max-width:none !important;
  width:100%;
}
.bdsdd-filter{border:1px solid #e6e6e6;border-radius:14px;padding:14px;background:#fff;position:relative;z-index:20}
.bdsdd-filter__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.bdsdd-filter__title{font-weight:700;font-size:16px}
.bdsdd-filter__grid{display:grid;gap:10px}
.bdsdd-grid-6{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:1100px){.bdsdd-grid-6{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.bdsdd-grid-6{grid-template-columns:repeat(1,minmax(0,1fr))}}

.bdsdd-field{display:flex;flex-direction:column;gap:6px}
.bdsdd-field>span{font-size:12px;color:#333;font-weight:600}
.bdsdd-field select,.bdsdd-field input[type="text"],.bdsdd-field input[type="number"],.bdsdd-search{
  width:100%;border:1px solid #d9d9d9;border-radius:10px;padding:10px 10px;font-size:14px;outline:none
}
.bdsdd-field select:disabled,.bdsdd-field input:disabled{opacity:.6;background:#f7f7f7}

.bdsdd-filter__actions{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.bdsdd-filter__hint{flex:1 1 100%;font-size:12px;color:#666}

.bdsdd-btn{border:0;background:#111;color:#fff;padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:700}
.bdsdd-btn:hover{opacity:.92}
.bdsdd-btn--ghost{background:#f2f2f2;color:#111}
.bdsdd-link{background:transparent;border:0;color:#111;text-decoration:underline;cursor:pointer;padding:10px}

.bdsdd-price{display:flex;flex-direction:column;gap:8px}
.bdsdd-chips{display:flex;flex-wrap:wrap;gap:8px}
.bdsdd-chip{border:1px solid #d9d9d9;background:#fff;border-radius:999px;padding:6px 10px;font-size:13px;cursor:pointer;white-space:nowrap}
.bdsdd-chip:hover{border-color:#999}
.bdsdd-chip.is-active{border-color:#111;background:#111;color:#fff}

.bdsdd-range{border:1px solid #ececec;border-radius:12px;padding:10px}
.bdsdd-range__row{position:relative;height:28px;--bdsdd-min:0%;--bdsdd-max:100%}
/* Accent color (brand) + shared UI tokens */
:root{
  --bdsdd-accent:#dd1f26;
  --bdsdd-track:#f0f0f0;
  --bdsdd-radius:16px;
  --bdsdd-radius-sm:12px;
  --bdsdd-border:rgba(0,0,0,.10);
  --bdsdd-border-strong:rgba(0,0,0,.14);
  --bdsdd-shadow-sm:0 1px 2px rgba(0,0,0,.06);
  --bdsdd-shadow-md:0 10px 28px rgba(0,0,0,.12);
}
/*
  Dual-range (min/max) should look like ONE track:
  - grey outside selected range
  - blue between min/max
  We render the track using a ::before layer and make the native tracks transparent.
*/
.bdsdd-range__row::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  transform:translateY(-50%);
  height:8px;
  border-radius:999px;
  background:linear-gradient(
    to right,
    #d0d0d0 0 var(--bdsdd-min),
    var(--bdsdd-accent) var(--bdsdd-min) var(--bdsdd-max),
    #d0d0d0 var(--bdsdd-max) 100%
  );
}
/*
  Dual-range uses 2 inputs (min/max) but should look like a single slider track.
  Overlay both range inputs in one row (one track).
*/
.bdsdd-range__row input[type="range"]{position:absolute;left:0;top:0;width:100%;height:28px;margin:0;pointer-events:none;background:transparent;z-index:2;appearance:none;-webkit-appearance:none;outline:none}
.bdsdd-range__row input[type="range"]::-webkit-slider-runnable-track{background:transparent}
.bdsdd-range__row input[type="range"]::-moz-range-track{background:transparent}
.bdsdd-range__row input[type="range"]::-ms-track{background:transparent;border-color:transparent;color:transparent}
.bdsdd-range__row input[type="range"]::-webkit-slider-thumb{pointer-events:auto}
.bdsdd-range__row input[type="range"]::-moz-range-thumb{pointer-events:auto}
.bdsdd-range__inputs{display:flex;align-items:center;gap:8px;margin-top:8px}
.bdsdd-range__inputs input{max-width:110px}
.bdsdd-unit{font-size:12px;color:#666}

/* Price dropdown (match compact mobile-like list) */
.bdsdd-range__arrow{font-weight:800;opacity:.75}
.bdsdd-range--price{border:1px solid #eee;border-radius:12px;padding:12px}
.bdsdd-price .bdsdd-range--price .bdsdd-range__inputs input{max-width:120px}

/* Compact + aligned price dropdown */
/* Requests:
 * - price dropdown panel width ~280px
 * - inputs (Từ/Đến) align with slider and never overflow
 */
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"]{
  padding:8px;
  width:280px;
  min-width:280px !important;
  max-width:280px !important;
}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range--price{padding:9px;border-radius:12px}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__row{height:26px}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__row input[type="range"]{height:26px}

/* Inputs line up with slider edges */
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__inputs{
  display:grid;
  /* 2 inputs align with slider edges; arrow is fixed; unit is overlaid */
  grid-template-columns: 1fr 16px 1fr;
  gap:8px;
  align-items:center;
  margin-top:10px;
  position:relative;
  width:100%;
  min-width:0;
}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__inputs input{
  width:100%;
  min-width:0;
  max-width:none;
  box-sizing:border-box;
}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__arrow{width:16px;text-align:center}
/* unit suffix sits on the right, without shrinking the max input */
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-unit{position:absolute;right:12px;top:50%;transform:translateY(-50%);opacity:.75}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] [data-bdsdd-price-max-input]{padding-right:34px}

.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-pricelist{margin-top:8px;padding-top:6px}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-price .bdsdd-chip{padding:7px 10px;font-size:14px}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-ddactions{margin-top:10px}
/* Make Reset / Apply look like a proper action row (no sticking together) */
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-ddactions--split{width:100%;gap:12px}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-ddactions--split .bdsdd-link--reset{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border:1px solid #e6e6e6;
  border-radius:12px;
  background:#fff;
  text-decoration:none;
  opacity:1;
  line-height:1;
}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-ddactions--split .bdsdd-link--reset:hover{
  background:#f7f7f7;
  text-decoration:none;
}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-ddactions--split .bdsdd-btn{
  padding:10px 16px;
  border-radius:12px;
  font-weight:700;
}

.bdsdd-pricelist{margin-top:10px;padding-top:6px;border-top:1px solid #eee;display:flex;flex-direction:column}
.bdsdd-price .bdsdd-chip{border:0;background:transparent;border-radius:10px;padding:10px 10px;font-size:14px;cursor:pointer;white-space:normal;text-align:left}
.bdsdd-price .bdsdd-chip:hover{background:#f6f6f6}
.bdsdd-price .bdsdd-chip.is-active{background:transparent;border:0;color:#b00000;font-weight:800}
.bdsdd-priceitem + .bdsdd-priceitem{border-top:1px solid #f0f0f0}

.bdsdd-ddactions--split{justify-content:space-between;align-items:center}
.bdsdd-link--reset{padding:10px 0;text-decoration:none;opacity:.85}
.bdsdd-link--reset:hover{opacity:1;text-decoration:underline}

.bdsdd-modal[hidden]{display:none}
.bdsdd-modal{position:fixed;inset:0;z-index:9999}
.bdsdd-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.bdsdd-modal__panel{position:absolute;right:0;top:0;height:100%;width:min(720px,100%);background:#fff;display:flex;flex-direction:column;box-shadow:-10px 0 30px rgba(0,0,0,.15)}
.bdsdd-modal__head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #eee}
.bdsdd-modal__title{font-weight:800;font-size:16px}
.bdsdd-iconbtn{width:36px;height:36px;border-radius:10px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:20px;line-height:1}

.bdsdd-filterbar__item--icon{display:flex;align-items:center;padding:0 10px;}
.bdsdd-filterbar__item--icon .bdsdd-iconbtn{border-left:0;padding:0;height:40px;width:40px;}
.bdsdd-modal__body{padding:16px;overflow:auto}
.bdsdd-modal__foot{padding:14px 16px;border-top:1px solid #eee;display:flex;gap:10px;justify-content:flex-end}

.bdsdd-section{margin-bottom:18px}
.bdsdd-section__title{font-weight:800;margin-bottom:10px}
.bdsdd-section__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:640px){.bdsdd-section__grid{grid-template-columns:1fr}}

.bdsdd-chipgroup{border:1px solid #eee;border-radius:14px;padding:12px}
.bdsdd-chipgroup__label{font-weight:700;font-size:13px;margin-bottom:8px}
.bdsdd-chipgroup__chips{display:flex;flex-wrap:wrap;gap:8px}
.bdsdd-search{margin-bottom:10px}

.bdsdd-box{border:1px solid #eee;border-radius:14px;padding:12px;margin:12px 0;background:#fff}
.bdsdd-box__title{font-weight:800;margin-bottom:8px}
.bdsdd-box__desc{margin:0 0 10px;color:#666;font-size:14px;line-height:1.45}
.bdsdd-box .bdsdd-chip{font-weight:700;text-decoration:none!important}
.bdsdd-box .bdsdd-chip:hover{ text-decoration:none!important }
.bdsdd-chip__k{opacity:.7;margin-right:6px}

/* ---- Filter bar (v2.2.1) ---- */
.bdsdd-filterbar{display:flex;align-items:stretch;border:1px solid #eee;border-radius:12px;overflow:visible;flex-wrap:wrap;position:relative;background:#fff}
.bdsdd-filterbar__search{display:flex;align-items:center;gap:10px;padding:10px 12px;min-width:280px;flex:1 1 280px}
.bdsdd-filterbar__searchIcon{font-size:18px;opacity:.7}
.bdsdd-filterbar__searchInput{border:0;outline:none;width:100%;font-size:14px;background:transparent}

.bdsdd-filterbar__item{position:relative;border-left:1px solid #eee;flex:0 0 auto;z-index:1}
.bdsdd-filterbar__item.is-open{z-index:99999}
.bdsdd-ddbtn{position:relative;border:0;background:transparent;cursor:pointer;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;padding:10px 34px 10px 12px;min-width:170px;height:100%}
.bdsdd-ddbtn__label{font-size:12px;color:#666;font-weight:700;line-height:1.1}
.bdsdd-ddbtn__value{font-size:14px;color:#111;font-weight:800;line-height:1.25;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bdsdd-ddbtn__caret{position:absolute;right:10px;top:50%;transform:translateY(-50%);opacity:.65}
.bdsdd-ddbtn.is-open{background:#f5f5f5}

.bdsdd-filterbar .bdsdd-iconbtn{border-left:1px solid #eee}

.bdsdd-ddpanel{position:fixed;top:0;left:0;z-index:2147483647;background:#fff;border:1px solid #eee;border-radius:14px;box-shadow:0 14px 34px rgba(0,0,0,.12);padding:10px;min-width:340px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:hidden}
.bdsdd-ddpanel[hidden]{display:none}

.bdsdd-ddsearch{width:100%;border:1px solid #d9d9d9;border-radius:10px;padding:10px;font-size:14px;outline:none;margin-bottom:8px}
.bdsdd-ddtitle{font-weight:800;margin:2px 0 8px 32px}
.bdsdd-ddback{position:absolute;left:10px;top:10px;width:32px;height:32px;border-radius:10px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:18px;line-height:1}

.bdsdd-ddlist{max-height:360px;overflow:auto;display:flex;flex-direction:column;gap:2px}
.bdsdd-dditem{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;border:0;background:transparent;padding:10px 10px;border-radius:10px;text-align:left;cursor:pointer;font-size:14px}
.bdsdd-dditem:hover{background:#f6f6f6}
.bdsdd-dditem.is-active{background:#111;color:#fff}
.bdsdd-dditem.is-active .bdsdd-ddarrow{opacity:1}
.bdsdd-ddarrow{opacity:.55}

.bdsdd-ddactions{display:flex;justify-content:flex-end;margin-top:10px}

@media(max-width:900px){
  .bdsdd-filterbar{overflow:visible}
  .bdsdd-filterbar__item{flex:1 1 160px}
  .bdsdd-ddbtn{min-width:unset;width:100%}
  .bdsdd-ddpanel{min-width:min(360px,100vw - 32px)}
}
@media (max-width: 640px){
  /* Center dropdown panels on mobile (iOS Safari) to avoid off-screen/left-shift panels */
  .bdsdd-ddpanel{
    left:50% !important;
    right:auto !important;
    transform:translateX(-50%) !important;
    width:min(92vw, 420px) !important;
    min-width:unset !important;
  }
}

/* Results (optional) */
.bdsdd-results.is-loading { opacity: .6; pointer-events: none; }
.bdsdd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1024px) { .bdsdd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .bdsdd-grid { grid-template-columns: 1fr; } }
.bdsdd-card { background: #fff; border: 1px solid #eee; border-radius: 14px; overflow: hidden; }
.bdsdd-card__thumb { display:block; aspect-ratio: 16 / 10; background: #f5f5f5; }
.bdsdd-card__thumb img { width:100%; height:100%; object-fit: cover; display:block; }
.bdsdd-card__body { padding: 10px 12px; }
.bdsdd-card__title { color: inherit; text-decoration: none; font-weight: 600; display: block; }
.bdsdd-pagination { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.bdsdd-pagination .page-numbers { display:inline-block; padding: 6px 10px; border:1px solid #eee; border-radius: 10px; text-decoration:none; }
.bdsdd-pagination .current { background: #f4f4f4; }


/* Archive/Taxonomy template wrapper */
.bdsdd-archive-wrap{padding:24px 0;}
.bdsdd-archive-inner{max-width:1200px;margin:0 auto;padding:0 16px;}


/* --- BDSDD: Pro dual-range thumb styling (price range) --- */
.bdsdd-range__row input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width:18px;
  height:18px;
  border-radius:999px;
  background: var(--bdsdd-accent);
  border:2px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  cursor: pointer;
  margin-top: -5px; /* center thumb against 8px visual track */
  pointer-events: auto;
}
.bdsdd-range__row input[type="range"]::-moz-range-thumb{
  width:18px;
  height:18px;
  border-radius:999px;
  background: var(--bdsdd-accent);
  border:2px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  cursor: pointer;
  pointer-events: auto;
}
.bdsdd-range__row input[type="range"]:focus{ outline: none !important; }

/* nicer focus ring */
.bdsdd-range__row input[type="range"]:focus::-webkit-slider-thumb{
  box-shadow: 0 0 0 4px rgba(221,31,38,.22), 0 2px 10px rgba(0,0,0,.18);
}
.bdsdd-range__row input[type="range"]:focus::-moz-range-thumb{
  box-shadow: 0 0 0 4px rgba(221,31,38,.22), 0 2px 10px rgba(0,0,0,.18);
}

/* =========================
   Mobile polish: sharper borders + better reset button
   ========================= */
@media (max-width: 640px){
  /* Outer filter card: crisper border on iOS */
  .bdsdd-filter{
    border-color: rgba(0,0,0,.14);
    border-width: 1.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
  }

  /* Make the filter bar look like a clear, segmented card */
  .bdsdd-filterbar{
    display: grid;
    grid-template-columns: 1fr;
    border-color: rgba(0,0,0,.14);
    border-width: 1.5px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }

  .bdsdd-filterbar__search{
    min-width: 0;
    flex: unset;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,0,0,.10);
  }

  .bdsdd-filterbar__item{
    border-left: 0;
    border-top: 1px solid rgba(0,0,0,.10);
  }

  .bdsdd-ddbtn{
    width: 100%;
    min-width: 0;
    padding: 12px 46px 12px 14px;
  }
  .bdsdd-ddbtn__label{ font-size: 12px; }
  .bdsdd-ddbtn__value{ font-size: 15px; }

  /* Reset button: larger touch target, aligned & premium look */
  .bdsdd-filterbar__item--icon{
    padding: 10px 12px;
    justify-content: flex-end;
    align-items: center;
  }
  .bdsdd-filterbar__item--icon .bdsdd-iconbtn{
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1.5px solid rgba(0,0,0,.14);
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bdsdd-accent);
  }
  .bdsdd-filterbar__item--icon .bdsdd-iconbtn:hover{ filter: brightness(0.99); }
  .bdsdd-filterbar__item--icon .bdsdd-iconbtn:active{ transform: translateY(1px); }
}

/* Related content (Bài viết -> Dự án Hub + các bài cùng dự án) */
.bdsdd-related-hub{margin-top:24px;padding:16px;border:1px solid rgba(0,0,0,.08);border-radius:16px;background:#fff}
.bdsdd-related-hub__title{margin:0 0 10px;font-size:20px;line-height:1.2}
.bdsdd-related-hub__hub a{font-weight:700;text-decoration:none}
.bdsdd-related-hub__hub a:hover{text-decoration:underline}
.bdsdd-related-hub__subtitle{margin:14px 0 8px;font-weight:700}
.bdsdd-related-hub__list{margin:0;padding-left:18px}
.bdsdd-related-hub__list li{margin:6px 0}


/* =========================
   Related posts grid + load more
   ========================= */
.bdsdd-related-posts{
  margin-top: 24px;
}
.bdsdd-related-posts__title{
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #111;
}


/* Main Hub featured card (in related section) */
.bdsdd-related-mainhub{
  margin: 0 0 18px;
}
.bdsdd-related-mainhub__label{
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(17,17,17,.55);
}

.bdsdd-card--hub{
  display: flex;
  gap: 0;
  overflow: hidden;
}
.bdsdd-card--hub .bdsdd-card__img{
  flex: 0 0 42%;
  min-height: 180px;
}
.bdsdd-card--hub .bdsdd-card__body{
  flex: 1;
}
.bdsdd-card--hub .bdsdd-card__title{
  font-size: 22px;
  line-height: 1.25;
  margin-top: 8px;
}
.bdsdd-card--hub .bdsdd-card__excerpt{
  -webkit-line-clamp: 3;
  font-size: 15px;
}
.bdsdd-card__more{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
}

@media (max-width: 719px){
  .bdsdd-card--hub{ flex-direction: column; }
  .bdsdd-card--hub .bdsdd-card__img{ flex: 0 0 auto; min-height: 0; }
}

/* 3-column responsive grid */
.bdsdd-related-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 720px){
  .bdsdd-related-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px){
  .bdsdd-related-grid{ grid-template-columns: repeat(3, 1fr); }
}

.bdsdd-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* Load more */
.bdsdd-related-loadmore-wrap{
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.bdsdd-related-loadmore{
  appearance: none;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}
.bdsdd-related-loadmore:hover{ filter: brightness(0.98); }
.bdsdd-related-loadmore:disabled{ opacity: .6; cursor: not-allowed; }
.bdsdd-related-loadmore-status{
  font-size: 13px;
  line-height: 1.4;
  color: rgba(0,0,0,.62);
}

.bdsdd-card__img{
  display: block;
  aspect-ratio: 16 / 9;
  background: #f2f2f2;
  overflow: hidden;
}
.bdsdd-card__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bdsdd-card__img--placeholder{
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ececec, #f7f7f7);
}

.bdsdd-card__body{
  padding: 14px 14px 16px;
}
.bdsdd-card__meta,
.bdsdd-card__meta2{
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0,0,0,.62);
  text-transform: none;
  margin: 0 0 4px;
}
.bdsdd-card__meta span,
.bdsdd-card__meta2 span{
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-left: 4px;
  color: rgba(0,0,0,.60);
}

.bdsdd-card__title{
  margin: 10px 0 10px;
  font-size: 18px;
  line-height: 1.22;
  font-weight: 800;
  text-transform: none;
}
.bdsdd-card__title a{
  color: inherit;
  text-decoration: none;
}
.bdsdd-card__title a:hover{ text-decoration: underline; }

.bdsdd-card__excerpt{
  font-size: 15px;
  line-height: 1.55;
  color: rgba(0,0,0,.68);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bdsdd-card__more{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  text-decoration: none;
  color: #111;
}

.bdsdd-carousel__controls{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}
.bdsdd-carousel__btn{
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  color: rgba(0,0,0,.85);
}
.bdsdd-carousel__btn:hover{ color: #000; }




/* === Mobile/iOS polish: prevent Safari auto-zoom on inputs ===
   iOS Safari will auto-zoom focused inputs if computed font-size < 16px.
   Keep form fields in BDSDD filters at >=16px on mobile to avoid "zoom + broken layout".
*/
.bdsdd-container,
.bdsdd-filter,
.bdsdd-ddpanel{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 782px){
  .bdsdd-filter input[type="text"],
  .bdsdd-filter input[type="search"],
  .bdsdd-filter input[type="number"],
  .bdsdd-filter select,
  .bdsdd-ddpanel input[type="text"],
  .bdsdd-ddpanel input[type="search"],
  .bdsdd-ddpanel input[type="number"],
  .bdsdd-ddpanel select{
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  .bdsdd-filter input::placeholder,
  .bdsdd-ddpanel input::placeholder{
    font-size: 16px !important;
    line-height: 1.25 !important;
  }
}


/* =============================
   Mobile Optimization Pack v1
   - Cleaner borders
   - More modern spacing/typography
   - Better dropdown sheets + backdrop
   - More professional reset button
============================== */

/* Backdrop for dropdown panels */
.bdsdd-ddoverlay{
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,.22);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 2147483646;
  display: none;
}
.bdsdd-ddoverlay.is-active{ display:block; }

@media (max-width: 782px){
  /* Make borders on mobile more visible (PC already looks crisp) */
  .bdsdd-filter{ border-color: rgba(0,0,0,.14); border-radius: var(--bdsdd-radius); box-shadow: var(--bdsdd-shadow-sm); }
  .bdsdd-filterbar{ border-color: rgba(0,0,0,.12); border-radius: var(--bdsdd-radius-sm); overflow: hidden; }
  .bdsdd-filterbar__item{ background:#fff; }
  .bdsdd-filterbar__item:not(:first-child){ border-top: 1px solid rgba(0,0,0,.08); }

  /* Search input row */
  .bdsdd-filterbar__search{ padding: 10px 12px; }
  .bdsdd-filterbar__searchInput{
    height: 48px;
    border-radius: 14px;
    border-color: rgba(0,0,0,.12);
    background: #fff;
  }

  /* Dropdown trigger rows */
  .bdsdd-ddbtn{ padding: 12px 12px; }
  .bdsdd-ddbtn__label{ font-size: 12px; opacity:.7; }
  .bdsdd-ddbtn__value{ font-size: 18px; letter-spacing: -.01em; }
  .bdsdd-ddbtn__caret{ opacity: .75; }

  /* Reset button row (make it look like a real action, not a lonely square) */
  .bdsdd-filterbar__item--icon{ padding: 0; }
  .bdsdd-filterbar__item--icon .bdsdd-iconbtn{
    width: 100% !important;
    height: 56px !important;
    border: 0;
    border-radius: 0 !important;
    background: #fff;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    color: var(--bdsdd-accent);
  }
  .bdsdd-filterbar__item--icon .bdsdd-iconbtn::after{
    content: "Đặt lại bộ lọc";
    color: #111;
    font-weight: 800;
    font-size: 15px;
  }
  .bdsdd-filterbar__item--icon .bdsdd-iconbtn:hover{ background:#fafafa; }

  /* Dropdown panels: bottom-sheet feel */
  .bdsdd-ddpanel{
    border-radius: 18px;
    border-color: rgba(0,0,0,.14);
    box-shadow: var(--bdsdd-shadow-md);
    max-height: calc(100dvh - 24px);
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .bdsdd-ddsearch{ height: 46px; border-radius: 14px; border-color: rgba(0,0,0,.12); }
  .bdsdd-ddlist{ max-height: min(56vh, 460px); }
  .bdsdd-dditem{ padding: 12px 12px; border-color: rgba(0,0,0,.06); }
  .bdsdd-dditem.is-active{ background: rgba(221,31,38,.10); }
  .bdsdd-dditem.is-active span{ color: #111; }

  /* Results cards/list */
  .bdsdd-card{ border-color: rgba(0,0,0,.12); border-radius: var(--bdsdd-radius); box-shadow: var(--bdsdd-shadow-sm); }
  .bdsdd-card__title{ font-size: 18px; }
  .bdsdd-card__meta{ font-size: 13px; }
}

@media (max-width: 640px){
  /* Lock background scroll when a dropdown is open */
  html.bdsdd-ddopen,
  html.bdsdd-ddopen body{ overflow: hidden; }

  /* Make modal full-screen on small phones for a more app-like UX */
  .bdsdd-modal__panel{
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    margin-top: 10vh;
    height: 90vh;
  }
  .bdsdd-modal__header{ padding: 14px 16px; }
  .bdsdd-modal__title{ font-size: 16px; }
  .bdsdd-modal__body{ padding: 14px 16px; }
  .bdsdd-modal__footer{ padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}


/* =============================
   Phân khu (CPT phan_khu)
   ============================= */
.bdsdd-phan-khu{
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(17,17,17,.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17,17,17,.06);
}
.bdsdd-phan-khu__title{
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}
.bdsdd-phan-khu__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.bdsdd-phan-khu__card{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(17,17,17,.10);
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.bdsdd-phan-khu__card:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17,17,17,.10);
  border-color: rgba(17,17,17,.16);
}
.bdsdd-phan-khu__thumb{
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(17,17,17,.04);
  flex: 0 0 auto;
}
.bdsdd-phan-khu__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bdsdd-phan-khu__placeholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(17,17,17,.06), rgba(17,17,17,.02));
}
.bdsdd-phan-khu__meta{ min-width: 0; }
.bdsdd-phan-khu__name{
  font-weight: 800;
  line-height: 1.25;
  font-size: 16px;
  margin: 0;
}
.bdsdd-phan-khu__desc{
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  opacity: .72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bdsdd-phan-khu__back{
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(17,17,17,.10);
  border-radius: 14px;
  background: rgba(17,17,17,.03);
}
.bdsdd-phan-khu__back a{
  text-decoration: none;
  font-weight: 700;
  color: inherit;
}

@media (max-width: 1024px){
  .bdsdd-phan-khu__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .bdsdd-phan-khu{
    padding: 14px;
    border-radius: 20px;
  }
  .bdsdd-phan-khu__grid{ grid-template-columns: 1fr; }
  .bdsdd-phan-khu__card{
    padding: 12px;
    border-radius: 18px;
  }
  .bdsdd-phan-khu__thumb{
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
  .bdsdd-phan-khu__title{ font-size: 18px; }
}

/* === Phân khu (big cards on single Dự án) ===
   We render this section wrapped by .bdsdd-phan-khu-block and reuse .bdsdd-card--hub.
   The rules below remove the outer "white panel" so the big cards can breathe and
   match the modern card style shown on the site.
*/
.bdsdd-phan-khu-block .bdsdd-phan-khu{
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.bdsdd-phan-khu-block .bdsdd-phan-khu__title{
  font-size: 26px;
  line-height: 1.18;
  margin: 0 0 14px;
}
.bdsdd-phan-khu-block .bdsdd-phan-khu__grid{
  /* Each Phân khu should stand out on its own row (desktop + mobile) */
  grid-template-columns: 1fr !important;
  gap: 18px;
}

.bdsdd-phan-khu-block .bdsdd-phan-khu__project{
  margin: 0 0 18px;
}

.bdsdd-phan-khu__hub .bdsdd-card__excerpt{
  margin-top: 8px;
}

@media (max-width: 640px){
  .bdsdd-phan-khu-block .bdsdd-phan-khu__title{ font-size: 22px; }
}
/* v2.6.7: Override core alignwide width inside constrained layouts */
.is-layout-constrained > .alignwide{
  max-width: var(--wp--style--global--content-size, 800px) !important;
}


/* v2.3.43: Semantic wrappers for project context on Phân khu pages */
.bdsdd-project-context__title{
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 900;
}
@media (max-width: 640px){
  .bdsdd-project-context__title{ font-size: 22px; }
}

/* =========================================================
   BDSDD - Cross-theme / cross-browser normalize PRICE slider
   Fix: thumb/track bị lệch do theme override input[type=range]
   Scope: only inside BDSDD filter/modal/dropdown panels
   ========================================================= */

/* Isolate box sizing to avoid theme messing internal layout */
.bdsdd-filter, .bdsdd-modal, .bdsdd-ddpanel{
  --bdsdd-range-track-h: 8px;
  --bdsdd-range-thumb: 18px;
  --bdsdd-range-thumb-border: 2px;
}
.bdsdd-filter *, .bdsdd-filter *::before, .bdsdd-filter *::after,
.bdsdd-modal *,  .bdsdd-modal *::before,  .bdsdd-modal *::after,
.bdsdd-ddpanel *, .bdsdd-ddpanel *::before, .bdsdd-ddpanel *::after{
  box-sizing: border-box !important;
}

/* Ensure visual track height stays consistent (some themes override ::before height) */
.bdsdd-range__row::before{
  height: var(--bdsdd-range-track-h) !important;
}

/* Reset the range itself (themes often add padding/line-height/appearance) */
.bdsdd-range__row input[type="range"]{
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;

  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;

  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  /* Prevent theme typography from affecting intrinsic metrics */
  font-size: 0 !important;
  line-height: 0 !important;

  /* Dual-range: allow drag only on thumbs */
  pointer-events: none !important;

  outline: none !important;
}

/* Make input hit-area stable across browsers/themes */
.bdsdd-range__row,
.bdsdd-range__row input[type="range"]{
  height: 28px !important;
}
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__row,
.bdsdd-ddpanel[data-bdsdd-ddpanel="price"] .bdsdd-range__row input[type="range"]{
  height: 26px !important;
}

/* Normalize native tracks to transparent; set height to avoid baseline shift */
.bdsdd-range__row input[type="range"]::-webkit-slider-runnable-track{
  height: var(--bdsdd-range-track-h) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
}
.bdsdd-range__row input[type="range"]::-moz-range-track{
  height: var(--bdsdd-range-track-h) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
}
.bdsdd-range__row input[type="range"]::-moz-range-progress{
  height: var(--bdsdd-range-track-h) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
}

/* Thumb: force center align relative to visual track */
.bdsdd-range__row input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none !important;
  appearance: none !important;
  width: var(--bdsdd-range-thumb) !important;
  height: var(--bdsdd-range-thumb) !important;
  border-radius: 999px !important;
  background: var(--bdsdd-accent, #dd1f26) !important;
  border: var(--bdsdd-range-thumb-border) solid #fff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.18) !important;

  /* center thumb against track */
  margin-top: calc((var(--bdsdd-range-track-h) - var(--bdsdd-range-thumb)) / 2) !important;

  cursor: pointer !important;
  pointer-events: auto !important;
}
.bdsdd-range__row input[type="range"]::-moz-range-thumb{
  width: var(--bdsdd-range-thumb) !important;
  height: var(--bdsdd-range-thumb) !important;
  border-radius: 999px !important;
  background: var(--bdsdd-accent, #dd1f26) !important;
  border: var(--bdsdd-range-thumb-border) solid #fff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.18) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Focus ring (consistent even if theme adds default outlines) */
.bdsdd-range__row input[type="range"]:focus{ outline: none !important; }
.bdsdd-range__row input[type="range"]:focus::-webkit-slider-thumb{
  box-shadow: 0 0 0 4px rgba(221,31,38,.22), 0 2px 10px rgba(0,0,0,.18) !important;
}
.bdsdd-range__row input[type="range"]:focus::-moz-range-thumb{
  box-shadow: 0 0 0 4px rgba(221,31,38,.22), 0 2px 10px rgba(0,0,0,.18) !important;
}
.bdsdd-range__row input[type="range"]::-moz-focus-outer{ border: 0 !important; }


/* v284: smaller dropdown panels */
.bdsdd-ddpanel{min-width:180px !important;}
