/*
 * Bottle ID: trang tra cứu + element ô nhập mã.
 *
 * Mọi màu đi qua biến --bid-*, mặc định suy ra từ màu chủ đề (--theme-color) và màu chữ đang dùng
 * (currentColor), nên đặt trên site nền sáng hay nền tối đều đọc được. Site muốn chỉnh riêng thì
 * khai lại biến trong theme-child (vd Miaaim: chữ trên nút màu tối). Ảnh nền dải tiêu đề gán thẳng
 * `background-image` cho `.bottle-page .bottle-hero` cùng `--bid-band-overlay: 1` để phủ lớp tối.
 */
.bottle-page,
.bottle-lookup {
	--bid-accent: var(--theme-color, #8b5a2b);
	--bid-accent-text: var(--bid-accent);
	--bid-on-accent: #fff;
	--bid-line: color-mix(in srgb, var(--bid-accent) 30%, transparent);
	--bid-line-soft: color-mix(in srgb, currentColor 12%, transparent);
	--bid-surface: color-mix(in srgb, currentColor 4%, transparent);
	--bid-muted: color-mix(in srgb, currentColor 68%, transparent);
	--bid-head-font: var(--font-header, inherit);
	--bid-ok: #4caf6a;
	--bid-warn: #e0645a;
}

.bottle-page {
	max-width: 1080px;
	margin: 0 auto 80px;
}

/* ---------------------------------------------------------------- dải tiêu đề */
.bottle-hero {
	position: relative;
	margin: 0 0 48px;
	padding: 72px 24px 64px;
	text-align: center;
	border-bottom: 1px solid var(--bid-line);
	/* ảnh nền: site tự gán background-image (không qua biến, url() trong biến tính theo file CSS này) */
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	isolation: isolate;
}

.bottle-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, color-mix(in srgb, var(--secondary-color, #000) 55%, transparent), color-mix(in srgb, var(--secondary-color, #000) 85%, transparent));
	opacity: var(--bid-band-overlay, 0);
}

.bottle-hero__crumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 10px;
	margin: 0 0 18px;
	font-size: 13px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--bid-muted);
}

.bottle-hero__crumbs > * + *::before {
	content: '/';
	margin-right: 10px;
	opacity: .6;
}

.bottle-hero__crumbs a {
	color: inherit;
	text-decoration: none;
}

.bottle-hero__crumbs a:hover {
	color: var(--bid-accent-text);
}

.bottle-hero__title {
	margin: 0;
	font-family: var(--bid-head-font);
	font-weight: 400;
	font-size: 46px;
	line-height: 1.15;
	letter-spacing: .07em;
	text-transform: uppercase;
}

.bottle-hero__title::after {
	content: '';
	display: block;
	width: 52px;
	height: 2px;
	margin: 18px auto 0;
	background: var(--bid-accent);
}

.bottle-hero__desc {
	max-width: 640px;
	margin: 20px auto 0;
	font-size: 17px;
	line-height: 1.65;
	color: var(--bid-muted);
}

/* ---------------------------------------------------------------- khung ô nhập */
.bottle-panel {
	max-width: 760px;
	margin: 0 auto;
	padding: 36px 32px;
	border: 1px solid var(--bid-line);
	background: var(--bid-surface);
}

.bottle-lookup {
	text-align: center;
}

.bottle-lookup__title {
	margin: 0 0 10px;
	font-family: var(--bid-head-font);
	font-weight: 400;
	font-size: 26px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bid-accent-text);
}

.bottle-lookup__desc {
	max-width: 560px;
	margin: 0 auto 20px;
	color: var(--bid-muted);
}

.bottle-lookup__form {
	display: flex;
	max-width: 600px;
	margin: 0 auto;
}

