/* Shop archive + single product */

/* ---------- archive grid ---------- */
.woocommerce ul.products li.product .box-image {
	border-radius: 8px;
}

.woocommerce ul.products li.product .box-text {
	padding-top: 10px;
}

.woocommerce ul.products li.product .price {
	font-size: 22px;
	font-weight: 700;
	color: var(--gs-ink);
}

.woocommerce ul.products li.product .price del {
	font-size: 14px;
	color: var(--gs-muted);
	opacity: 1;
}

.woocommerce ul.products li.product .price ins {
	text-decoration: none;
}

.woocommerce ul.products li.product .name {
	font-size: 14px;
	line-height: 1.35;
	color: var(--gs-ink);
}

.woocommerce ul.products li.product .star-rating {
	color: var(--gs-star);
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
	background: var(--gs-blue);
	color: #fff;
	border-radius: 4px;
	text-transform: none;
	font-size: 14px;
	font-weight: 600;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
	background: #00508f;
}

.woocommerce .woocommerce-breadcrumb {
	font-size: 12.5px;
	color: var(--gs-muted);
	margin-bottom: 18px;
}

.woocommerce .woocommerce-breadcrumb a {
	color: var(--gs-muted);
}

/* ---------- single product ---------- */
.single-product .product-title,
.single-product .product_title {
	font-size: 28px;
	font-weight: 700;
	color: var(--gs-ink);
}

.gs-price-panel {
	margin: 10px 0 16px;
}

.gs-pr-line {
	display: flex;
	justify-content: flex-start;
	align-items: baseline;
	font-size: 14px;
	color: var(--gs-muted);
	max-width: 420px;
	gap: 8px;
}

.gs-pr-line s {
	text-decoration: line-through;
	color: var(--gs-muted);
}

.gs-pr-line b {
	font-weight: 700;
}

.gs-pr-save b {
	color: #0A8A00;
	font-weight: 700;
}

.gs-pr-now {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-top: 8px;
	font-size: 14px;
	color: var(--gs-muted);
}

.gs-pr-now strong {
	font-size: 34px;
	font-weight: 700;
	color: var(--gs-ink);
	line-height: 1.1;
}

.gs-pr-now strong .woocommerce-Price-currencySymbol {
	font-size: 22px;
}

.gs-pr-note {
	font-size: 12px;
	color: var(--gs-muted);
	margin: 8px 0 0;
	max-width: 420px;
	line-height: 1.5;
}

.gs-pr-ship {
	font-size: 13px;
	color: var(--gs-ink);
	margin: 6px 0 0;
	font-weight: 600;
}

.single-product .single_add_to_cart_button {
	background: var(--gs-blue);
	border-radius: 4px;
	text-transform: none;
	font-weight: 600;
}

.single-product .single_add_to_cart_button:hover {
	background: #00508f;
}

.single-product form.cart .quantity input {
	border-radius: 4px;
}

.single-product table.shop_attributes th {
	font-weight: 600;
	color: var(--gs-ink);
	width: 38%;
}

.single-product table.shop_attributes td {
	color: var(--gs-ink);
}

/* vertical gallery: pin width only, never height/position */
@media (min-width: 850px) {
	.product-gallery .product-thumbnails {
		max-width: 96px;
	}
}

/* ---------- mini cart fragments safety ---------- */
.gs-cart-count {
	font-variant-numeric: tabular-nums;
}

/* buy now button matches the primary action colour */
.ux-buy-now-button {
	background: var(--gs-blue) !important;
	color: #fff !important;
	border-radius: 4px;
	text-transform: none;
	font-weight: 600;
}

.ux-buy-now-button:hover {
	background: #00508f !important;
}

/* sale badge is not part of the target card */
.badge-container .badge,
.badge-inner {
	display: none !important;
}

/* related products block */
.related.products > h2,
.upsells.products > h2 {
	font-size: 22px;
	font-weight: 700;
	text-transform: none;
	color: var(--gs-ink);
}

.related.products .product-small .price,
.upsells.products .product-small .price {
	font-size: 18px;
	font-weight: 700;
}

