/* YTHUA — module blog - style mặc định, trung tính để dễ ghi đè bằng theme */

.ythua-bd-wrapper {
	display: grid;
	gap: 24px;
	margin: 24px 0;
}

.ythua-bd-grid {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.ythua-bd-list {
	grid-template-columns: 1fr;
}

.ythua-bd-card {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ythua-bd-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.ythua-bd-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ythua-bd-thumb img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.ythua-bd-content {
	padding: 16px;
}

.ythua-bd-title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.3;
}

.ythua-bd-meta {
	font-size: 13px;
	color: #777;
	margin-bottom: 8px;
}

.ythua-bd-excerpt {
	font-size: 14px;
	line-height: 1.5;
	color: #444;
}

.ythua-bd-empty {
	padding: 24px;
	text-align: center;
	color: #777;
}

.ythua-bd-pagination {
	margin-top: 24px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ythua-bd-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
}

.ythua-bd-pagination .page-numbers.current {
	background: #222;
	color: #fff;
	border-color: #222;
}

/* ===== Module Shop (sản phẩm) ===== */

.ythua-shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.ythua-product-card {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.ythua-product-thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.ythua-product-info {
	padding: 16px;
}

.ythua-product-title {
	margin: 0 0 8px;
	font-size: 16px;
}

.ythua-product-title a {
	color: inherit;
	text-decoration: none;
}

.ythua-product-price {
	margin-bottom: 12px;
	font-size: 15px;
}

.ythua-price-old {
	text-decoration: line-through;
	color: #999;
	margin-right: 8px;
}

.ythua-price-sale {
	color: #c0392b;
	font-weight: 600;
}

.ythua-price-current {
	font-weight: 600;
}

.ythua-price-hint {
	display: block;
	font-size: 12px;
	color: #777;
	margin-top: 4px;
}

.ythua-add-to-cart-form {
	display: flex;
	gap: 8px;
}

.ythua-qty-input {
	width: 56px;
}

.ythua-out-of-stock {
	color: #999;
	font-style: italic;
}

/* ===== Nút dùng chung ===== */

.ythua-btn {
	display: inline-block;
	padding: 8px 16px;
	border: none;
	border-radius: 4px;
	background: #222;
	color: #fff;
	cursor: pointer;
	text-decoration: none;
	font-size: 14px;
}

.ythua-btn:hover {
	background: #444;
	color: #fff;
}

.ythua-btn-secondary {
	background: #eee;
	color: #222;
}

.ythua-btn-secondary:hover {
	background: #ddd;
	color: #222;
}

.ythua-btn-small {
	padding: 4px 10px;
	font-size: 12px;
}

/* ===== Thông báo trạng thái ===== */

.ythua-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.ythua-notice-success {
	background: #e8f6ea;
	color: #1e7b34;
	border: 1px solid #b8e6c1;
}

.ythua-notice-error {
	background: #fbe9e7;
	color: #b3261e;
	border: 1px solid #f3c2bd;
}

/* ===== Module Giỏ hàng ===== */

.ythua-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
}

.ythua-cart-table th,
.ythua-cart-table td {
	padding: 10px;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: middle;
}

.ythua-cart-code-form {
	margin-top: 6px;
	font-size: 12px;
}

.ythua-cart-code-form input[type="text"] {
	width: 100px;
	margin-right: 4px;
}

.ythua-remove-link {
	color: #b3261e;
	text-decoration: none;
}

.ythua-cart-total {
	font-size: 18px;
	margin: 16px 0;
	text-align: right;
}

.ythua-checkout-form textarea,
.ythua-checkout-form input[type="text"],
.ythua-checkout-form input[type="tel"] {
	width: 100%;
	max-width: 420px;
}

/* ===== Module Tài khoản ===== */

.ythua-account-tabs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 32px;
}

.ythua-account-col input {
	width: 100%;
	max-width: 320px;
}

.ythua-orders-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}

.ythua-orders-table th,
.ythua-orders-table td {
	padding: 10px;
	border-bottom: 1px solid #eee;
	text-align: left;
}

/* ===== Icon trên menu (Blog / Shop / Giỏ hàng / Tài khoản) ===== */

.ythua-menu-icon {
	font-size: 16px;
	vertical-align: middle;
	margin-right: 2px;
}

.ythua-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 8px;
	background: #c0392b;
	color: #fff;
	font-size: 10px;
	line-height: 16px;
	vertical-align: top;
	margin-right: 4px;
}

/* ===== Trang Bacatami (siêu thị tổng) ===== */

.ythua-bacatami-filter-bar {
	margin: 24px 0;
	display: grid;
	gap: 12px;
}

.ythua-filter-companies,
.ythua-filter-loai {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ythua-filter-secondary {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.ythua-filter-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid #e2e2e2;
	background: #fff;
	color: #444;
	font-size: 13px;
	text-decoration: none;
}

.ythua-filter-pill-small {
	padding: 5px 12px;
}

.ythua-filter-pill.is-active {
	background: #222;
	border-color: #222;
	color: #fff;
}

.ythua-filter-pill.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ythua-filter-search {
	display: flex;
	gap: 8px;
}

.ythua-filter-search input[type="text"] {
	min-width: 220px;
	padding: 6px 10px;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
}

.ythua-bacatami-intro {
	margin: 24px 0 40px;
}

.ythua-company-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}

