/*
Theme Name: Flatsome Child
Description: Child theme cho taikhoanai.vn — WordPress + Flatsome + WooCommerce
Author: taikhoanai
Template: flatsome
Version: 1.0.0
Text Domain: flatsome-child
*/

/* ============================================================
   CUSTOM CSS — taikhoanai.vn
   Toàn bộ CSS custom đặt ở đây, KHÔNG dùng <style> inline.
   ============================================================ */

/* ------------------------------------------------------------
   1. BIẾN MÀU
   ------------------------------------------------------------ */
:root {
	--tk-primary: #2563eb;
	--tk-primary-dark: #1d4ed8;
	--tk-accent: #ff2535;
	--tk-text: #0f172a;
	--tk-muted: #64748b;
	--tk-border: #e2e8f0;
	--tk-bg-soft: #f8fafc;
	--tk-auto: #2454d6;
	--tk-auto-bg: #f9fbff;
	--tk-auto-border: #9db8ff;
	--tk-manual: #a36112;
	--tk-manual-bg: #fffaf2;
	--tk-manual-border: #e4c38c;
	--tk-radius: 10px;
}

/* ------------------------------------------------------------
   2. BADGE GIAO HÀNG (listing + trang sản phẩm)
   ------------------------------------------------------------ */
.tk-card-delivery-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	width: fit-content;
	min-height: 22px;
	margin: 0 0 6px;
	padding: 2px 8px;
	border-radius: 6px;
	border: 1px solid var(--tk-border);
	font-size: 11px;
	line-height: 1.2;
	font-weight: 600;
	white-space: nowrap;
}

.tk-card-delivery-badge.is-auto {
	color: var(--tk-auto);
	border-color: var(--tk-auto-border);
	background: var(--tk-auto-bg);
}

.tk-card-delivery-badge.is-manual {
	color: var(--tk-manual);
	border-color: var(--tk-manual-border);
	background: var(--tk-manual-bg);
}

.tk-card-delivery-symbol {
	font-size: 11px;
	line-height: 1;
}

/* Badge trên trang sản phẩm: đặt trên nút Add to cart */
.tk-single-delivery {
	margin: 12px 0 8px;
}

/* ------------------------------------------------------------
   3. COUNTDOWN
   ------------------------------------------------------------ */
.tk-countdown-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.tk-countdown-label {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.85;
}

.tk-countdown-time {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-variant-numeric: tabular-nums;
	font-size: 18px;
	font-weight: 800;
}

.tk-countdown-sep {
	opacity: 0.6;
}

/* Trong section Flash Sale nền tối */
.tk-flash-section .tk-countdown-wrap {
	color: #fff;
}

/* ------------------------------------------------------------
   4. SECTION HEADER PATTERN (badge + H2 + sub + link phải)
   Dùng lại cho: Danh mục / Flash Sale / Bán chạy / Mới lên kệ / Chủ đề
   ------------------------------------------------------------ */
.tk-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.tk-section-head__left {
	min-width: 0;
	border-left: 4px solid var(--tk-primary);
	padding-left: 14px;
}

.tk-section-head__eyebrow {
	display: inline-flex;
	align-items: center;
	margin: 0 0 6px;
	padding: 3px 10px;
	border-radius: 20px;
	background: #eef4ff;
	color: var(--tk-primary-dark);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.tk-section-head__title {
	margin: 0;
	padding: 0;
	color: var(--tk-text);
	font-size: 30px;
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.4px;
}

.tk-section-head__sub {
	margin: 6px 0 0;
	color: var(--tk-muted);
	font-size: 13px;
	line-height: 1.4;
}

.tk-section-head__link {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

/* ------------------------------------------------------------
   5. TRUST BAR (4 ô lợi ích dưới header)
   ------------------------------------------------------------ */
.tk-trust-bar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--tk-border);
	background: #fff;
}

.tk-trust-bar__item {
	text-align: center;
	padding: 4px 8px;
}

