.gia-bo {
	/* Đồng bộ Flatsome LV: primary #5b8c51, body #333, font Manrope/Roboto */
	--gb-primary: var(--fs-color-primary, #5b8c51);
	--gb-primary-dark: #4a7343;
	--gb-ink: #333333;
	--gb-muted: #666666;
	--gb-line: #d7e3db;
	--gb-head-bg: rgba(91, 140, 81, 0.12);
	--gb-soft-bg: #f4f8f3;
	--gb-title: var(--gb-primary);
	--gb-radius: 6px;
	--gb-cell-pad-y: 0.85rem;
	--gb-cell-pad-x: 1.15rem;
	--gb-cell-pad-edge: 1.4rem;
	margin: 1.5rem auto;
	color: var(--gb-ink);
	/* Không set font-family — để theme (Flatsome) quyết định */
	width: 100%;
	max-width: 80%;
	box-sizing: border-box;
}

.gia-bo *,
.gia-bo *::before,
.gia-bo *::after {
	box-sizing: border-box;
}

.gia-bo__board {
	width: 100%;
	max-width: 100%;
}

.gia-bo--single-day .gia-bo__table-wrap {
	border: 1px solid var(--gb-line);
	border-radius: var(--gb-radius);
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(91, 140, 81, 0.08);
}

.gia-bo__days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 1px solid var(--gb-line);
	border-bottom: 0;
	background: #fff;
}

.gia-bo__day {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.12rem;
	width: 100%;
	min-width: 0;
	min-height: 3.1rem;
	margin: 0;
	padding: 0.55rem 0.2rem;
	border: 0;
	border-right: 1px solid var(--gb-line);
	border-radius: 0;
	background: #fff;
	color: var(--gb-ink);
	cursor: pointer;
	/* Button UA font → lấy font body của theme */
	font: inherit;
	line-height: 1.15;
	transition: background 0.15s ease, color 0.15s ease;
	touch-action: manipulation;
}

.gia-bo__day:last-child {
	border-right: 0;
}

.gia-bo__day:hover {
	background: var(--gb-soft-bg);
}

.gia-bo__day:focus-visible {
	outline: 2px solid var(--gb-primary);
	outline-offset: -2px;
	z-index: 1;
}

.gia-bo__day.is-active {
	background: var(--gb-head-bg);
	color: var(--gb-primary-dark);
	font-weight: 700;
}

.gia-bo__day.is-empty {
	opacity: 0.55;
}

.gia-bo__day.is-empty.is-active {
	opacity: 1;
}

.gia-bo__day-wd {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #5a6f63;
}

.gia-bo__day.is-active .gia-bo__day-wd {
	color: var(--gb-primary);
}

.gia-bo__day-date {
	font-size: 0.88rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.gia-bo__panel {
	display: none;
	width: 100%;
}

.gia-bo__panel.is-active {
	display: block;
}

.gia-bo__empty {
	margin: 0;
	padding: 1rem 1.1rem;
	border: 1px solid var(--gb-line);
	border-top: 0;
	background: var(--gb-soft-bg);
	color: var(--gb-muted);
}

.gia-bo__table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--gb-line);
	border-top: 0;
	/* Chặn theme Flatsome thêm khoảng/hàng ảo dưới bảng */
	overflow-y: hidden;
	line-height: normal;
}

.gia-bo__table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	min-width: 480px;
	font-size: 1.125rem;
	line-height: 1.5;
	margin: 0 !important;
	color: var(--gb-ink);
}

.gia-bo .gia-bo__table th,
.gia-bo .gia-bo__table td {
	padding: var(--gb-cell-pad-y) var(--gb-cell-pad-x);
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--gb-line);
	border-top: 0;
	border-left: 0;
	border-right: 0;
}

.gia-bo .gia-bo__table thead th:first-child,
.gia-bo .gia-bo__table tbody td:first-child {
	padding-left: var(--gb-cell-pad-edge);
}

.gia-bo .gia-bo__table thead th:last-child,
.gia-bo .gia-bo__table tbody td:last-child {
	padding-right: var(--gb-cell-pad-edge);
}