.ythua-company-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 20px 12px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	background: #fff;
	text-align: center;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ythua-company-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.ythua-company-logo {
	width: 64px;
	height: 64px;
	object-fit: contain;
	border-radius: 50%;
}

.ythua-company-logo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f2f2;
	color: #999;
	font-size: 28px;
}

.ythua-company-name {
	font-weight: 600;
	font-size: 14px;
}

.ythua-company-card-disabled {
	cursor: default;
	opacity: 0.55;
}

.ythua-company-card-disabled:hover {
	box-shadow: none;
	transform: none;
}

.ythua-company-soon {
	font-size: 11px;
	color: #999;
}

.ythua-company-block {
	margin: 48px 0;
	padding-top: 32px;
	border-top: 1px solid #eee;
	scroll-margin-top: 24px;
}

.ythua-company-block-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 20px;
}

.ythua-company-block-title h2 {
	margin: 0 0 6px;
}

.ythua-company-desc {
	color: #666;
	max-width: 520px;
	margin: 0 0 6px;
}

.ythua-company-need {
	max-width: 520px;
	margin: 0 0 6px;
	font-size: 13px;
	color: #8a5a00;
	background: #fff6e5;
	border: 1px solid #f0d9a6;
	border-radius: 4px;
	padding: 4px 8px;
	display: inline-block;
}

.ythua-company-need-label {
	font-weight: 600;
}

.ythua-company-link {
	font-size: 13px;
}

.ythua-company-block-tabs {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.ythua-tab-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #f2f2f2;
	font-size: 13px;
	font-weight: 600;
	color: #444;
}

.ythua-company-subheading {
	font-size: 16px;
	margin: 20px 0 12px;
}

.ythua-shop-grid-small {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ===== Form thu thập email quan tâm (theo từng công ty) ===== */

.ythua-subscribe-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 10px;
}

.ythua-subscribe-form input[type="email"] {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 13px;
	min-width: 220px;
}

/* ===== Đăng ký: chọn loại tài khoản, dashboard cá nhân/doanh nghiệp ===== */

.ythua-account-type-choice {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 16px 0;
}

.ythua-account-hint {
	font-size: 13px;
	color: #777;
	margin: 4px 0 16px;
}

.ythua-btn-danger {
	background: #b3261e;
}

.ythua-btn-danger:hover {
	background: #8f1e18;
	color: #fff;
}

.ythua-settings-form {
	margin-bottom: 32px;
}

/* Tra cứu đơn hàng (v1.7.0) */
.ythua-lookup-form p {
	margin-bottom: 12px;
}
.ythua-lookup-form input[type="text"],
.ythua-lookup-form input[type="tel"] {
	width: 100%;
	max-width: 320px;
}
.ythua-lookup-result {
	margin-top: 24px;
}
.ythua-order-key {
	font-size: 1.05em;
	margin-top: 10px;
}

/* Tồn kho theo số lượng (v1.8.0) */
.ythua-low-stock {
	color: #b45309;
	font-size: 0.9em;
	margin: 4px 0;
}

/* Đặt lịch hẹn (v1.9.0) */
.ythua-booking-wrap {
	max-width: 560px;
}
.ythua-booking-step-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 12px 0 20px;
}
.ythua-booking-step-form select,
.ythua-booking-step-form input[type="date"] {
	padding: 8px 10px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	min-width: 220px;
}
.ythua-booking-confirm-form p {
	margin-bottom: 12px;
}
.ythua-booking-confirm-form input[type="text"],
.ythua-booking-confirm-form input[type="tel"],
.ythua-booking-confirm-form input[type="email"],
.ythua-booking-confirm-form select,
.ythua-booking-confirm-form textarea {
	width: 100%;
	max-width: 400px;
	padding: 8px 10px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	box-sizing: border-box;
}

/* Đăng nhập bằng Google (v1.10.0) */
.ythua-google-btn-row {
	margin-top: 10px;
}
.ythua-btn-google {
	display: inline-block;
	border: 1px solid #d6d6d6;
	background: #fff;
	color: #444;
}
.ythua-btn-google:hover {
	background: #f5f5f5;
	color: #222;
}

/* ===== Module Vlog (v1.11.0) ===== */

.ythua-vlog-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.ythua-vlog-wrap {
	margin-top: 8px;
}

/* Khung tỷ lệ dùng chung cho cả thumbnail lưới và khung phát video. */
.ythua-ratio-16-9 {
	position: relative;
	height: 0;
	padding-top: 56.25%;
}

.ythua-ratio-9-16 {
	position: relative;
	height: 0;
	padding-top: 177.78%;
	max-width: 360px;
	margin-left: auto;
	margin-right: auto;
}

.ythua-vlog-player-section {
	margin-bottom: 32px;
}

.ythua-vlog-player {
	width: 100%;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}

.ythua-vlog-player iframe,
.ythua-vlog-player video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
}

