/**
 * WooCommerce Lite - Frontend Stylesheet (Ultra Lightweight ~15KB)
 * Tương thích 100% Theme Flatsome & Mobile First
 */

:root {
	--wclite-primary: #d26e4b;
	--wclite-primary-hover: #b85836;
	--wclite-success: #27ae60;
	--wclite-border: #e2e8f0;
	--wclite-bg-light: #f8fafc;
	--wclite-text-main: #1e293b;
	--wclite-text-muted: #64748b;
	--wclite-radius: 6px;
}

/* ==========================================================================
   1. GIỎ HÀNG (CART PAGE & DRAWER)
   ========================================================================== */
.wclite-cart-container {
	margin: 30px auto;
	font-family: inherit;
	color: var(--wclite-text-main);
}

.wclite-cart-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 30px;
	align-items: start;
}

@media (max-width: 850px) {
	.wclite-cart-layout {
		grid-template-columns: 1fr;
	}
}

.wclite-cart-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: var(--wclite-radius);
	border: 1px solid var(--wclite-border);
	overflow: hidden;
}

.wclite-cart-table th {
	background: var(--wclite-bg-light);
	padding: 14px 16px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
	border-bottom: 1px solid var(--wclite-border);
}

.wclite-cart-table td {
	padding: 16px;
	border-bottom: 1px solid var(--wclite-border);
	vertical-align: middle;
}

.wclite-product-cell {
	display: flex;
	align-items: center;
	gap: 15px;
}

.wclite-product-thumb {
	width: 65px;
	height: 65px;
	border-radius: 4px;
	object-fit: cover;
	border: 1px solid var(--wclite-border);
}

.wclite-product-info .title {
	font-weight: 600;
	color: var(--wclite-text-main);
	text-decoration: none;
	display: block;
	margin-bottom: 4px;
}

.wclite-product-info .variation-meta {
	font-size: 12px;
	color: var(--wclite-text-muted);
}

/* Quantity Controls */
.wclite-qty-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wclite-border);
	border-radius: 4px;
	overflow: hidden;
}

.wclite-qty-btn {
	background: #fff;
	border: none;
	width: 32px;
	height: 32px;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.wclite-qty-btn:hover {
	background: var(--wclite-bg-light);
}

.wclite-qty-input {
	width: 44px;
	height: 32px;
	text-align: center;
	border: none;
	border-left: 1px solid var(--wclite-border);
	border-right: 1px solid var(--wclite-border);
	font-weight: 600;
	font-size: 14px;
	outline: none;
}

.wclite-remove-btn {
	color: #94a3b8;
	font-size: 20px;
	text-decoration: none;
	line-height: 1;
	transition: color 0.2s;
}

.wclite-remove-btn:hover {
	color: #ef4444;
}

/* Cart Totals Box */
.wclite-cart-totals-box {
	background: #fff;
	border: 1px solid var(--wclite-border);
	border-radius: var(--wclite-radius);
	padding: 24px;
	position: sticky;
	top: 20px;
}

.wclite-cart-totals-box h3 {
	margin: 0 0 16px 0;
	font-size: 18px;
	font-weight: 700;
	border-bottom: 1px solid var(--wclite-border);
	padding-bottom: 12px;
}

.wclite-totals-row {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	font-size: 14px;
}

.wclite-totals-row.grand-total {
	border-top: 2px solid var(--wclite-border);
	margin-top: 10px;
	padding-top: 16px;
	font-size: 18px;
	font-weight: 700;
}

.wclite-btn-checkout {
	display: block;
	width: 100%;
	padding: 14px;
	background: var(--wclite-primary);
	color: #fff !important;
	text-align: center;
	font-weight: 700;
	border-radius: 4px;
	text-decoration: none;
	margin-top: 20px;
	border: none;
	cursor: pointer;
	transition: background 0.2s;
}

.wclite-btn-checkout:hover {
	background: var(--wclite-primary-hover);
}

/* Coupon Box */
.wclite-coupon-form {
	display: flex;
	gap: 8px;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid var(--wclite-border);
}

.wclite-coupon-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--wclite-border);
	border-radius: 4px;
	font-size: 13px;
	text-transform: uppercase;
}

.wclite-btn-coupon {
	padding: 8px 16px;
	background: #334155;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

/* ==========================================================================
   2. THANH TOÁN ONE-PAGE CHECKOUT
   ========================================================================== */
.wclite-checkout-wrap {
	margin: 30px auto;
	font-family: inherit;
}

.wclite-checkout-grid {
	display: grid;
	grid-template-columns: 1fr 420px;
	gap: 30px;
	align-items: start;
}

@media (max-width: 850px) {
	.wclite-checkout-grid {
		grid-template-columns: 1fr;
	}
}

.wclite-card {
	background: #fff;
	border: 1px solid var(--wclite-border);
	border-radius: var(--wclite-radius);
	padding: 24px;
	margin-bottom: 20px;
}

.wclite-card-title {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid var(--wclite-border);
	padding-bottom: 12px;
}

.wclite-form-row {
	margin-bottom: 16px;
}

.wclite-form-row label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13px;
}

.wclite-input,
.wclite-select,
.wclite-textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #fff;
}

.wclite-input:focus,
.wclite-select:focus,
.wclite-textarea:focus {
	border-color: var(--wclite-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(210, 110, 75, 0.15);
}

.wclite-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.wclite-row-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
}

