/**
 * Home page — WooCommerce product lists.
 */

.hm-new-arrivals {
	padding: clamp(44px, 4vw, 72px) 0 clamp(54px, 5vw, 88px);
	background: #fff;
	color: #111;
}

.hm-new-arrivals__inner {
	width: min(1800px, calc(100% - 48px));
	margin-inline: auto;
}

.hm-product-list__banner {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(220px, 22vw, 400px);
	margin-bottom: clamp(28px, 3vw, 46px);
	padding: clamp(24px, 4vw, 60px);
	overflow: hidden;
	border-radius: 14px;
	background: #e9e9e9;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
}

.hm-product-list__banner::after {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .05) 68%);
	content: "";
}

.hm-product-list__banner-picture,
.hm-product-list__banner-image {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	width: 100%;
	height: 100%;
}

.hm-product-list__banner-image {
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.hm-product-list__banner:hover .hm-product-list__banner-image,
.hm-product-list__banner:focus-visible .hm-product-list__banner-image {
	transform: scale(1.025);
}

.hm-product-list__banner-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	max-width: 720px;
}

.hm-product-list__banner-title {
	font-size: clamp(28px, 3vw, 52px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.025em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}

.hm-product-list__banner-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 24px;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-size: 14px;
	font-weight: 700;
}

.hm-product-list__empty {
	padding: 24px;
	border: 1px dashed #b6b6b6;
	border-radius: 10px;
	background: #f8f8f8;
	text-align: center;
}

.hm-new-arrivals__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}

.hm-new-arrivals__title {
	margin: 0;
	font-size: clamp(28px, 2.1vw, 42px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.025em;
	font-family: "Inter";
	color: #272727;
}

.hm-new-arrivals__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	min-height: 54px;
	padding: 11px 28px;
	border: 2px solid currentColor;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 5px 13px rgba(0, 0, 0, .16);
	color: #111;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.hm-new-arrivals__more:hover,
.hm-new-arrivals__more:focus-visible {
	background: #111;
	box-shadow: 0 7px 18px rgba(0, 0, 0, .2);
	color: #fff;
	transform: translateY(-2px);
}

.hm-new-arrivals__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 48px 28px;
}

.hm-product-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.hm-product-card__media {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 4 / 5;
	border-radius: 0;
	background: #fff;
	isolation: isolate;
}

.hm-product-card__image-link {
	position: absolute;
	inset: 0;
	display: block;
}

.hm-product-card__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

.hm-product-card__image--primary {
	z-index: 1;
	opacity: 1;
}

.hm-product-card__image--secondary {
	z-index: 2;
	opacity: 0;
}