.ythua-vlog-player-title {
	margin: 0 0 6px;
	font-size: 22px;
}

.ythua-vlog-desc {
	font-size: 14px;
	line-height: 1.6;
	color: #444;
	margin-top: 8px;
}

.ythua-vlog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 8px 0 24px;
}

.ythua-vlog-card {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ythua-vlog-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.ythua-vlog-thumb {
	display: block;
	width: 100%;
	background: #111;
	overflow: hidden;
}

.ythua-vlog-thumb img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ythua-vlog-card-info {
	padding: 12px 14px;
}

.ythua-vlog-card-title {
	margin: 0 0 6px;
	font-size: 15px;
	line-height: 1.35;
}

.ythua-vlog-card-title a {
	color: inherit;
	text-decoration: none;
}

.ythua-vlog-card-meta {
	margin: 0;
	font-size: 12px;
	color: #777;
}

.ythua-vlog-card-meta a {
	color: inherit;
}

.ythua-vlog-submit-form input[type="text"],
.ythua-vlog-submit-form input[type="url"],
.ythua-vlog-submit-form textarea {
	width: 100%;
	max-width: 420px;
	padding: 8px 10px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	box-sizing: border-box;
}

/* ===== Module Sự kiện ===== */

.ythua-event-wrapper {
	max-width: 720px;
}

.ythua-event-header {
	margin-bottom: 20px;
}

.ythua-event-intro {
	color: #444;
}

.ythua-event-section {
	margin: 20px 0;
}

.ythua-event-section ul {
	margin: 0;
	padding-left: 20px;
}

.ythua-event-info {
	background: #f7f7f7;
	border-radius: 6px;
	padding: 14px 16px;
	margin: 20px 0;
}

.ythua-event-info p {
	margin: 4px 0;
}

.ythua-event-quote {
	font-style: italic;
	color: #555;
	border-left: 3px solid #222;
	padding-left: 14px;
	margin: 24px 0;
}

.ythua-event-seats {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #222;
	color: #fff;
	font-size: 14px;
	margin-bottom: 16px;
}

.ythua-event-seats-full {
	background: #b3261e;
}

.ythua-event-form textarea,
.ythua-event-form input[type="text"],
.ythua-event-form input[type="tel"],
.ythua-event-form input[type="email"],
.ythua-event-form input[type="number"] {
	width: 100%;
	max-width: 420px;
	padding: 8px 10px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	box-sizing: border-box;
}

/* ===== Công cụ (Bảng công & Chi tiêu) - trang /congcu ===== */

.ythua-tools-wrapper {
	max-width: 900px;
}

.ythua-tools-tool-title {
	margin-top: 0;
}

.ythua-tools-guest-notice {
	background: #fff7e6;
	border: 1px solid #f0d999;
	color: #6b4e00;
}

.ythua-tools-guest-notice a {
	margin-left: 6px;
	font-weight: 600;
}

.ythua-tools-form {
	background: #fafafa;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 16px;
	margin: 16px 0;
}

.ythua-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin: 14px 0;
}

.ythua-tools-field label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.ythua-tools-field input[type="number"],
.ythua-tools-field input[type="date"] {
	width: 100%;
	max-width: 220px;
	padding: 8px 10px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	box-sizing: border-box;
}

.ythua-tools-preview {
	background: #eef6ff;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 14px;
	color: #1a3d63;
}

.ythua-tools-month-title {
	margin-top: 28px;
}

.ythua-tools-summary-bar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.ythua-tools-summary-item {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ythua-tools-summary-label {
	font-size: 13px;
	color: #666;
}

.ythua-tools-summary-value {
	font-size: 18px;
	font-weight: 700;
}

/* Bảng chi tiết tháng: chuyển sang dạng card xếp dọc trên màn hình hẹp
   (điện thoại) thay vì buộc cuộn ngang - dùng data-label trên mỗi <td>
   làm nhãn thay cho <th>, giữ nguyên bảng thật cho trình đọc màn hình. */
@media (max-width: 680px) {
	.ythua-tools-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.ythua-tools-table,
	.ythua-tools-table tbody,
	.ythua-tools-table tr,
	.ythua-tools-table td {
		display: block;
		width: 100%;
	}

	.ythua-tools-table tr {
		border: 1px solid #e2e2e2;
		border-radius: 10px;
		margin-bottom: 12px;
		padding: 8px 12px;
	}

	.ythua-tools-table td {
		border-bottom: 1px solid #f0f0f0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 10px;
		padding: 8px 0;
		text-align: right;
	}

	.ythua-tools-table td:last-child {
		border-bottom: none;
	}

	.ythua-tools-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #555;
		text-align: left;
	}
}

/* ===== Thanh hiển thị mã đang dùng (thay cho đăng nhập) ===== */

.ythua-tools-ma-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	background: #eef6ff;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 14px;
}

/* ===== Form hạn mức chi tiêu riêng (mỗi mã tự đặt) ===== */

.ythua-tools-han-muc-form {
	background: #f5fbf7;
	border-color: #cfe8d8;
}

.ythua-tools-hint {
	font-size: 12px;
	color: #666;
	margin: 8px 0 0;
}
