/*
Theme Name: CityFarm
Description: Theme riêng cho cửa hàng vật tư thủy canh CityFarm.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: cityfarm
*/

:root {
	--wc-primary: #cc0000;
	--wc-primary-text: #ffffff;
	--wc-secondary: #f5f5f5;
	--wc-secondary-text: #1f1f1f;
	--wc-highlight: #cc0000;
	--wc-highlight-text: #ffffff;
	--brand: #057b2c;
	--action: #cc0000;
	--action-hover: #a80000;
	--text: #1f1f1f;
	--muted: #525252;
	--border: #e5e5e5;
	--border-strong: #d4d4d4;
	--band: #f3f8f4;
	--brand-tint: #eef6f0;
	--footer: #1f1f1f;
	--radius: 8px;
	--radius-lg: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 Roboto, Arial, sans-serif; color: var(--text); background: #fff; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; font-weight: 700; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cf-skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: #fff; padding: 8px 12px; border-radius: var(--radius); }
.cf-skip:focus { left: 8px; }
.cf-wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.cf-main { padding-block: 20px 40px; }
.cf-section { padding-block: 32px; }
.cf-h2 { margin: 0 0 16px; font-size: 24px; }
.cf-h3 { margin: 16px 0 6px; font-size: 19px; }
.cf-muted { color: var(--muted); }
.cf-price { font-weight: 700; white-space: nowrap; }
.cf-price del { font-weight: 400; color: var(--muted); }
.cf-price ins { text-decoration: none; }

/* Nút: một màu hành động, hai mức nhấn */
.cf-btn, .button, .wp-element-button, button.button, a.button, input.button, input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px;
	border-radius: var(--radius); border: 1px solid var(--action); background: var(--action); color: #fff;
	font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.cf-btn:hover, .button:hover, input[type="submit"]:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }
.cf-btn--line { background: #fff; color: var(--action); }
.cf-btn--line:hover { background: #fff5f5; color: var(--action-hover); }
.button.disabled, .button:disabled, button:disabled[disabled] { opacity: .5; cursor: not-allowed; }
.added_to_cart { display: inline-block; margin-left: 8px; font-weight: 500; color: var(--brand); }

/* Ô nhập */
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
	width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; font: inherit; color: var(--text);
}
textarea { min-height: 96px; }
.select2-container .select2-selection--single { height: 44px; border-color: var(--border-strong); border-radius: var(--radius); }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 42px; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 42px; }

