/* Thẻ sản phẩm, so sánh, khối giá trang sản phẩm, thanh liên hệ nổi – dùng design tokens (--bcy-*). */

/* ---------- Thẻ sản phẩm ---------- */
.bcy-card-brand { margin: 0 0 2px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bcy-color-primary, #d71920); }
.bcy-card-specs { list-style: none; margin: 6px 0 0; padding: 0; font-size: .8rem; line-height: 1.45; color: var(--bcy-color-muted, #6b7280); }
.bcy-card-specs li { margin: 0; }
.bcy-card-specs__label { color: var(--bcy-color-text, #1a1a1a); font-weight: 500; }
.bcy-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--bcy-color-border, #e5e7eb); font-size: .78rem; color: var(--bcy-color-muted, #6b7280); }
.bcy-compare-btn {
	display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 4px 10px; min-height: 30px;
	border: 1px solid var(--bcy-color-border, #e5e7eb); border-radius: 99px; background: transparent;
	color: inherit; font: inherit; font-size: .78rem; font-weight: 600; line-height: 1.2; cursor: pointer; text-transform: none; letter-spacing: 0;
}
.bcy-compare-btn:hover, .bcy-compare-btn.is-active { border-color: var(--bcy-color-primary, #d71920); color: var(--bcy-color-primary, #d71920); }
.bcy-compare-btn.is-active { background: color-mix(in srgb, var(--bcy-color-primary, #d71920) 8%, transparent); }
.bcy-compare-btn--single { min-height: 38px; padding: 6px 14px; font-size: .88rem; }

/* ---------- Lưới / danh sách ---------- */
.bcy-view-toggle { display: inline-flex; gap: 4px; margin: 0 0 12px; padding: 3px; border: 1px solid var(--bcy-color-border, #e5e7eb); border-radius: 12px; }
.bcy-view-toggle button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--bcy-color-muted, #6b7280); cursor: pointer; }
.bcy-view-toggle button[aria-pressed="true"] { background: var(--bcy-color-primary, #d71920); color: #fff; }
@media (min-width: 550px) {
	.bcy-view-list [data-bcy-region="results"] .products > .product-small.col,
	.bcy-view-list [data-bcy-region="results"] ul.products > li.product { flex-basis: 100% !important; max-width: 100% !important; width: 100% !important; }
	.bcy-view-list [data-bcy-region="results"] .product-small.box { display: flex; align-items: stretch; }
	.bcy-view-list [data-bcy-region="results"] .product-small .box-image { flex: 0 0 34%; max-width: 280px; }
	.bcy-view-list [data-bcy-region="results"] .product-small .box-text { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 24px; text-align: left; }
}

/* ---------- Khay so sánh ---------- */
.bcy-compare-tray { position: fixed; z-index: 9990; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(980px, calc(100% - 24px)); background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / .2); border: 1px solid var(--bcy-color-border, #e5e7eb); }
.bcy-compare-tray[hidden] { display: none; }
.bcy-compare-tray__inner { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.bcy-compare-tray__title { flex: none; font-size: .9rem; }
.bcy-compare-tray__list { display: flex; flex: 1; gap: 8px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.bcy-compare-tray__item { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; padding: 6px 26px 6px 6px; border: 1px solid var(--bcy-color-border, #e5e7eb); border-radius: 12px; font-size: .8rem; line-height: 1.3; }
.bcy-compare-tray__item img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.bcy-compare-tray__item span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bcy-compare-tray__item.is-empty { justify-content: center; border-style: dashed; color: #9ca3af; padding: 6px; min-height: 54px; }
.bcy-compare-tray__item button { position: absolute; top: 2px; right: 4px; margin: 0; padding: 0 4px; border: 0; background: none; font-size: 1.1rem; line-height: 1; color: #6b7280; cursor: pointer; }
.bcy-compare-tray__actions { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.bcy-compare-tray__go { margin: 0 !important; }
.bcy-compare-tray__clear { margin: 0; padding: 0; border: 0; background: none; font-size: .78rem; text-decoration: underline; color: #6b7280; cursor: pointer; }
@media (max-width: 849px) {
	.bcy-compare-tray { bottom: 74px; border-radius: 16px; }
	.bcy-compare-tray__title { display: none; }
	.bcy-compare-tray__item { padding-right: 22px; }
	.bcy-compare-tray__item span { display: none; }
	.bcy-compare-tray__item.is-empty span { display: block; }
}

/* ---------- Bảng so sánh ---------- */
.bcy-compare__empty { padding: 40px 20px; text-align: center; border: 1px dashed var(--bcy-color-border, #e5e7eb); border-radius: 20px; }
.bcy-compare__diff { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 600; cursor: pointer; }
.bcy-compare__diff input { margin: 0; }
.bcy-compare__scroll { overflow-x: auto; border: 1px solid var(--bcy-color-border, #e5e7eb); border-radius: 18px; }
.bcy-compare__table { width: 100%; min-width: calc(160px + var(--bcy-compare-cols, 2) * 200px); margin: 0; border-collapse: collapse; table-layout: fixed; }
.bcy-compare__table th, .bcy-compare__table td { padding: 12px 14px; border-bottom: 1px solid var(--bcy-color-border, #e5e7eb); vertical-align: top; text-align: left; font-size: .92rem; }
.bcy-compare__table tbody th { width: 170px; position: sticky; left: 0; background: #fafafa; font-weight: 600; z-index: 1; }
.bcy-compare__corner { width: 170px; position: sticky; left: 0; background: #fff; z-index: 2; }
.bcy-compare__product { position: relative; text-align: center !important; }
.bcy-compare__product img { width: 100%; max-width: 180px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.bcy-compare__name { display: block; margin: 8px 0 4px; font-weight: 700; color: var(--bcy-color-text, #1a1a1a); }
.bcy-compare__price { display: block; margin-bottom: 8px; }
.bcy-compare__remove { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: #f3f4f6; color: #374151; line-height: 28px; text-align: center; font-size: 1.1rem; }
.bcy-compare__remove:hover { background: var(--bcy-color-primary, #d71920); color: #fff; }
.bcy-compare__group th { background: color-mix(in srgb, var(--bcy-color-primary, #d71920) 7%, #fff) !important; color: var(--bcy-color-primary, #d71920); font-size: .78rem !important; letter-spacing: .08em; text-transform: uppercase; }
.bcy-compare__row.is-different td { background: color-mix(in srgb, var(--bcy-color-warning, #b45309) 6%, #fff); }
.only-diff .bcy-compare__row[data-differs="0"] { display: none; }

/* ---------- Trang sản phẩm: thương hiệu, công cụ, thẻ giá ---------- */
.bcy-product-brand { margin: 0 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.4; }
.bcy-product-brand a { color: var(--bcy-color-muted, #6b7280); }
.bcy-product-brand a:hover { color: var(--bcy-color-primary, #d71920); }
.bcy-product-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0 16px; font-size: .92rem; }
.bcy-product-tools__sep { color: var(--bcy-color-border, #d1d5db); }
.bcy-tool, .bcy-compare-btn.bcy-tool {
	display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 0; padding: 4px 0;
	border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--bcy-color-text, #1a1a1a);
	font: inherit; font-weight: 500; font-size: .92rem; line-height: 1.3; letter-spacing: 0; text-transform: none; cursor: pointer;
}
.bcy-tool:hover, .bcy-compare-btn.bcy-tool.is-active { color: var(--bcy-color-primary, #d71920); background: none; }
.bcy-share { position: relative; }
.bcy-share__menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: grid; min-width: 190px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--bcy-color-border, #e5e7eb); box-shadow: 0 14px 34px rgb(0 0 0 / .14); }
.bcy-share__menu[hidden] { display: none; }
.bcy-share__menu a, .bcy-share__menu button { display: block; width: 100%; margin: 0; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: .9rem; text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer; }
.bcy-share__menu a:hover, .bcy-share__menu button:hover { background: #f3f4f6; }

.bcy-pricecard { margin: 0 0 20px; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--bcy-color-border, #eceef1); box-shadow: 0 10px 30px rgb(16 16 16 / .07); }
.bcy-pricecard__head {
	display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px;
	background: linear-gradient(90deg, var(--bcy-color-primary, #d71920) 0%, color-mix(in srgb, var(--bcy-color-primary, #d71920) 55%, #f59e0b) 100%);
	color: #fff; font-weight: 800; font-size: clamp(.86rem, 2.2vw, 1.02rem); letter-spacing: .02em; line-height: 1.35; text-transform: uppercase; text-align: center;
}
.bcy-pricecard__head svg { flex: none; }
.bcy-pricecard__body { padding: 18px 16px 16px; text-align: center; }
.bcy-pricecard__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.bcy-pricecard__price { font-size: clamp(1.65rem, 4.6vw, 2.3rem); font-weight: 800; line-height: 1.15; color: var(--bcy-color-primary, #d71920); overflow-wrap: anywhere; }
.bcy-pricecard__price .amount, .bcy-pricecard__price bdi { color: inherit; font-size: inherit; font-weight: inherit; }
.bcy-pricecard__dash { margin: 0 .25em; }
.bcy-pricecard__pct { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 99px; background: var(--bcy-color-primary, #d71920); color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.2; }
.bcy-pricecard__regular { color: #9ca3af; font-size: 1.02rem; }
.bcy-pricecard__regular .amount { color: inherit; font-weight: 500; }
.bcy-pricecard [hidden] { display: none !important; }
.bcy-pricecard__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 12px; }
.bcy-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 12px; border-radius: 99px; background: #f3f4f6; color: var(--bcy-color-text, #1a1a1a); font-size: .86rem; font-weight: 600; line-height: 1.35; }
.bcy-chip--ok svg { color: var(--bcy-color-success, #15803d); flex: none; }
.bcy-chip--save { background: color-mix(in srgb, var(--bcy-color-primary, #d71920) 8%, #fff); color: var(--bcy-color-primary, #d71920); }
.bcy-chip--save svg { flex: none; }
.bcy-chip .amount { color: inherit; font-weight: 700; }
.summary:has(.bcy-pricecard) .woocommerce-variation-price { display: none; }

/* ---------- Chọn thuộc tính (thẻ ảnh / nút) ---------- */
.variations_form.has-bcy-swatches .bcy-swatch-native { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.variations:has(.bcy-swatch-field) th.label { display: none; }
table.variations:has(.bcy-swatch-field), table.variations:has(.bcy-swatch-field) tbody,
table.variations:has(.bcy-swatch-field) tr, table.variations:has(.bcy-swatch-field) td { display: block; width: 100%; padding: 0; border: 0; }
.bcy-swatch-field { margin: 0 0 16px; }
.bcy-swatch-field__label { display: block; margin-bottom: 8px; font-size: .95rem; font-weight: 600; line-height: 1.4; color: var(--bcy-color-text, #1a1a1a); }
.bcy-swatch-field__value { font-weight: 500; color: var(--bcy-color-primary, #d71920); }
.bcy-swatches { display: grid; gap: 10px; }
.bcy-swatches--image { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.bcy-swatches--button { grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); }
.bcy-swatch {
	position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px; margin: 0; padding: 8px 12px;
	border: 1.5px solid var(--bcy-color-border, #e5e7eb); border-radius: 12px; background: #fff; box-shadow: none;
	color: var(--bcy-color-text, #1a1a1a); font: inherit; font-size: .88rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer;
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.bcy-swatches--button .bcy-swatch { justify-content: center; text-align: center; }
.variations_form .bcy-swatch { border-radius: 12px !important; } /* Theme đặt bo tròn viên thuốc cho mọi nút. */
.bcy-pricecard__price:has(.bcy-pricecard__dash) { font-size: clamp(1.35rem, 3vw, 1.85rem); }
.bcy-swatch:hover { border-color: var(--bcy-color-primary, #d71920); background: #fff; }
.bcy-swatch:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bcy-color-primary, #d71920) 30%, transparent); }
.bcy-swatch.is-selected { border-color: var(--bcy-color-primary, #d71920); box-shadow: inset 0 0 0 1px var(--bcy-color-primary, #d71920); background: color-mix(in srgb, var(--bcy-color-primary, #d71920) 5%, #fff); }
.bcy-swatch.is-unavailable { opacity: .45; border-style: dashed; }
.bcy-swatch__img { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #f5f5f6; }
.bcy-swatch__text { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.bcy-swatch__dot { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--bcy-dot, #ccc); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15), 0 0 0 2px #fff; }
.bcy-swatch__check {
	display: none; position: absolute; right: -7px; bottom: -7px; width: 22px; height: 22px; border-radius: 50%;
	background: var(--bcy-color-success, #15803d) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
	box-shadow: 0 0 0 2px #fff;
}
.bcy-swatch.is-selected .bcy-swatch__check { display: block; }
.variations_form .reset_variations { display: inline-block; margin: 2px 0 10px; font-size: .85rem; }
@media (max-width: 549px) {
	.bcy-swatches--image { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bcy-swatch__img { width: 44px; height: 44px; }
	.bcy-swatch { padding: 6px 10px; font-size: .84rem; }
}

.bcy-promo-box { margin: 0 0 18px; border: 1.5px dashed var(--bcy-color-primary, #d71920); border-radius: 16px; overflow: hidden; }
.bcy-promo-box__title { margin: 0; padding: 10px 16px; background: var(--bcy-color-primary, #d71920); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .9rem; }
.bcy-promo-box__list, .bcy-promo-box__content { margin: 0; padding: 12px 16px 12px 36px; font-size: .9rem; }
.bcy-promo-box__content { padding-left: 16px; }
.bcy-promo-box__list li { margin: 0 0 6px; }
.bcy-installment-btn { margin-left: 0 !important; background: #fff !important; color: var(--bcy-color-primary, #d71920) !important; border: 2px solid var(--bcy-color-primary, #d71920) !important; }
.bcy-commit { margin: 18px 0; padding: 14px 16px; border-radius: 16px; background: #f7f7f8; }
.bcy-commit__title { margin: 0 0 8px; font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .04em; }
.bcy-commit__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.bcy-commit__list li { position: relative; margin: 0; padding-left: 24px; }
.bcy-commit__list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--bcy-color-success, #15803d); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; font-weight: 700; }
.bcy-collapsible { position: relative; }
.bcy-collapsible.is-collapsed { max-height: 640px; overflow: hidden; }
.bcy-collapsible.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(transparent, #fff); }
.bcy-collapsible__toggle { display: block; margin: 12px auto 0 !important; }

/* ---------- Form tư vấn ---------- */
.bcy-lead--card { padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: #fff; color: var(--bcy-color-text, #1a1a1a); box-shadow: 0 20px 50px rgb(0 0 0 / .14); text-align: left; }
/* Form luôn đọc được kể cả khi đặt trong section nền tối (Flatsome tô chữ trắng cho .dark). */
.bcy-lead--card, .bcy-lead--card .bcy-lead__title, .bcy-lead--card label, .bcy-lead--card .bcy-lead__field label { color: var(--bcy-color-text, #1a1a1a) !important; }
.bcy-lead--card .bcy-lead__sub, .bcy-lead--card .bcy-lead__consent { color: var(--bcy-color-muted, #6b7280) !important; }
.bcy-lead--card input, .bcy-lead--card select { color: var(--bcy-color-text, #1a1a1a) !important; background-color: #fff !important; }
.bcy-lead__title { margin: 0 0 6px; font-size: 1.4rem; font-weight: 800; color: inherit; }
.bcy-lead__sub { margin: 0 0 16px; color: var(--bcy-color-muted, #6b7280); font-size: .92rem; }
.bcy-lead__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.bcy-lead__field { margin: 0 0 12px; }
.bcy-lead__field label { display: block; margin-bottom: 4px; font-size: .82rem; font-weight: 600; color: inherit; }
.bcy-lead__field input, .bcy-lead__field select { width: 100%; min-height: 46px; margin: 0; font-size: 16px; }
.bcy-lead__field abbr { color: var(--bcy-color-primary, #d71920); text-decoration: none; border: 0; }
.bcy-lead__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bcy-lead__consent { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 6px; font-size: .82rem; font-weight: 400; line-height: 1.5; color: var(--bcy-color-muted, #6b7280); cursor: pointer; }
.bcy-lead__consent input { margin: 3px 0 0; flex: none; }
.bcy-lead__error { display: block; color: var(--bcy-color-danger, #b91c1c); font-size: .8rem; }
.bcy-lead__error:empty { display: none; }
.bcy-lead__submit { width: 100%; min-height: 50px; margin: 12px 0 0 !important; }
.bcy-lead__status { margin: 10px 0 0; font-weight: 600; font-size: .9rem; }
.bcy-lead__status.is-ok { color: var(--bcy-color-success, #15803d); }
.bcy-lead__status.is-error { color: var(--bcy-color-danger, #b91c1c); }

/* ---------- Thanh liên hệ nổi ---------- */
.bcy-float { position: fixed; z-index: 9980; right: 16px; bottom: 90px; }
.bcy-float__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bcy-float__list li { margin: 0; }
.bcy-float__btn { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; }
.bcy-float__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bcy-color-primary, #d71920); box-shadow: 0 8px 22px rgb(0 0 0 / .2); flex: none; order: 2; }
.bcy-float__btn--zalo .bcy-float__icon { background: #0068ff; }
.bcy-float__btn--messenger .bcy-float__icon { background: #a334fa; }
.bcy-float__btn--map .bcy-float__icon { background: #16a34a; }
.bcy-float__btn--phone .bcy-float__icon { animation: bcy-ring 2.4s infinite; }
.bcy-float__text { order: 1; display: none; padding: 6px 12px; border-radius: 10px; background: rgb(20 20 20 / .9); font-size: .8rem; line-height: 1.3; white-space: nowrap; }
.bcy-float__btn:hover .bcy-float__text, .bcy-float__btn:focus-visible .bcy-float__text { display: block; }
.bcy-float__label { display: block; font-weight: 700; }
.bcy-float__sub { display: block; opacity: .85; }
@keyframes bcy-ring { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bcy-color-primary, #d71920) 50%, transparent); } 50% { box-shadow: 0 0 0 12px transparent; } }
@media (max-width: 849px) {
	.bcy-float { left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--bcy-color-border, #e5e7eb); box-shadow: 0 -6px 20px rgb(0 0 0 / .08); padding-bottom: env(safe-area-inset-bottom); }
	.bcy-float__list { flex-direction: row; gap: 0; }
	.bcy-float__list li { flex: 1; }
	.bcy-float__btn { flex-direction: column; gap: 2px; padding: 6px 2px; color: var(--bcy-color-text, #1a1a1a) !important; }
	.bcy-float__icon { width: 34px; height: 34px; order: 1; box-shadow: none; }
	.bcy-float__icon svg { width: 18px; height: 18px; }
	.bcy-float__text { display: block !important; order: 2; padding: 0; background: none; font-size: .68rem; text-align: center; }
	.bcy-float__sub { display: none; }
	body:has(.bcy-float) { padding-bottom: 64px; }
	body:has(.bcy-float) .back-to-top { bottom: 80px !important; }
}
@media (prefers-reduced-motion: reduce) { .bcy-float__btn--phone .bcy-float__icon { animation: none; } }
