/* =========================================================
   HP Homepage Pattern — layout styles
   Prefix .hp- = home page. Nạp bởi plugin hp-homepage-pattern
   ở cả frontend và block editor.
   ========================================================= */

/* --- Content stays within the theme container (no full-bleed) --- */
.home .entry-content { max-width: 1190px; margin-left: auto; margin-right: auto; overflow-x: hidden; }
.home .entry-content > * { margin-top: 0; margin-bottom: 0; }

/* --- Section chung: nhịp padding (thay cho style inline lặp trên từng group) --- */
.hp-section   { box-sizing: border-box; padding: 2.5rem 1.25rem; }
.hp-hero-wrap { padding: 1.5rem 1.25rem 0.5rem; }
.hp-longform  { padding: 3rem 1.25rem; }
.hp-faq       { padding: 3rem 1.25rem 3.5rem; }

/* --- Heading type scale (fluid; clamp = responsive, min value applies on mobile) --- */
.hp-section .wp-block-heading { margin: 0 0 .9rem; }

.hp-intro h1 {
	/* ~26px on small phones -> 38px on desktop */
	font-size: clamp(1.625rem, 1.15rem + 2vw, 2.375rem);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.015em;
	text-transform: uppercase;
	margin: 0 0 .6rem;
}
.hp-section h2.wp-block-heading {
	/* ~18px on small phones -> 22px on desktop */
	font-size: clamp(1.125rem, 0.95rem + 0.75vw, 1.375rem);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: .02em;
	text-transform: uppercase;
	margin-bottom: 1.1rem;
}
.hp-card h3 {
	font-size: .9375rem; /* 15px */
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .035em;
	text-transform: uppercase;
	margin: .3rem 0;
}
.hp-longform h3 {
	font-size: 1.0625rem; /* 17px */
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	margin: 1.7rem 0 .5rem;
}
.hp-faq .wp-block-details summary {
	font-size: .9375rem; /* 15px */
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0;
	text-transform: none;
}

/* --- Nút: xanh lá đậm giống mẫu --- */
.hp-section .wp-block-button__link {
	background-color: #2f5d3f;
	color: #fff;
	border-radius: 4px;
	padding: .8em 1.7em;
	font-weight: 600;
	letter-spacing: .02em;
	border: 2px solid #2f5d3f;
}
.hp-section .wp-block-button__link:hover {
	background-color: #24492f;
	border-color: #24492f;
	color: #fff;
}
.hp-section .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: #2f5d3f;
}
.hp-section .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: #2f5d3f;
	color: #fff;
}
.hp-btns { display: flex; justify-content: center; }

/* --- Hero --- */
.hp-hero-img { margin: 0; }
.hp-hero-img img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	object-position: 50% 32%;
	display: block;
	border-radius: 6px;
}
.hp-intro p { font-size: 1.05rem; margin: 0 0 .4rem; }
.hp-intro .hp-btns { margin-top: 1.2rem; }

/* --- 3 card danh mục --- */
.hp-categories .wp-block-columns { gap: 1.5rem; }
.hp-card {
	background: #f5f5f4;
	border-radius: 8px;
	padding: 1.75rem 1.25rem;
	height: 100%;
	text-align: center;
}
.hp-card .wp-block-image { margin: 0 0 .9rem; }
.hp-card img {
	height: 170px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	margin: 0 auto;
	display: block;
}
.hp-card .hp-more { margin: 0; }
.hp-card .hp-more a {
	color: #2f5d3f;
	font-weight: 600;
	text-decoration: none;
}
.hp-card .hp-more a:hover { text-decoration: underline; }

/* --- Hàng khuyến mãi ảnh + chữ --- */
.hp-promo .wp-block-columns { gap: 2.5rem; }
.hp-promo .wp-block-image img { border-radius: 8px; display: block; width: 100%; }
.hp-promo ul { margin: 0 0 1.3rem; padding-left: 1.1rem; }
.hp-promo li { margin: .4rem 0; }
/* hp-promo     = ảnh trái / chữ phải (thứ tự cột trong markup)
   hp-promo-alt = chữ trái / ảnh phải (thứ tự cột trong markup) */

