/*
 * VBQ — CSS giao diện chung (child theme).
 *
 * Màu/chữ lấy từ Global của Elementor (biến --e-global-*), có giá trị dự phòng.
 * Các class gắn vào Container/Widget trong Elementor (Advanced → CSS Classes).
 */

:root {
	--vbq-primary: var(--e-global-color-primary, #105430);
	--vbq-cream: var(--e-global-color-secondary, #f1f0ec);
	--vbq-gold: var(--e-global-color-accent, #be9f56);
	--vbq-line: var(--e-global-color-vbqline, #9c9c9c);
	--vbq-line-light: var(--e-global-color-vbqlnlt, #d2d4d8);
	--vbq-dot: 8px;
	--vbq-dot-offset: 16px;
}

/* -------------------------------------------------------------------------
 * Khung kẻ có 4 chấm tròn ở góc — .vbq-frame
 * Chấm vẽ bằng background (không cần thêm phần tử). Biến thể --light: chấm trắng (trên nền xanh).
 * ---------------------------------------------------------------------- */
.vbq-frame {
	--vbq-dot-color: var(--vbq-primary);
	border: 1px solid var(--vbq-line);
	background-image:
		radial-gradient(circle, var(--vbq-dot-color) 48%, transparent 52%),
		radial-gradient(circle, var(--vbq-dot-color) 48%, transparent 52%),
		radial-gradient(circle, var(--vbq-dot-color) 48%, transparent 52%),
		radial-gradient(circle, var(--vbq-dot-color) 48%, transparent 52%);
	background-repeat: no-repeat;
	background-size: var(--vbq-dot) var(--vbq-dot);
	background-position:
		var(--vbq-dot-offset) var(--vbq-dot-offset),
		calc(100% - var(--vbq-dot-offset)) var(--vbq-dot-offset),
		var(--vbq-dot-offset) calc(100% - var(--vbq-dot-offset)),
		calc(100% - var(--vbq-dot-offset)) calc(100% - var(--vbq-dot-offset));
}

.vbq-frame--light {
	--vbq-dot-color: #fff;
	border-color: rgba(255, 255, 255, 0.8);
}

.vbq-frame--no-border {
	border: 0;
}

/* Đường kẻ phân cách section (thiết kế dùng kẻ mảnh trên/dưới các khối). */
.vbq-rule-top {
	border-top: 1px solid var(--vbq-line);
}

.vbq-rule-bottom {
	border-bottom: 1px solid var(--vbq-line);
}

/* Kẻ dọc giữa các cột con (lưới thương hiệu, 3 thẻ…). */
.vbq-rule-x > .e-con-inner > .e-con + .e-con,
.vbq-rule-x > .e-con + .e-con {
	border-left: 1px solid var(--vbq-line-light);
}

/* -------------------------------------------------------------------------
 * Timeline dọc — .vbq-timeline (container cha) + .vbq-timeline__item (từng mốc)
 * Đường chấm bên trái, mỗi mốc có chấm tròn đặc.
 * ---------------------------------------------------------------------- */
.vbq-timeline {
	position: relative;
	--vbq-tl-x: 20px;
	--vbq-tl-dot: 18px;
}

.vbq-timeline::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--vbq-tl-x);
	width: 2px;
	background-image: radial-gradient(circle, var(--vbq-primary) 1px, transparent 1.5px);
	background-size: 2px 6px;
	background-repeat: repeat-y;
	transform: translateX(-50%);
}

.vbq-timeline__item {
	position: relative;
	padding-left: calc(var(--vbq-tl-x) * 2 + 24px) !important;
}

.vbq-timeline__item::before {
	content: "";
	position: absolute;
	top: var(--vbq-tl-dot-top, 40px);
	left: var(--vbq-tl-x);
	width: var(--vbq-tl-dot);
	height: var(--vbq-tl-dot);
	border-radius: 50%;
	background: var(--vbq-primary);
	transform: translateX(-50%);
}

.vbq-timeline__item + .vbq-timeline__item {
	border-top: 1px solid var(--vbq-line);
}

@media (max-width: 767px) {
	.vbq-timeline {
		--vbq-tl-x: 12px;
		--vbq-tl-dot: 14px;
	}

	.vbq-timeline__item {
		padding-left: 40px !important;
	}
}

/* -------------------------------------------------------------------------
 * Icon tia nắng — .vbq-sunburst (widget Image dùng file assets/img/vbq-sunburst-*.svg)
 * ---------------------------------------------------------------------- */
.vbq-sunburst img {
	width: 70px;
	height: auto;
}

@media (max-width: 767px) {
	.vbq-sunburst img {
		width: 56px;
	}
}

/* -------------------------------------------------------------------------
 * Ảnh trong khung vòm (trang chủ, 2 bên tiêu đề mở đầu) — .vbq-arch
 * ---------------------------------------------------------------------- */
.vbq-arch img {
	aspect-ratio: 1 / 2.2;
	object-fit: contain;
	padding: 24px 16px;
	border: 2px solid var(--vbq-primary);
	border-radius: 999px;
	background: #fff;
}

/* -------------------------------------------------------------------------
 * Thẻ ảnh có chữ đè — .vbq-overlay-card (container có ảnh nền)
 * ---------------------------------------------------------------------- */
.vbq-overlay-card {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	transition: transform 0.4s ease;
}

.vbq-overlay-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.55) 100%);
	pointer-events: none;
}