@media (max-width: 600px) {
	.wclite-row-2,
	.wclite-row-3 {
		grid-template-columns: 1fr;
	}
}

/* Payment Selector Cards */
.wclite-payment-methods {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wclite-payment-card {
	border: 1.5px solid var(--wclite-border);
	border-radius: var(--wclite-radius);
	padding: 14px 16px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.wclite-payment-card:hover {
	border-color: #cbd5e1;
	background: var(--wclite-bg-light);
}

.wclite-payment-card.active {
	border-color: var(--wclite-primary);
	background: #fdf8f6;
}

.wclite-payment-card input[type="radio"] {
	margin-top: 3px;
	cursor: pointer;
}

.wclite-payment-info strong {
	display: block;
	font-size: 14px;
	margin-bottom: 2px;
}

.wclite-payment-info p {
	margin: 0;
	font-size: 12px;
	color: var(--wclite-text-muted);
}

/* Order Review Items */
.wclite-review-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wclite-border);
}

.wclite-review-thumb {
	width: 50px;
	height: 50px;
	border-radius: 4px;
	object-fit: cover;
	border: 1px solid var(--wclite-border);
}

.wclite-review-details {
	flex: 1;
}

.wclite-review-title {
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	margin-bottom: 2px;
}

.wclite-review-qty {
	font-size: 12px;
	color: var(--wclite-text-muted);
}

.wclite-review-price {
	font-weight: 600;
	font-size: 14px;
}

/* Place Order Button */
.wclite-btn-submit-order {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 15px;
	background: var(--wclite-primary);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
	margin-top: 20px;
}

.wclite-btn-submit-order:hover {
	background: var(--wclite-primary-hover);
}

.wclite-btn-submit-order:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ==========================================================================
   3. FRONTEND SWATCHES (CHỌN BIẾN THỂ)
   ========================================================================== */
.wclite-swatches-box {
	margin: 20px 0;
}

.wclite-swatch-group {
	margin-bottom: 15px;
}

.wclite-swatch-label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 8px;
}

.wclite-swatches-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wclite-swatch-item {
	padding: 6px 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	background: #fff;
	transition: all 0.2s;
	user-select: none;
}

.wclite-swatch-item:hover {
	border-color: var(--wclite-primary);
}

.wclite-swatch-item.active {
	border-color: var(--wclite-primary);
	background: #fdf8f6;
	color: var(--wclite-primary);
}

.wclite-swatch-item.color-swatch {
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px #cbd5e1;
}

.wclite-swatch-item.color-swatch.active {
	box-shadow: 0 0 0 2px var(--wclite-primary);
}

/* ==========================================================================
   4. DRAWER CART (OFF-CANVAS POPUP)
   ========================================================================== */
.wclite-drawer-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wclite-drawer-backdrop.active {
	opacity: 1;
	visibility: visible;
}

.wclite-cart-drawer {
	position: fixed;
	top: 0;
	right: -400px;
	width: 380px;
	max-width: 90vw;
	height: 100%;
	background: #fff;
	z-index: 99999;
	box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
	transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
}

.wclite-cart-drawer.active {
	right: 0;
}

.wclite-drawer-header {
	padding: 16px 20px;
	border-bottom: 1px solid var(--wclite-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wclite-drawer-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.wclite-drawer-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
}

.wclite-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
}

.wclite-drawer-footer {
	padding: 20px;
	border-top: 1px solid var(--wclite-border);
	background: var(--wclite-bg-light);
}

/* Spinner & alerts */
.wclite-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.wclite-notice-box {
	padding: 14px 18px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 14px;
}
.wclite-notice-box.error {
	background: #fef2f2;
	border-left: 4px solid #ef4444;
	color: #991b1b;
}
.wclite-notice-box.success {
	background: #f0fdf4;
	border-left: 4px solid #22c55e;
	color: #166534;
}

/* ==========================================================================
   Cấu hình Grid Danh mục sản phẩm: Desktop 5 cột, Tablet 3 cột, Mobile 2 cột
   ========================================================================== */
.products.row.large-columns-5 > .col {
	max-width: 20%;
	flex-basis: 20%;
}
@media (max-width: 849px) {
	.products.row.medium-columns-3 > .col {
		max-width: 33.333333% !important;
		flex-basis: 33.333333% !important;
	}
}
@media (max-width: 549px) {
	.products.row.small-columns-2 > .col {
		max-width: 50% !important;
		flex-basis: 50% !important;
	}
}

/* ==========================================================================
   Tối ưu hiển thị Breadcrumbs chuẩn SEO & Rank Math
   ========================================================================== */
.woocommerce-breadcrumb,
.rank-math-breadcrumb {
	margin-bottom: 15px;
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}
.rank-math-breadcrumb p {
	margin: 0;
}
.woocommerce-breadcrumb a,
.rank-math-breadcrumb a {
	color: #444;
	text-decoration: none;
	transition: color 0.15s ease-in-out;
}
.woocommerce-breadcrumb a:hover,
.rank-math-breadcrumb a:hover {
	color: var(--wclite-primary, #0284c7);
}
.woocommerce-breadcrumb .divider,
.rank-math-breadcrumb .separator {
	margin: 0 6px;
	opacity: 0.5;
	font-weight: 300;
}
.woocommerce-breadcrumb .active,
.rank-math-breadcrumb .last {
	color: #111;
	font-weight: 600;
}