/* Nút "Get it now" — style tham khảo nút BUY NOW của zillakamistore.com:
   đỏ #ef4444, chữ hoa đậm, bo 8px, icon giỏ hàng, hover đảo màu (nền trắng / chữ đỏ) */
.hp-promo .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	background-color: #ef4444;
	border: 2px solid #ef4444;
	color: #fff;
	border-radius: .5rem;
	padding: .75rem 1.25rem;
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.hp-promo .wp-block-button__link::before {
	content: "";
	width: 1.25em;
	height: 1.25em;
	flex: none;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='8'%20cy='21'%20r='1'/%3E%3Ccircle%20cx='19'%20cy='21'%20r='1'/%3E%3Cpath%20d='M2.05%202.05h2l2.66%2012.42a2%202%200%200%200%202%201.58h9.78a2%202%200%200%200%201.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='8'%20cy='21'%20r='1'/%3E%3Ccircle%20cx='19'%20cy='21'%20r='1'/%3E%3Cpath%20d='M2.05%202.05h2l2.66%2012.42a2%202%200%200%200%202%201.58h9.78a2%202%200%200%200%201.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hp-promo .wp-block-button__link:hover,
.hp-promo .wp-block-button__link:focus {
	background-color: #fff;
	color: #ef4444;
	border-color: #ef4444;
}
@media (min-width: 640px) {
	.hp-promo .wp-block-button__link { font-size: 1rem; }
}

/* --- Hàng sản phẩm --- */
.hp-products .woocommerce { margin-top: 1.2rem; }
.hp-products .hp-btns { margin-top: 1.6rem; }

/* Nút "xem thêm" nhỏ xinh dưới mỗi hàng sản phẩm (kiểu mẫu tham chiếu) */
.hp-products .wp-block-button.is-style-outline .wp-block-button__link {
	display: inline-block;
	background-color: #fff;
	color: #1c1c1c;
	border: 1px solid #d9d6cf;
	border-radius: 2px;
	padding: .8em 2.3em;
	font-size: .6875rem;            /* 11px */
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: .14em;
	text-transform: uppercase;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.hp-products .wp-block-button.is-style-outline .wp-block-button__link:hover,
.hp-products .wp-block-button.is-style-outline .wp-block-button__link:focus {
	background-color: #2f5d3f;
	border-color: #2f5d3f;
	color: #fff;
}

/* --- Đoạn nội dung dài --- */
.hp-longform p { margin: .6rem 0; line-height: 1.75; }
.hp-longform ul { line-height: 1.7; }

/* --- FAQ --- */
.hp-faq .wp-block-details {
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin: .6rem 0;
}
.hp-faq .wp-block-details summary {
	cursor: pointer;
	list-style-position: inside;
}
.hp-faq .wp-block-details[open] summary { margin-bottom: .7rem; }

/* --- Mobile (<=781px: block Columns tự xếp 1 cột) --- */
@media (max-width: 781px) {
	.hp-card img { height: 130px; }
	.hp-promo .wp-block-columns { gap: 1.25rem; }
	.hp-longform h3 { margin-top: 1.4rem; }
	.hp-intro p { font-size: 1rem; }
	.hp-longform p,
	.hp-promo li { font-size: .95rem; }
	.hp-section h2.wp-block-heading { margin-bottom: .9rem; }

	/* hp-promo-alt: markup là [chữ, ảnh] -> trên mobile đảo lại cho ẢNH lên trước */
	.hp-promo-alt .wp-block-columns { display: flex; flex-wrap: wrap; }
	.hp-promo-alt .wp-block-columns > .wp-block-column:last-child { order: -1; }
	.hp-promo-alt .wp-block-columns > .wp-block-column:last-child .wp-block-image { margin-bottom: 1.25rem; }
}

/* --- Điện thoại nhỏ --- */
@media (max-width: 480px) {
	.hp-card { padding: 1.4rem 1rem; }
	.hp-card img { height: 120px; }
	.hp-hero-img img { max-height: 320px; }
}
