
/* ==========================================================================
   v9.6.0 BED BUILDER STUDIO — giai đoạn 1 (đi cùng assets/js/nhe-v9-builder-studio.js)
   Chỉ áp khi body có .nhe-studio (JS thêm). Tắt nhanh: ?studio=0
   ========================================================================== */
html body.nhe-studio .hero-section-v2,
html body.nhe-studio #builderPromoBanner,
html body.nhe-studio .accordion-next-btn { display: none !important; }

/* Wizard: chỉ hiện bước đang mở; đầu bước thành tiêu đề tĩnh */
html body.nhe-studio #builderAccordion .accordion-step.is-collapsed { display: none !important; }
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header { cursor: default; }
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header .accordion-step-summary,
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header .accordion-chevron { display: none !important; }

/* Hàng chip bước */
html body.nhe-studio .nhe-studio-steps {
  position: sticky; top: 64px; z-index: 40;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 2px 12px; margin: 0 0 12px;
  background: #FAF8F5; border-bottom: 1px solid rgba(74, 59, 50, .1);
}
html body.nhe-studio .nhe-studio-steps::-webkit-scrollbar { display: none; }
html body.nhe-studio .nhe-step-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 8px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 13.5px/1 'Be Vietnam Pro', sans-serif; background: #F4F0EA; color: #7A6558;
  transition: background-color .2s ease, color .2s ease;
}
html body.nhe-studio .nhe-step-chip i {
  font-style: normal; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; background: #EBE5DC; color: #7A6558;
}
html body.nhe-studio .nhe-step-chip.is-done { background: #E8EDE2; color: #44683B; }
html body.nhe-studio .nhe-step-chip.is-done i { background: #44683B; color: #fff; }
html body.nhe-studio .nhe-step-chip.is-current { background: #5A3A28; color: #fff; }
html body.nhe-studio .nhe-step-chip.is-current i { background: #fff; color: #5A3A28; }
html body.nhe-studio .nhe-step-chip:focus-visible { outline: 2px solid #5A3A28; outline-offset: 2px; }

/* Thanh giá đáy: dùng chung PC + điện thoại */
html body.nhe-studio #mobileStickyBottomBar { display: flex !important; }
html body.nhe-studio .nhe-bar-trust { display: none; }
html body.nhe-studio { padding-bottom: 92px; }

/* Header studio (chỉ điện thoại/tablet) */
html body.nhe-studio .nhe-studio-head { display: none; }

/* ---------------- Máy tính ---------------- */
@media (min-width: 1025px) {
  html body.nhe-studio .builder-container {
    display: grid !important;
    grid-template-columns: 600px minmax(0, 1fr) !important;
    gap: 32px !important;
    max-width: 1440px; margin: 0 auto !important;
    padding: 20px 40px 24px !important;
    align-items: start;
  }
  html body.nhe-studio #previewSection { position: sticky !important; top: 80px !important; width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important; }
  html body.nhe-studio #previewSection .preview-content-wrapper { flex: none !important; min-height: 0 !important; }
  html body.nhe-studio #desktopFloatingSummaryBar { display: none !important; }
  html body.nhe-studio #builderAccordion { width: auto !important; max-width: none !important; }

  html body.nhe-studio #mobileStickyBottomBar {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    height: 76px; padding: 0 40px !important; gap: 28px !important; align-items: center !important;
    background: rgba(252, 249, 245, .95) !important; backdrop-filter: blur(24px);
    box-shadow: 0 -10px 30px -14px rgba(36, 28, 23, .2) !important;
    border-top: 0 !important; z-index: 80 !important;
  }
  html body.nhe-studio .nhe-bar-trust { display: flex; gap: 18px; flex: 1; min-width: 0; }
  html body.nhe-studio .nhe-bar-trust span {
    display: inline-flex; align-items: center; gap: 6px;
    font: 500 12.5px/1 'Be Vietnam Pro', sans-serif; color: #5C4A3E; white-space: nowrap;
  }
  html body.nhe-studio .nhe-bar-trust span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #44683B; }
  html body.nhe-studio #mobileStickyCtaBtn { min-height: 52px; padding: 0 26px !important; border-radius: 999px !important; }
  html body.nhe-studio #mobileStickyPriceCol { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; }
  html body.nhe-studio #mobileStickyPriceValue { font: 600 24px/1 Lora, serif !important; color: #241C17 !important; }
  html body.nhe-studio #mobileStickySavingsBadge { margin-left: 10px; }
  html body.nhe-studio #mobileOpenSummaryBtn {
    width: auto !important; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
    font: 600 13px/1 'Be Vietnam Pro', sans-serif !important; color: #5A3A28 !important; text-decoration: underline; text-underline-offset: 4px;
  }
  html body.nhe-studio { padding-bottom: 96px; }
}

/* ---------------- Điện thoại / tablet ---------------- */
@media (max-width: 1024px) {
  html body.nhe-studio .nhe-announcement-bar,
  html body.nhe-studio .nhc-announce,
  html body.nhe-studio .nhe-site-header { display: none !important; }

  html body.nhe-studio .nhe-studio-head {
    position: sticky; top: 0; z-index: 70;
    display: flex; align-items: center; justify-content: space-between;
    height: 52px; padding: 0 4px;
    background: rgba(250, 248, 245, .94); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(74, 59, 50, .08);
  }
  html body.nhe-studio .nhe-studio-title { font: 500 17px/1 Lora, serif; color: #241C17; }
  html body.nhe-studio .nhe-studio-ib {
    width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  }
  html body.nhe-studio .nhe-studio-ib svg { width: 22px; height: 22px; stroke: #4A3B32; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

  html body.nhe-studio #previewSection {
    top: 52px !important; margin-top: 0 !important; transition: box-shadow .2s ease;
    height: auto !important; min-height: 0 !important; max-height: none !important;
  }
  /* .preview-content-wrapper là phần tử flex (flex:1) trong cột -> điều khiển bằng flex-basis */
  html body.nhe-studio #previewSection .preview-content-wrapper {
    flex: 0 0 220px !important; height: 220px !important; min-height: 0 !important;
    transition: flex-basis .25s ease, height .25s ease;
  }
  html body.nhe-studio #previewSection .canvas-side,
  html body.nhe-studio #previewSection .canvas-container,
  html body.nhe-studio #previewSection .canvas-wrapper { height: 100% !important; }
  html body.nhe-studio #previewSection .bed-canvas:not(.hidden) { height: 100% !important; width: auto !important; max-width: 100% !important; margin: 0 auto !important; }

  /* Canvas thu nhỏ khi cuộn */
  html body.nhe-studio.nhe-canvas-mini #previewSection { box-shadow: 0 8px 16px -12px rgba(36, 28, 23, .35); cursor: pointer; }
  html body.nhe-studio.nhe-canvas-mini #previewSection .preview-header { display: none !important; }
  html body.nhe-studio.nhe-canvas-mini #previewSection .preview-content-wrapper { flex-basis: 96px !important; height: 96px !important; }

  html body.nhe-studio .nhe-studio-steps { margin: 0 -8px 10px; padding: 8px 16px 10px; }
  html body.nhe-studio .nhe-step-chip { height: 34px; padding: 0 12px 0 6px; font-size: 12.5px; gap: 6px; }
  html body.nhe-studio .nhe-step-chip i { width: 22px; height: 22px; font-size: 11px; }
  html body.nhe-studio .nhe-mob-floating-contact { bottom: 96px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body.nhe-studio #previewSection .preview-content-wrapper,
  html body.nhe-studio .nhe-step-chip { transition: none !important; }
}

/* ==========================================================================
   v9.6.1 — sửa canvas PC + bước 1 + ẩn footer; v9.7.0 GĐ2 — thanh set, bước Bộ
   ========================================================================== */
html body.nhe-studio footer.nhe-ft { display: none !important; }

@media (min-width: 1025px) {
  /* Canvas: phần canvas lấy hết khung (bỏ 26% từng để dành cho thẻ giá cũ) */
  html body.nhe-studio #previewSection .preview-content-wrapper { height: min(584px, calc(100vh - 352px)) !important; }
  html body.nhe-studio #previewSection .canvas-side { flex: 1 1 auto !important; height: auto !important; max-height: none !important; min-height: 0 !important; }
  html body.nhe-studio #previewSection .canvas-side .canvas-container { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; max-height: none !important; aspect-ratio: auto !important; }
  html body.nhe-studio #previewSection .price-side { display: none !important; }
  /* Bước 1: 4 thẻ vải trải đều cả cột */
  html body.nhe-studio #groupFabric .fabric-tabs { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; width: 100% !important; max-width: none !important; justify-content: stretch !important; }
  html body.nhe-studio #groupFabric .fabric-tab { width: auto !important; min-width: 0 !important; max-width: none !important; padding: 22px 12px 16px !important; min-height: 112px !important; }
}

/* Thanh set dưới canvas: Vải (chung) | Set 1 · Set 2 · + Thêm set */
html body.nhe-studio .nhe-studio-setbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  padding: 10px 0 2px; min-width: 0; overflow-x: auto; scrollbar-width: none;
}
html body.nhe-studio .nhe-studio-setbar::-webkit-scrollbar { display: none; }
html body.nhe-studio .nhe-fabric-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px;
  border: 0; border-radius: 999px; background: #FEFDFB; box-shadow: inset 0 0 0 1px rgba(74, 59, 50, .22);
  font: 500 13px/1 'Be Vietnam Pro', sans-serif; color: #3D3027; cursor: pointer; white-space: nowrap;
}
html body.nhe-studio .nhe-fabric-pill b { color: #241C17; font-weight: 600; }
html body.nhe-studio .nhe-fabric-pill span { color: #5A3A28; text-decoration: underline; text-underline-offset: 3px; }
html body.nhe-studio .nhe-studio-setbar #multiSetHeaderBar {
  display: flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 0 0 0 8px !important;
  border: 0 !important; border-left: 1px solid rgba(74, 59, 50, .2) !important; background: transparent !important; box-shadow: none !important;
  flex: 0 0 auto; width: auto !important;
}
html body.nhe-studio .nhe-studio-setbar #multiSetTabsWrap { display: flex !important; gap: 6px; flex-wrap: nowrap !important; overflow: visible !important; }
html body.nhe-studio .nhe-studio-setbar .set-nav-btn {
  height: 36px !important; padding: 0 14px !important; border-radius: 999px !important; border: 0 !important;
  background: #F4F0EA !important; color: #3D3027 !important; font: 500 13px/1 'Be Vietnam Pro', sans-serif !important; box-shadow: none !important;
  display: inline-flex !important; align-items: center; gap: 6px; white-space: nowrap;
}
html body.nhe-studio .nhe-studio-setbar .set-nav-btn.active { background: #241C17 !important; color: #fff !important; font-weight: 600 !important; }
html body.nhe-studio .nhe-studio-setbar #btnAddSet {
  height: 36px !important; padding: 0 14px !important; border-radius: 999px !important; border: 0 !important;
  background: transparent !important; box-shadow: inset 0 0 0 1.5px rgba(74, 59, 50, .28) !important;
  color: #5A3A28 !important; font: 600 13px/1 'Be Vietnam Pro', sans-serif !important; white-space: nowrap; width: auto !important;
}
html body.nhe-studio .nhe-studio-setbar #btnAddSet svg { display: none; }

/* Bước Bộ: danh sách bật/tắt (thay lưới ô +/− cũ, vẫn giữ DOM cũ cho JS) */
html body.nhe-studio #groupCombo #productGrid,
html body.nhe-studio #groupCombo > .section-label { display: none !important; }
html body.nhe-studio .nhe-items {
  display: flex; flex-direction: column; margin: 14px 0 10px; padding: 4px 16px;
  border-radius: 14px; background: #FEFDFB; box-shadow: inset 0 0 0 1px rgba(74, 59, 50, .14);
}
html body.nhe-studio .nhe-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px;
  font: 500 14px/1.3 'Be Vietnam Pro', sans-serif; color: #241C17;
}
html body.nhe-studio .nhe-item + .nhe-item { border-top: 1px solid rgba(74, 59, 50, .08); }
html body.nhe-studio .nhe-sw {
  position: relative; width: 46px; height: 28px; border: 0; border-radius: 999px; padding: 0; cursor: pointer;
  background: #D9D0C5; transition: background-color .2s ease; flex: 0 0 auto;
}
html body.nhe-studio .nhe-sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(36, 28, 23, .25); transition: transform .2s ease; }
html body.nhe-studio .nhe-sw.is-on { background: #5A3A28; }
html body.nhe-studio .nhe-sw.is-on i { transform: translateX(18px); }
html body.nhe-studio .nhe-sw:focus-visible, html body.nhe-studio .nhe-seg button:focus-visible { outline: 2px solid #5A3A28; outline-offset: 2px; }
html body.nhe-studio .nhe-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #F4F0EA; }
html body.nhe-studio .nhe-seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 8px 12px; cursor: pointer;
  font: 600 12.5px/1 'Be Vietnam Pro', sans-serif; color: #7A6558; white-space: nowrap;
}
html body.nhe-studio .nhe-seg button.is-on { background: #FEFDFB; color: #241C17; box-shadow: 0 1px 4px rgba(36, 28, 23, .1); }
html body.nhe-studio .nhe-items-limit { margin: 4px 0 10px; font: 400 12.5px/1.45 'Be Vietnam Pro', sans-serif; color: #7A6558; }

@media (max-width: 1024px) {
  html body.nhe-studio .nhe-studio-setbar { padding: 8px 12px 6px; background: #FAF8F5; }
  html body.nhe-studio .nhe-fabric-pill, html body.nhe-studio .nhe-studio-setbar .set-nav-btn, html body.nhe-studio .nhe-studio-setbar #btnAddSet { height: 32px !important; font-size: 12px !important; padding: 0 11px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body.nhe-studio .nhe-sw, html body.nhe-studio .nhe-sw i { transition: none !important; }
}

/* ==========================================================================
   v9.8.0 GIAI ĐOẠN 3 — bước Màu gọn, Phối 2 màu nổi bật, thanh bộ phận; bước 4 gọn
   ========================================================================== */
/* Tiêu đề bước: bỏ "BƯỚC N" + số tròn (đã có ở hàng chip) */
html body.nhe-studio #builderAccordion .accordion-step-badge,
html body.nhe-studio #builderAccordion .accordion-step-num { display: none !important; }
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header { padding-top: 14px !important; padding-bottom: 10px !important; }

/* Phối ngẫu nhiên + Lịch sử: 1 hàng gọn */
html body.nhe-studio #colorHarmonyToolbar { display: flex !important; justify-content: flex-end !important; align-items: center; gap: 8px; padding: 0 !important; margin: 0 0 12px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
html body.nhe-studio #colorHarmonyToolbar .harmony-toolbar-info { display: none !important; }
html body.nhe-studio #colorHarmonyToolbar .harmony-btn-group { display: flex; gap: 8px; }
html body.nhe-studio #colorHarmonyToolbar button { height: 36px !important; padding: 0 14px !important; border-radius: 999px !important; font-size: 13px !important; }

/* Thẻ Phối 2 màu */
html body.nhe-studio #groupMixMode.nhe-mix {
  padding: 14px 16px !important; margin: 0 0 16px !important; border-radius: 16px !important;
  background: #F6EEE6 !important; box-shadow: inset 0 0 0 1.5px rgba(90, 58, 40, .35) !important; border: 0 !important;
}
html body.nhe-studio .nhe-mix-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
html body.nhe-studio .nhe-mix-head img { flex: 0 0 auto; width: 96px; height: 72px; border-radius: 12px; object-fit: cover; background: #fff; }
html body.nhe-studio .nhe-mix-txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
html body.nhe-studio .nhe-mix-txt b { font: 600 16px/1.25 'Be Vietnam Pro', sans-serif; color: #241C17; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
html body.nhe-studio .nhe-mix-txt em { font: 600 10px/20px 'Be Vietnam Pro', sans-serif; font-style: normal; letter-spacing: .06em; height: 20px; padding: 0 8px; border-radius: 999px; background: #5A3A28; color: #fff; }
html body.nhe-studio .nhe-mix-txt small { font: 400 12.5px/1.45 'Be Vietnam Pro', sans-serif; color: #5C4A3E; }
/* bỏ công tắc tổng + hộp gợi ý; luôn hiện các lựa chọn từng món */
html body.nhe-studio #groupMixMode .toggle-row,
html body.nhe-studio #groupMixMode #dualToneHintBanner { display: none !important; }
html body.nhe-studio #groupMixMode #mixOptions { display: flex !important; flex-wrap: wrap; gap: 8px; max-height: none !important; opacity: 1 !important; visibility: visible !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; }
html body.nhe-studio #groupMixMode .mix-option {
  display: inline-flex !important; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px !important; margin: 0 !important;
  border-radius: 999px !important; background: #FEFDFB !important; box-shadow: inset 0 0 0 1px rgba(74, 59, 50, .2) !important; border: 0 !important;
  font: 600 13px/1 'Be Vietnam Pro', sans-serif !important; color: #241C17 !important;
}
html body.nhe-studio #groupMixMode .mix-option .mix-option-label { font: inherit !important; color: inherit !important; }
html body.nhe-studio #groupMixMode #pillowMixSubPanel { flex: 1 1 100%; margin-top: 4px !important; padding: 10px !important; border-radius: 12px !important; background: #FEFDFB !important; }
html body.nhe-studio #groupMixMode .pillow-mix-mode-card img { max-height: 110px !important; object-fit: cover; }
html body.nhe-studio #groupMixMode .pillow-mix-subpanel-title { font-size: 12.5px !important; margin-bottom: 8px !important; }

/* Bước Màu: bỏ bộ chọn set trùng (đã có dưới canvas) */
html body.nhe-studio #step3SetSelectorBar { display: none !important; }

/* Thanh chọn bộ phận: hàng chip gọn, vuốt ngang trên điện thoại */
html body.nhe-studio #componentTabs { display: flex !important; flex-wrap: wrap; gap: 8px !important; grid-template-columns: none !important; }
html body.nhe-studio #componentTabs .component-tab {
  flex: 0 0 auto; width: auto !important; min-height: 44px; padding: 6px 14px 6px 10px !important; border-radius: 12px !important;
  display: inline-flex !important; align-items: center; gap: 8px;
}
html body.nhe-studio #componentTabs .component-tab.active { box-shadow: inset 0 0 0 1.5px #5A3A28 !important; background: #EFE6DD !important; }

/* Bước 4: bỏ chỉnh kiểu may riêng cho chăn / gối ôm (mỗi set tối đa 1 cái) */
html body.nhe-studio #tailoringOverrideAccordionDuvet,
html body.nhe-studio #tailoringOverrideAccordionBolster { display: none !important; }

@media (max-width: 1024px) {
  html body.nhe-studio #componentTabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px 4px; }
  html body.nhe-studio #componentTabs::-webkit-scrollbar { display: none; }
  html body.nhe-studio .nhe-mix-head img { width: 64px; height: 48px; }
  html body.nhe-studio .nhe-mix-txt b { font-size: 15px; }
}

/* ==========================================================================
   v9.9.0 POLISH + GIAI ĐOẠN 4 (Xem lại & đặt)
   Bỏ "khung lồng khung": bước không còn thẻ bao; 1 kiểu thẻ cho mọi lựa chọn;
   nhịp khoảng cách 16px (điện thoại) / 20px (máy tính).
   ========================================================================== */
html body.nhe-studio {
  --nhe-card-bg: #FEFDFB;
  --nhe-card-line: rgba(74, 59, 50, .16);
  --nhe-card-on-bg: #EFE6DD;
  --nhe-card-on-line: #5A3A28;
  --nhe-gap: 16px;
}
@media (min-width: 1025px) { html body.nhe-studio { --nhe-gap: 20px; } }

/* Bỏ min-height đã thêm ở v9.7/9.8 (gây cuộn vào khoảng trống) */
html body.nhe-studio #builderAccordion { min-height: 0 !important; }

/* ---- Bước: không khung, tiêu đề + nội dung ---- */
html body.nhe-studio #builderAccordion,
html body.nhe-studio .scrollable-workspace { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
html body.nhe-studio #builderAccordion .accordion-step-nav { display: none !important; }
html body.nhe-studio #builderAccordion .accordion-step {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html body.nhe-studio #builderAccordion .accordion-step.is-open {
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  border-radius: 0 !important; padding: 0 0 8px !important; margin: 0 !important; overflow: visible !important;
}
html body.nhe-studio #builderAccordion .accordion-step.is-open::before,
html body.nhe-studio #builderAccordion .accordion-step.is-open::after { display: none !important; }
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 2px 0 14px !important; min-height: 0 !important; cursor: default; pointer-events: none;
}
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-step-title {
  font: 500 22px/1.25 Lora, serif !important; color: #241C17 !important; letter-spacing: -.01em; margin: 0 !important;
}
@media (min-width: 1025px) {
  html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-step-title { font-size: 26px !important; }
}
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-body,
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner {
  padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
  max-height: none !important; overflow: visible !important;
}
html body.nhe-studio #builderAccordion .accordion-body-inner { display: flex !important; flex-direction: column !important; gap: var(--nhe-gap) !important; }
html body.nhe-studio #builderAccordion .control-section,
html body.nhe-studio #builderAccordion .control-group { margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
html body.nhe-studio #builderAccordion .control-section > * + * { margin-top: 12px; }

/* Lề hai bên đều nhau */
@media (max-width: 1024px) {
  /* .builder-container đã có padding 8px → nội dung cách mép 16px, thẳng hàng với dải chip */
  html body.nhe-studio #builderAccordion { margin: 0 8px !important; width: auto !important; }
  html body.nhe-studio .nhe-studio-steps { margin: 0 0 18px !important; padding: 10px 16px !important; }
  html body.nhe-studio .nhe-studio-setbar { padding: 10px 8px 8px !important; }
}
/* .accordion-body là grid (hiệu ứng mở) → item cần min-width:0, nếu không bị nội dung đẩy rộng hơn màn hình */
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-body { grid-template-columns: minmax(0, 1fr) !important; }
html body.nhe-studio #builderAccordion .accordion-body-inner { min-width: 0 !important; width: 100% !important; }
html body.nhe-studio #colorHarmonyToolbar .harmony-btn-group { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
html body.nhe-studio #colorHarmonyToolbar .harmony-btn-group > * { min-width: 0 !important; width: auto !important; }

/* ---- 1 kiểu thẻ cho mọi lựa chọn ---- */
html body.nhe-studio #groupFabric .fabric-tab,
html body.nhe-studio #groupCombo .set-tab,
html body.nhe-studio #builderAccordion .style-card {
  background: var(--nhe-card-bg) !important; border: 0 !important; box-shadow: inset 0 0 0 1px var(--nhe-card-line) !important;
  border-radius: 14px !important; transition: box-shadow .15s ease, background-color .15s ease;
}
html body.nhe-studio #groupFabric .fabric-tab.active,
html body.nhe-studio #groupCombo .set-tab.active,
html body.nhe-studio #builderAccordion .style-card.active {
  background: var(--nhe-card-on-bg) !important; box-shadow: inset 0 0 0 1.5px var(--nhe-card-on-line) !important;
}
html body.nhe-studio #groupFabric .fabric-tabs { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; grid-auto-rows: 1fr; }
@media (min-width: 1025px) { html body.nhe-studio #groupFabric .fabric-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; } }
html body.nhe-studio #groupFabric .fabric-tab { min-height: 96px !important; padding: 18px 10px 14px !important; width: auto !important; max-width: none !important; }
html body.nhe-studio #btnToggleFabricGuideAccordion {
  background: transparent !important; border: 0 !important; box-shadow: none !important; min-height: 44px; padding: 8px 0 !important;
  justify-content: flex-start !important; color: #5A3A28 !important; text-decoration: underline; text-underline-offset: 4px; width: auto !important;
}

/* Bước 2: lưới gói đều 2 cột; ghi chú tên + ưu đãi nhẹ hơn */
html body.nhe-studio #groupCombo .set-selection { display: block !important; }
html body.nhe-studio #comboGrid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; width: 100% !important; max-width: none !important; }
html body.nhe-studio #groupCombo .set-tab { width: auto !important; max-width: none !important; min-height: 76px; padding: 14px 12px !important; margin: 0 !important; }
html body.nhe-studio #groupCombo .set-tab.combo-item-custom { display: none !important; } /* "Mua lẻ" = tắt bớt món ở danh sách bên dưới */
html body.nhe-studio #nheSetNamingNote { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; font-size: 12.5px !important; color: #7A6558 !important; }
html body.nhe-studio #groupCombo .nhe-items { margin: 0 !important; }
html body.nhe-studio #comboBanner { background: #F2EEE6 !important; border: 0 !important; box-shadow: none !important; border-radius: 14px !important; padding: 12px 14px !important; text-align: left !important; }
html body.nhe-studio #comboBanner * { text-align: left !important; }

/* Bước 3: bỏ khung hướng dẫn Linshang + khối "đang chọn" thành dòng */
html body.nhe-studio .linshang-disclaimer-bar { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; font-size: 12px !important; }
html body.nhe-studio #groupColorPicker .current-selection { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
html body.nhe-studio #groupColorPicker > .section-label { font: 600 14px/1.3 'Be Vietnam Pro', sans-serif !important; text-align: left !important; }
html body.nhe-studio #groupColorPicker .color-section-subtitle { text-align: left !important; }
html body.nhe-studio #colorSearch { border-radius: 999px !important; min-height: 44px; padding: 0 16px !important; }

/* Bước 4: bỏ khung lồng (độ cao nệm, kiểu may) */
html body.nhe-studio .set-mattress-slider-container,
html body.nhe-studio .set-tailoring-container,
html body.nhe-studio .set-tailoring-toggle-bar,
html body.nhe-studio .classified-item-sizes-wrapper { background: transparent !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
html body.nhe-studio .classified-size-card { padding: 12px 0 !important; border-left: 0 !important; border-right: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
html body.nhe-studio .mattress-height-dual-control { background: var(--nhe-card-bg) !important; box-shadow: inset 0 0 0 1px var(--nhe-card-line) !important; border: 0 !important; border-radius: 14px !important; }
html body.nhe-studio .style-card-img-wrap { border: 0 !important; box-shadow: none !important; border-radius: 10px !important; }
html body.nhe-studio .classified-item-sizes-title { font: 600 14px/1.3 'Be Vietnam Pro', sans-serif !important; }

/* ---- Bước 5 = Xem lại & đặt (GĐ4) ---- */
html body.nhe-studio #groupContact .contact-header .step-badge,
html body.nhe-studio #groupContact .contact-header .contact-title { display: none !important; }
html body.nhe-studio #groupContact .contact-header { padding: 0 !important; margin: 0 !important; text-align: left !important; }
html body.nhe-studio #groupContact .contact-subtitle { font-size: 13px !important; color: #7A6558 !important; text-align: left !important; }
html body.nhe-studio #builderBomStatusBadge { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; justify-content: flex-start !important; color: #44683B !important; }
html body.nhe-studio #tailorOrderTicketBox { border-radius: 14px !important; box-shadow: inset 0 0 0 1px var(--nhe-card-line) !important; border: 0 !important; background: var(--nhe-card-bg) !important; }
html body.nhe-studio #groupContact .contact-cta-box { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; display: flex !important; flex-direction: column; gap: 12px; }
html body.nhe-studio #builderBuyNowBtn { display: none !important; } /* nút chính = "Đặt may ngay" ở thanh đáy */
html body.nhe-studio #builderAddToCartBtn {
  min-height: 48px !important; border-radius: 999px !important; background: transparent !important;
  box-shadow: inset 0 0 0 1.5px #5A3A28 !important; border: 0 !important; color: #5A3A28 !important; font-weight: 600 !important;
}
html body.nhe-studio #builderTrustStrip { display: none !important; } /* đã có ở thanh giá */
html body.nhe-studio #builderZaloConsultBtn {
  background: transparent !important; border: 0 !important; box-shadow: none !important; min-height: 40px !important;
  color: #5A3A28 !important; text-decoration: underline; text-underline-offset: 4px; padding: 0 !important; justify-content: center !important;
}
html body.nhe-studio #builderUtilityRow { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; gap: 8px !important; }
html body.nhe-studio #builderUtilityRow > * { background: #F4F0EA !important; border: 0 !important; box-shadow: none !important; border-radius: 12px !important; }
html body.nhe-studio #groupContact .contact-note { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; font-size: 12px !important; color: #7A6558 !important; }
/* Hay mua kèm (ruột) chuyển sang bước 5 */
html body.nhe-studio #groupContact #extraItemsBuilderPanel { margin: 0 !important; }
html body.nhe-studio #extraItemsBuilderPanel { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
html body.nhe-studio #extraItemsToggleBtn { background: #F4F0EA !important; border: 0 !important; box-shadow: none !important; border-radius: 14px !important; }

@media (prefers-reduced-motion: reduce) {
  html body.nhe-studio #groupFabric .fabric-tab, html body.nhe-studio #groupCombo .set-tab, html body.nhe-studio #builderAccordion .style-card { transition: none !important; }
}
html body.nhe-studio #builderAccordion #classifiedItemSizesWrapper { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
html body.nhe-studio #builderAccordion .classified-item-sizes-title { padding: 0 0 4px !important; margin: 0 !important; }

/* ==========================================================================
   v9.9.1 POLISH (phản hồi 16/11 chiều)
   ========================================================================== */

/* ---- Thanh giá đáy (PC): thẳng hàng mép canvas trái & cột bước phải, không dạt ra mép màn hình lớn ---- */
@media (min-width: 1025px) {
  html body.nhe-studio #mobileStickyBottomBar {
    padding-left: max(40px, calc((100% - 1440px) / 2 + 40px)) !important;
    padding-right: max(40px, calc((100% - 1440px) / 2 + 40px)) !important;
  }
}

/* ---- Bước 3: thẻ Phối 2 màu = 1 khung duy nhất, bên trong phẳng ---- */
html body.nhe-studio #builderAccordion #groupMixMode.nhe-mix {
  background: #F6EEE6 !important; border-radius: 16px !important; padding: 16px !important;
  box-shadow: none !important; border: 0 !important;
}
html body.nhe-studio #builderAccordion #groupMixMode .nhe-mix-head { margin: 0 0 12px !important; }
html body.nhe-studio #builderAccordion #groupMixMode .mix-toggle {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important;
}
html body.nhe-studio #builderAccordion #pillowMixSubPanel {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 14px 0 0 !important; margin: 0 !important;
}
/* Ảnh 2 kiểu phối gối: hiện đủ ảnh (trước bị giới hạn 110px nên bị cắt) */
html body.nhe-studio #groupMixMode .pillow-mix-mode-mockup { aspect-ratio: 4 / 3 !important; height: auto !important; max-height: none !important; }
html body.nhe-studio #groupMixMode .pillow-mix-mode-card img,
html body.nhe-studio #groupMixMode .pillow-mix-mode-mockup img { max-height: none !important; height: 100% !important; width: 100% !important; object-fit: cover !important; }
html body.nhe-studio #groupMixMode .pillow-mix-mode-card { background: #FEFDFB !important; border-radius: 14px !important; overflow: hidden; }