.bottle-lookup__input {
	flex: 1;
	min-width: 0;
	height: 54px;
	padding: 0 18px;
	border: 1px solid var(--bid-line);
	border-right: 0;
	border-radius: 0;
	background: var(--bid-surface);
	color: inherit;
	font-size: 17px;
	letter-spacing: .12em;
	text-transform: uppercase;
	transition: border-color .3s ease;
}

.bottle-lookup__input::placeholder {
	color: var(--bid-muted);
	letter-spacing: .02em;
	text-transform: none;
}

.bottle-lookup__input:focus {
	border-color: var(--bid-accent);
	box-shadow: none;
	outline: 0;
}

.bottle-lookup__btn,
.bottle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 54px;
	padding: 0 28px;
	border: 1px solid var(--bid-accent);
	border-radius: 0;
	background: var(--bid-accent);
	color: var(--bid-on-accent);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease;
}

.bottle-lookup__btn:hover,
.bottle-btn:hover {
	background: transparent;
	color: var(--bid-accent-text);
}

.bottle-btn--outline {
	background: transparent;
	color: var(--bid-accent-text);
}

.bottle-btn--outline:hover {
	background: var(--bid-accent);
	color: var(--bid-on-accent);
}

.bottle-lookup__example {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--bid-muted);
}

/* ---------------------------------------------------------------- ba bước hướng dẫn */
.bottle-guide {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 48px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: bid-step;
}

.bottle-guide__item {
	position: relative;
	padding: 36px 24px 30px;
	border: 1px solid var(--bid-line-soft);
	text-align: center;
	counter-increment: bid-step;
	transition: border-color .3s ease;
}

.bottle-guide__item:hover {
	border-color: var(--bid-line);
}

.bottle-guide__item::before {
	content: counter(bid-step, decimal-leading-zero);
	position: absolute;
	top: 14px;
	left: 18px;
	font-family: var(--bid-head-font);
	font-size: 15px;
	letter-spacing: .1em;
	color: var(--bid-muted);
}

.bottle-guide__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border: 1px solid var(--bid-line);
	border-radius: 50%;
	font-size: 26px;
	color: var(--bid-accent-text);
}

.bottle-guide__item h3 {
	margin: 18px 0 8px;
	font-family: var(--bid-head-font);
	font-weight: 400;
	font-size: 20px;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.bottle-guide__item p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--bid-muted);
}

/* ---------------------------------------------------------------- kết quả */
.bottle-result {
	display: grid;
	grid-template-columns: 380px 1fr;
	margin: 0 0 40px;
	border: 1px solid var(--bid-line);
}

.bottle-result__cert {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 28px 28px;
	text-align: center;
	border-right: 1px solid var(--bid-line);
	background: var(--bid-surface);
}

.bottle-result__seal {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border: 1px solid var(--bid-accent);
	border-radius: 50%;
	outline: 1px solid var(--bid-line);
	outline-offset: 5px;
	font-size: 30px;
	color: var(--bid-accent-text);
}

.bottle-result__eyebrow {
	margin: 24px 0 6px;
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--bid-muted);
}

.bottle-result__code {
	margin: 0;
	font-family: var(--bid-head-font);
	font-weight: 400;
	font-size: 38px;
	line-height: 1.2;
	letter-spacing: .08em;
	color: var(--bid-accent-text);
	word-break: break-word;
}

.bottle-result__line {
	margin: 6px 0 0;
	font-size: 15px;
	letter-spacing: .24em;
	text-transform: uppercase;
}

.bottle-result__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	padding: 5px 14px;
	border: 1px solid color-mix(in srgb, var(--bid-ok) 55%, transparent);
	color: var(--bid-ok);
	font-size: 13px;
	letter-spacing: .06em;
}

.bottle-result__product {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--bid-line-soft);
	color: inherit;
	text-decoration: none;
}

.bottle-result__product-img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.bottle-result__product-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}

.bottle-result__product:hover .bottle-result__product-img img {
	transform: scale(1.04);
}

