/* Minimal WooCommerce layout polish using theme variables */
/* Fix column collapse and use robust grid */
.woocommerce ul.products {
	margin-bottom: 0;
}

.woocommerce ul.products,
.woocommerce-page ul.products,
.tax-product_brand ul.products,
.post-type-archive-product ul.products {
	padding-left: calc(var(--bs-gutter-x) * .5);
	padding-right: calc(var(--bs-gutter-x) * .5);
	padding-top: 0;
	padding-bottom: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after,
.tax-product_brand ul.products::before,
.tax-product_brand ul.products::after,
.post-type-archive-product ul.products::before,
.post-type-archive-product ul.products::after {
	display: none !important;
}

/* Product card */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.tax-product_brand ul.products li.product,
.post-type-archive-product ul.products li.product {
	border: 0;
	padding: 1rem;
	border-radius: 0;
	background: #fff;
	box-shadow: var(--shadow-sm);
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

/* Kill Woo core columns-* width rules completely */
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product,
.tax-product_brand ul.products[class*="columns-"] li.product,
.post-type-archive-product ul.products[class*="columns-"] li.product {
	width: auto !important;
	margin: 0 !important;
}

.woocommerce ul.products li.product:nth-child(n),
.woocommerce-page ul.products li.product:nth-child(n),
.tax-product_brand ul.products li.product:nth-child(n),
.post-type-archive-product ul.products li.product:nth-child(n) {
	margin: 0 !important;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(0);
	box-shadow: var(--shadow-md);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-weight: 800;
	text-align: center;
}

.woocommerce ul.products li.product .price {
	color: var(--color-text);
	font-weight: 700;
	text-align: center;
}

/* Enlarge images and keep ratio */
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img,
.tax-product_brand ul.products li.product a img,
.post-type-archive-product ul.products li.product a img {
	width: 100%;
	height: auto;
	max-width: 380px;
	object-fit: contain;
	background: #fff;
	border: 0;
	border-radius: 0;
}

.woocommerce ul.products li.product .bot-woo-product__figure {
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Center add to cart */
.woocommerce ul.products li.product .button {
	margin-top: .5rem;
}

/* Buttons keep theme look */
.woocommerce .single_add_to_cart_button,
.woocommerce a.add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.woocommerce input#submit.add_to_cart_button,
.woocommerce .cart button.button,
.woocommerce .cart input.button,
.woocommerce-page .single_add_to_cart_button {
	background: #000;
	color: #fff;
	border-radius: var(--radius-pill);
	border: 0;
	box-shadow: var(--shadow-md);
	padding: .5rem 1.5rem; 
	font-size: 1.05rem; 
	text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
	transform: translateY(0);
	background: #fff;
	color: #000;
}

/* Product hero banner gradient */
.product-hero-banner {
	background: linear-gradient(90deg, var(--grad-from, #000000), var(--grad-to, #444444));
}

/* Alternate header for single product: white text on product gradient */
.site-header.is-product-gradient {
	background: linear-gradient(90deg, var(--grad-from, #000000), var(--grad-to, #444444));
}
.site-header.is-product-gradient .navbar,
.site-header.is-product-gradient .navbar .navbar-brand,
.site-header.is-product-gradient .navbar .nav-link,
.site-header.is-product-gradient .navbar .menu-icon,
.site-header.is-product-gradient .navbar .bi,
.site-header.is-product-gradient .navbar a:not(.dropdown-item) {
	color: #fff !important;
}
.site-header.is-product-gradient .navbar .nav-link:hover,
.site-header.is-product-gradient .navbar .nav-link:focus {
	color: #f1f1f1 !important;
}
.site-header.is-product-gradient .navbar-toggler {
	color: #fff;
	border-color: rgba(255,255,255,.5);
	background: transparent;
}
.site-header.is-product-gradient .dropdown-menu {
	/* Keep dropdown menus readable */
	color: var(--color-text, #111);
}

/* Hero media: make image cover its column while preserving alt/title for SEO */
.product-hero .hero-media {
	position: relative;
	overflow: hidden;
}

.object-fit-cover {
	object-fit: cover;
}

.object-fit-contain {
	object-fit: contain;
}

.product-hero .ratio-1x1 {
	--bs-aspect-ratio: 100%;
}

.product-hero .ratio-md-none {
	--bs-aspect-ratio: 100%;
}

@media (min-width: 768px) {
	.product-hero .ratio-md-none {
		--bs-aspect-ratio: auto;
	}
}

/* WooCommerce single product gallery polish */
.woocommerce div.product div.images {
	margin-bottom: 1.5rem;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image {
	border-radius: 0;
	overflow: hidden;
}

.woocommerce div.product div.images img {
	width: 100%;
	height: auto;
	display: block;
}

.woocommerce div.product div.images .flex-control-nav {
	gap: .5rem;
}

.woocommerce div.product div.images .flex-control-thumbs li {
	margin: 0;
}

.woocommerce div.product div.images .flex-control-thumbs img {
	border: 2px solid transparent;
	border-radius: .25rem;
}

.woocommerce div.product div.images .flex-control-thumbs img.flex-active {
	border-color: var(--color-primary, #000);
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	box-shadow: none;
	z-index: 49;
}

/* Brand header (single product) */
.product-brand-header .product-brand-name {
	font-weight: 800;
	letter-spacing: .5px;
}

.product-brand-header .product-brand-image {
	max-height: 64px;
	width: auto;
	object-fit: contain;
	margin-left: .5rem;
	vertical-align: middle;
}

@media (min-width: 992px) {
	.product-brand-header .product-brand-image {
		max-height: 72px;
	}
}

/* Vertical thumbnail gallery layout */
.product-main-gallery {
	position: relative;
}

.product-main-gallery .woocommerce-product-gallery {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

/* Main figure takes remaining width */
.product-main-gallery .woocommerce-product-gallery__wrapper {
	flex: 1 1 auto;
	min-width: 0;
}

/* Thumbnails column */
.product-main-gallery .flex-control-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	flex: 0 0 70px;
	width: 70px;
	order: 2;
}

.product-main-gallery .flex-control-nav li {
	width: 100%;
}

.product-main-gallery .flex-control-nav img {
	width: 100%;
	aspect-ratio: 1/1;
	object-fit: cover;
	height: auto;
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: .25rem;
	transition: border-color .15s ease, transform .15s ease;
}

.product-main-gallery .flex-control-nav img:hover {
	border-color: var(--color-primary, #000);
	transform: translateY(0);
}

.product-main-gallery .flex-control-nav img.flex-active {
	border-color: var(--color-primary, #000);
}

/* Ensure zoom / lightbox trigger stays above */
.product-main-gallery .woocommerce-product-gallery__trigger {
	position: absolute;
	/* ensure absolute positioning */
	top: auto;
	right: auto;
	bottom: .5rem;
	left: .5rem;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
}

.product-main-gallery .woocommerce-product-gallery__trigger:hover {
	background: rgba(0, 0, 0, .75);
}

@media (max-width: 767.98px) {
	.product-main-gallery .woocommerce-product-gallery {
		flex-direction: column;
	}

	.product-main-gallery .flex-control-nav {
		flex-direction: row;
		order: 2;
		flex: 0 0 auto;
		width: auto;
	}

	.product-main-gallery .flex-control-nav li {
		width: 64px;
	}
}

/* Feature icons row */
.feature-icons-row .feature-icon {
	width: 50px;
	height: 50px;
}

.feature-icons-row .feature-item {
	color: inherit;
}

/* Details section */
.details-block h3 {
	font-weight: 800;
}

.details-section .details-img {
	max-height: 30vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Single product layout: rely on Bootstrap grid from templates, not CSS grid here */
.woocommerce div.product .product_title {
	font-size: 1.5rem;
	text-align: left;
	margin-bottom: 1.5rem;
}

.woocommerce div.product .price {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
}

.woocommerce div.product .quantity .qty {
	width: 80px;
}

.woocommerce div.product form.cart div.quantity {
	height: 3.1rem;
	border-radius: 0;
}

.woocommerce div.product .woocommerce-product-details__short-description {
	font-size: 1.25rem;
	margin-bottom: 3rem;
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme)) div.product p.price,
.woocommerce:where(body:not(.woocommerce-uses-block-theme)) div.product span.price {
	color: #000;
}

/* Related products spacing */
.woocommerce div.product .related {
	margin-top: 2rem;
}

.woocommerce div.product .related>h2 {
	text-align: center;
	margin-bottom: 1rem;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: .375rem;
}

/* No responsive grid overrides needed; Bootstrap handles breakpoints */

.woocommerce #content div.product div.images,
.woocommerce div.product div.images,
.woocommerce-page #content div.product div.images,
.woocommerce-page div.product div.images,
.woocommerce div.product div.images .flex-control-thumbs li {
	width: 100%;
}

/* Override Bootstrap: remove active accordion background */
.accordion-button:not(.collapsed) {
	background-color: transparent !important;
	box-shadow: none !important;
	color: inherit;
}

.accordion-button:focus {
	box-shadow: none !important;
}

/* Hero block full viewport minus header and cropped image */
.hero-block {
	min-height: calc(100vh - var(--hero-offset, 64px));
}

.hero-block .hero-image-col,
.hero-block .hero-image-wrapper {
	height: 100%;
}

.hero-block .hero-image-col {
	display: flex;
}

.hero-block .hero-image-wrapper {
	flex: 1 1 auto;
}

.hero-block .hero-image-wrapper {
	position: relative;
	overflow: hidden;
}

.hero-block .hero-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	max-height: 100%;
}
/* CGX overrides */
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper .zoomImg {
	display:none!important;	
}
.woocommerce-tabs.wc-tabs-wrapper {
  display: none;
}


@media (max-width: 767.98px) {

	/* Mobile: keep full height and cover image */
	.hero-block {
		min-height: 100vh;
	}

	.hero-block .hero-image {
		height: 100%;
		object-fit: cover;
	}
}

/* Prefer small viewport height when available to avoid mobile browser UI bars */
@supports (height: 100svh) {
	.hero-block {
		min-height: calc(85svh - var(--hero-offset, 64px));  /* old_ 65svh */
	}

	@media (max-width: 767.98px) {
		.hero-block {
			min-height: 40svh;
		}
	}
}