.tk-trust-bar__title {
	display: block;
	color: var(--tk-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.tk-trust-bar__sub {
	display: block;
	color: var(--tk-muted);
	font-size: 11px;
	line-height: 1.3;
	margin-top: 2px;
}

@media (max-width: 849px) {
	.tk-trust-bar {
		grid-template-columns: repeat(2, 1fr);
	}

	.tk-section-head__title {
		font-size: 24px;
	}
}

/* ------------------------------------------------------------
   6. FLASH SALE SECTION
   ------------------------------------------------------------ */
.tk-flash-section {
	background: linear-gradient(135deg, #1a0a0f 0%, #2b0d14 100%);
	color: #fff;
	padding: 34px 0;
}

.tk-flash-section .tk-section-head__title {
	color: #fff;
}

.tk-flash-section .tk-section-head__sub {
	color: rgba(255, 255, 255, 0.72);
}

.tk-flash-section .tk-section-head__left {
	border-left-color: var(--tk-accent);
}

.tk-flash-section .tk-section-head__eyebrow {
	background: rgba(255, 37, 53, 0.16);
	color: #ff9aa2;
}

/* Card sản phẩm trong section nền tối: chữ phải sáng */
.tk-flash-section .product-small .box-text,
.tk-flash-section .product-small .name,
.tk-flash-section .product-small .name a,
.tk-flash-section .product-small .category,
.tk-flash-section .product-small .price,
.tk-flash-section .product-small .price ins,
.tk-flash-section .product-small .price bdi {
	color: #fff;
}

.tk-flash-section .product-small .price del,
.tk-flash-section .product-small .price del bdi {
	color: rgba(255, 255, 255, 0.55);
}

.tk-flash-section .product-small .price ins {
	text-decoration: none;
	font-weight: 700;
}

/* Nút "Chọn" trong card tối */
.tk-flash-section .product-small .button {
	background-color: #fff;
	border-color: #fff;
	color: #0f172a;
}

.tk-flash-section .product-small .button:hover {
	background-color: rgba(255, 255, 255, 0.85);
	border-color: rgba(255, 255, 255, 0.85);
	color: #0f172a;
}

/* ------------------------------------------------------------
   7. PRODUCT CARD
   ------------------------------------------------------------ */
.tk-product-grid .product-small .box-text {
	text-align: left;
}

.tk-product-grid .product-small .name {
	font-size: 13px;
	line-height: 1.35;
	font-weight: 600;
	min-height: 2.7em;
	margin-bottom: 4px;
}

.tk-product-grid .product-small .price {
	font-size: 14px;
}

.tk-product-grid .product-small .category {
	display: block;
	font-size: 10px;
	letter-spacing: 0.04em;
	color: var(--tk-muted);
	margin-bottom: 3px;
}

/* ------------------------------------------------------------
   7b. FLASH SALE: giá gạch ngang hiển thị đúng
   ------------------------------------------------------------ */
.tk-product-grid .product-small .price del {
	opacity: 0.65;
	font-weight: 400;
	margin-right: 4px;
}

.tk-product-grid .product-small .price ins {
	text-decoration: none;
	font-weight: 700;
}

/* ------------------------------------------------------------
   8. DANH MỤC (card trang chủ)
   ------------------------------------------------------------ */
/* Flatsome render danh mục bằng .box-category: card trắng có viền + ảnh vuông */
.box-category {
	border: 1px solid var(--tk-border);
	border-radius: var(--tk-radius);
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s, transform 0.2s;
}

.box-category:hover {
	border-color: var(--tk-primary);
	transform: translateY(-2px);
}

.box-category .box-image {
	background: var(--tk-bg-soft);
}

.box-category .box-text {
	padding: 14px 14px 16px;
	text-align: left;
}

.box-category .header-title {
	margin: 0 0 2px;
	font-size: 13px;
	line-height: 1.3;
	letter-spacing: 0;
}

.box-category .count {
	margin: 0;
	font-size: 11px;
	text-transform: none;
	letter-spacing: 0;
	color: var(--tk-muted);
	opacity: 1;
}

.tk-cat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

@media (max-width: 849px) {
	.tk-cat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.tk-cat-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 16px;
	border: 1px solid var(--tk-border);
	border-radius: var(--tk-radius);
	background: #fff;
	text-decoration: none;
	transition: border-color 0.2s, transform 0.2s;
}

.tk-cat-card:hover {
	border-color: var(--tk-primary);
	transform: translateY(-2px);
}

.tk-cat-card__name {
	color: var(--tk-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.tk-cat-card__count {
	color: var(--tk-muted);
	font-size: 12px;
}

.tk-cat-card__keywords {
	color: var(--tk-muted);
	font-size: 11px;
	line-height: 1.4;
}

/* ------------------------------------------------------------
   9. PLACEHOLDER ẢNH — chỉ dùng cho ảnh TODO
   ------------------------------------------------------------ */
.tk-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	background: repeating-linear-gradient(
		45deg,
		#f1f5f9,
		#f1f5f9 10px,
		#e2e8f0 10px,
		#e2e8f0 20px
	);
	color: var(--tk-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	border-radius: var(--tk-radius);
}

/* ------------------------------------------------------------
   9b. TRANG SẢN PHẨM — tinh chỉnh buy box
   ------------------------------------------------------------ */
/* Giá hiện tại nổi bật, giá gốc mờ hơn */
.single-product .product-info .price del {
	opacity: 0.55;
	font-weight: 400;
	font-size: 0.7em;
}

.single-product .product-info .price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--tk-accent);
}

/* Dải giá variable: bớt khoảng trống thừa */
.single-product .product-info .price {
	margin-bottom: 10px;
}

/* Accordion tab: giữ nhịp đọc giống site mẫu */
.single-product .accordion-item .accordion-title {
	font-weight: 600;
}

.single-product .accordion-inner {
	font-size: 14px;
	line-height: 1.65;
}

/* Nút mua ngay: đẩy lên ngang hàng, không xuống dòng */
.single-product .variations_button {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.single-product .variations_button .quantity {
	margin-right: 0;
}

/* ------------------------------------------------------------
   10. TODO BANNER — hiển thị rõ nội dung cần viết
   ------------------------------------------------------------ */
.tk-todo {
	border-left: 4px solid #f59e0b;
	background: #fffbeb;
	padding: 10px 14px;
	margin: 12px 0;
	font-size: 13px;
	color: #78350f;
	border-radius: 0 6px 6px 0;
}

.tk-todo strong {
	color: #92400e;
}