/* Đầu trang */
.cf-header { border-bottom: 1px solid var(--border); background: #fff; }
.cf-header__row { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.cf-logo { display: block; flex: none; line-height: 0; }
.cf-logo img { width: 150px; height: auto; }
.cf-search { flex: 1 1 280px; min-width: 0; }
.cf-header__link { flex: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.cf-cart-count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--action); color: #fff; font-size: 12px; font-weight: 700; }
.cf-cart-count[hidden] { display: none; }
.cf-icon-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex: none; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; color: var(--text); cursor: pointer; }
.cf-nav__list, .cf-nav__list ul { list-style: none; margin: 0; padding: 0; }
.cf-nav__list { display: flex; gap: 4px; flex-wrap: wrap; }
.cf-nav__list > li { position: relative; }
.cf-nav__list a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 500; border-radius: var(--radius); }
.cf-nav__list a:hover { background: var(--band); }
.cf-nav__list .current-menu-item > a { color: var(--brand); }
.cf-nav__list .sub-menu { display: none; position: absolute; z-index: 20; left: 0; top: 100%; min-width: 260px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.cf-nav__list li:hover > .sub-menu, .cf-nav__list li:focus-within > .sub-menu { display: block; }
.cf-nav__list .sub-menu a { font-weight: 400; }

/* Trang chủ */
.cf-home-top { padding-block: 40px 16px; }
.cf-home-h1 { margin: 0 0 24px; font-size: 34px; color: var(--brand); }
.cf-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cf-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.cf-door { display: flex; flex-direction: column; overflow: hidden; }
.cf-door__img { flex: 1 1 200px; min-height: 200px; background: var(--band); }
.cf-door__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cf-door__body { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cf-door h2 { margin: 0; font-size: 22px; }
.cf-door p { margin: 0; color: var(--muted); }
.cf-door--list { padding: 20px; gap: 12px; }
.cf-refill { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cf-refill li { display: flex; align-items: center; gap: 12px; padding-block: 8px; border-bottom: 1px solid #f0f0f0; }
.cf-refill__img { flex: none; width: 48px; height: 48px; border-radius: var(--radius); overflow: hidden; background: var(--band); line-height: 0; }
.cf-refill__img img { width: 100%; height: 100%; object-fit: cover; }
.cf-refill__name { flex: 1 1 auto; min-width: 0; text-decoration: none; }
.cf-refill .cf-btn { padding-inline: 14px; flex: none; }
.cf-add-short { display: none; font-size: 20px; line-height: 1; }
.cf-more { font-weight: 500; color: var(--brand); }
.cf-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cf-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.cf-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--band); }
.cf-tile__name { font-weight: 500; }
.cf-band { background: var(--band); }
.cf-reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cf-review { margin: 0; display: flex; gap: 16px; }
.cf-review img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.cf-review blockquote { margin: 4px 0 0; color: var(--muted); }
.cf-stars { color: #8a6100; letter-spacing: 1px; }
.cf-news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.cf-news a { font-weight: 500; }

/* Chân trang */
.cf-footer { background: var(--footer); color: #fff; }
.cf-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 32px; padding-block: 32px; }
.cf-footer__title { margin: 0 0 10px; font-size: 16px; }
.cf-footer p { margin: 0 0 10px; }
.cf-footer__list { list-style: none; margin: 0; padding: 0; }
.cf-footer__list a { display: flex; align-items: center; min-height: 36px; }
.cf-map { width: 100%; height: 160px; border: 0; border-radius: var(--radius); background: #333; }
.cf-bottom-bar { display: none; }

/* Trang nội dung */
.cf-prose { max-width: 828px; }
.cf-prose iframe { max-width: 100%; }
.cf-prose h1 { font-size: 30px; margin: 0 0 16px; }
.cf-prose table { width: 100%; border-collapse: collapse; }
.cf-postlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.cf-postlist li { display: flex; gap: 16px; }
.cf-postlist h2 { margin: 0 0 4px; font-size: 18px; }
.cf-postlist p { margin: 0; }
.cf-postlist__img { flex: none; width: 96px; }
.cf-postlist__img img { border-radius: var(--radius); }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

/* Cửa hàng */
.woocommerce-breadcrumb { margin-bottom: 14px; color: var(--muted); }
.woocommerce-products-header__title { margin: 0 0 8px; font-size: 28px; }
.cf-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cf-chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; }
.cf-chip:hover { background: var(--band); }
.cf-chip[aria-current="page"] { border-color: var(--brand); color: var(--brand); font-weight: 500; }
.woocommerce-result-count { margin: 0 0 12px; float: left; color: var(--muted); line-height: 44px; }
.woocommerce-ordering { float: right; margin: 0 0 12px; }
.woocommerce-ordering select { width: auto; }
ul.products { clear: both; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 12px; border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; text-decoration: none; position: relative; }
ul.products li.product img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); margin: 0 !important; }
ul.products li.product .woocommerce-loop-product__title { margin: 0; padding: 0 !important; font-size: 15px !important; font-weight: 400; flex: 1 1 auto; }
ul.products li.product .price { color: var(--text) !important; font-weight: 700; font-size: 15px !important; margin: 0 !important; display: block; }
ul.products li.product .price del { font-weight: 400; color: var(--muted); }
ul.products li.product .price ins { text-decoration: none; font-weight: 700; }
ul.products li.product .button { width: 100%; margin: 0 !important; background: #fff; color: var(--action); }
ul.products li.product .button:hover { background: #fff5f5; color: var(--action-hover); }
.onsale { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 2px 8px; border-radius: var(--radius); background: var(--action); color: #fff; font-size: 13px; font-weight: 700; min-height: 0 !important; min-width: 0 !important; line-height: 1.5 !important; margin: 0 !important; }
.woocommerce-pagination ul { list-style: none; padding: 0; display: flex; gap: 4px; justify-content: center; margin: 24px 0 0; border: 0 !important; }
.woocommerce-pagination li { border: 0 !important; }
.woocommerce-pagination .current { font-weight: 700; color: var(--brand); }

/* Trang sản phẩm */
div.product { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
div.product > * { min-width: 0; }
div.product div.images, div.product div.summary { width: auto !important; float: none !important; margin: 0 !important; }
div.product div.images img { border-radius: var(--radius-lg); }
div.product .flex-control-thumbs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
div.product .flex-control-thumbs li { width: auto !important; float: none !important; margin: 0 !important; }
div.product .flex-control-thumbs img { border-radius: var(--radius); cursor: pointer; opacity: .75; }
div.product .flex-control-thumbs img.flex-active, div.product .flex-control-thumbs img:hover { opacity: 1; }
div.product .product_title { margin: 0 0 10px; font-size: 30px; }
div.product p.price { margin: 0 0 8px; font-size: 28px !important; font-weight: 700; color: var(--text) !important; }
div.product p.price del { font-size: 20px; font-weight: 400; color: var(--muted); }
div.product p.price ins { text-decoration: none; }
div.product .stock { margin: 0 0 10px; font-weight: 500; color: var(--brand) !important; }
div.product .stock.out-of-stock { color: var(--action) !important; }
div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px !important; }
div.product form.cart::before, div.product form.cart::after { display: none !important; }
div.product form.cart .quantity { float: none !important; margin: 0 !important; }
div.product form.cart .quantity .qty { width: 72px; text-align: center; }
div.product form.cart .single_add_to_cart_button { flex: 1 1 180px; float: none !important; }
.cf-call { flex: 1 1 180px; }
.cf-note, .x24-vtp-deferred { margin: 0 0 8px; color: var(--muted); }
.woocommerce-product-details__short-description ul { margin: 0; padding-left: 20px; }
.woocommerce-tabs, section.related, section.upsells { grid-column: 1 / -1; min-width: 0; }
.woocommerce-tabs ul.tabs { display: none !important; }
.woocommerce-tabs .panel { max-width: 780px; margin: 0 !important; }
.woocommerce-tabs .panel img { border-radius: var(--radius); height: auto; }
.woocommerce-tabs .panel h2:first-child { font-size: 22px; margin: 0 0 8px; }
section.related > h2, section.upsells > h2 { font-size: 22px; margin: 0 0 12px; }

/* Giỏ hàng, thanh toán */
.woocommerce-cart-form__contents, .shop_table { width: 100%; border-collapse: collapse; }
.shop_table th, .shop_table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.shop_table .product-thumbnail img { width: 64px; border-radius: var(--radius); }
.shop_table .product-remove a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--muted) !important; text-decoration: none; font-size: 20px; }
.cart-collaterals { margin-top: 24px; }
.cart_totals { float: none !important; width: 100% !important; max-width: 480px; margin-left: auto; }
.cart_totals h2 { font-size: 20px; margin: 0 0 8px; }
.coupon { display: flex; gap: 8px; flex-wrap: wrap; }
.coupon input.input-text { width: 180px !important; }
.wc-proceed-to-checkout .button { width: 100%; }
form.checkout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
form.checkout .woocommerce-NoticeGroup { grid-column: 1 / -1; }
form.checkout #customer_details .col-1, form.checkout #customer_details .col-2 { width: 100% !important; float: none !important; }
form.checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; font-size: 20px; }
form.checkout #order_review { grid-column: 2; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
form.checkout h3 { font-size: 20px; margin: 0 0 12px; }
.woocommerce form .form-row { margin: 0 0 12px; padding: 0; float: none; width: 100%; }
.woocommerce form .form-row label { display: block; margin-bottom: 4px; font-weight: 500; }
.woocommerce form .form-row .required { color: var(--action); text-decoration: none; }
#payment { background: transparent !important; }
#payment ul.payment_methods { list-style: none; margin: 12px 0; padding: 0; }
#payment div.payment_box { background: var(--band) !important; color: var(--text) !important; border-radius: var(--radius); }
#payment div.payment_box::before { display: none !important; }
#place_order { width: 100%; }
#shipping_method { list-style: none; margin: 0; padding: 0; }

/* Thông báo */
.woocommerce-message, .woocommerce-info, .woocommerce-error { list-style: none; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--border); border-left: 0; border-radius: var(--radius); background: var(--band); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none !important; }
.woocommerce-error { background: #fef2f2; border-color: #fecaca; }

/* Màn hẹp */
@media (max-width: 1024px) {
	ul.products, .cf-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cf-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	body:not(.woocommerce-cart):not(.woocommerce-checkout) { padding-bottom: 53px; }
	.cf-wrap { padding-inline: 16px; }
	.cf-header__row { flex-wrap: wrap; gap: 8px; padding-block: 10px; justify-content: space-between; }
	.cf-icon-btn { display: inline-flex; order: 1; }
	.cf-logo { order: 2; }
	.cf-logo img { width: 120px; }
	.cf-cart-link { order: 3; }
	.cf-header__phone { display: none; }
	.cf-search { order: 4; flex: 1 1 100%; }
	.cf-nav { display: none; border-top: 1px solid var(--border); }
	.cf-nav.is-open { display: block; }
	.cf-nav__list { flex-direction: column; padding-block: 6px; }
	.cf-nav__list .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 12px; min-width: 0; }
	.cf-home-top { padding-block: 16px 8px; }
	.cf-home-h1 { font-size: 25px; margin-bottom: 12px; }
	.cf-section { padding-block: 20px; }
	.cf-h2 { font-size: 19px; margin-bottom: 10px; }
	.cf-doors { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.cf-door__img { height: 130px; }
	.cf-door__body { padding: 14px; gap: 8px; align-items: stretch; }
	.cf-door h2 { font-size: 19px; }
	.cf-door--list { padding: 14px; }
	.cf-refill li { display: grid; grid-template-columns: 48px minmax(0, 1fr) 44px; gap: 0 10px; align-items: center; }
	.cf-refill__img { grid-row: 1 / span 2; }
	.cf-refill__name { grid-column: 2; }
	.cf-refill .cf-price { grid-column: 2; }
	.cf-refill .cf-btn { grid-column: 3; grid-row: 1 / span 2; width: 44px; padding: 0; }
	.cf-add-long { display: none; }
	.cf-add-short { display: inline; }
	.cf-refill .added_to_cart { display: none; }
	.cf-grid-4, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	ul.products li.product { padding: 8px; }
	.cf-reviews, .cf-news, .cf-footer__grid { grid-template-columns: minmax(0, 1fr); }
	.cf-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
	.cf-chip { flex: none; }
	.woocommerce-result-count { float: none; line-height: 1.5; margin-bottom: 6px; }
	.woocommerce-ordering { float: none; }
	.woocommerce-ordering select { width: 100%; }
	div.product { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	div.product div.images .woocommerce-product-gallery__image img { height: 230px !important; object-fit: cover; }
	.woocommerce div.product div.images .flex-control-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
	.woocommerce div.product div.images .flex-control-thumbs li { flex: 0 0 56px; }
	.single-product .woocommerce-breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
	div.product .product_title { font-size: 22px; }
	div.product p.price { font-size: 24px !important; }
	div.product form.cart .single_add_to_cart_button, .cf-call { display: none; }
	.cf-prose h1 { font-size: 24px; }
	form.checkout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	form.checkout #order_review_heading, form.checkout #order_review, form.checkout #customer_details { grid-column: 1; grid-row: auto; }
	.woocommerce-cart-form__contents thead { display: none; }
	.cf-bottom-bar { position: fixed; z-index: 25; inset: auto 0 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); background: #fff; }
	.cf-bottom-bar > * { min-height: 52px; display: flex; align-items: center; justify-content: center; font: inherit; font-weight: 500; text-decoration: none; border: 0; background: #fff; color: var(--text); }
	.cf-bottom-bar .cf-bottom-add { background: var(--action); color: #fff; cursor: pointer; }
}

/* Đè CSS mặc định của WooCommerce */
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt, .woocommerce #payment #place_order, .woocommerce-cart .wc-proceed-to-checkout a.checkout-button { background: var(--action); color: #fff; border-radius: var(--radius); }
.woocommerce span.onsale { background: var(--action); color: #fff; }
.cf-shop-page h1 { margin: 0 0 16px; font-size: 28px; }
.woocommerce-cart table.cart img, .woocommerce-checkout table.cart img { width: 64px; border-radius: var(--radius); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea { min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); line-height: 1.5; }
.woocommerce form .form-row select { min-height: 44px; padding: 8px 32px 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); line-height: 1.5; }
#ship-to-different-address { margin: 12px 0; font-size: 15px; font-weight: 400; }
#ship-to-different-address label { display: flex; align-items: center; gap: 8px; }
.woocommerce-shipping-fields + .woocommerce-additional-fields h3, .woocommerce-additional-fields h3 { margin-top: 16px; }
.woocommerce table.shop_table { border-radius: var(--radius); border-color: var(--border); }
.woocommerce #payment { border-radius: 0; }
.woocommerce #payment ul.payment_methods { border-bottom: 0; }
.woocommerce ul.products li.product { padding: 12px; }
.woocommerce ul.products li.product a img { margin: 0 0 6px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 15px; color: var(--text); }
.woocommerce ul.products li.product .button { display: flex; min-height: 44px; border: 1px solid var(--action); border-radius: var(--radius); background: #fff; color: var(--action); font-weight: 500; }
.woocommerce ul.products li.product .button:hover { background: #fff5f5; color: var(--action-hover); }
.woocommerce ul.products li.product .added_to_cart { display: block; text-align: center; padding: 4px 0 0; }
.woocommerce span.onsale { top: 8px; left: 8px; right: auto; padding: 2px 8px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; min-width: 0; min-height: 0; }
.woocommerce div.product form.cart .button { min-height: 44px; border-radius: var(--radius); }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button { min-height: 44px; border-radius: var(--radius); font-weight: 500; }
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--action-hover); }
.woocommerce div.product div.images .woocommerce-product-gallery__trigger { top: 12px; right: 12px; }
.woocommerce-cart table.cart td.actions .coupon .input-text { min-height: 44px; }
@media (max-width: 768px) {
	.woocommerce ul.products li.product { padding: 8px; }
	.woocommerce div.product form.cart .single_add_to_cart_button, .cf-call { display: none; }
}
.woocommerce .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 32px 0 12px; line-height: 42px; }
.woocommerce #payment div.payment_box p { margin: 0; }

/* Đợt soi: thứ bậc màu, phản hồi, các trạng thái */
.cf-btn--line, .woocommerce ul.products li.product .button { border-color: var(--brand); color: var(--brand); background: #fff; }
.cf-btn--line:hover, .woocommerce ul.products li.product .button:hover { background: var(--brand-tint); color: var(--brand); border-color: var(--brand); }
.cf-btn--line.is-added { background: var(--brand); color: #fff; }
.woocommerce a.button:not(.alt):not(.add_to_cart_button), .woocommerce button.button:not(.alt) { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); background: #fff; color: var(--text); line-height: 1.25; }
.woocommerce a.button:not(.alt):not(.add_to_cart_button):hover, .woocommerce button.button:not(.alt):hover { background: var(--band); color: var(--text); }
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled] { background: #fff; color: var(--muted); padding: 8px 18px; }
.woocommerce a.added_to_cart, .cf-refill .added_to_cart { display: none !important; }
.cf-toast { position: fixed; z-index: 40; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: var(--radius); background: var(--footer); color: #fff; }
.cf-toast[hidden] { display: none; }
.cf-toast a { min-height: 44px; display: inline-flex; align-items: center; color: #fff; font-weight: 500; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--brand-tint); color: var(--brand); font-weight: 700; }
.woocommerce nav.woocommerce-pagination ul li a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.cf-more { min-height: 44px; display: inline-flex; align-items: center; }
.woocommerce form .form-row.woocommerce-validated input.input-text, .woocommerce form .form-row.woocommerce-validated select, .woocommerce form .form-row.woocommerce-validated .select2-selection, .woocommerce form .form-row textarea.input-text { border-color: var(--border-strong); }
.woocommerce form .form-row.woocommerce-invalid input.input-text, .woocommerce form .form-row.woocommerce-invalid select { border-color: var(--action); }
.woocommerce .show-password-input { width: 44px; height: 44px; top: 0 !important; right: 0 !important; display: flex; align-items: center; justify-content: center; }
.woocommerce-form-login__rememberme { min-height: 44px; display: inline-flex !important; align-items: center; gap: 8px; }
@media (min-width: 769px) {
	form.checkout { row-gap: 0; }
	form.checkout .woocommerce-NoticeGroup { grid-row: 1; margin-bottom: 16px; }
	form.checkout #order_review_heading { grid-row: 2; margin-bottom: 12px; }
	form.checkout #customer_details { grid-row: 2 / span 2; }
	form.checkout #order_review { grid-row: 3; }
}
.x24-vtp-deferred-row td { color: var(--action); font-weight: 500; background: #fff; }
p.x24-vtp-deferred { color: var(--text); }
.cf-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.cf-chips.is-end { -webkit-mask-image: none; mask-image: none; }
.cf-chips::-webkit-scrollbar { display: none; }
.cf-chip { flex: none; }
.cf-empty-actions { margin: 16px 0 8px; }
.cf-empty-actions .cf-chips { margin-bottom: 12px; }
.cf-trust { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 20px; }
.cf-trust li { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.cf-trust svg { flex: none; color: var(--brand); }
.cf-trust a { text-decoration: none; }
.cf-prose p, .cf-prose li, .woocommerce-tabs .panel p, .woocommerce-tabs .panel li { text-align: left !important; }
.woocommerce ul.order_details { margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.woocommerce ul.order_details::before, .woocommerce ul.order_details::after { display: none; }
.woocommerce ul.order_details li { float: none; margin: 0; padding: 0; border: 0; }
.cf-sub-toggle { display: none; }
.cf-bottom-bar .cf-bottom-alt { color: var(--brand); border-left: 1px solid var(--border); }
@media (max-width: 1024px) {
	.cf-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cf-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.cf-toast { bottom: 64px; }
	.cf-chips { margin-inline: -16px; padding-inline: 16px; }
	.cf-trust { margin-bottom: 14px; font-size: 14px; }
	.woocommerce-cart-form__contents tr.cart_item { display: grid !important; grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 6px 12px; padding: 12px; background: #fff !important; border-bottom: 1px solid var(--border); }
	.woocommerce-cart-form__contents tr.cart_item td { display: block !important; border: 0 !important; padding: 0 !important; text-align: left !important; background: none !important; }
	.woocommerce-cart-form__contents tr.cart_item td::before { display: none !important; }
	.woocommerce-cart-form__contents td.product-thumbnail { grid-column: 1; grid-row: 1 / span 2; }
	.woocommerce-cart-form__contents td.product-name { grid-column: 2; grid-row: 1; }
	.woocommerce-cart-form__contents td.product-remove { grid-column: 3; grid-row: 1; }
	.woocommerce-cart-form__contents td.product-price { display: none !important; }
	.woocommerce-cart-form__contents td.product-quantity { grid-column: 2; grid-row: 2; }
	.woocommerce-cart-form__contents td.product-subtotal { grid-column: 2 / span 2; grid-row: 3; font-weight: 700; }
	.woocommerce-cart-form__contents td.actions .coupon { display: flex; gap: 8px; }
	.woocommerce-cart-form__contents td.actions .coupon .input-text { flex: 1 1 auto; width: auto !important; margin: 0 !important; }
	.woocommerce-cart-form__contents td.actions .coupon .button { width: auto !important; float: none !important; }
	.woocommerce-cart-form__contents td.actions > .button { width: 100%; margin-top: 8px; }
	.cf-nav__list li.menu-item-has-children { display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
	.cf-nav__list .sub-menu { display: none; grid-column: 1 / -1; }
	.cf-nav__list li.is-open > .sub-menu, .cf-nav__list li:focus-within.is-open > .sub-menu { display: block; }
	.cf-nav__list li:hover:not(.is-open) > .sub-menu, .cf-nav__list li:focus-within:not(.is-open) > .sub-menu { display: none; }
	.cf-sub-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--text); font-size: 20px; cursor: pointer; }
	.woocommerce ul.order_details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.woocommerce ul.order_details li.method { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
	.cf-btn, .button, .cf-chip { transition: background-color .15s, color .15s; }
}

/* Vòng soi lại */
.woocommerce form .form-row.woocommerce-validated select, .woocommerce form .form-row.woocommerce-validated .select2-container .select2-selection { border-color: var(--border-strong) !important; }
.woocommerce-column--shipping-address { margin-top: 16px; }
.x24-vtp-deferred-row td::before { display: none !important; }
.woocommerce table.shop_table .x24-vtp-deferred-row td { text-align: left !important; }
@media (min-width: 769px) {
	.cf-chips { scrollbar-width: thin; padding-bottom: 6px; }
	.cf-chips::-webkit-scrollbar { display: block; height: 6px; }
	.cf-chips::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
}
@media (max-width: 768px) {
	.woocommerce table.shop_table_responsive.woocommerce-cart-form__contents tr.cart_item td.product-price { display: none !important; }
	.woocommerce table.shop_table_responsive.woocommerce-cart-form__contents tr.cart_item td { text-align: left !important; }
	.cf-trust li:nth-child(3) { grid-column: 1 / -1; }
	.cf-trust li:nth-child(4) { display: none; }
}
.aligncenter { display: block; margin-inline: auto; }
.alignleft { float: left; margin: 0 16px 8px 0; }
.alignright { float: right; margin: 0 0 8px 16px; }

/* Thông báo lỗi: một cột, dễ đọc từ trên xuống. */
.woocommerce-error { display: block; }
.woocommerce-error li { display: block; padding: 3px 0; }
.woocommerce-error a { color: inherit; }
/* Số trang: số hiện tại canh giữa như các số khác. */
.woocommerce nav.woocommerce-pagination ul { align-items: center; }
.woocommerce nav.woocommerce-pagination ul li span.current { min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); }
.woocommerce nav.woocommerce-pagination ul li a { padding: 0; }
@media (min-width: 1025px) {
	.cf-trust { display: flex; justify-content: space-between; }
}
.woocommerce-customer-details--phone::before, .woocommerce-customer-details--email::before { display: none !important; }
.woocommerce .woocommerce-customer-details address p.woocommerce-customer-details--phone, .woocommerce .woocommerce-customer-details address p.woocommerce-customer-details--email { padding-left: 0 !important; }
@media (max-width: 768px) {
	.woocommerce-cart-form__contents td.actions { padding-left: 12px !important; padding-right: 12px !important; }
	.woocommerce-cart-form__contents td.actions .coupon { width: 100%; padding: 0 !important; }
}
