/*
Theme Name: YourShop
Theme URI: http://127.0.0.1:8088/
Description: Child theme for Blocksy. Placeholder brand YourShop. Custom CSS only; do not edit the parent theme.
Author: YourShop
Template: blocksy
Version: 1.0.5
Text Domain: yourshop
Requires at least: 7.0
Requires PHP: 8.3
*/

/* Shop and category archives. The imported shop page uses a 400px title band. */
.post-type-archive-product .hero-section .entry-header,
.tax-product_cat .hero-section .entry-header,
.tax-product_tag .hero-section .entry-header {
	min-height: 0 !important;
	padding: 16px 0 8px !important;
}

.post-type-archive-product .hero-section h1,
.tax-product_cat .hero-section h1,
.tax-product_tag .hero-section h1 {
	font-size: 1.35rem;
	line-height: 1.3;
	font-weight: 700;
}

/* Five columns on a wide screen. Blocksy already maps .columns-5. */
.post-type-archive-product [data-products],
.tax-product_cat [data-products],
.tax-product_tag [data-products] {
	--grid-columns-gap: 14px;
	--grid-rows-gap: 16px;
}

@media (min-width: 1000px) {
	.post-type-archive-product [data-products].columns-5,
	.tax-product_cat [data-products].columns-5,
	.tax-product_tag [data-products].columns-5 {
		--shop-columns: repeat(5, minmax(0, 1fr));
	}
}

/* Shop cards stay square and compact. Cover avoids stretching OSS or local images. */
[data-products] .product .ct-media-container {
	aspect-ratio: 1 / 1;
}

[data-products] .product .ct-media-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

[data-products] .product figure {
	--product-element-spacing: 8px;
	margin-bottom: 8px;
}

[data-products] .product .woocommerce-loop-product__title {
	margin: 0.35rem 0 0.15rem;
	font-size: 13px;
	line-height: 1.35;
	font-weight: 600;
}

[data-products] .product .woocommerce-loop-product__title a {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

[data-products] .product .price {
	margin-bottom: 2px;
	font-size: 14px;
	font-weight: 700;
}

[data-products] .product .entry-meta {
	margin-bottom: 4px;
	font-size: 12px;
}

[data-products] .product .button,
[data-products] .product .added_to_cart {
	margin-top: 0.35rem;
	padding: 0.3rem 0.5rem;
	font-size: 12px;
	line-height: 1.2;
	min-height: 0;
}

.yourshop-shop-filters li {
	margin-bottom: 0.15rem;
	font-size: 13px;
}

/* Desktop shows the filter. Narrow screens collapse it behind Filter. */
.yourshop-filter-toggle {
	position: absolute;
	left: -9999px;
}

.yourshop-shop-filters > label {
	display: none;
}

@media (max-width: 999.98px) {
	.ct-container[data-sidebar] {
		display: flex;
		flex-direction: column;
	}

	#sidebar.ct-hidden-sm,
	#sidebar.ct-hidden-md {
		display: block !important;
		order: -1;
	}

	.yourshop-shop-filters > label {
		display: block;
		cursor: pointer;
		margin: 0 0 0.75rem;
		padding: 0.65rem 0.9rem;
		border: 1px solid currentColor;
		font-weight: 600;
	}

	.yourshop-shop-filters > .yourshop-filter-panel {
		display: none;
	}

	.yourshop-filter-toggle:checked ~ .yourshop-filter-panel {
		display: block;
	}
}
