/**
 * WooCommerce Shop Page Styles
 *
 * @package Yusung
 */

/* --------------------------------------------------------------------------
   Site width for shop
   -------------------------------------------------------------------------- */
#primary.woocommerce-main.site-main--site-width {
	width: 100%;
	max-width: var(--yusung-site-container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--yusung-spacing);
	padding-right: var(--yusung-spacing);
	box-sizing: border-box;
}

.woocommerce-main.site-main--site-width {
	padding-top: 2rem;
	padding-bottom: 3rem;
}

.woocommerce-main.site-main--site-width > .yusung-container.yusung-container--site,
.no-sidebar .woocommerce-main.site-main--site-width .yusung-container--site,
body.yusung-wc-site-width .woocommerce-main .yusung-container--site {
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 0;
	padding-right: 0;
}

.woocommerce-main.site-main--site-width .woocommerce {
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   Shop / category / tag layout — sidebar (category tree) + content
   -------------------------------------------------------------------------- */
.yusung-shop-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	margin-top: 2rem;
}

.yusung-shop-layout__content {
	order: 2;
	min-width: 0;
}

.yusung-shop-layout__sidebar {
	order: 1;
	position: sticky;
	top: calc(var(--yusung-header-height, 120px) + 12px);
}

@media (max-width: 1024px) {
	.yusung-shop-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.yusung-shop-layout__content {
		order: 1;
	}

	.yusung-shop-layout__sidebar {
		order: 2;
		position: static;
		top: auto;
	}
}

/* --------------------------------------------------------------------------
   Category logo grid (ảnh 2)
   -------------------------------------------------------------------------- */
.yusung-shop-logos {
	margin-bottom: 2rem;
}

.yusung-shop-logos__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1rem;
}

.yusung-shop-logos__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.25rem 0.75rem;
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 8px;
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.yusung-shop-logos__item:hover {
	border-color: #004187;
	box-shadow: 0 4px 16px rgba(0, 65, 135, 0.1);
	transform: translateY(-2px);
	text-decoration: none;
}

.yusung-shop-logos__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 70px;
}

.yusung-shop-logos__image img {
	max-width: 100%;
	max-height: 70px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.yusung-shop-logos__name {
	font-size: 0.75rem;
	font-weight: 600;
	color: #374151;
	text-align: center;
	line-height: 1.3;
}

.yusung-shop-logos__item:hover .yusung-shop-logos__name {
	color: #004187;
}

.yusung-shop-logos__image--view-all {
	font-size: 1.5rem;
	font-weight: 700;
	color: #004187;
}

.yusung-shop-logos__item--view-all .yusung-shop-logos__name {
	color: #004187;
}

/* Hide page title on shop & site-width template */
.yusung-hide-page-title .woocommerce-products-header__title,
.yusung-hide-page-title .entry-header .entry-title {
	display: none;
}

.yusung-hide-page-title .entry-header:empty {
	display: none;
}

/* --------------------------------------------------------------------------
   Category cards (ảnh 1)
   -------------------------------------------------------------------------- */
.yusung-shop-categories {
	margin-bottom: 2.5rem;
}

.yusung-shop-categories__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
}

.yusung-shop-categories__card {
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.yusung-shop-categories__card:hover {
	border-color: #004187;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.yusung-shop-categories__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.yusung-shop-categories__link:hover {
	text-decoration: none;
	color: inherit;
}

.yusung-shop-categories__image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 140px;
	padding: 1rem;
	background: #f9fafb;
	border-bottom: 1px solid #ebebeb;
}

.yusung-shop-categories__image img {
	max-width: 100%;
	max-height: 120px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.yusung-shop-categories__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1rem;
	position: relative;
}

.yusung-shop-categories__title {
	margin: 0 0 0.5rem;
	font-size: 0.9375rem;
	font-weight: 700;
	color: #004187;
	line-height: 1.3;
}

.yusung-shop-categories__list {
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 1;
}

.yusung-shop-categories__list li {
	position: relative;
	padding-left: 0.75rem;
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #6b7280;
}

.yusung-shop-categories__list li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: #9ca3af;
}

.yusung-shop-categories__excerpt {
	font-size: 0.75rem;
	line-height: 1.5;
	color: #6b7280;
	flex: 1;
}

.yusung-shop-categories__arrow {
	display: inline-flex;
	margin-top: 0.75rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: #004187;
}