/* Nút Phối ngẫu nhiên / Lịch sử: chia đều cả hàng ở mọi kích thước */
html body.nhe-studio #colorHarmonyToolbar { justify-content: stretch !important; width: 100% !important; }
html body.nhe-studio #colorHarmonyToolbar .harmony-btn-group { width: 100% !important; }
html body.nhe-studio #colorHarmonyToolbar .harmony-btn-group > * { min-height: 44px !important; justify-content: center !important; }

/* ---- Thẻ kiểu may: viền chọn bao trọn thẻ (trước bị ảnh che, chỉ thấy viền ở phần chữ) ---- */
html body.nhe-studio #builderAccordion .style-card { position: relative !important; overflow: hidden !important; box-shadow: none !important; background: var(--nhe-card-bg) !important; }
html body.nhe-studio #builderAccordion .style-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4;
  box-shadow: inset 0 0 0 1px var(--nhe-card-line); transition: box-shadow .15s ease;
}
html body.nhe-studio #builderAccordion .style-card:hover::after { box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .45); }
html body.nhe-studio #builderAccordion .style-card.active::after { box-shadow: inset 0 0 0 2px #5A3A28; }
html body.nhe-studio #builderAccordion .style-card.active { background: var(--nhe-card-on-bg) !important; }
html body.nhe-studio #builderAccordion .style-card.active .style-card-info { background: var(--nhe-card-on-bg) !important; }
html body.nhe-studio #builderAccordion .style-card.active .style-card-title { color: #241C17 !important; font-weight: 700 !important; }
html body.nhe-studio #builderAccordion .style-card-img-wrap { border-radius: 0 !important; }
html body.nhe-studio #builderAccordion .style-card .style-card-title { line-height: 1.3 !important; }