.related.products .product-small .name {
	font-size: 14px;
	text-transform: none;
}

/* loop cards: hide the category chip, show the saving line */
ul.products li.product .category,
ul.products li.product .box-text .category {
	display: none !important;
}

.gs-loop-saving {
	display: block;
	color: #0A8A00;
	font-size: 13px;
	font-weight: 600;
	margin-top: 2px;
}

.gs-loop-ship {
	display: block;
	color: var(--gs-muted);
	font-size: 12px;
	margin-top: 2px;
}

/* keep the loop add-to-cart visible instead of hover-only */
ul.products li.product .add-to-cart-button {
	position: static !important;
	opacity: 1 !important;
	transform: none !important;
	margin-top: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--gs-blue);
	color: #fff !important;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 16px;
}

/* loop cards: category chip (Flatsome prints it inside .box-text) */
ul.products .product-small .category,
ul.products .box-text .category,
ul.products .product-small .product-category {
	display: none !important;
}

/* ---------- loop grid uses the same card as the homepage ---------- */
.products .gs-loop-item {
	display: flex;
	flex-direction: column;
}

.products .gs-loop-item .gs-pcard {
	flex: 1 1 auto;
	width: 100%;
	padding: 0;
}

ul.products li.gs-loop-item .gs-pcard-media {
	aspect-ratio: 1 / 1;
}

.products .gs-loop-item .gs-pcard-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ---------- single product: add-to-cart and buy-now on one row ---------- */
.single-product div.product form.cart {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.single-product div.product form.cart .quantity {
	margin: 0;
	float: none;
}

.single-product div.product form.cart .single_add_to_cart_button,
.single-product div.product form.cart .ux-buy-now-button {
	margin: 0;
	float: none;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 26px;
	line-height: 1;
}

.single-product div.product form.cart .single_add_to_cart_button {
	min-width: 180px;
}

.single-product div.product form.cart .ux-buy-now-button {
	min-width: 160px;
	background: var(--gs-blue) !important;
}

/* ---------- gallery: let the image fill the column ---------- */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
}

.single-product .product-gallery {
	max-width: 100%;
}

.single-product .woocommerce-product-gallery {
	max-width: 100%;
}

/* quantity stepper on the single product keeps the card look */
.single-product div.product form.cart .quantity input.qty {
	height: 46px;
	width: 56px;
	border-radius: 0;
}

/* the cart form was inheriting a narrow width; let it use the summary column */
.single-product div.product form.cart {
	width: 100%;
	max-width: none;
	gap: 10px;
}

.single-product div.product form.cart .quantity {
	flex: 0 0 auto;
}

.single-product div.product form.cart .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 18px;
}

.single-product div.product form.cart .ux-buy-now-button {
	flex: 0 0 auto;
	min-width: 0;
	padding: 0 18px;
	background: var(--gs-blue) !important;
	color: #fff !important;
}

/* two-column product layout: gallery 48 / summary 48 inside a 1350px container */
.single-product .product-container {
	max-width: var(--gs-content);
}

.single-product .product-container .row.content-row {
	max-width: none;
}

.single-product .product-gallery.col,
.single-product .product-info.summary.col-fit {
	flex: 0 0 48% !important;
	max-width: 48% !important;
	width: 48% !important;
}

/* ---------- hard grid for the loop (parent theme flex classes are bypassed) ---------- */
/* archive grid only: related / upsell blocks keep a flex row */
.products:not(.related):not(.upsells) {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 34px 21px;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.related.products,
.upsells.products {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 28px 21px !important;
	list-style: none;
	margin: 0;
	padding: 0;
}

.related.products .gs-loop-item,
.upsells.products .gs-loop-item {
	flex: 0 0 calc((100% - 63px) / 4) !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	float: none !important;
}

.products .gs-loop-item,
.products .product {
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
	padding: 0 !important;
}

.products .gs-loop-item .gs-pcard-media img {
	opacity: 1 !important;
	visibility: visible !important;
}

.products .gs-loop-item .gs-pcard-buy {
	margin-top: 12px;
}

@media (max-width: 989px) {
	.products:not(.related):not(.upsells) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.related.products .gs-loop-item,
	.upsells.products .gs-loop-item {
		flex: 0 0 calc((100% - 42px) / 3) !important;
	}
}

@media (max-width: 849px) {
	.products:not(.related):not(.upsells) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
	}

	.related.products .gs-loop-item,
	.upsells.products .gs-loop-item {
		flex: 0 0 calc((100% - 16px) / 2) !important;
	}
}

