/**
 * Theme Name: Shoptimizer Child
 * Theme URI: https://www.commercegurus.com/wordpress-themes/shoptimizer
 * Description: Child theme for the Shoptimizer theme
 * Author: Witsberry
 * Author URI: https://witsberry
 * Version: 1.0.7
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: shoptimizer-child
 * Template: shoptimizer
 */

/* Add your custom CSS below this line */
.category-feature img {
	position: relative;
	z-index: 1;
	width: 100%;
	min-height: 100px;
	-o-object-fit: cover;
	object-fit: cover;
}

.product .woocommerce-product-gallery__wrapper img {
	max-height: 600px;
	object-fit: contain;
	background: #fff;
}

.product .woocommerce-product-gallery .flex-control-thumbs li img {
	max-height: 40px;
	object-fit: contain;
	background: #fff;
}

.product .woocommerce-product-gallery__wrapper img {
	max-height: 350px;
	object-fit: contain;
	background: #fff;
}

.shoptimizer-plp-image-wrapper img {
	max-height: 135px;
	object-fit: contain !important;
}

.woocommerce-loop-product__title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;

	overflow: hidden;
	text-overflow: ellipsis;

	white-space: normal;
	line-height: 1.4em;
	max-height: 2.8em;
	/* 2 lines × line-height */
}

.cgkit-as-variation-price> :first-child:not(:has(del)) {
	color: #7b7bff !important;
	font-weight: 700 !important;
}

.shoptimizer-mini-cart-wrap .product_list_widget img,
.woocommerce-checkout-review-order-table .product-item-thumbnail img,
table.cart .product-thumbnail img {
	min-height: 55px;
	max-height: 55px;
	object-fit: contain;
}

@media (min-width: 993px) {
	.product .woocommerce-product-gallery .flex-control-thumbs li img {
		min-height: 60px;
		max-height: 60px;
	}

	.product .woocommerce-product-gallery__wrapper img {
		max-height: 600px;
		min-height: 600px;
	}

	.shoptimizer-plp-image-wrapper img {
		max-height: 199.77px;
		min-height: 199.77px;
	}


}

/* ============================================
   Homepage Sections
   ============================================ */

.shoptimizer-home-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 0 1rem;
}

.shoptimizer-home-section-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
}

.shoptimizer-home-section-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: #333;
	text-decoration: none;
}

.shoptimizer-home-section-link-arrow {
	font-size: 1.2rem;
}

.home-section {
	padding: 3rem 0;
}

.home-section-flash_sale {
	padding-top: 0;
}

.flash-sale-wrapper {
	margin-top: 2rem;
}

/* ============================================
   Landing Page Template - Full Width
   ============================================ */

/* Override unnecessary padding-top on landing page */
body.page-template-template-landing-php .site-content {
	padding-top: 0 !important;
}

body.page-template-template-landing-php .shoptimizer-archive {
	display: block;
	max-width: 100%;
}

body.page-template-template-landing-php .shoptimizer-archive .archive-header {
	display: none;
}

body.page-template-template-landing-php .shoptimizer-archive > .col-full,
body.page-template-template-landing-php #content > .col-full,
body.page-template-template-landing-php .site-content > .col-full {
	max-width: 100%;
	width: 100%;
	padding: 0;
}

/* Force content-area to full width on landing page */
@media (min-width: 993px) {
	body.page-template-template-landing-php .content-area {
		width: 100% !important;
		float: none !important;
	}
}

/* Homepage sections - max width matching header */
.home-section-flash_sale,
.home-section-new_additions,
.home-section-best_sellers,
.home-section-for_you,
.home-section-featured-categories {
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 15px;
}

.flash-sale-wrapper {
	margin: 2rem auto 0;
}

/* Product grid on homepage - reuse theme columns-5 */
.home-section ul.products {
	margin-bottom: 0;
}

/* Ensure product cards match theme grid sizing */
.home-section ul.products li.product {
	flex: 0 0 auto;
}

/* Mobile adjustments */
@media (max-width: 992px) {
	.shoptimizer-home-section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		padding: 1rem 0 0.5rem;
	}

	.shoptimizer-home-section-title {
		font-size: 1.2rem;
	}

	.home-section {
		padding: 2rem 0;
	}

	.home-section ul.products {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
		width: 100%;
		margin-left: 0;
	}
}