.vbq-overlay-card,
.vbq-overlay-card .elementor-heading-title,
.vbq-overlay-card p {
	color: #fff;
}

.vbq-overlay-card:hover {
	transform: scale(1.02);
}

/* -------------------------------------------------------------------------
 * Nút có chấm trắng hai bên ("NHẬN TƯ VẤN") — .vbq-btn-dots
 * ---------------------------------------------------------------------- */
.vbq-btn-dots .elementor-button-text {
	display: inline-flex;
	gap: 40px;
	align-items: center;
}

.vbq-btn-dots .elementor-button-text::before,
.vbq-btn-dots .elementor-button-text::after {
	content: "";
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: currentColor;
}

/* -------------------------------------------------------------------------
 * Phân trang Loop Grid — ô vuông viền (Sản phẩm, Tin tức)
 * ---------------------------------------------------------------------- */
.vbq-pagination .elementor-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.vbq-pagination .elementor-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	margin: 0 !important;
	padding: 0 12px;
	border: 1px solid var(--vbq-gold);
	color: var(--vbq-gold);
}

.vbq-pagination .elementor-pagination .page-numbers.current,
.vbq-pagination .elementor-pagination a.page-numbers:hover {
	border-color: var(--vbq-primary);
	color: var(--vbq-primary);
}

/* -------------------------------------------------------------------------
 * Tiện ích
 * ---------------------------------------------------------------------- */