/* gallery arrows only make sense with more than one image */
.single-product .product-gallery .image-tools,
.single-product .product-gallery .flickity-prev-next-button {
	display: none !important;
}

/* social share row is not part of the target layout */
.single-product .product-share,
.single-product .social-icons {
	display: none !important;
}

/* parent theme pins .product width to the column percentage; neutralise it inside the grid */
.products > .gs-loop-item {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.products .gs-loop-item > .gs-pcard {
	width: 100%;
	max-width: none;
	display: flex;
}

.products .gs-loop-item .gs-pcard-media {
	width: 100%;
	position: relative;
}

/* ---------- product page container: centred, padded, 1350px ---------- */
.single-product .product-main {
	padding-left: 0;
	padding-right: 0;
}

.single-product .product-container {
	max-width: var(--gs-content) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 16px !important;
	padding-right: 16px !important;
	width: 100%;
	box-sizing: border-box;
}

.single-product .product-container .row.content-row {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	align-items: flex-start;
}

/* gallery: square stage, no stray carousel arrows on a single image */
.single-product .product-gallery .flickity-button,
.single-product .product-gallery .flickity-prev-next-button,
.single-product .product-gallery button.flickity-button {
	display: none !important;
}

.single-product .product-gallery .woocommerce-product-gallery__image {
	width: 100%;
}

.single-product .product-gallery .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

/* vertical thumbnails column */
.single-product .product-gallery.product-gallery--vertical .product-thumbnails,
.single-product .product-gallery .product-thumbnails {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 96px;
}

.single-product .product-gallery .product-thumbnails img {
	width: 96px;
	height: 96px;
	object-fit: contain;
	border: 1px solid var(--gs-line);
	border-radius: 6px;
	background: #fff;
}

.single-product .product-gallery .product-thumbnails .is-nav-selected img,
.single-product .product-gallery .product-thumbnails img:hover {
	border-color: var(--gs-blue);
}

/* gallery chrome: no arrows, uniform slide height */
.single-product .product-gallery button,
.single-product .woocommerce-product-gallery button {
	display: none !important;
}

.single-product .product-gallery .flickity-viewport {
	border-radius: 8px;
}

.single-product .product-gallery .woocommerce-product-gallery__image {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* prev / next product thumbnails under the gallery: not part of the target layout */
.single-product .next-prev-thumbs,
.single-product .prod-dropdown,
.single-product .hide-for-off-canvas {
	display: none !important;
}

/* ---------- product page on mobile: single column ---------- */
@media (max-width: 849px) {
	.single-product .product-container .row.content-row {
		flex-wrap: wrap !important;
	}

	.single-product .product-gallery.col,
	.single-product .product-info.summary.col-fit {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.single-product .product-gallery .product-thumbnails {
		flex-direction: row;
		max-width: none;
		overflow-x: auto;
		gap: 8px;
		margin-top: 10px;
	}

	.single-product .product-gallery .product-thumbnails li,
	.single-product .product-gallery .product-thumbnails img {
		width: 64px;
		height: 64px;
		flex: 0 0 64px;
	}

	.gs-pr-now strong {
		font-size: 26px;
	}

	.gs-pr-line {
		font-size: 13px;
	}

	.single-product .product_title,
	.single-product .product-title {
		font-size: 22px;
		line-height: 1.25;
	}

	.single-product div.product form.cart {
		flex-wrap: wrap;
		gap: 8px;
	}

	.single-product div.product form.cart .single_add_to_cart_button,
	.single-product div.product form.cart .ux-buy-now-button {
		flex: 1 1 100%;
		height: 44px;
	}

	.single-product div.product form.cart .quantity {
		flex: 0 0 auto;
	}
}