.hm-product-card__sale {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	padding: 4px 10px;
	border-radius: 0;
	background: #e63323;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button {
	position: absolute !important;
	top: auto !important;
	right: auto !important;
	bottom: 18px !important;
	left: 50% !important;
	z-index: 5;
	display: inline-flex !important;
	float: none !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	height: 48px !important;
	min-width: 140px !important;
	min-height: 48px !important;
	max-width: calc(100% - 28px) !important;
	max-height: 48px !important;
	margin: 0 !important;
	padding: 0 22px !important;
	overflow: visible !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #272727 !important;
	background-image: none !important;
	box-shadow: 0 5px 16px rgba(0, 0, 0, .18) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-shadow: none !important;
	opacity: 0;
	transform: translate(-50%, 10px);
	transition: background-color .2s ease, color .2s ease, opacity .25s ease, transform .25s ease;
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button:hover,
.hm-product-card .hm-product-card__media > .hm-product-card__cart.button:focus-visible {
	background: #fff !important;
	color: #111 !important;
	outline: 1px solid #111;
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button.loading {
	opacity: .72;
	pointer-events: none;
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button.added {
	background: #272727 !important;
	color: #fff !important;
}

.hm-product-card__cart-label {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button.added::after {
	display: none !important;
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button.loading::after {
	top: 50% !important;
	right: auto !important;
	left: 50% !important;
	margin: 0 !important;
	font-size: 15px !important;
	transform: translate(-50%, -50%);
}

.hm-product-card .hm-product-card__media > .hm-product-card__cart.button.loading > .hm-product-card__cart-label {
	opacity: 0;
}

.hm-product-card__media .added_to_cart.wc-forward {
	display: none !important;
}

.hm-product-card__content {
	padding-top: 18px;
}

.hm-product-card__category {
	display: none;
}

.hm-product-card__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	min-height: 48px;
	margin: 0 0 6px;
	font-family: "Jost", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.42;
}

.hm-product-card__title a {
	color: #272727;
	text-decoration: none;
}

.hm-product-card__title a:hover,
.hm-product-card__title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hm-product-card__price {
	color: #6b6b6b;
	font-size: 15px;
	line-height: 1.45;
}

.hm-product-card__price del {
	margin-right: 7px;
	color: #969696;
	opacity: 1;
}

.hm-product-card__price ins {
	color: #6b6b6b;
	font-weight: 500;
	text-decoration: none;
}

.hm-product-card:focus-within .hm-product-card__cart.button {
	opacity: 1;
	transform: translate(-50%, 0);
}

.hm-product-card:focus-within .hm-product-card__media.has-secondary-image .hm-product-card__image--secondary {
	opacity: 1;
}

.hm-product-card:focus-within .hm-product-card__media.has-secondary-image .hm-product-card__image--primary {
	opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
	.hm-product-card:hover .hm-product-card__cart.button {
		opacity: 1;
		transform: translate(-50%, 0);
	}

	.hm-product-card:hover .hm-product-card__media.has-secondary-image .hm-product-card__image--secondary {
		opacity: 1;
		transform: scale(1.025);
	}

	.hm-product-card:hover .hm-product-card__media.has-secondary-image .hm-product-card__image--primary {
		opacity: 0;
		transform: scale(1.025);
	}
}

@media (hover: none) {
	.hm-product-card .hm-product-card__media > .hm-product-card__cart.button {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

.hm-new-arrivals--empty .hm-new-arrivals__inner {
	padding: 24px;
	border: 1px dashed #b6b6b6;
	border-radius: 10px;
	background: #f8f8f8;
	text-align: center;
}

.hm-new-arrivals--empty p {
	margin: 0;
}

@media (max-width: 1023px) {
	.hm-new-arrivals__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.hm-new-arrivals {
		padding: 38px 0 52px;
	}

	.hm-new-arrivals__inner {
		width: min(100% - 24px, 1800px);
	}

	.hm-product-list__banner {
		min-height: min(78vw, 420px);
		margin-bottom: 24px;
		padding: 22px;
		border-radius: 10px;
	}

	.hm-product-list__banner::after {
		background: linear-gradient(0deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .04) 75%);
	}

	.hm-product-list__banner-content {
		gap: 13px;
	}

	.hm-product-list__banner-title {
		font-size: clamp(24px, 8vw, 36px);
	}

	.hm-product-list__banner-button {
		min-height: 40px;
		padding: 9px 18px;
		font-size: 13px;
	}

	.hm-new-arrivals__header {
		align-items: flex-end;
		gap: 14px;
		margin-bottom: 20px;
	}

	.hm-new-arrivals__title {
		font-size: clamp(23px, 7vw, 30px);
	}

	.hm-new-arrivals__more {
		min-width: 0;
		min-height: 40px;
		padding: 9px 17px;
		border-width: 1.5px;
		font-size: 13px;
	}

	.hm-new-arrivals__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 26px 12px;
	}

	/* Mobile hien thi dung 2 cot x 2 hang. */
	.hm-new-arrivals__grid > .hm-product-card:nth-child(n + 5) {
		display: none;
	}

	.hm-product-card__media {
		border-radius: 0;
	}

	.hm-product-card__sale {
		top: 8px;
		right: 8px;
		left: auto;
		min-height: 26px;
		padding: 4px 9px;
		font-size: 11px;
	}

	.hm-product-card .hm-product-card__media > .hm-product-card__cart.button {
		top: auto !important;
		right: auto !important;
		bottom: 10px !important;
		left: 50% !important;
		width: auto !important;
		height: 38px !important;
		min-width: min(132px, calc(100% - 16px)) !important;
		min-height: 38px !important;
		max-width: calc(100% - 16px) !important;
		max-height: 38px !important;
		padding: 0 12px !important;
		border-radius: 0 !important;
		font-size: 12px !important;
		opacity: 1;
		transform: translate(-50%, 0);
	}

	.hm-product-card__content {
		padding-top: 11px;
	}

	.hm-product-card__category {
		min-height: 17px;
		font-size: 12px;
	}

	.hm-product-card__title {
		min-height: 40px;
		margin-bottom: 5px;
		font-size: 14px;
		line-height: 1.4;
	}

	.hm-product-card__price {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-product-card__image,
	.hm-product-card__cart.button,
	.hm-new-arrivals__more,
	.hm-product-list__banner-image {
		transition: none;
	}
}