/* ---- Nút "Tùy chọn kiểu may & Chần gòn": thẻ mở rộng rõ ràng, sang hơn ---- */
html body.nhe-studio #builderAccordion .set-tailoring-container { border-radius: 14px !important; }
html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar {
  display: flex !important; align-items: center !important; gap: 12px !important;
  min-height: 60px !important; padding: 12px 14px 12px 16px !important; border-radius: 14px !important; cursor: pointer;
  background: linear-gradient(135deg, #FBF8F4 0%, #F0E6DB 55%, #E9DCCD 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .2), inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 2px rgba(74, 59, 50, .08) !important;
  border: 0 !important; transition: box-shadow .15s ease;
}
html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar:hover { box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .4), inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 6px rgba(74, 59, 50, .1) !important; }
html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar:focus-visible { outline: 2px solid #5A3A28; outline-offset: 2px; }
html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar .nhe-cta-pill-pulse { display: none !important; }
html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar::before {
  content: ''; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
  background: #5A3A28 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F6EEE6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M20 4 8.1 15.9M14.5 14.5 20 20M8.1 8.1 12 12'/%3E%3C/svg%3E") center / 18px no-repeat;
}
html body.nhe-studio #builderAccordion .set-tailoring-title {
  flex: 1 1 auto; display: flex !important; flex-direction: column; gap: 2px;
  font: 600 15px/1.3 'Be Vietnam Pro', sans-serif !important; color: #241C17 !important; letter-spacing: 0 !important; text-transform: none !important;
}
html body.nhe-studio #builderAccordion .set-tailoring-title .nhe-tailor-sub { font: 400 12.5px/1.35 'Be Vietnam Pro', sans-serif; color: #7A6558; }
html body.nhe-studio #builderAccordion .set-tailoring-chevron {
  flex: 0 0 32px; width: 32px !important; height: 32px !important; padding: 9px; border-radius: 50%;
  background: #FEFDFB; box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .2); color: #5A3A28; transition: transform .2s ease;
}
html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar[aria-expanded="true"] .set-tailoring-chevron { transform: rotate(180deg); }
html body.nhe-studio #builderAccordion .set-tailoring-inner { padding: 16px 0 4px !important; }
html body.nhe-studio #builderAccordion .set-tailoring-group + .set-tailoring-group { margin-top: 18px !important; }
html body.nhe-studio #builderAccordion .set-tailoring-group-title,
html body.nhe-studio #builderAccordion .set-tailoring-group > h4,
html body.nhe-studio #builderAccordion .set-tailoring-group > .group-title { font: 600 13px/1.3 'Be Vietnam Pro', sans-serif !important; letter-spacing: .04em !important; color: #241C17 !important; }