/* --------------------------------------------------------------------------
   Products section title
   -------------------------------------------------------------------------- */
.yusung-shop-products__title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a2e;
}

/* --------------------------------------------------------------------------
   Product cards
   -------------------------------------------------------------------------- */
.woocommerce ul.products li.yusung-product-card-wrap {
	margin: 0;
	padding: 0;
}

.yusung-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.yusung-product-card-wrap:hover .yusung-product-card {
	border-color: #004187;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.yusung-product-card__image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 180px;
	padding: 1rem;
	background: #f9fafb;
	border-bottom: 1px solid #ebebeb;
	overflow: hidden;
}

.yusung-product-card__image-link img {
	max-width: 100%;
	max-height: 160px;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
}

.yusung-product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1rem;
}

.yusung-product-card__title {
	margin: 0 0 0.375rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.35;
}

.yusung-product-card__title a {
	color: #004187;
	text-decoration: none;
}

.yusung-product-card__title a:hover {
	text-decoration: underline;
}

.yusung-product-card__excerpt {
	margin-bottom: 0.75rem;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #6b7280;
	flex: 1;
}

.yusung-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5rem;
	margin-top: auto;
}

.yusung-product-card__price {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #004187;
	margin-left: auto;
}

.yusung-product-card__price del {
	color: #9ca3af;
	font-weight: 400;
	font-size: 0.8125rem;
}

.yusung-product-card__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 1.125rem;
	font-weight: 700;
	color: #004187;
	text-decoration: none;
	flex-shrink: 0;
}

.yusung-product-card__arrow:hover {
	color: #003066;
}

/* Hide default add to cart on card — link via arrow/title */
.woocommerce ul.products li.yusung-product-card-wrap .button,
.woocommerce ul.products li.yusung-product-card-wrap .added_to_cart {
	display: none;
}

/* Shop toolbar */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	margin-bottom: 1.25rem;
}

/* Product grid — fix WC pseudo-elements breaking columns */
.woocommerce-main .woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.woocommerce-main .woocommerce ul.products::before,
.woocommerce-main .woocommerce ul.products::after {
	display: none !important;
	content: none !important;
}

.woocommerce-main .woocommerce ul.products li.product {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	grid-column: auto !important;
}

/* --------------------------------------------------------------------------
   Single product — related / upsells (full-width card grid)
   -------------------------------------------------------------------------- */
.yusung-single-product__below {
	width: 100%;
	clear: both;
}

.woocommerce div.product .yusung-single-product__below section.related.products,
.woocommerce div.product .yusung-single-product__below section.upsells.products {
	width: 100% !important;
	max-width: 100% !important;
}

.woocommerce div.product .yusung-single-product__below section.related.products ul.products,
.woocommerce div.product .yusung-single-product__below section.upsells.products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 1.5rem !important;
	width: 100% !important;
}

.woocommerce div.product .yusung-single-product__below section.related.products ul.products li.product,
.woocommerce div.product .yusung-single-product__below section.upsells.products ul.products li.product {
	width: 100% !important;
	min-width: 0 !important;
	float: none !important;
}

.woocommerce div.product .yusung-single-product__below .yusung-product-card {
	width: 100%;
}

.woocommerce div.product .yusung-single-product__below .yusung-product-card__title {
	word-break: normal;
	overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Elementor / builder content below products
   -------------------------------------------------------------------------- */
.yusung-shop-builder-content {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid #ebebeb;
}

.yusung-shop-builder-content > .elementor {
	width: 100%;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.yusung-shop-logos__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.yusung-shop-categories__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 1024px) {
	.yusung-shop-logos__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.yusung-shop-categories__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.woocommerce div.product .yusung-single-product__below section.related.products ul.products,
	.woocommerce div.product .yusung-single-product__below section.upsells.products ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 768px) {
	.yusung-shop-logos__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.yusung-shop-categories__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.yusung-shop-categories__image {
		height: 120px;
	}

	.woocommerce div.product .yusung-single-product__below section.related.products ul.products,
	.woocommerce div.product .yusung-single-product__below section.upsells.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 480px) {
	.yusung-shop-logos__grid,
	.yusung-shop-categories__grid {
		grid-template-columns: 1fr;
	}

	.woocommerce div.product .yusung-single-product__below section.related.products ul.products,
	.woocommerce div.product .yusung-single-product__below section.upsells.products ul.products {
		grid-template-columns: 1fr !important;
	}
}