/* Ảnh sản phẩm nền trong đặt trên nền màu thẻ. */
.vbq-product-card__media {
	background-color: var(--e-global-color-vbqcard, #c9d7ec);
}

/* Giảm chuyển động theo cài đặt hệ điều hành. */
@media (prefers-reduced-motion: reduce) {
	.vbq-overlay-card,
	.vbq-overlay-card:hover {
		transform: none;
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Header — đè lên hero ở trang có hero (body.vbq-has-hero), nền xanh ở trang còn lại.
 * ---------------------------------------------------------------------- */
.vbq-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

body.vbq-has-hero .vbq-header {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px);
	right: 0;
	left: 0;
	z-index: 100;
	background: transparent;
}

body:not(.vbq-has-hero) .vbq-header {
	background-color: var(--vbq-primary);
}

/* Mũi tên menu con nhỏ như thiết kế (˅). */
.vbq-header .elementor-nav-menu--main .sub-arrow {
	padding-left: 6px;
	font-size: 0.6em;
}

/* Menu con: bỏ viền/bóng mặc định, thêm bóng nhẹ. */
.vbq-header .elementor-nav-menu--dropdown {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */
.vbq-footer__rule {
	border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.vbq-footer-menu .elementor-nav-menu--main .elementor-item::before {
	/* Ghi đè CSS pointer của Elementor để hiện dấu "- " trước mỗi link (theo thiết kế). */
	content: "-" !important;
	position: static !important;
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	margin-right: 0.4em;
	background: none !important;
	color: inherit !important;
	opacity: 1 !important;
	transform: none !important;
}

@media (min-width: 1025px) {
	.vbq-footer-menu .elementor-item {
		white-space: nowrap;
	}
}

/* -------------------------------------------------------------------------
 * Trang chủ & thành phần dùng lại
 * ---------------------------------------------------------------------- */

/* Dòng giữa tiêu đề mở đầu lớn hơn (thiết kế: 3 dòng, dòng giữa nổi bật). */
.vbq-em-lg {
	display: inline-block;
	font-size: 1.55em;
	line-height: 1.1;
}

/* Ảnh có nút tròn mũi tên ở giữa (danh sách 01/02/03, thẻ năng lực). */
.vbq-img-arrow .elementor-widget-container,
.vbq-img-arrow a {
	position: relative;
	display: block;
}

.vbq-img-arrow a::after {
	content: "\2192";
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1.5px solid #fff;
	border-radius: 50%;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	transform: translate(-50%, -50%);
	transition: background-color 0.3s, color 0.3s;
}

.vbq-img-arrow a:hover::after {
	background-color: #fff;
	color: var(--vbq-primary);
}

.vbq-img-arrow img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* Nhãn số thứ tự "• 01". */
.vbq-list-num .elementor-heading-title::before {
	content: "\2022";
	margin-right: 10px;
}

/* Lưới thương hiệu 2×2 có đường kẻ. */
.vbq-brand-grid {
	border-right: 1px solid var(--vbq-line-light);
	border-left: 1px solid var(--vbq-line-light);
}

.vbq-brand-grid > .e-con:nth-child(odd) {
	border-right: 1px solid var(--vbq-line-light);
}

.vbq-brand-grid > .e-con:nth-child(-n + 2) {
	border-bottom: 1px solid var(--vbq-line-light);
}

.vbq-brand-grid img {
	max-height: 320px;
	object-fit: contain;
}

@media (max-width: 767px) {
	.vbq-brand-grid img {
		max-height: 150px;
	}

	.vbq-em-lg {
		font-size: 1.25em;
	}
}

/* Slider ảnh toàn chiều rộng, chấm điều hướng dọc ở mép phải (trang chủ). */
.vbq-slider-vdots .swiper-slide-image {
	width: 100%;
	height: min(56vw, 860px);
	object-fit: cover;
}

.vbq-slider-vdots .swiper-pagination {
	top: 50% !important;
	right: 24px !important;
	bottom: auto !important;
	left: auto !important;
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: auto !important;
	transform: translateY(-50%);
}

.vbq-slider-vdots .swiper-pagination-bullet {
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	border: 2px solid transparent;
	background: var(--vbq-primary) !important;
	opacity: 1 !important;
}

.vbq-slider-vdots .swiper-pagination-bullet-active {
	border-color: #fff;
}

/* Nút Trước / Sau dính đáy cột trái (khối Năng lực). */
.vbq-carousel-nav {
	margin-top: auto;
}

.vbq-carousel-nav .elementor-button {
	width: 100%;
}

/* Logo khách hàng: đều chiều cao, căn giữa. */
.vbq-client-logo img {
	width: auto;
	max-width: 100%;
	height: 100px;
	object-fit: contain;
}

@media (max-width: 767px) {
	.vbq-client-logo img {
		height: 64px;
	}
}

/* Playfair Display mặc định dùng số kiểu cũ (oldstyle) — thiết kế dùng số thẳng hàng ("20", "2026"). */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
	font-variant-numeric: lining-nums;
}

/* -------------------------------------------------------------------------
 * Trang con: thanh tab, ô tìm kiếm nổi, thẻ sản phẩm
 * ---------------------------------------------------------------------- */

/* Thanh tab: gạch chân ngắn hơn chữ một chút (thiết kế), cuộn ngang trên mobile. */
.vbq-tabs .elementor-nav-menu--main .elementor-item::after {
	right: 15% !important;
	left: 15% !important;
	width: auto !important;
}

@media (max-width: 767px) {
	.vbq-tabs .elementor-nav-menu {
		flex-wrap: nowrap;
		overflow-x: auto;
		justify-content: flex-start !important;
		-webkit-overflow-scrolling: touch;
	}

	.vbq-tabs .elementor-nav-menu > li {
		flex: 0 0 auto;
	}
}

/* Ô tìm kiếm nổi ở góc phải phần mở đầu (desktop). */
@media (min-width: 1025px) {
	.vbq-intro-sub > .e-con-inner {
		position: relative;
	}

	.vbq-search-float {
		position: absolute !important;
		top: 0;
		right: 16px;
		width: auto !important;
	}
}

@media (max-width: 1024px) {
	.vbq-search-float {
		align-self: stretch;
	}

	.vbq-search-float .vbq-search {
		width: 100% !important;
	}
}

/* Thẻ sản phẩm. */
.vbq-product-card__media img {
	width: 100%;
	aspect-ratio: 336 / 470;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.vbq-product-card__media a {
	display: block;
	overflow: hidden;
}

.vbq-product-card:hover .vbq-product-card__media img {
	transform: scale(1.03);
}

.vbq-product-card .elementor-heading-title a {
	color: inherit;
}

/* Tab lọc thương hiệu: không viết hoa, không bo góc. */
.vbq-products .e-filter-item {
	text-transform: none;
}

/* Ngắt dòng cố định theo thiết kế desktop → bỏ trên mobile để chữ tự xuống dòng. */
@media (max-width: 767px) {
	.vbq-intro-sub .elementor-widget-text-editor br {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Tin tức
 * ---------------------------------------------------------------------- */
.vbq-img-cover img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.vbq-img-fill,
.vbq-img-fill .elementor-widget-container,
.vbq-img-fill a {
	height: 100%;
}

.vbq-img-fill img {
	width: 100%;
	height: 100%;
	min-height: 320px;
	object-fit: cover;
}

/* Khung kẻ quanh bài nổi bật và lưới bài (thiết kế: các ô ngăn bằng đường kẻ mảnh). */
.vbq-news-featured .e-loop-item,
.vbq-news-grid .e-loop-item {
	border-right: 1px solid var(--vbq-line-light);
	border-bottom: 1px solid var(--vbq-line-light);
}

.vbq-news-featured .elementor-loop-container,
.vbq-news-grid .elementor-loop-container {
	border-left: 1px solid var(--vbq-line-light);
}

.vbq-news-featured .elementor-loop-container {
	border-top: 1px solid var(--vbq-line-light);
}

.vbq-news-featured-card__media {
	border-left: 1px solid var(--vbq-line-light);
}

@media (max-width: 767px) {
	.vbq-news-featured-card__media {
		border-left: 0;
	}
}

.vbq-news-card .elementor-heading-title a,
.vbq-news-featured-card .elementor-heading-title a {
	color: inherit;
}

/* Tab lọc chuyên mục trông như thanh tab trang con. */
.vbq-tabs--filter .e-filter {
	justify-content: center;
}

/* Tab lọc rộng hơn màn hình: căn trái để cuộn ngang thấy đủ mục đầu/cuối. */
@media (max-width: 767px) {
	.elementor-widget-taxonomy-filter .e-filter {
		justify-content: flex-start !important;
	}
}

/* -------------------------------------------------------------------------
 * Trang giới thiệu: khung 2 cột, ảnh rộng, hàng thẻ, accordion
 * ---------------------------------------------------------------------- */
.vbq-frame2__media {
	border-left: 1px solid var(--vbq-line);
}

.vbq-frame2__media--left {
	border-right: 1px solid var(--vbq-line);
	border-left: 0;
}

.vbq-frame2__media img {
	max-height: 560px;
	object-fit: contain;
}

@media (max-width: 767px) {
	.vbq-frame2__media,
	.vbq-frame2__media--left {
		border: 0;
	}
}

.vbq-img-wide img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.vbq-img-band img {
	width: 100%;
	height: min(48vw, 640px);
	object-fit: cover;
}

.vbq-card-row > .e-con + .e-con {
	border-left: 1px solid var(--vbq-line-light);
}

@media (max-width: 767px) {
	.vbq-card-row > .e-con + .e-con {
		border-left: 0;
	}
}

.vbq-card-row .vbq-overlay-card {
	margin: 24px 16px;
}

/* Accordion: tiêu đề kẻ dưới, nút tròn +/−. */
.vbq-accordion .elementor-accordion-item {
	border: 0 !important;
	border-bottom: 1px solid var(--vbq-line) !important;
}

.vbq-accordion .elementor-tab-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 0 !important;
}

.vbq-accordion .elementor-accordion-icon {
	order: 2;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
	width: 32px !important;
	height: 32px;
	margin-left: 16px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 12px;
	line-height: 1;
}

.vbq-accordion .elementor-tab-content {
	padding: 0 0 24px !important;
	border: 0 !important;
}

/* Chữ nhấn vàng nghiêng trong tiêu đề ("Theo dõi xu hướng cùng Giffard"). */
.vbq-gold {
	color: var(--vbq-gold);
	font-style: italic;
}

.vbq-carousel-nav .elementor-button {
	text-transform: none;
}

/* -------------------------------------------------------------------------
 * Trang chi tiết (sản phẩm, bài viết)
 * ---------------------------------------------------------------------- */
.vbq-breadcrumb .elementor-widget-heading + .elementor-widget-heading::before {
	content: "›";
	margin-right: 8px;
	color: var(--vbq-line);
}

.vbq-breadcrumb .elementor-heading-title {
	display: inline;
}

.vbq-frame2__media--left-line {
	border-left: 1px solid var(--vbq-line);
}

@media (max-width: 767px) {
	.vbq-frame2__media--left-line {
		border-left: 0;
	}
}

.vbq-specs .elementor-heading-title:empty,
.vbq-specs .elementor-widget-heading:has(.elementor-heading-title:empty) {
	display: none;
}

/* Nội dung bài viết / mô tả sản phẩm soạn trong trình soạn thảo WordPress. */
.vbq-post-content {
	color: var(--e-global-color-vbqdark, #212120);
	font-size: 17px;
	line-height: 1.75;
}

.vbq-post-content h2,
.vbq-post-content h3,
.vbq-post-content h4 {
	margin: 1.6em 0 0.6em;
	color: var(--vbq-primary);
	font-family: "Playfair Display", serif;
	text-transform: none;
}

.vbq-post-content h2 {
	font-size: 28px;
}

.vbq-post-content h3 {
	font-size: 22px;
}

.vbq-post-content a {
	color: var(--vbq-primary);
	text-decoration: underline;
}

.vbq-post-content img {
	height: auto;
	margin: 1em 0;
}

.vbq-post-content blockquote {
	margin: 1.5em 0;
	padding: 8px 0 8px 24px;
	border-left: 3px solid var(--vbq-gold);
	font-style: italic;
}

/* Đường kẻ phân tách phía trên một widget (trang chi tiết sản phẩm). */
.vbq-sep-top {
	border-top: 1px solid var(--vbq-line-light);
	padding-top: 24px;
}

.vbq-product-detail__media img {
	width: 100%;
}

@media (min-width: 768px) {
	.vbq-product-detail__media {
		position: sticky;
		top: 120px;
	}
}

/* Nút trái tim ở góc thẻ sản phẩm. */
.vbq-product-card {
	position: relative;
}

.vbq-product-card > .vbq-product-card__wish,
.vbq-product-card > .e-con-inner > .vbq-product-card__wish {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: auto;
}

/* Header: trên tablet/mobile đẩy nút quan tâm + hamburger về bên phải. */
@media (max-width: 1024px) {
	.vbq-header .vbq-header__wish {
		margin-left: auto;
	}
}