.gia-bo .gia-bo__table thead th {
	background: var(--gb-head-bg);
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--gb-primary-dark);
	border-bottom: 1px solid var(--gb-line);
	white-space: nowrap;
}

/* Viền dưới đã có ở .gia-bo__table-wrap — bỏ border hàng cuối để không nhìn như hàng trống */
.gia-bo__table tbody tr:last-child td {
	border-bottom: 0;
}

.gia-bo__table tbody tr:nth-child(odd) td {
	background: #fff;
}

.gia-bo__table tbody tr:nth-child(even) td {
	background: var(--gb-head-bg);
}

.gia-bo__table tbody tr {
	transition: background 0.15s ease;
}

.gia-bo__table tbody tr:hover td {
	background: rgba(91, 140, 81, 0.18);
}

.gia-bo__table tbody td {
	color: var(--gb-ink);
	font-weight: 500;
	opacity: 1;
	-webkit-text-fill-color: var(--gb-ink);
}

.gia-bo__col-product {
	font-weight: 600;
}

.gia-bo__col-price {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-weight: 600;
	color: var(--gb-ink);
}

.gia-bo__col-date,
.gia-bo__col-unit {
	white-space: nowrap;
	font-weight: 500;
	color: var(--gb-ink);
}

.gia-bo__updated {
	margin: 0.75rem 0 0;
	text-align: right;
	font-size: 0.92rem;
	font-style: italic;
	color: var(--gb-muted);
}

