/* ==========================================================================
   Bed — BASE: design tokens + thành phần dùng chung (heading, nút, thẻ sản phẩm, slider)
   Token lấy từ theme mẫu (:root của mẫu). 1rem của mẫu = 10px → quy đổi ra px ở đây.
   ========================================================================== */
:root {
	--bed-font-body: 'Lora', sans-serif;
	--bed-font-heading: 'Lora', serif;
	--bed-fg: #000000;
	--bed-bg: #ffffff;
	--bed-bg-body: #f0efeb;
	--bed-primary: #121f38;
	--bed-primary-rgb: 18, 31, 56;
	--bed-secondary: #9a563a;
	--bed-link: #000000;
	--bed-accent: #e3d8d0;
	--bed-n50: #f0eeeb;
	--bed-n100: #C8BFB6;
	--bed-n200: #9E9089;
	--bed-n300: #6B5F58;
	--bed-n400: #464646;
	--bed-price: #af1713;
	--bed-price-compare: #9E9089;
	--bed-sale-bg: #121f38;
	--bed-sale: #ffffff;
	--bed-btn: #121f38;
	--bed-btn-text: #ffffff;
	--bed-addtocart-bg: #0c1526;
	--bed-footer-bg: #121f38;
	--bed-footer-text: #ffffff;
	--bed-error: #EE1926;
	--bed-success: #2BAD14;
	--bed-warning: #F2BC1B;
	--bed-acard-bg: #ffffff;     /* nền thẻ bài viết (spa dùng --bed-accent) */
	--bed-acard-border: #ebebeb;
	--bed-card-ratio: 1 / 1;
	--bed-radius: 8px;
	--bed-radius-card: 16px;
	--bed-container: 1434px;
	--bed-shadow-l: 0 20px 48px 0 rgba(51, 51, 51, .2);
}

html { scroll-behavior: smooth; }
body.bed-theme {
	background-color: var(--bed-bg-body);
	color: var(--bed-fg);
	font-family: var(--bed-font-body);
	-webkit-font-smoothing: antialiased;
}
body.bed-theme #wrapper,
body.bed-theme #main { background: var(--bed-bg-body); } /* Flatsome đặt #main nền trắng → lộ dải trắng quanh các khối nền #ffffff */
body.bed-theme a { color: inherit; }
body.bed-theme .bed-section a:not(.bed-btn):not(.button):hover { color: var(--bed-primary); }