/* Nhiều set: chỉ thẻ set là khung, bên trong rộng rãi */
html body.nhe-studio #builderAccordion .set-accordion-item { border-radius: 16px !important; overflow: hidden; }
html body.nhe-studio #builderAccordion .set-accordion-item.is-expanded { box-shadow: 0 1px 3px rgba(74, 59, 50, .06) !important; }
html body.nhe-studio #builderAccordion .set-accordion-header { min-height: 52px; }
html body.nhe-studio #builderAccordion .combo-size-hint { background: transparent !important; border: 0 !important; padding: 0 !important; }

@media (max-width: 600px) {
  html body.nhe-studio #builderAccordion .set-accordion-inner { padding: 12px !important; }
  html body.nhe-studio #builderAccordion .master-group-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  html body.nhe-studio #builderAccordion .style-card .style-card-img-wrap { aspect-ratio: 4 / 3; height: auto !important; }
  html body.nhe-studio #builderAccordion .style-card .style-card-img { width: 100% !important; height: 100% !important; object-fit: cover; }
  html body.nhe-studio #builderAccordion .style-card .style-card-title { font-size: 13px !important; }
  html body.nhe-studio #builderAccordion .set-tailoring-toggle-bar { padding: 10px 12px !important; }
  html body.nhe-studio #groupMixMode .pillow-mix-mode-grid,
  html body.nhe-studio #groupMixMode .pillow-mix-mode-cards { gap: 10px !important; }
}