.bottle-result__product-name {
	font-size: 15px;
	letter-spacing: .04em;
}

.bottle-result__product-name small {
	display: block;
	margin-bottom: 2px;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--bid-muted);
}

.bottle-result__product:hover .bottle-result__product-name {
	color: var(--bid-accent-text);
}

.bottle-result__body {
	padding: 36px 40px;
}

.bottle-result__heading {
	margin: 0 0 14px;
	font-family: var(--bid-head-font);
	font-weight: 400;
	font-size: 24px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bid-accent-text);
}

.bottle-result__list {
	margin: 0;
}

.bottle-result__row {
	display: grid;
	grid-template-columns: 190px 1fr;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--bid-line-soft);
}

.bottle-result__row dt {
	font-size: 13px;
	font-weight: 400;
	letter-spacing: .1em;
	line-height: 1.9;
	text-transform: uppercase;
	color: var(--bid-muted);
}

.bottle-result__row dd {
	margin: 0;
	font-size: 16px;
}

.bottle-result__row dd a {
	color: var(--bid-accent-text);
}

.bottle-result__muted {
	color: var(--bid-muted);
}

.bottle-chip {
	display: inline-block;
	margin-left: 4px;
	padding: 2px 12px;
	border: 1px solid currentColor;
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	vertical-align: 1px;
}

.bottle-chip--in_stock {
	color: var(--bid-ok);
}

.bottle-chip--sold {
	color: var(--bid-accent-text);
}

.bottle-chip--warn {
	color: var(--bid-warn);
}

.bottle-result__scan {
	display: flex;
	gap: 14px;
	margin: 24px 0 0;
	padding: 16px 18px;
	border-left: 2px solid var(--bid-accent);
	background: var(--bid-surface);
	font-size: 14px;
	line-height: 1.6;
	color: var(--bid-muted);
}

.bottle-result__scan i {
	padding-top: 3px;
	font-size: 18px;
	color: var(--bid-accent-text);
}

/* không tìm thấy / quá lượt */
.bottle-result--missing {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	padding: 44px 32px;
	text-align: center;
}

.bottle-result--missing .bottle-result__seal {
	border-color: var(--bid-warn);
	color: var(--bid-warn);
}

.bottle-result--missing .bottle-result__code {
	color: inherit;
}

.bottle-result__text {
	max-width: 520px;
	margin: 16px auto 24px;
	line-height: 1.65;
	color: var(--bid-muted);
}

/* ---------------------------------------------------------------- màn nhỏ */
@media (max-width: 991px) {
	.bottle-result {
		grid-template-columns: 1fr;
	}

	.bottle-result__cert {
		border-right: 0;
		border-bottom: 1px solid var(--bid-line);
	}

	.bottle-result__product-img {
		max-width: 420px;
	}
}

@media (max-width: 767px) {
	.bottle-page {
		margin-bottom: 48px;
	}

	.bottle-hero {
		margin-bottom: 28px;
		padding: 44px 16px 40px;
	}

	.bottle-hero__title {
		font-size: 30px;
	}

	.bottle-hero__desc {
		font-size: 15px;
	}

	.bottle-panel {
		padding: 24px 16px;
	}

	.bottle-lookup__form {
		flex-direction: column;
		gap: 10px;
	}

	/* flex: 1 trong hàng dọc = flex-basis 0 → ô nhập bị ép lùn */
	.bottle-lookup__input {
		flex: none;
		border-right: 1px solid var(--bid-line);
	}

	.bottle-guide {
		grid-template-columns: 1fr;
		gap: 14px;
		margin-top: 28px;
	}

	.bottle-result__cert {
		padding: 32px 18px 22px;
	}

	.bottle-result__code {
		font-size: 28px;
	}

	.bottle-result__body {
		padding: 24px 18px;
	}

	.bottle-result__row {
		grid-template-columns: 1fr;
		gap: 2px;
		padding: 12px 0;
	}
}