/* ---------- Container ---------- */
.bed-container {
	width: 100%;
	max-width: var(--bed-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: 12px;
	padding-right: 12px;
}
.bed-section { position: relative; }
.bed-section img { max-width: 100%; height: auto; }

/* ---------- Heading (heading-bar + gạch chân nét tay) ---------- */
.bed-heading-bar { position: relative; }
.bed-heading {
	display: inline-block;
	position: relative;
	z-index: 1;
	font-family: var(--bed-font-heading) !important;
	font-weight: 600 !important;
	font-size: 28px;
	line-height: 1.2;
	letter-spacing: normal;
	color: var(--bed-fg);
	margin: 0 0 20px;
	text-wrap: pretty;
	text-transform: none;
}
@media (min-width: 768px) { .bed-heading { font-size: 32px; margin-bottom: 32px; } }
.bed-heading a { color: inherit; }
.bed-heading span { position: relative; display: inline-block; color: var(--bed-primary); }
.bed-heading span::after {
	content: '';
	position: absolute;
	left: 0; bottom: -10px;
	width: 100%; height: 11px;
	background-color: currentColor;
	pointer-events: none;
	-webkit-mask: url("data:image/svg+xml,%3Csvg height='11' viewBox='0 0 219 11' fill='none' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8C25.8556 3.07738 53.8451 3.61733 82.4695 3.07653C119.514 2.37666 150.586 6.76911 216 4.41882' stroke='black' stroke-width='2' pathLength='1' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
	mask: url("data:image/svg+xml,%3Csvg height='11' viewBox='0 0 219 11' fill='none' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8C25.8556 3.07738 53.8451 3.61733 82.4695 3.07653C119.514 2.37666 150.586 6.76911 216 4.41882' stroke='black' stroke-width='2' pathLength='1' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.bed-heading-bar.text-center { text-align: center; }
.bed-heading-bar.text-right { text-align: right; }

/* ---------- Nút ---------- */
.bed-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	position: relative; overflow: hidden;
	padding: 11px 23px;
	border: 1px solid transparent;
	border-radius: 9999px;
	font-family: var(--bed-font-body);
	font-size: 14px; font-weight: 600; line-height: 20px;
	text-align: center; text-decoration: none; cursor: pointer;
	transition: transform .3s cubic-bezier(0, 0, .2, 1), background-color .2s, color .2s;
}
.bed-btn:active { transform: scale(.94); }
.bed-btn--primary { background: var(--bed-btn); color: var(--bed-btn-text) !important; border-color: var(--bed-btn); }
.bed-btn--secondary { background: transparent; color: var(--bed-btn) !important; border-color: var(--bed-btn); }
.bed-btn--secondary:hover { background: var(--bed-btn); color: var(--bed-btn-text) !important; }
.bed-btn--primary::after, .bed-btn--secondary::after {
	content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
	transform: skew(-15deg); opacity: .3;
	background-image: linear-gradient(90deg, transparent, #fff, transparent);
}
.bed-btn--primary:hover::after, .bed-btn--secondary:hover::after { animation: bedShine 1s ease forwards; }
@keyframes bedShine { to { left: 100%; } }
.bed-btn--lg { padding: 14px 32px; font-size: 16px; }
.bed-btn--block { width: 100%; }
.bed-viewall { text-align: center; margin-top: 16px; }
.bed-viewall .bed-btn { min-width: 0; padding: 12px 23px; font-size: 16px; line-height: 24px; margin-top: 24px; }
@media (max-width: 767px) { .bed-viewall .bed-btn { width: 100%; min-width: 0; } }

/* ==========================================================================
   SLIDER — MỘT bộ style mũi tên / chấm cho MỌI carousel (Embla của mẫu → Flickity của Flatsome)
   Mẫu (components.css): .embla__button 36px tròn, nền #fff, icon carret, opacity:0 → 1 khi rê chuột vào
   vùng slider (chỉ ≥768px); disabled: vẫn ẩn, hover vùng slider → opacity .5 + not-allowed; hover nút: nền #f0eeeb.
   .embla__dots: flex gap 8, chấm 16×4 #909090 (active = primary), ẩn khi chỉ có 1 trang.
   Flatsome ghi đè: mũi tên SVG to, :disabled{opacity:0!important}, .dot tròn 12px viền 3px, .flickity-page-dots absolute
   → tất cả đã bị đặt lại ở đây (selector có body.bed-theme để thắng Flatsome mà không cần dựa vào thứ tự nạp).
   ========================================================================== */
:root {
	--bed-arrow-size: 36px;
	--bed-arrow-offset: 12px;
	--bed-carret-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.4 3.3L15.9 3.4L16.2 3.7L16.3 4.2L16.1 4.6L9.6 11.1L9.3 11.5L9.2 12L9.5 12.7L16.2 19.4L16.3 19.9L16.2 20.2L15.9 20.5L15.5 20.7L15 20.5L8.5 13.9L7.9 13L7.7 12L7.8 11.1L8.3 10.3L15 3.5Z'/%3E%3C/svg%3E");
	--bed-carret-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.3 3.3L8.7 3.3L9 3.5L15.7 10.2L16.1 11L16.3 11.9L16.1 13L15.5 13.8L8.9 20.5L8.5 20.7L8.1 20.6L7.9 20.3L7.8 19.9L7.9 19.5L14.5 12.9L14.8 12.4L14.9 12L14.8 11.6L14.5 11.1L7.8 4.5L7.7 3.8L7.9 3.5Z'/%3E%3C/svg%3E");
}
.bed-slider { position: relative; }
.bed-slider .flickity-viewport { overflow: hidden; }

/* --- mũi tên trước/sau (nút do Flickity sinh ra) --- */
body.bed-theme .bed-slider .flickity-prev-next-button {
	position: absolute; top: 50%; bottom: auto; z-index: 2;
	display: flex; align-items: center; justify-content: center;
	width: var(--bed-arrow-size); height: var(--bed-arrow-size); min-height: 0; max-width: none;
	margin: calc(var(--bed-arrow-size) / -2) 0 0; padding: 0;
	border: 0; border-radius: 50%; box-shadow: none !important; outline-offset: 2px;
	background: #fff !important; color: var(--bed-fg);
	font-size: 0; line-height: 1; letter-spacing: 0; text-transform: none; text-align: center;
	opacity: 0; transform: none !important; cursor: pointer;
	transition: opacity .2s ease-out, background-color .2s ease-out;
}
body.bed-theme .bed-slider .flickity-prev-next-button.previous { left: calc(var(--bed-arrow-offset) + var(--bed-slider-bleed, 0px)); right: auto; }
body.bed-theme .bed-slider .flickity-prev-next-button.next { right: var(--bed-arrow-offset); left: auto; }
/* icon: ẩn mũi tên SVG của Flatsome, vẽ carret của mẫu bằng mask (ăn theo currentColor) */
body.bed-theme .bed-slider .flickity-prev-next-button .flickity-button-icon { display: none !important; }
body.bed-theme .bed-slider .flickity-prev-next-button::before {
	content: ''; display: block; width: 16px; height: 16px; background-color: currentColor;
	-webkit-mask: var(--bed-carret-right) center / contain no-repeat; mask: var(--bed-carret-right) center / contain no-repeat;
}
body.bed-theme .bed-slider .flickity-prev-next-button.previous::before {
	-webkit-mask-image: var(--bed-carret-left); mask-image: var(--bed-carret-left);
}

/* hover / disabled — như mẫu: chỉ hiện khi rê chuột vào vùng slider, chỉ ≥768px */
body.bed-theme .bed-slider .flickity-prev-next-button:hover:not(:disabled) { background: var(--bed-n50) !important; color: var(--bed-fg); }
body.bed-theme .bed-slider .flickity-prev-next-button:disabled { background: #fff !important; opacity: 0 !important; pointer-events: none; cursor: not-allowed; }
@media (min-width: 768px) {
	body.bed-theme .bed-slider:hover .flickity-prev-next-button:not(:disabled), body.bed-theme .bed-slider .flickity-prev-next-button:not(:disabled):focus-visible { opacity: 1 !important; }
	body.bed-theme .bed-slider:hover .flickity-prev-next-button:disabled { opacity: .5 !important; pointer-events: auto; cursor: not-allowed; }
}
@media (max-width: 767px) {
	body.bed-theme .bed-slider .flickity-prev-next-button { display: none !important; }
}
/* chỉ có 1 trang → ẩn cả mũi tên lẫn chấm (class do bed.js gắn; mẫu: .embla__buttons:has([disabled]+[disabled]){display:none}) */
body.bed-theme .bed-slider.is-single .flickity-prev-next-button,
body.bed-theme .bed-slider.is-single .flickity-page-dots,
body.bed-theme .bed-slider.is-nodots .flickity-page-dots { display: none !important; }

/* --- chấm điều hướng (.embla__dots / .embla__dot) --- */
body.bed-theme .bed-slider .flickity-page-dots {
	position: static; left: auto; right: auto; bottom: auto; width: auto;
	display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
	margin: 16px 0 0; padding: 0 0 0 var(--bed-slider-bleed, 0px); list-style: none; text-align: center; line-height: 1;
}
body.bed-theme .bed-slider .flickity-page-dots .dot {
	display: block; flex: none; width: 16px; height: 4px; margin: 0; padding: 0;
	border: 0; border-radius: 4px; background: #909090; opacity: 1;
	pointer-events: auto; cursor: pointer; transition: background-color .2s;
}
body.bed-theme .bed-slider .flickity-page-dots .dot:hover { opacity: 1; }
body.bed-theme .bed-slider .flickity-page-dots .dot.is-selected { background: var(--bed-primary); opacity: 1 !important; }
body.bed-theme .bed-slider .flickity-page-dots .dot:only-child { display: none; }
body.bed-theme .bed-slider .flickity-page-dots:not(:has(.dot:nth-child(2))) { display: none; }

/* --- slider sản phẩm trong mega menu (header, bed-layout.css: .bed-mslider): chấm theo mẫu = 16×4 #909090, active = primary --- */
body.bed-theme .bed-mslider__dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
body.bed-theme .bed-mslider__dots i { width: 16px; height: 4px; border-radius: 4px; background: #909090; cursor: pointer; transition: background-color .2s; }
body.bed-theme .bed-mslider__dots i.is-active { width: 16px; background: var(--bed-primary); }

/* --- nút điều hướng NGOÀI slider ([data-bed-slider], vd cạnh tiêu đề bộ sưu tập): 36px, viền neutral-100 --- */
.bed-slider__nav { display: flex; gap: 8px; flex: none; }
body.bed-theme button[data-bed-slider] {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 36px; height: 36px; min-height: 0; max-width: none; margin: 0; padding: 0;
	border: 1px solid var(--bed-n100); border-radius: 50%; background: #fff; color: var(--bed-fg);
	font-size: 0; line-height: 1; letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer;
	transition: all .2s ease;
}
body.bed-theme button[data-bed-slider] svg { display: block; width: 16px; height: 16px; margin: 0; }
body.bed-theme button[data-bed-slider]:hover:not(:disabled) { background: var(--bed-fg); color: #fff; border-color: var(--bed-fg); }
.bed-slider__nav.is-single { display: none; }

/* ---------- Badge ---------- */
.bed-badge {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--bed-sale-bg); color: var(--bed-sale);
	border-radius: 2px; padding: 4px; margin: 0;
	font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: -0.064px; text-transform: none; white-space: nowrap;
}
@media (min-width: 768px) { .bed-badge { padding: 4px 6px; } }
.bed-badge--soldout { background: var(--bed-n50); color: var(--bed-error); }

/* ---------- Giá ---------- */
.bed-price { color: var(--bed-price); font-weight: 600; font-size: 14px; }
.bed-price-compare { color: var(--bed-price-compare); text-decoration: line-through; font-size: 12px; }

/* ---------- THẺ SẢN PHẨM ---------- */
.bed-card {
	position: relative; display: block; height: 100%; text-align: left;
	font-family: var(--bed-font-body); font-size: 14px; font-weight: 400; line-height: 1.42857; letter-spacing: -0.064px; color: var(--bed-fg);
}
@media (min-width: 768px) { .bed-card { font-size: 16px; } }
@media (min-width: 1024px) { .bed-card:hover { z-index: 900; } }
.bed-card *, .bed-card *::before, .bed-card *::after { box-sizing: border-box; }
.bed-card__inner {
	position: relative; display: flex; flex-direction: column; height: 100%;
	background: #fff; border: 1px solid var(--bed-n50); border-radius: var(--bed-radius-card); overflow: hidden;
	transition: transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .25s ease;
}
.bed-card:hover .bed-card__inner { box-shadow: 0 10px 28px rgba(0, 0, 0, .08); }
.bed-card__top { position: relative; overflow: hidden; margin: 0; padding: 0; }
body.bed-theme .bed-card__media {
	position: relative; display: flex; width: 100%; aspect-ratio: var(--bed-card-ratio, 123 / 160); overflow: hidden;
	margin: 0; padding: 0; background: transparent; text-decoration: none; cursor: pointer;
}
body.bed-theme .bed-card__img {
	position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0;
	object-fit: contain; transition: opacity .3s ease-out;
}
body.bed-theme .bed-card__img--2 { opacity: 0; z-index: 0; }
.bed-card__top:hover .bed-card__img--2 { opacity: 1; z-index: 1; }
.bed-card__top:has(.bed-card__img--2):hover .bed-card__img:not(.bed-card__img--2) { opacity: 0; }
.bed-card__badges { position: absolute; top: 8px; left: 8px; z-index: 10; display: flex; align-items: center; gap: 12px; }
.bed-card__utils {
	position: absolute; top: 8px; right: 8px; z-index: 10;
	display: none; flex-direction: column; align-items: center; gap: 8px;
	transition: transform .3s ease-out;
}
body.bed-theme .bed-card__util {
	position: relative; display: flex; align-items: center; justify-content: center; flex: none;
	width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0;
	border: 1px solid var(--bed-n200); border-radius: 9999px; background: #fff; box-shadow: none;
	color: var(--bed-fg); font-size: 16px; font-weight: 400; line-height: 22.86px; letter-spacing: normal; text-transform: none; text-decoration: none; cursor: pointer;
	opacity: .6; transition: transform .15s cubic-bezier(.4, 0, .2, 1), opacity .3s;
}
body.bed-theme .bed-card__util:hover, body.bed-theme .bed-card__util:focus-visible { opacity: 1; color: var(--bed-fg); background: #fff; border-color: var(--bed-n200); }
body.bed-theme .bed-card__util:active { transform: scale(.95); }
.bed-card__util .bed-icon { display: block; width: 16px; height: 16px; margin: 0; flex: none; }
.bed-tip {
	position: absolute; top: 50%; right: calc(100% + 4px); transform: translateY(-50%);
	padding: 4px 12px; border-radius: 9999px; background: #000; color: #fff;
	font-size: 16px; font-weight: 400; line-height: 22.86px; letter-spacing: -0.064px; white-space: nowrap; pointer-events: none;
	opacity: 0; visibility: hidden; transition: opacity .3s ease-out;
}
.bed-card__util:hover .bed-tip, .bed-card__util:focus-visible .bed-tip { opacity: 1; visibility: visible; }
.bed-card__cta {
	position: absolute; z-index: 10; left: 8px; bottom: 8px; width: calc(100% - 12px);
	transition: transform .5s ease-out;
}
@media (min-width: 768px) { .bed-card__cta { left: 50%; bottom: 16px; width: calc(100% - 32px); transform: translateX(-50%); } }
@media (min-width: 1024px) {
	.bed-card__utils { display: flex; transform: translateX(52px); }
	.bed-card:hover .bed-card__utils, .bed-card__utils:focus-within { transform: none; }
	.bed-card__cta { transform: translate(-50%, 200%); }
	.bed-card__top:hover .bed-card__cta, .bed-card__cta:focus-within { transform: translate(-50%, 0); }
}
body.bed-theme .bed-card__cta-btn {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	width: 32px; height: 32px; min-height: 0; margin: 0 0 0 auto; padding: 7px;
	border-radius: 9999px; font-size: 16px; font-weight: 600; line-height: 1.42857; letter-spacing: -0.064px; text-transform: none; text-decoration: none;
}
.bed-card__cta-label { display: none; font-size: 14px; line-height: 20px; }
.bed-card__cta-ico { display: flex; flex: none; }
.bed-card__cta-ico .bed-icon { display: block; width: 20px; height: 20px; }
@media (min-width: 1024px) {
	body.bed-theme .bed-card__cta-btn { width: 100%; height: auto; margin: 0; padding: 11px 8px; }
	.bed-card__cta-label { display: block; }
	.bed-card__cta-ico { display: none; }
}
.bed-card .added_to_cart { display: none !important; }
body.bed-theme .bed-card__body {
	display: flex; flex-direction: column; flex: 1 1 auto; gap: 8px; height: auto;
	margin: 0; padding: 12px; color: var(--bed-fg); text-decoration: none;
}
body.bed-theme .bed-card__body:hover { color: var(--bed-link); }
.bed-card__vendor { margin: 0; font-size: 14px; line-height: 20px; color: inherit; }
.bed-card__title {
	margin: 0; padding: 0; font-family: var(--bed-font-body) !important; font-weight: 600; font-size: 14px; line-height: 1.2; letter-spacing: normal; color: inherit; text-transform: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) { .bed-card__title { font-size: 16px; } }
.bed-card__row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin: auto 0 0; }
.bed-card__prices { flex: 1 1 0%; display: flex; flex-direction: column; gap: 4px; }
.bed-card .bed-price { display: block; margin: 0; font-size: 14px; font-weight: 400; line-height: 1.42857; letter-spacing: -0.064px; color: var(--bed-price); }
.bed-card .bed-price-compare { display: block; margin: 0; font-size: 12px; font-weight: 400; line-height: 20px; letter-spacing: -0.064px; color: var(--bed-price-compare); text-decoration: line-through; }
@media (min-width: 768px) {
	.bed-card .bed-price { font-size: 16px; }
	.bed-card .bed-price-compare { font-size: 14px; }
}
.bed-card__swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 4px 0; }
@media (min-width: 768px) { .bed-card__swatches { gap: 8px; } }
.bed-swatch { position: relative; display: block; margin: 0; padding: 0; }
.bed-swatch__dot {
	display: block; width: 20px; height: 20px; overflow: hidden; cursor: pointer;
	border: 1px solid var(--bed-n50); border-radius: 4px; background: var(--bed-n50);
}
@media (min-width: 1025px) { .bed-swatch__dot { width: 26px; height: 26px; } }
.bed-swatch__dot img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
.bed-swatch__name {
	position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); z-index: 5;
	padding: 4px 6px; border-radius: 4px; background: #000; color: #fff;
	font-size: 12px; font-weight: 400; line-height: 16px; white-space: nowrap; pointer-events: none;
	opacity: 0; transition: opacity .3s ease-out;
}
.bed-swatch:last-child .bed-swatch__name, .bed-swatch:has(+ .bed-swatch-more) .bed-swatch__name { left: auto; right: 0; transform: none; }
.bed-swatch:hover .bed-swatch__name { opacity: 1; }
.bed-swatch-more { font-size: inherit; line-height: inherit; color: inherit; cursor: pointer; }
.bed-swatch-more:hover { color: var(--bed-link); }

/* thanh tồn kho (flash sale) — "stock-countdown" của mẫu */
.bed-stock { margin: 0; }
@media (min-width: 768px) { .bed-stock { margin-bottom: 12px; } }
.bed-stock__label { margin: 0 0 4px; font-size: 16px; line-height: 1.42857; color: var(--bed-fg); }
.bed-stock__bar { width: 100%; height: 4px; border-radius: 4px; background: var(--bed-n50); overflow: hidden; }
.bed-stock__bar i { display: block; height: 4px; border-radius: 4px; background: var(--bed-flash-process, var(--bed-secondary)); }

/* Lưới sản phẩm dùng chung */
.bed-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .bed-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {  .bed-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Slider sản phẩm: ô rộng theo mẫu (61.3% mobile / 27% tablet / 25% desktop) */
.bed-product-slider .bed-slide { width: 57%; padding-left: 8px; box-sizing: border-box; }
@media (min-width: 768px) { .bed-product-slider .bed-slide { width: 27%; padding-left: 16px; } }
@media (min-width: 1024px) { .bed-product-slider .bed-slide { width: 25%; } }
/* như mẫu: container Embla lệch trái bằng đúng khoảng đệm của ô (-8px / -16px), khung cắt ở mép container */
.bed-product-slider { margin-left: -8px; --bed-slider-bleed: 8px; clip-path: inset(-400px 0 -400px 8px); }
@media (min-width: 768px) { .bed-product-slider { margin-left: -16px; --bed-slider-bleed: 16px; clip-path: inset(-400px 0 -400px 16px); } }
.bed-product-slider .bed-slide .bed-card { height: 100%; }
.bed-product-slider .flickity-viewport { overflow: hidden; }

/* tiện ích */
.bed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Modal dùng chung (Bed.modal) ---------- */
body.bed-modal-open { overflow: hidden; }
.bed-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 12px; opacity: 0; transition: opacity .2s; }
.bed-modal.is-open { opacity: 1; }
.bed-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.bed-modal__box { position: relative; z-index: 1; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 16px; padding: 24px; }
.bed-modal__close { position: absolute; right: 10px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bed-n50); font-size: 22px; line-height: 1; cursor: pointer;     margin: 0 !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-height: unset !important;}

/* ==========================================================================
   Flatsome ép  .flickity-slider > div:not(.col){ width:100% !important; margin:0; padding:0 }  (đặc hiệu 0,2,1)
   và trước khi Flickity khởi tạo:  .slider > div:not(.col){ width:100% }, .slider:not(.flickity-enabled)>*{ display:inline-block!important }
   → ghi đè lại bề rộng / khoảng cách ô slide của các khối bed_* bằng !important + cùng đặc hiệu (file này nạp sau flatsome nên thắng).
   Mỗi rule khai báo CẢ hai trạng thái ( .bed-slider > div.X = chưa khởi tạo, .flickity-slider > div.X = đã khởi tạo )
   để bố cục không nhảy khi Flickity chạy (CLS). Khi thêm slider mới: thêm vào đây, không đặt height:100% cho ô.
   ========================================================================== */
/* trước khi khởi tạo: dàn ngang bằng flex (không dùng inline-block → không có khe chữ, cùng bố cục với sau khởi tạo) */
body.bed-theme .bed-slider:not(.flickity-enabled):not(:has(> .flickity-viewport)) {
	display: flex; align-items: flex-start; flex-wrap: nowrap; overflow: hidden; white-space: normal; width: auto;
}
body.bed-theme .bed-slider:not(.flickity-enabled):not(:has(> .flickity-viewport)) > * { flex: 0 0 auto; display: block !important; white-space: normal !important; }
/* chừa sẵn chỗ cho dải chấm (16px cách + 4px chấm) để Flickity khởi tạo xong trang không bị đẩy xuống (CLS) */
body.bed-theme .bed-slider[data-bed-dots]:not(.flickity-enabled):not(:has(> .flickity-viewport)) { padding-bottom: var(--bed-dots-space, 20px); }
body.bed-theme .bed-hero__slider { --bed-dots-space: 0px; }
/* bộ sưu tập */

/* flash sale */
.bed-fs .bed-slider > div.bed-fs__item, .bed-fs .flickity-slider > div.bed-fs__item { width: 57% !important; padding: 0 0 0 8px; margin: 0; }
@media (min-width: 768px)  { .bed-fs .bed-slider > div.bed-fs__item, .bed-fs .flickity-slider > div.bed-fs__item { width: 33.3333% !important; padding-left: 16px; } }
@media (min-width: 1024px) { .bed-fs .bed-slider > div.bed-fs__item, .bed-fs .flickity-slider > div.bed-fs__item { width: 25% !important; } }
/* hero: mỗi ô = 100% */
.bed-slider > div.bed-hero__slide, .flickity-slider > div.bed-hero__slide { width: 100% !important; margin: 0; padding: 0; }
/* voucher */
.bed-slider > div.bed-coupons__slide, .flickity-slider > div.bed-coupons__slide { width: 80% !important; padding: 16px 12px 16px 8px; margin: 0; }
@media (min-width: 768px)  { .bed-slider > div.bed-coupons__slide, .flickity-slider > div.bed-coupons__slide { width: 50% !important; } }
@media (min-width: 1270px) { .bed-slider > div.bed-coupons__slide, .flickity-slider > div.bed-coupons__slide { width: calc(100% / var(--bed-cp-cols, 3)) !important; } }
/* slider sản phẩm (bed-product-slider: trang sản phẩm / bài viết; bed-pslider: khối [bed_products_slider]) */
.bed-product-slider.bed-slider > div.bed-slide, .bed-product-slider .flickity-slider > div.bed-slide { width: 57% !important; padding: 0 0 0 8px; margin: 0; }
@media (min-width: 768px)  { .bed-product-slider.bed-slider > div.bed-slide, .bed-product-slider .flickity-slider > div.bed-slide { width: 27% !important; padding-left: 16px; } }
@media (min-width: 1024px) { .bed-product-slider.bed-slider > div.bed-slide, .bed-product-slider .flickity-slider > div.bed-slide { width: 25% !important; } }
.bed-pslider .bed-slider > div.bed-slide, .bed-pslider .flickity-slider > div.bed-slide { width: 57% !important; padding: 0 0 0 var(--bed-ps-gap); margin: 0; }
@media (min-width: 768px)  { .bed-pslider .bed-slider > div.bed-slide, .bed-pslider .flickity-slider > div.bed-slide { width: var(--bed-ps-w-md) !important; } }
@media (min-width: 1270px) { .bed-pslider .bed-slider > div.bed-slide, .bed-pslider .flickity-slider > div.bed-slide { width: var(--bed-ps-w-lg) !important; } }
/* video review */

/* Tiêu đề / tên: mẫu đặt letter-spacing: normal (chữ thường kế thừa -0.004em của body) */

/* Chữ thường của mẫu: line-height 1.42857 (20/14) — các thành phần không đặt lh riêng thừa hưởng đúng */
body.bed-theme { line-height: 1.42857; }

/* Flatsome ép h1–h6 { width:100% } → tiêu đề trong hàng flex (vd. tiêu đề danh mục + sắp xếp) bị đẩy xuống dòng; mẫu dùng w-auto */
body.bed-theme :is(h1, h2, h3, h4, h5, h6) { width: auto; }