/* ---- Bước 5 ---- */
html body.nhe-studio .nhe-review-label { margin: 0 0 8px !important; font: 600 13px/1.3 'Be Vietnam Pro', sans-serif !important; letter-spacing: .02em; color: #241C17; }
html body.nhe-studio .nhe-review-sets:empty { display: none; }
html body.nhe-studio .nhe-review-row {
  display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid rgba(74, 59, 50, .12);
}
html body.nhe-studio .nhe-review-row:last-child { border-bottom: 1px solid rgba(74, 59, 50, .12); }
html body.nhe-studio .nhe-review-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html body.nhe-studio .nhe-review-row b { font: 600 14px/1.3 'Be Vietnam Pro', sans-serif; color: #241C17; }
html body.nhe-studio .nhe-review-row small { font: 400 12.5px/1.4 'Be Vietnam Pro', sans-serif; color: #7A6558; }
html body.nhe-studio .nhe-review-edit {
  flex: 0 0 auto; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .45); color: #5A3A28; font: 600 13px/1 'Be Vietnam Pro', sans-serif;
}
html body.nhe-studio .nhe-review-edit:hover { background: #F4F0EA; }
html body.nhe-studio .nhe-review-edit:focus-visible { outline: 2px solid #5A3A28; outline-offset: 2px; }
html body.nhe-studio .nhe-review-ticket-btn {
  display: none; width: 100%; min-height: 48px; margin: 4px 0 0; border: 0; border-radius: 14px; cursor: pointer;
  background: #FEFDFB; box-shadow: inset 0 0 0 1px var(--nhe-card-line); color: #241C17;
  font: 600 14px/1 'Be Vietnam Pro', sans-serif; align-items: center; justify-content: space-between; padding: 0 16px;
}
html body.nhe-studio .nhe-review-ticket-btn::after { content: '›'; font-size: 20px; color: #7A6558; }
@media (max-width: 1024px) { html body.nhe-studio .nhe-review-ticket-btn { display: flex; } }
html body.nhe-studio .nhe-addon { display: flex; flex-direction: column; }
html body.nhe-studio #extraItemsToggleBtn { min-height: 64px; padding: 12px 14px !important; }
html body.nhe-studio .nhe-more { margin: 0; }
html body.nhe-studio .nhe-more > summary {
  list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font: 500 13px/1 'Be Vietnam Pro', sans-serif; color: #7A6558;
}
html body.nhe-studio .nhe-more > summary::-webkit-details-marker { display: none; }
html body.nhe-studio .nhe-more > summary::after { content: '⋯'; font-size: 16px; }
html body.nhe-studio .nhe-more[open] > summary { color: #241C17; }
html body.nhe-studio .nhe-more > #builderUtilityRow { margin-top: 8px !important; }
html body.nhe-studio #groupContact .contact-cta-box { gap: 8px !important; }
html body.nhe-studio #builderBomStatusBadge { font-size: 13px !important; gap: 8px !important; align-items: flex-start !important; }

/* ---- Header studio điện thoại: Trang chủ · tiêu đề + ? · giỏ hàng · menu ---- */
html body.nhe-studio .nhe-studio-head { display: none; }
@media (max-width: 1024px) {
  html body.nhe-studio .nhe-studio-head {
    display: grid !important; grid-template-columns: 88px 1fr 88px !important; align-items: center !important;
    padding: 0 8px !important; gap: 0 !important;
  }
  html body.nhe-studio .nhe-studio-head .nhe-head-l,
  html body.nhe-studio .nhe-studio-head .nhe-head-r { display: flex; align-items: center; gap: 0; }
  html body.nhe-studio .nhe-studio-head .nhe-head-r { justify-content: flex-end; }
  html body.nhe-studio .nhe-studio-head .nhe-head-c { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
  html body.nhe-studio .nhe-studio-head .nhe-studio-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body.nhe-studio .nhe-studio-head .nhe-studio-ib { position: relative; width: 44px !important; height: 44px !important; flex: 0 0 44px; }
  html body.nhe-studio .nhe-studio-head .nhe-studio-ib.is-sm { width: 32px !important; height: 32px !important; flex: 0 0 32px; }
  html body.nhe-studio .nhe-studio-head .nhe-studio-ib.is-sm svg { width: 18px; height: 18px; }
  html body.nhe-studio .nhe-studio-head .nhe-head-count {
    position: absolute; top: 6px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: #5A3A28; color: #fff; font: 700 10px/16px 'Be Vietnam Pro', sans-serif; text-align: center;
  }
  html body.nhe-studio .nhe-studio-head .nhe-head-count[data-n="0"] { display: none; }
}

/* ==========================================================================
   v9.9.2
   ========================================================================== */
/* Header studio điện thoại: [nhà][Studio phối màu] ........ [?][giỏ][menu] */
@media (max-width: 1024px) {
  html body.nhe-studio .nhe-studio-head { grid-template-columns: auto 1fr auto !important; padding: 0 4px 0 6px !important; }
  html body.nhe-studio .nhe-studio-head .nhe-head-c { justify-content: flex-start !important; padding-left: 2px; }
  html body.nhe-studio .nhe-studio-head .nhe-studio-title { font-size: 18px !important; }
  html body.nhe-studio .nhe-studio-head .nhe-head-r .nhe-studio-ib { width: 40px !important; height: 44px !important; flex: 0 0 40px; }
  html body.nhe-studio .nhe-studio-head .nhe-head-r .nhe-studio-ib svg { width: 21px; height: 21px; }
}

/* Phối 2 màu: món không có trong set -> mờ, không bấm được */
html body.nhe-studio #mixOptions .is-disabled { opacity: .45; cursor: not-allowed !important; filter: grayscale(.4); }
html body.nhe-studio #mixOptions .is-disabled * { cursor: not-allowed !important; pointer-events: none; }

/* Popup "Chi tiết đơn may đo" (PC): hiện mượt */
@keyframes nheFadeIn { from { opacity: 0; } to { opacity: 1; } }
/* CSS cũ khoá transform & opacity bằng !important -> dùng translate/scale/filter riêng */
@keyframes nhePopIn { from { filter: opacity(0); translate: 0 20px; scale: .97; } to { filter: opacity(1); translate: 0 0; scale: 1; } }
html body.nhe-studio #desktopQuoteModalBackdrop:not(.hidden) { animation: nheFadeIn .22s ease both; }
html body.nhe-studio #desktopBreakdownPopover.is-entering,
html body.nhe-studio #desktopBreakdownPopover:not(.hidden) { animation: nhePopIn .34s cubic-bezier(.16, 1, .3, 1) both !important; }

/* Nhãn "Xoay 360°": nhỏ gọn, tự ẩn sau vài giây, ẩn khi canvas thu nhỏ */
@keyframes nheHintOut { to { opacity: 0; visibility: hidden; } }
html body.nhe-studio #builder3dHint {
  bottom: 8px !important; padding: 3px 10px !important; font-size: 11px !important; pointer-events: none;
  white-space: nowrap;
  animation: nheHintOut .5s ease 3.5s forwards;
}
html body.nhe-studio.nhe-canvas-mini #builder3dHint { display: none !important; }
@media (max-width: 1024px) {
  html body.nhe-studio #builder3dHint { font-size: 10.5px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body.nhe-studio #desktopQuoteModalBackdrop:not(.hidden),
  html body.nhe-studio #desktopBreakdownPopover.is-entering,
  html body.nhe-studio #desktopBreakdownPopover:not(.hidden) { animation: none !important; }
}

/* ==========================================================================
   v9.9.2 — Chuyển động tinh tế cho nút, thẻ, bước (cảm giác premium)
   Dùng thuộc tính riêng translate/scale/filter để không đụng transform !important của CSS cũ.
   ========================================================================== */
html body.nhe-studio {
  --nhe-ease: cubic-bezier(.16, 1, .3, 1);
  --nhe-ease-std: cubic-bezier(.2, .7, .2, 1);
}

/* Phản hồi chạm/hover cho mọi nút & thẻ chọn */
html body.nhe-studio :is(.nhe-step-chip, .nhe-studio-ib, .nhe-fabric-pill, .set-nav-btn, #btnAddSet, .nhe-review-edit, .nhe-review-ticket-btn,
  #mobileStickyCtaBtn, #builderAddToCartBtn, #btnRandomHarmony, #btnHarmonyHistory, .nhe-seg > button, .nhe-sw,
  #groupFabric .fabric-tab, #groupCombo .set-tab, #builderAccordion .style-card, .pillow-mix-mode-card, .mix-option,
  .component-tab, .color-cat-tabs > *, .set-tailoring-toggle-bar, #extraItemsToggleBtn, .utility-action-btn, .nhe-more > summary) {
  transition: background-color .2s var(--nhe-ease-std), box-shadow .2s var(--nhe-ease-std), color .2s var(--nhe-ease-std),
              border-color .2s var(--nhe-ease-std), opacity .2s var(--nhe-ease-std), translate .2s var(--nhe-ease), scale .16s var(--nhe-ease) !important;
}
html body.nhe-studio :is(.nhe-step-chip, .nhe-studio-ib, .nhe-fabric-pill, .set-nav-btn, #btnAddSet, .nhe-review-edit, .nhe-review-ticket-btn,
  #mobileStickyCtaBtn, #builderAddToCartBtn, #btnRandomHarmony, #btnHarmonyHistory, .nhe-seg > button, .nhe-sw, .component-tab,
  .color-cat-tabs > *, .set-tailoring-toggle-bar, #extraItemsToggleBtn, .utility-action-btn):active { scale: .97; }
html body.nhe-studio :is(#groupFabric .fabric-tab, #groupCombo .set-tab, #builderAccordion .style-card, .pillow-mix-mode-card):active { scale: .985; }
@media (hover: hover) {
  html body.nhe-studio :is(#groupFabric .fabric-tab, #groupCombo .set-tab, #builderAccordion .style-card, .pillow-mix-mode-card):hover { translate: 0 -2px; }
  html body.nhe-studio :is(#mobileStickyCtaBtn, #builderAddToCartBtn):hover { translate: 0 -1px; }
  html body.nhe-studio #mobileStickyCtaBtn:hover { box-shadow: 0 8px 22px rgba(36, 28, 23, .22) !important; }
}
html body.nhe-studio #mobileStickyCtaBtn svg { transition: translate .25s var(--nhe-ease); }
html body.nhe-studio #mobileStickyCtaBtn:hover svg { translate: 3px 0; }

/* Ô màu: nổi nhẹ khi rê, nảy khi chọn */
html body.nhe-studio .color-swatch { transition: translate .2s var(--nhe-ease), box-shadow .2s var(--nhe-ease-std), scale .16s var(--nhe-ease) !important; }
@media (hover: hover) { html body.nhe-studio .color-swatch:hover { translate: 0 -2px; } }
html body.nhe-studio .color-swatch:active { scale: .95; }
@keyframes nheSelectPop { 0% { scale: .94; } 60% { scale: 1.03; } 100% { scale: 1; } }
html body.nhe-studio :is(.color-swatch.selected, .color-swatch.active, #builderAccordion .style-card.active, #groupFabric .fabric-tab.active, #groupCombo .set-tab.active) {
  animation: nheSelectPop .32s var(--nhe-ease) backwards;
}

/* Mở bước: nội dung trượt lên + hiện dần; các khối con nối tiếp nhau */
/* fill-mode backwards: hết hiệu ứng thì translate về none (translate giữ lại sẽ làm hỏng phần tử position:fixed bên trong, vd. phiếu tóm tắt) */
@keyframes nheStepIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header { animation: nheStepIn .4s var(--nhe-ease) backwards; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > * { animation: nheStepIn .45s var(--nhe-ease) backwards; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(2) { animation-delay: .04s; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(3) { animation-delay: .08s; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(4) { animation-delay: .12s; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(n+5) { animation-delay: .16s; }

/* Chip bước hiện tại: chấm số đổi màu mượt; dấu ✓ hiện nảy */
html body.nhe-studio .nhe-step-chip i { transition: background-color .25s var(--nhe-ease-std), color .25s var(--nhe-ease-std); }
html body.nhe-studio .nhe-step-chip.is-done i { animation: nheSelectPop .35s var(--nhe-ease) backwards; }

/* Phối 2 màu / phần kiểu may mở ra */
html body.nhe-studio #pillowMixSubPanel.active { animation: nheStepIn .4s var(--nhe-ease) backwards; }
html body.nhe-studio .set-tailoring-toggle-bar[aria-expanded="true"] + * .set-tailoring-inner,
html body.nhe-studio .set-accordion-item.is-expanded .set-accordion-inner { animation: nheStepIn .4s var(--nhe-ease) backwards; }
html body.nhe-studio .nhe-review-row { animation: nheStepIn .4s var(--nhe-ease) backwards; }

/* Giá đổi: nháy nhẹ */
@keyframes nhePriceBump { 0% { scale: 1; } 35% { scale: 1.045; color: #6B3F24; } 100% { scale: 1; } }
html body.nhe-studio .nhe-price-bump { animation: nhePriceBump .45s var(--nhe-ease) backwards; transform-origin: left center; display: inline-block; }

/* Canvas đổi ảnh / set: hiện dần */
html body.nhe-studio #previewSection .canvas-container img { transition: opacity .3s var(--nhe-ease-std); }

/* ---- Phiếu tóm tắt may đo trên điện thoại/tablet (≤ 1023px): Cách ly tuyệt đối giữa Inline và Modal Sheet ---- */
@keyframes nheSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@media (max-width: 1023px) {
  /* Màn che mờ cho Bottom Sheet phủ kín viewport trên mọi thiết bị di động & tablet (< 1024px) */
  html body.nhe-studio #tailorSheetBackdrop,
  html body.nhe-studio .tailor-sheet-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    z-index: 999 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  html body.nhe-studio #tailorSheetBackdrop.is-active,
  html body.nhe-studio .tailor-sheet-backdrop.is-active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Khi chưa mở sheet: Triệt tiêu hoàn toàn khỏi luồng cuộn của Bước 5 (không lơ lửng, không chiếm chỗ) */
  html body.nhe-studio #tailorOrderTicketBox:not(.is-sheet-open) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  /* Khi đã mở sheet: Trở thành modal trượt đáy duy nhất, hiển thị trên thanh giá đáy */
  html body.nhe-studio #tailorOrderTicketBox.is-sheet-open {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--nhe-bar-h, 76px) !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - var(--nhe-bar-h, 76px) - 56px) !important;
    z-index: 1000 !important;
    margin: 0 !important;
    padding-bottom: 16px !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(0) !important;
    animation: nheSheetSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    background: #FFFFFF !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.nhe-studio *, html body.nhe-studio *::before, html body.nhe-studio *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important;
  }
  html body.nhe-studio :is(*):hover, html body.nhe-studio :is(*):active { translate: none !important; scale: none !important; }
}

/* ==========================================================================
   v9.9.3 — trượt trái/phải giữa các bước, nút Quay lại, thanh giá PC gọn, nút đổi ngôn ngữ, link bảng so sánh
   ========================================================================== */

/* ---- Chuyển bước: trượt theo hướng đi (tiến: từ phải; lùi: từ trái) ---- */
@keyframes nheSlideFwd  { from { opacity: 0; translate: 32px 0; }  to { opacity: 1; translate: 0 0; } }
@keyframes nheSlideBack { from { opacity: 0; translate: -32px 0; } to { opacity: 1; translate: 0 0; } }
html body.nhe-studio #builderAccordion { overflow-x: clip; overflow-clip-margin: 12px; }
html body.nhe-studio #builderAccordion .accordion-step.is-open > .accordion-header,
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > * {
  animation-name: nheSlideFwd !important; animation-duration: .42s !important;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1) !important; animation-fill-mode: backwards !important;
}
html body.nhe-studio[data-nhe-dir="back"] #builderAccordion .accordion-step.is-open > .accordion-header,
html body.nhe-studio[data-nhe-dir="back"] #builderAccordion .accordion-step.is-open .accordion-body-inner > * { animation-name: nheSlideBack !important; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(2) { animation-delay: .03s !important; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(3) { animation-delay: .06s !important; }
html body.nhe-studio #builderAccordion .accordion-step.is-open .accordion-body-inner > :nth-child(n+4) { animation-delay: .09s !important; }

/* ---- Nút Quay lại ---- */
html body.nhe-studio .mobile-sticky-cta-col { display: flex !important; align-items: center !important; gap: 10px !important; }
html body.nhe-studio .nhe-back-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: 0 0 auto;
  height: 48px; padding: 0 18px 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .28); color: #5A3A28;
  font: 600 14px/1 'Be Vietnam Pro', sans-serif;
  transition: background-color .2s ease, box-shadow .2s ease, scale .16s cubic-bezier(.16, 1, .3, 1);
}
html body.nhe-studio .nhe-back-btn[hidden] { display: none !important; }
html body.nhe-studio .nhe-back-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body.nhe-studio .nhe-back-btn:hover { background: #F4F0EA; box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .45); }
html body.nhe-studio .nhe-back-btn:active { scale: .97; }
html body.nhe-studio .nhe-back-btn:focus-visible { outline: 2px solid #5A3A28; outline-offset: 2px; }
@media (max-width: 1024px) {
  /* Điện thoại: chỉ icon tròn để nhường chỗ cho nút Tiếp */
  html body.nhe-studio .nhe-back-btn { width: 44px; height: 44px; padding: 0; }
  html body.nhe-studio .nhe-back-btn span { display: none; }
  html body.nhe-studio .mobile-sticky-cta-col { gap: 8px !important; }
}

/* ---- Thanh giá PC: 1 hàng thẳng, cân đối ---- */
@media (min-width: 1025px) {
  html body.nhe-studio #mobileStickyBottomBar {
    display: flex !important; align-items: center !important; justify-content: flex-start !important;
    height: 84px !important; gap: 20px !important;
  }
  html body.nhe-studio #mobileStickyPriceCol { flex: 0 0 auto; gap: 6px !important; cursor: pointer; }
  html body.nhe-studio .mobile-sticky-price-row { display: flex !important; align-items: center !important; gap: 12px !important; }
  html body.nhe-studio #mobileStickyPriceValue { font: 500 28px/1 Lora, serif !important; letter-spacing: -.01em; }
  html body.nhe-studio #mobileStickySavingsBadge {
    margin: 0 !important; display: inline-flex !important; align-items: center; height: 24px; padding: 0 10px !important;
    border-radius: 999px !important; background: #EEF2E8 !important; border: 0 !important; box-shadow: none !important;
    font: 600 12px/1 'Be Vietnam Pro', sans-serif !important; color: #44683B !important; white-space: nowrap;
  }
  html body.nhe-studio #mobileStickySavingsBadge:not(.active):empty { display: none !important; }
  html body.nhe-studio #mobileOpenSummaryBtn {
    display: inline-flex !important; align-items: center; gap: 4px; font: 500 13px/1 'Be Vietnam Pro', sans-serif !important;
    color: #7A6558 !important; text-decoration: none !important;
  }
  html body.nhe-studio #mobileOpenSummaryBtn span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(90, 58, 40, .35); }
  html body.nhe-studio #mobileOpenSummaryBtn:hover { color: #241C17 !important; }
  html body.nhe-studio .nhe-bar-trust { flex: 1 1 auto !important; justify-content: flex-end !important; gap: 0 !important; }
  html body.nhe-studio .nhe-bar-trust span { font: 500 13px/1.2 'Be Vietnam Pro', sans-serif !important; color: #7A6558 !important; gap: 8px !important; }
  html body.nhe-studio .nhe-bar-trust span::before { display: none !important; }
  html body.nhe-studio .nhe-bar-trust svg { width: 16px; height: 16px; fill: none; stroke: #8A7364; stroke-width: 1.6; stroke-linecap: round; }
  html body.nhe-studio .mobile-sticky-cta-col { flex: 0 0 auto; padding-left: 8px; }
  html body.nhe-studio #mobileStickyCtaBtn { min-height: 52px !important; height: 52px; padding: 0 28px !important; gap: 10px; font-size: 15px !important; }
}

/* ---- Header điện thoại: nút EN/VI (tối giản, tròn, không viền theo đúng design language Studio) ---- */
@media (max-width: 1024px) {
  html body.nhe-studio .nhe-studio-head .nhe-lang-btn {
    width: 38px !important; height: 38px !important; flex: 0 0 38px;
    border-radius: 50% !important; border: 0 !important; background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 13px/1 'Be Vietnam Pro', sans-serif; letter-spacing: .04em; color: #4A3B32; text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
  }
  html body.nhe-studio .nhe-studio-head .nhe-lang-btn::before {
    display: none !important;
  }
  html body.nhe-studio .nhe-studio-head .nhe-lang-btn:hover,
  html body.nhe-studio .nhe-studio-head .nhe-lang-btn:active {
    background: rgba(90, 58, 40, .08) !important;
    color: #241C17 !important;
  }
  html body.nhe-studio .nhe-studio-head .nhe-lang-btn:focus-visible {
    outline: 2px solid #5A3A28 !important; outline-offset: 2px !important;
  }
  html body.nhe-studio .nhe-studio-head .nhe-head-r .nhe-studio-ib { width: 38px !important; height: 38px !important; flex: 0 0 38px; }
  html body.nhe-studio .nhe-studio-head .nhe-studio-title { font-size: 17px !important; }
}
@media (max-width: 359px) {
  html body.nhe-studio .nhe-studio-head .nhe-studio-title { font-size: 15px !important; }
}

/* ---- Link "Bảng so sánh & Đặc tính 4 chất liệu vải": nút phụ gọn, bỏ icon ⓘ bị gạch chân ---- */
html body.nhe-studio #btnToggleFabricGuideAccordion {
  display: inline-flex !important; align-items: center !important; gap: 8px !important; align-self: flex-start;
  min-height: 40px !important; padding: 0 16px 0 12px !important; border-radius: 999px !important;
  background: #F4F0EA !important; box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .14) !important; border: 0 !important;
  color: #5A3A28 !important; text-decoration: none !important; width: auto !important;
  transition: background-color .2s ease, box-shadow .2s ease, scale .16s cubic-bezier(.16, 1, .3, 1);
}
html body.nhe-studio #btnToggleFabricGuideAccordion:hover { background: #EDE5DB !important; box-shadow: inset 0 0 0 1px rgba(90, 58, 40, .3) !important; }
html body.nhe-studio #btnToggleFabricGuideAccordion:active { scale: .97; }
html body.nhe-studio #btnToggleFabricGuideAccordion .fabric-guide-info-icon { display: none !important; }
html body.nhe-studio #btnToggleFabricGuideAccordion .fabric-guide-toggle-left { display: inline-flex !important; align-items: center; gap: 8px; text-decoration: none !important; }
html body.nhe-studio #btnToggleFabricGuideAccordion .fabric-guide-toggle-left::before {
  content: ''; width: 18px; height: 18px; flex: 0 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A3A28' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4' width='7' height='16' rx='1.5'/%3E%3Crect x='13.5' y='4' width='7' height='16' rx='1.5'/%3E%3Cpath d='M6 8h2M16 8h2M6 11h2M16 11h2'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body.nhe-studio #btnToggleFabricGuideAccordion .fabric-guide-modal-trigger-label {
  font: 600 13.5px/1.2 'Be Vietnam Pro', sans-serif !important; color: #5A3A28 !important; text-decoration: none !important; border: 0 !important;
}

/* Điện thoại: cột giá không bị ép xuống dòng khi có thêm nút Quay lại */
@media (max-width: 1024px) {
  html body.nhe-studio #mobileStickyPriceCol { min-width: 0; flex: 1 1 auto; }
  html body.nhe-studio #mobileOpenSummaryBtn,
  html body.nhe-studio #mobileOpenSummaryBtn span,
  html body.nhe-studio #mobileStickySavingsBadge { white-space: nowrap !important; }
  html body.nhe-studio .mobile-sticky-cta-col { flex: 0 0 auto; }
  html body.nhe-studio #mobileStickyCtaBtn { white-space: nowrap; }
}
