/*
Theme Name: GP Auto Child
Description: Child theme cho GeneratePress, tối ưu cho website đăng bài và sản phẩm WooCommerce tự động: trang chủ theo danh mục, lưới thẻ đều nhau, nhiều link nội bộ, trang sản phẩm có nút liên hệ và ít CSS/JS thừa.
Author: Quincy Tran
Template: generatepress
Version: 1.2.1
Requires PHP: 7.4
Text Domain: gp-auto-child
*/

/* ==========================================================================
   1. Biến và nền tảng
   ========================================================================== */

:root {
	--gpc-cols: 3;
	--gpc-radius: 14px;
	--gpc-radius-sm: 8px;
	--gpc-gap: 20px;
	--gpc-border: rgba(0, 0, 0, 0.09);
	--gpc-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
	--gpc-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.07), 0 10px 26px rgba(0, 0, 0, 0.09);
	--gpc-muted: var(--contrast-2, #575760);
	--gpc-line: var(--contrast-3, #b2b2be);
}

body,
button,
input,
select,
optgroup,
textarea {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.gpc img {
	max-width: 100%;
	height: auto;
}

/* Mobile first: keep long imported titles/URLs inside their containers. */
.gpc .site-content > *,
.gpc .gpc-grid > *,
.gpc .gpc-footer__grid > * {
	min-width: 0;
}

.gpc .site-main,
.gpc .sidebar,
.gpc .gpc-footer,
.gpc .site-branding {
	overflow-wrap: anywhere;
}

.gpc .entry-content iframe,
.gpc .entry-content video,
.gpc .entry-content .wp-caption {
	max-width: 100%;
}

.gpc .entry-content pre {
	max-width: 100%;
	overflow-x: auto;
}

.gpc a:focus-visible,
.gpc button:focus-visible {
	outline: 2px solid var(--accent, #1e73be);
	outline-offset: 3px;
}

/* ==========================================================================
   2. Tiêu đề khối
   ========================================================================== */

.gpc-section {
	margin-bottom: 36px;
}

.gpc-section:last-child {
	margin-bottom: 0;
}

.gpc-section__title {
	font-size: 1.3rem;
	line-height: 1.3;
	margin: 0 0 6px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--accent, #1e73be);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
}

.gpc-section__title a {
	color: var(--contrast, #222);
	text-decoration: none;
}

.gpc-section__title a:hover,
.gpc-section__title a:focus {
	color: var(--accent, #1e73be);
}

.gpc-section__count {
	font-size: 0.8rem;
	font-weight: 400;
	color: var(--gpc-muted);
	background: var(--base-2, #f7f8f9);
	border-radius: 999px;
	padding: 3px 10px;
}

.gpc-section__desc {
	font-size: 0.92rem;
	color: var(--gpc-muted);
	margin: 12px 0 0;
}

.gpc-section__title + .gpc-grid,
.gpc-section__desc + .gpc-grid {
	margin-top: 22px;
}

/* ==========================================================================
   3. Lưới và thẻ bài viết
   ========================================================================== */

.gpc-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gpc-gap);
	align-items: stretch;
}

.gpc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--base-3, #fff);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	overflow: hidden;
	box-shadow: var(--gpc-shadow);
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.gpc-card:hover,
.gpc-card:focus-within {
	box-shadow: var(--gpc-shadow-hover);
	transform: translateY(-2px);
}

.gpc-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--base-2, #f7f8f9);
	overflow: hidden;
}

.gpc .gpc-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.gpc-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	text-align: center;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--gpc-line);
	background: var(--base-2, #f7f8f9);
}

.gpc-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 9px;
	padding: 16px 18px 18px;
}

.gpc-card__cat {
	align-self: flex-start;
	position: relative;
	z-index: 2;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 6px 11px;
	border-radius: 999px;
	color: var(--accent, #1e73be);
	background: color-mix(in srgb, var(--accent, #1e73be) 10%, transparent);
	text-decoration: none;
}

a.gpc-card__cat:hover,
a.gpc-card__cat:focus {
	color: var(--base-3, #fff);
	background: var(--accent, #1e73be);
}

a.gpc-card__cat {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
}

.gpc-card__title {
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.45;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.9em;
}

.gpc-card__title a {
	color: var(--contrast, #222);
	text-decoration: none;
}

/* Cả thẻ bấm được nhưng vẫn chỉ có một đường dẫn tới bài viết. */
.gpc-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.gpc-card:hover .gpc-card__title a,
.gpc-card__title a:focus {
	color: var(--accent, #1e73be);
}

.gpc-card__excerpt {
	flex: 1 1 auto;
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.6;
	color: var(--gpc-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 4.8em;
}

.gpc-card__date {
	margin-top: auto;
	font-size: 0.78rem;
	color: var(--gpc-line);
}

/* ==========================================================================
   4. Phân trang
   ========================================================================== */

.gpc-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 32px;
}

.gpc-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 13px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius-sm);
	background: var(--base-3, #fff);
	color: var(--contrast, #222);
	font-size: 0.9rem;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.gpc-pagination .page-numbers:hover,
.gpc-pagination .page-numbers:focus {
	background: var(--base-2, #f7f8f9);
	color: var(--accent, #1e73be);
}

.gpc-pagination .page-numbers.current {
	background: var(--accent, #1e73be);
	border-color: var(--accent, #1e73be);
	color: #fff;
	font-weight: 600;
}

.gpc-pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
}

.gpc-more {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	font-size: 0.85rem;
}

.gpc-more__label {
	color: var(--gpc-muted);
}

.gpc-more__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius-sm);
	background: var(--base-3, #fff);
	color: var(--contrast, #222);
	text-decoration: none;
}

.gpc-more__link:hover,
.gpc-more__link:focus {
	background: var(--accent, #1e73be);
	border-color: var(--accent, #1e73be);
	color: #fff;
}

.gpc-more__gap {
	color: var(--gpc-line);
}

/* ==========================================================================
   5. Header
   ========================================================================== */

.site-header .header-image,
.site-logo img {
	height: 44px;
	width: auto;
	border-radius: var(--gpc-radius-sm);
}

.main-navigation .main-nav ul li a {
	font-weight: 500;
}

.gpc-menu-search {
	display: flex;
	align-items: center;
	padding: 10px 20px;
}

.gpc-searchform {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--gpc-border);
	border-radius: 999px;
	background: var(--base-3, #fff);
	overflow: hidden;
}

.gpc-searchform__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: none;
	padding: 8px 14px;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--contrast, #222);
}

.gpc-searchform__input:focus {
	outline: none;
}

.gpc-searchform:focus-within {
	outline: 2px solid var(--accent, #1e73be);
	outline-offset: 2px;
}

.gpc-searchform__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--gpc-muted);
	cursor: pointer;
}

.gpc-searchform__submit:hover,
.gpc-searchform__submit:focus {
	color: var(--accent, #1e73be);
	background: none;
}

/* ==========================================================================
   6. Bài viết đơn
   ========================================================================== */

.gpc-breadcrumb {
	font-size: 0.83rem;
	color: var(--gpc-muted);
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--gpc-border);
}

.gpc-breadcrumb a {
	color: var(--gpc-muted);
	text-decoration: none;
}

.gpc-breadcrumb a:hover,
.gpc-breadcrumb a:focus {
	color: var(--accent, #1e73be);
	text-decoration: underline;
}

.single:not(.single-product) .entry-content,
.gpc-product-content {
	font-size: 1.02rem;
	line-height: 1.75;
}

.single:not(.single-product) .entry-content > p,
.gpc-product-content > p {
	margin-bottom: 1.3em;
}

.single .featured-image img,
.single .post-image img,
.single:not(.single-product) .entry-content img,
.gpc-product-content img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	border-radius: var(--gpc-radius);
	height: auto;
}

.single:not(.single-product) .entry-content img,
.gpc-product-content img {
	margin-top: 1.6em;
	margin-bottom: 1.6em;
}

.single:not(.single-product) .entry-content figure,
.gpc-product-content figure {
	margin: 1.6em 0;
	text-align: center;
}

.single:not(.single-product) .entry-content figcaption,
.gpc-product-content figcaption,
.single:not(.single-product) .entry-content .wp-caption-text,
.gpc-product-content .wp-caption-text {
	font-size: 0.82rem;
	color: var(--gpc-muted);
	margin-top: 8px;
}

.single:not(.single-product) .entry-content h2,
.gpc-product-content h2 {
	font-size: 1.28rem;
	line-height: 1.35;
	font-weight: 700;
	margin: 1.9em 0 0.7em;
	padding: 0.55em 0.8em;
	border-left: 4px solid var(--accent, #1e73be);
	border-radius: var(--gpc-radius-sm);
	background: var(--base-2, #f7f8f9);
	color: var(--contrast, #222);
}

.single:not(.single-product) .entry-content h3,
.gpc-product-content h3 {
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 1.6em 0 0.6em;
	color: var(--contrast, #222);
}

.single:not(.single-product) .entry-content h4,
.gpc-product-content h4 {
	font-size: 1.08rem;
	font-weight: 600;
	margin: 1.4em 0 0.5em;
}

.single:not(.single-product) .entry-content ul,
.gpc-product-content ul,
.single:not(.single-product) .entry-content ol,
.gpc-product-content ol {
	margin: 0 0 1.3em 1.4em;
}

.single:not(.single-product) .entry-content li,
.gpc-product-content li {
	margin-bottom: 0.5em;
}

.gpc .entry-content table {
	display: block;
	max-width: 100%;
	border-radius: var(--gpc-radius-sm);
	overflow-x: auto;
}

.single:not(.single-product) .entry-content blockquote,
.gpc-product-content blockquote {
	margin: 1.6em 0;
	padding: 1em 1.2em;
	border-left: 4px solid var(--gpc-line);
	border-radius: var(--gpc-radius-sm);
	background: var(--base-2, #f7f8f9);
	font-style: normal;
}

.single .entry-meta {
	font-size: 0.85rem;
}

/* Điều hướng bài trước và bài sau */

.gpc-postnav {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin-top: 32px;
}

.gpc-postnav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	background: var(--base-3, #fff);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gpc-postnav__item:hover,
.gpc-postnav__item:focus {
	border-color: var(--accent, #1e73be);
	box-shadow: var(--gpc-shadow);
}

.gpc-postnav__item--next {
	text-align: left;
	grid-column: 1;
}

.gpc-postnav__label {
	font-size: 0.76rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--accent, #1e73be);
}

.gpc-postnav__title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--contrast, #222);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Bài viết liên quan */

.gpc-related {
	margin-top: 44px;
	padding-top: 8px;
}

.gpc-related .gpc-section__title {
	font-size: 1.35rem;
}

.gpc-related .gpc-grid {
	margin-top: 22px;
}

/* ==========================================================================
   7. Sidebar
   ========================================================================== */

.gpc-widget {
	margin-bottom: 30px;
	padding: 18px 20px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	background: var(--base-3, #fff);
}

.gpc-widget .widget-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--accent, #1e73be);
	color: var(--contrast, #222);
}

.gpc-widget__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gpc-widget__list li {
	padding: 9px 0;
	border-bottom: 1px solid var(--gpc-border);
	font-size: 0.88rem;
	line-height: 1.5;
}

.gpc-widget__list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.gpc-widget__list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--contrast, #222);
	text-decoration: none;
}

.gpc-widget__list a:hover,
.gpc-widget__list a:focus {
	color: var(--accent, #1e73be);
}

.gpc-widget__list--cats li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.gpc-widget__list--cats li.is-current a {
	color: var(--accent, #1e73be);
	font-weight: 600;
}

.gpc-count {
	flex: 0 0 auto;
	font-size: 0.74rem;
	color: var(--gpc-muted);
	background: var(--base-2, #f7f8f9);
	border-radius: 999px;
	padding: 2px 9px;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

.gpc-footer {
	padding: 44px 0 36px;
	background: var(--base-2, #f7f8f9);
	border-top: 1px solid var(--gpc-border);
}

.gpc-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 26px;
}

.gpc-footer__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 14px;
	color: var(--contrast, #222);
}

.gpc .gpc-footer__logo {
	display: block;
	width: 48px;
	height: auto;
	border-radius: var(--gpc-radius-sm);
	margin-bottom: 12px;
}

.gpc-footer__desc {
	font-size: 0.85rem;
	line-height: 1.6;
	color: var(--gpc-muted);
	margin: 0 0 14px;
}

.gpc-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gpc-footer__list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 0;
	font-size: 0.86rem;
	line-height: 1.5;
}

.gpc-footer__list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--gpc-muted);
	text-decoration: none;
}

.gpc-footer__list a:hover,
.gpc-footer__list a:focus {
	color: var(--accent, #1e73be);
}

.gpc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gpc-tag {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 5px 11px;
	border: 1px solid var(--gpc-border);
	border-radius: 999px;
	background: var(--base-3, #fff);
	font-size: 0.78rem;
	color: var(--gpc-muted);
	text-decoration: none;
}

.gpc-tag:hover,
.gpc-tag:focus {
	background: var(--accent, #1e73be);
	border-color: var(--accent, #1e73be);
	color: #fff;
}

.site-info {
	font-size: 0.83rem;
}

/* ==========================================================================
   9. Bình luận
   ========================================================================== */

.comments-area {
	margin-top: 44px;
	padding: 18px 16px 22px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	background: var(--base-3, #fff);
}

.comments-title,
.comment-reply-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--accent, #1e73be);
}

.comment-list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.comment-list li.comment,
.comment-list li.pingback {
	list-style: none;
	margin-bottom: 16px;
}

.comment-list .children {
	list-style: none;
	margin: 16px 0 0 8px;
	padding: 0;
	border-left: 2px solid var(--gpc-border);
	padding-left: 8px;
}

.comment-body {
	padding: 16px 18px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius-sm);
	background: var(--base-2, #f7f8f9);
}

.comment-author img.avatar {
	border-radius: 50%;
	margin-right: 10px;
}

.comment-author .fn {
	font-weight: 600;
	font-style: normal;
	color: var(--contrast, #222);
}

.comment-metadata,
.comment-meta {
	font-size: 0.78rem;
	color: var(--gpc-muted);
}

.comment-content {
	font-size: 0.93rem;
	line-height: 1.65;
	margin-top: 10px;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.comment-reply-link {
	display: inline-block;
	margin-top: 10px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--accent, #1e73be);
	text-decoration: none;
}

.comment-form label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--contrast, #222);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius-sm);
	background: var(--base-3, #fff);
	font-size: 1rem;
	line-height: 1.5;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--accent, #1e73be);
	outline: none;
}

.comment-form .comment-form-author,
.comment-form .comment-form-email {
	display: block;
	width: 100%;
	vertical-align: top;
}

.comment-form .comment-form-email {
	margin-left: 0;
}

.comment-form .form-submit {
	margin-top: 4px;
	margin-bottom: 0;
}

.gpc-button,
.comment-form .submit {
	padding: 11px 24px;
	border: 0;
	border-radius: var(--gpc-radius-sm);
	background: var(--accent, #1e73be);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	cursor: pointer;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.83rem;
}

.comment-form .comment-form-cookies-consent label {
	font-weight: 400;
	margin-bottom: 0;
	color: var(--gpc-muted);
}

/* ==========================================================================
   10. Mobile first: mở rộng từ một cột lên tablet/desktop
   ========================================================================== */

@media (min-width: 601px) {
	.gpc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gpc-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gpc-section {
		margin-bottom: 48px;
	}

	.gpc-section__title {
		font-size: 1.6rem;
	}

	.gpc-postnav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gpc-postnav__item--next {
		grid-column: 2;
		text-align: right;
	}

	.comments-area {
		padding: 24px 26px 28px;
	}

	.comment-form .comment-form-author,
	.comment-form .comment-form-email {
		display: inline-block;
		width: calc(50% - 8px);
	}

	.comment-form .comment-form-email {
		margin-left: 12px;
	}

	.single:not(.single-product) .entry-content h2,
	.gpc-product-content h2 {
		font-size: 1.45rem;
	}
}

@media (min-width: 769px) {
	.gpc-menu-search {
		padding: 0 10px;
	}

	.gpc-searchform {
		max-width: 260px;
	}

	.comment-list .children {
		margin-left: 26px;
		padding-left: 18px;
	}
}

@media (min-width: 1025px) {
	:root {
		--gpc-gap: 24px;
	}

	.gpc-grid {
		grid-template-columns: repeat(var(--gpc-cols, 3), minmax(0, 1fr));
	}

	.gpc-footer__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 32px;
	}
}

/* Lề hai bên cho trang chủ, danh mục, tìm kiếm khi màn hình hẹp hơn khung 1200px.
   Các trang này không có khung .inside-article nên trước 1.2.0 thẻ dính sát mép màn hình.
   Bài viết, trang tĩnh và trang WooCommerce đã có lề của khung nên không áp dụng. */
@media (max-width: 1239px) {
	.gpc:not(.woocommerce):not(.single):not(.page) .site-main,
	.gpc .gpc-footer__inner {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ==========================================================================
   11. Cửa hàng (WooCommerce)
   Mobile first: 2 cột sản phẩm trên điện thoại, 3 cột từ 769px,
   từ 1025px theo "Số sản phẩm mỗi hàng" của WooCommerce.
   Dùng tiền tố .site-main để thắng CSS mặc định của WooCommerce mà không cần !important
   (trừ width/float/margin của li.product vốn bị GeneratePress đặt bằng bộ chọn rất mạnh).
   ========================================================================== */

/* Bảng của WooCommerce giữ dạng bảng; bảng trong bài viết vẫn cuộn ngang. */
.gpc .entry-content table.shop_table,
.gpc .entry-content table.woocommerce-product-attributes,
.gpc .entry-content table.variations {
	display: table;
	width: 100%;
}

.gpc-price-contact {
	color: var(--accent, #1e73be);
	font-weight: 700;
}

.gpc-footer__title--sub {
	margin-top: 22px;
}

/* Thẻ sản phẩm của child theme: trang chủ, trong bài viết */

.gpc-grid--products {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.gpc-card--product .gpc-card__media {
	aspect-ratio: 1 / 1;
	background: #fff;
}

.gpc .gpc-card--product .gpc-card__img {
	object-fit: contain;
}

.gpc-card--product .gpc-card__body {
	gap: 6px;
	padding: 12px 14px 14px;
}

.gpc-card--product .gpc-card__title {
	font-size: 0.95rem;
}

.gpc-card--product .gpc-card__excerpt {
	display: none;
}

.gpc-card__price {
	margin-top: auto;
	font-size: 1rem;
	font-weight: 700;
	color: var(--accent, #1e73be);
}

.gpc-card__price del,
.gpc .site-main ul.products li.product .price del,
.single-product div.product .summary .price del {
	margin-right: 6px;
	font-size: 0.85em;
	font-weight: 400;
	color: var(--gpc-line);
}

.gpc-card__price ins,
.gpc .site-main ul.products li.product .price ins,
.single-product div.product .summary .price ins {
	text-decoration: none;
}

.gpc-card__sale {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	border-radius: 999px;
	background: #d63638;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.4;
}

/* Lưới sản phẩm của WooCommerce: trang Cửa hàng, danh mục, sản phẩm tương tự */

.gpc .site-main ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.gpc .site-main ul.products.columns-1 {
	grid-template-columns: minmax(0, 1fr);
}

.gpc .site-main ul.products::before,
.gpc .site-main ul.products::after {
	display: none;
}

.gpc .site-main ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 0 14px;
	background: var(--base-3, #fff);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	box-shadow: var(--gpc-shadow);
	overflow: hidden;
	text-align: left;
	transition: box-shadow 0.18s ease;
}

.gpc .site-main ul.products li.product:hover,
.gpc .site-main ul.products li.product:focus-within {
	box-shadow: var(--gpc-shadow-hover);
}

.gpc .site-main ul.products li.product a img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	margin: 0 0 10px;
	background: #fff;
	border-radius: 0;
	box-shadow: none;
}

.gpc .site-main ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.9em;
	margin: 0;
	padding: 0 12px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--contrast, #222);
}

.gpc .site-main ul.products li.product .price {
	display: block;
	margin: 6px 0 12px;
	padding: 0 12px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--accent, #1e73be);
}

.gpc .site-main ul.products li.product .button,
.gpc .site-main ul.products li.product .added_to_cart {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: auto 12px 0;
	padding: 8px 12px;
	border-radius: var(--gpc-radius-sm);
	font-size: 0.88rem;
	text-align: center;
}

.gpc .site-main ul.products li.product .added_to_cart {
	margin-top: 8px;
}

/* Nút WooCommerce theo màu chủ đạo của site (Màu sắc > Global Colors) thay cho tím/xám mặc định */
.gpc .site-main a.button,
.gpc .site-main button.button,
.gpc .site-main input.button,
.gpc .site-main #respond input#submit {
	border: 0;
	border-radius: var(--gpc-radius-sm);
	background: var(--accent, #1e73be);
	color: #fff;
	font-weight: 600;
}

.gpc .site-main a.button:hover,
.gpc .site-main a.button:focus,
.gpc .site-main button.button:hover,
.gpc .site-main button.button:focus,
.gpc .site-main input.button:hover,
.gpc .site-main #respond input#submit:hover {
	background: var(--accent, #1e73be);
	color: #fff;
	filter: brightness(0.92);
}

.gpc .site-main button.button:disabled,
.gpc .site-main button.button.disabled {
	opacity: 0.5;
}

.gpc .site-main ul.products li.product .onsale,
.single-product .site-main span.onsale {
	top: 10px;
	left: 10px;
	right: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	line-height: 1.4;
}

.gpc .woocommerce-ordering select {
	min-height: 44px;
	font-size: 1rem;
}

.gpc .site-main .woocommerce-pagination ul.page-numbers {
	border: 0;
}

.gpc .site-main .woocommerce-pagination ul.page-numbers li {
	margin: 0 4px 8px;
	border: 0;
}

.gpc .site-main .woocommerce-pagination ul.page-numbers li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius-sm);
}

/* Trang sản phẩm */

.gpc .woocommerce-breadcrumb {
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--gpc-border);
	font-size: 0.83rem;
	color: var(--gpc-muted);
}

.gpc .woocommerce-breadcrumb a {
	color: var(--gpc-muted);
	text-decoration: none;
}

.single-product div.product .woocommerce-product-gallery__image img {
	border-radius: var(--gpc-radius);
	background: #fff;
}

.single-product div.product div.images .flex-control-thumbs {
	margin-top: 8px;
}

.single-product div.product div.images .flex-control-thumbs li {
	box-sizing: border-box;
	padding-right: 8px;
}

.single-product div.product .flex-control-thumbs li img {
	border-radius: var(--gpc-radius-sm);
}

.single-product div.product .product_title {
	margin-bottom: 10px;
	font-size: 1.5rem;
	line-height: 1.3;
}

.single-product div.product .summary .price {
	margin-bottom: 6px;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--accent, #1e73be);
}

.gpc-price-details {
	margin: 0 0 16px;
}

.gpc-price-range {
	margin: 0 0 4px;
	font-size: 0.9rem;
	color: var(--contrast, #222);
}

.gpc-price-note {
	margin: 0;
	font-size: 0.82rem;
	color: var(--gpc-muted);
}

/* Điểm nổi bật (mô tả ngắn tool gửi dạng danh sách) */
.single-product .woocommerce-product-details__short-description {
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: var(--gpc-radius-sm);
	background: var(--base-2, #f7f8f9);
	font-size: 0.95rem;
	line-height: 1.6;
}

.single-product .woocommerce-product-details__short-description > :last-child {
	margin-bottom: 0;
}

.single-product .woocommerce-product-details__short-description ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-product .woocommerce-product-details__short-description li {
	position: relative;
	margin-bottom: 6px;
	padding-left: 24px;
}

.single-product .woocommerce-product-details__short-description li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	font-weight: 700;
	color: var(--accent, #1e73be);
}

.single-product div.product form.cart {
	margin-bottom: 14px;
}

.single-product div.product form.cart:not(.variations_form),
.single-product div.product form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.single-product div.product form.cart div.quantity {
	float: none;
	margin: 0;
}

.single-product div.product form.cart .qty {
	width: 4.5em;
	min-height: 44px;
	font-size: 1rem;
}

.single-product div.product form.cart .single_add_to_cart_button {
	float: none;
	min-height: 44px;
	padding: 10px 24px;
	border-radius: var(--gpc-radius-sm);
}

/* Nút liên hệ */

.gpc-contact {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
}

.gpc-contact__btn {
	display: inline-flex;
	flex: 1 1 160px;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: var(--gpc-radius-sm);
	background: var(--accent, #1e73be);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}

.gpc-contact__btn:hover,
.gpc-contact__btn:focus {
	color: #fff;
	filter: brightness(0.92);
}

.gpc-contact__btn--call {
	background: #d63638;
}

.gpc-contact__btn--zalo {
	background: #0068ff;
}

.gpc-contact__btn--messenger {
	background: #0084ff;
}

.gpc-sticky-contact {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	display: flex;
	gap: 8px;
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
	background: var(--base-3, #fff);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
}

.gpc-sticky-contact .gpc-contact__btn {
	flex: 1 1 0;
	padding: 10px 8px;
}

.gpc-has-sticky-contact {
	padding-bottom: 64px;
}

.single-product div.product .product_meta {
	font-size: 0.85rem;
	color: var(--gpc-muted);
}

.single-product div.product .product_meta > span {
	display: block;
	margin-bottom: 4px;
}

/* Mô tả, thông số, đánh giá xếp dọc */

.gpc-product-sections {
	clear: both;
	padding-top: 32px;
}

.gpc-product-section {
	margin-bottom: 32px;
}

.gpc-product-section__title,
.single-product .woocommerce-Reviews-title,
.single-product .related.products > h2,
.single-product .upsells.products > h2 {
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--accent, #1e73be);
	font-size: 1.3rem;
	line-height: 1.3;
	color: var(--contrast, #222);
}

.gpc .site-main table.woocommerce-product-attributes {
	border: 1px solid var(--gpc-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--gpc-radius-sm);
	overflow: hidden;
}

.gpc .site-main table.woocommerce-product-attributes th,
.gpc .site-main table.woocommerce-product-attributes td {
	padding: 10px 14px;
	border: 0;
	border-bottom: 1px solid var(--gpc-border);
	font-size: 0.92rem;
	text-align: left;
	vertical-align: top;
}

/* Điện thoại: WooCommerce xếp tên thông số và giá trị thành 2 dòng; tên phủ hết chiều ngang. */
.gpc .site-main table.woocommerce-product-attributes th {
	width: auto;
	background: var(--base-2, #f7f8f9);
	font-weight: 600;
}

.gpc .site-main table.woocommerce-product-attributes tr:last-child th,
.gpc .site-main table.woocommerce-product-attributes tr:last-child td {
	border-bottom: 0;
}

.gpc .site-main table.woocommerce-product-attributes td p {
	margin: 0;
	padding: 0;
	font-style: normal;
}

.single-product .related.products,
.single-product .upsells.products {
	clear: both;
	margin-top: 40px;
}

/* Tiêu đề form đánh giá của WooCommerce là thẻ span: phải thành khối thì gạch chân mới không đè chữ bên dưới. */
.single-product #reviews .comment-reply-title {
	display: block;
	font-size: 1.05rem;
	margin-bottom: 14px;
}

/* Biểu mẫu giỏ hàng / thanh toán: chữ 16px để iPhone không tự phóng to */
.gpc .woocommerce form .form-row input.input-text,
.gpc .woocommerce form .form-row textarea,
.gpc .woocommerce form .form-row select {
	min-height: 44px;
	font-size: 1rem;
}

@media (min-width: 601px) {
	.gpc-grid--products {
		gap: 18px;
	}

	.gpc-card--product .gpc-card__excerpt {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		min-height: 3.2em;
		font-size: 0.85rem;
	}

	.gpc .site-main ul.products {
		gap: 18px;
	}
}

@media (min-width: 769px) {
	.gpc-grid--products,
	.gpc .site-main ul.products.columns-3,
	.gpc .site-main ul.products.columns-4,
	.gpc .site-main ul.products.columns-5,
	.gpc .site-main ul.products.columns-6 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.single-product div.product .product_title {
		font-size: 1.8rem;
	}

	.gpc .site-main table.woocommerce-product-attributes th {
		width: 38%;
	}

	.gpc-product-section__title,
	.single-product .woocommerce-Reviews-title,
	.single-product .related.products > h2,
	.single-product .upsells.products > h2 {
		font-size: 1.45rem;
	}

	.gpc-sticky-contact {
		display: none;
	}

	.gpc-has-sticky-contact {
		padding-bottom: 0;
	}
}

@media (min-width: 1025px) {
	.gpc-grid--products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--gpc-gap);
	}

	.gpc .site-main ul.products {
		gap: var(--gpc-gap);
	}

	.gpc .site-main ul.products.columns-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gpc .site-main ul.products.columns-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.gpc .site-main ul.products.columns-5 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.gpc .site-main ul.products.columns-6 {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.gpc-card {
		transition: none;
	}

	.gpc-card:hover,
	.gpc-card:focus-within {
		transform: none;
	}
}