/* Theme orchard — tối, vẫn theo tông xanh LV */
.gia-bo--orchard {
	--gb-primary: var(--fs-color-primary, #5b8c51);
	--gb-ink: #f3f7f4;
	--gb-muted: #b7c7bd;
	--gb-line: rgba(243, 247, 244, 0.35);
	--gb-head-bg: rgba(91, 140, 81, 0.35);
	--gb-soft-bg: rgba(18, 36, 28, 0.55);
	--gb-title: #a5d6a7;
}

.gia-bo--orchard .gia-bo__day {
	background: rgba(18, 36, 28, 0.72);
	color: var(--gb-ink);
}

.gia-bo--orchard .gia-bo__day:hover,
.gia-bo--orchard .gia-bo__day.is-active {
	background: rgba(63, 122, 85, 0.35);
}

.gia-bo--orchard .gia-bo__day-wd,
.gia-bo--orchard .gia-bo__day.is-active .gia-bo__day-wd {
	color: var(--gb-muted);
}

.gia-bo--orchard .gia-bo__empty {
	background: rgba(18, 36, 28, 0.55);
	border-color: rgba(143, 208, 164, 0.35);
}

.gia-bo--orchard .gia-bo__table tbody tr:nth-child(odd) td {
	background: rgba(18, 36, 28, 0.55);
}

.gia-bo--orchard .gia-bo__table tbody tr:nth-child(even) td {
	background: rgba(63, 122, 85, 0.28);
}

.gia-bo--orchard .gia-bo__table tbody tr:hover td {
	background: rgba( 143, 208, 164, 0.35 );
}

/* —— Tablet —— */
@media (max-width: 900px) {
	.gia-bo {
		max-width: 100%;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		padding-left: 16px;
		padding-right: 16px;
	}

	.gia-bo__table {
		min-width: 0;
		font-size: 0.95rem;
	}

	.gia-bo__table th,
	.gia-bo__table td {
		padding: 0.7rem 0.65rem;
	}

	.gia-bo__day {
		padding: 0.5rem 0.15rem;
		min-height: 2.9rem;
	}

	.gia-bo__day-date {
		font-size: 0.8rem;
	}
}

/* —— Mobile —— */
@media (max-width: 640px) {
	.gia-bo {
		margin: 1rem auto;
		padding-left: 18px;
		padding-right: 18px;
	}

	/* 7 ngày vẫn dàn đều; ẩn /tháng để không tràn */
	.gia-bo__days {
		width: 100%;
	}

	.gia-bo__day {
		padding: 0.55rem 0.1rem;
		min-height: 3rem;
		gap: 0.08rem;
	}

	.gia-bo__day-wd {
		font-size: 0.65rem;
	}

	.gia-bo__day-date {
		font-size: 0.82rem;
	}

	.gia-bo__day-m {
		display: none;
	}

	/* Bảng → thẻ theo dòng */
	.gia-bo__table-wrap {
		overflow: visible;
		border: 1px solid var(--gb-line);
		border-top: 0;
		background: transparent;
	}

	.gia-bo__table,
	.gia-bo__table thead,
	.gia-bo__table tbody,
	.gia-bo__table tr,
	.gia-bo__table th,
	.gia-bo__table td {
		display: block;
		width: 100%;
	}

	.gia-bo__table {
		min-width: 0;
		border: 0;
	}

	.gia-bo__table thead {
		display: none !important;
	}

	.gia-bo__table tbody tr {
		margin: 0;
		padding: 0.9rem 1.15rem;
		border-bottom: 1px solid var(--gb-line);
	}

	.gia-bo__table tbody tr:last-child {
		border-bottom: 0;
	}

	.gia-bo__table tbody tr:nth-child(odd) {
		background: #fff;
	}

	.gia-bo__table tbody tr:nth-child(even) {
		background: var(--gb-head-bg);
	}

	.gia-bo__table tbody tr:hover {
		background: rgba(91, 140, 81, 0.18);
	}

	.gia-bo__table tbody tr:nth-child(odd) td,
	.gia-bo__table tbody tr:nth-child(even) td,
	.gia-bo__table tbody tr:hover td {
		background: transparent;
	}

	.gia-bo__table td {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 0.75rem;
		padding: 0.28rem 0;
		border: 0 !important;
		white-space: normal;
		text-align: right;
	}

	.gia-bo__table td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--gb-ink);
		flex: 0 1 auto;
		text-align: left;
		max-width: 45%;
	}

	.gia-bo__col-product {
		font-size: 1.15rem;
		font-weight: 700;
		color: var(--gb-ink);
		padding-bottom: 0.35rem !important;
		margin-bottom: 0.15rem;
		border-bottom: 1px dashed rgba(20, 38, 29, 0.18) !important;
	}

	.gia-bo__col-product::before {
		display: none;
	}

	.gia-bo__col-product {
		text-align: left;
		justify-content: flex-start;
	}

	/* Đã chọn ngày ở tab → ẩn cột Ngày cho gọn */
	.gia-bo__col-date {
		display: none !important;
	}

	.gia-bo__col-price {
		font-size: 1rem;
		font-weight: 600;
		color: var(--gb-ink);
	}

	.gia-bo__col-unit {
		font-size: 0.92rem;
		font-weight: 500;
		color: var(--gb-ink);
	}

	.gia-bo__updated {
		text-align: left;
		font-size: 0.82rem;
	}
}

/* —— Mobile hẹp —— */
@media (max-width: 380px) {
	.gia-bo {
		padding-left: 14px;
		padding-right: 14px;
	}

	.gia-bo__day {
		min-height: 2.75rem;
		padding: 0.45rem 0.05rem;
	}

	.gia-bo__day-wd {
		font-size: 0.58rem;
	}

	.gia-bo__day-date {
		font-size: 0.74rem;
	}

	.gia-bo__table tbody tr {
		padding: 0.65rem 0.7rem;
	}

	.gia-bo__table td::before {
		font-size: 0.85rem;
	}
}

@media (hover: none) {
	.gia-bo__day:hover {
		background: #fff;
	}

	.gia-bo__day.is-active:hover {
		background: var(--gb-head-bg);
	}

	.gia-bo__table tbody tr:hover td {
		background: inherit;
	}

	.gia-bo__table tbody tr:nth-child(odd):hover {
		background: #fff;
	}

	.gia-bo__table tbody tr:nth-child(even):hover {
		background: var(--gb-head-bg);
	}

	.gia-bo__table tbody tr:active {
		background: rgba(91, 140, 81, 0.18);
	}
}
