/* =========================================================
   ShubhCraft — WooCommerce pages (shop, product, cart,
   checkout, account). Carries the divine design language
   beyond the homepage.
   ========================================================= */

/* ----- Shared: page titles & breadcrumbs ----- */
.sgc-site .woocommerce-products-header__title.page-title,
.sgc-site .woocommerce-products-header h1,
.sgc-site.woocommerce-cart .entry-title,
.sgc-site.woocommerce-checkout .entry-title,
.sgc-site.woocommerce-account .entry-title {
	font-family: var(--sgc-serif);
	font-weight: 700;
	color: var(--sgc-maroon-deep);
}

.sgc-site .woocommerce-products-header__title.page-title::after {
	content: "";
	display: block;
	width: 4rem;
	height: 3px;
	margin: 0.65rem auto 0;
	background: var(--sgc-gradient-gold);
	border-radius: 2px;
}

.sgc-site .woocommerce-breadcrumb {
	font-size: 0.8125rem;
	color: var(--sgc-muted);
}

.sgc-site .woocommerce-breadcrumb a {
	color: var(--sgc-maroon);
}

.sgc-site .woocommerce-breadcrumb a:hover {
	color: var(--sgc-saffron);
}

/* ----- Notices ----- */
.sgc-site .woocommerce-message,
.sgc-site .woocommerce-info {
	background-color: var(--sgc-maroon-deep);
	color: var(--sgc-gold-light);
}

.sgc-site .woocommerce-message a,
.sgc-site .woocommerce-info a {
	color: var(--sgc-gold-light);
	text-decoration: underline;
}

/* ----- Sale badge ----- */
.sgc-site .woocommerce span.onsale,
.sgc-site ul.products li.product .onsale {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	border: none;
	border-radius: 2px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.75rem;
	padding: 0.25em 0.7em;
}

/* ----- Star ratings ----- */
.sgc-site .star-rating span::before,
.sgc-site p.stars a:hover::after,
.sgc-site p.stars a.active::after {
	color: var(--sgc-saffron-light);
}

/* =====================================================
   PRODUCT GRID (shop / category / related / cross-sells)
   ===================================================== */

/* Warm ivory canvas behind the white cards */
.sgc-site.post-type-archive-product .site-content,
.sgc-site.tax-product_cat .site-content,
.sgc-site.tax-product_tag .site-content,
.sgc-site.post-type-archive-product .storefront-breadcrumb,
.sgc-site.tax-product_cat .storefront-breadcrumb,
.sgc-site.tax-product_tag .storefront-breadcrumb {
	background-color: var(--sgc-ivory);
}

.sgc-site .storefront-breadcrumb {
	margin-bottom: 0;
}

.sgc-site .woocommerce-products-header {
	padding: 1.5rem 0 0.5rem;
}

/* Default loop items (kept for contexts not using the card template) */
.sgc-site ul.products li.product {
	background: var(--sgc-white);
	border: 1px solid rgba(212, 175, 55, 0.14);
	border-radius: var(--sgc-radius-lg);
	box-shadow: var(--sgc-shadow-soft);
	overflow: hidden;
	padding-bottom: 1.25rem;
	position: relative;
	transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.sgc-site ul.products li.product:hover {
	box-shadow: var(--sgc-shadow-glow);
	border-color: rgba(212, 175, 55, 0.45);
	transform: translateY(-4px);
}

.sgc-site ul.products li.product img {
	width: 100%;
	margin: 0 0 0.85rem;
	border-radius: 0;
	display: block;
	transition: transform 0.5s ease;
}

.sgc-site ul.products li.product:hover img {
	transform: scale(1.04);
}

/* Loop items rendering the shared .sgc-product-card component:
   the card brings its own chrome, so the <li> goes transparent. */
.sgc-site ul.products li.product.sgc-loop-item,
.sgc-site ul.products li.product.sgc-loop-item:hover {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding-bottom: 0;
	overflow: visible;
	transform: none;
	text-align: left;
}

.sgc-site ul.products li.product.sgc-loop-item img,
.sgc-site ul.products li.product.sgc-loop-item:hover img {
	margin: 0;
	transform: none;
	transition: none;
}

.sgc-site ul.products li.product .woocommerce-loop-product__title,
.sgc-site ul.products li.product h2,
.sgc-site ul.products li.product h3 {
	font-family: var(--sgc-sans);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--sgc-dark);
	padding: 0 1rem;
}

.sgc-site ul.products li.product .price {
	color: var(--sgc-maroon);
	font-weight: 700;
	padding: 0 1rem;
}

.sgc-site ul.products li.product .price del {
	color: var(--sgc-muted);
	font-weight: 400;
	opacity: 1;
}

.sgc-site ul.products li.product .price ins {
	text-decoration: none;
}

.sgc-site ul.products li.product .star-rating {
	margin: 0 auto 0.4rem;
}

.sgc-site ul.products li.product:not(.sgc-loop-item) .button {
	display: block;
	margin: 0.5rem 1rem 0;
	background-color: var(--sgc-maroon);
	color: var(--sgc-ivory);
	border-radius: var(--sgc-radius);
	font-weight: 600;
	text-align: center;
	transition: background-color 0.2s, color 0.2s;
}

.sgc-site ul.products li.product:not(.sgc-loop-item) .button:hover {
	background-color: var(--sgc-accent);
	color: #1a1208;
}

/* Card-based loop on phones: two compact columns, stacked buttons */
@media (max-width: 600px) {
	.sgc-site ul.products:has(li.sgc-loop-item) {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}

	/* Clearfix pseudo-elements would otherwise occupy grid cells */
	.sgc-site ul.products:has(li.sgc-loop-item)::before,
	.sgc-site ul.products:has(li.sgc-loop-item)::after {
		content: none;
	}

	.sgc-site ul.products li.product.sgc-loop-item {
		width: 100%;
		float: none;
		margin: 0;
	}

	.sgc-site ul.products li.product.sgc-loop-item .sgc-product-card__actions {
		flex-direction: column;
	}
}

/* Sorting / result-count row */
.sgc-site .storefront-sorting {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.75rem;
}

.sgc-site .storefront-sorting form {
	margin-bottom: 0;
}

/* Extra "View cart" link is redundant — the button itself morphs (cart-button.js) */
.sgc-site ul.products li.product .added_to_cart {
	display: none;
}

/* Sorting bar */
.sgc-site .storefront-sorting select.orderby,
.sgc-site .woocommerce-ordering select {
	border: 1px solid rgba(212, 175, 55, 0.4);
	border-radius: 2rem;
	background-color: var(--sgc-white);
	color: var(--sgc-dark);
	padding: 0.35em 2em 0.35em 1em;
	font-size: 0.875rem;
}

.sgc-site .woocommerce-result-count {
	color: var(--sgc-muted);
	font-size: 0.875rem;
}

/* Pagination */
.sgc-site .woocommerce-pagination .page-numbers li .page-numbers {
	border-radius: 50%;
	color: var(--sgc-maroon);
}

.sgc-site .woocommerce-pagination .page-numbers li .page-numbers.current {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
}

/* =====================================================
   SINGLE PRODUCT
   ===================================================== */
.sgc-site.single-product .product_title {
	font-family: var(--sgc-serif);
	font-weight: 700;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	line-height: 1.15;
	color: var(--sgc-maroon-deep);
}

.sgc-site.single-product .summary .price {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--sgc-maroon);
}

.sgc-site.single-product .summary .price del {
	font-size: 0.7em;
	color: var(--sgc-muted);
	opacity: 1;
}

.sgc-site.single-product .summary .price ins {
	text-decoration: none;
}

/* Gallery frame */
.sgc-site.single-product div.product .woocommerce-product-gallery {
	border-radius: var(--sgc-radius-lg);
	overflow: hidden;
	border: 1px solid rgba(212, 175, 55, 0.18);
}

/* Quantity + add-to-cart */
.sgc-site.single-product .quantity {
	display: inline-flex;
	align-items: stretch;
	float: left;
	margin-right: 0.875em;
}

.sgc-site.single-product .quantity .sgc-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(212, 175, 55, 0.45);
	background: var(--sgc-white);
	color: var(--sgc-maroon-deep);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.sgc-site.single-product .quantity .sgc-qty-btn--minus {
	border-radius: var(--sgc-radius) 0 0 var(--sgc-radius);
	border-right: none;
}

.sgc-site.single-product .quantity .sgc-qty-btn--plus {
	border-radius: 0 var(--sgc-radius) var(--sgc-radius) 0;
	border-left: none;
}

.sgc-site.single-product .quantity .sgc-qty-btn:hover:not(:disabled),
.sgc-site.single-product .quantity .sgc-qty-btn:focus-visible {
	background: rgba(212, 175, 55, 0.12);
	border-color: var(--sgc-gold);
	color: var(--sgc-maroon-deep);
	outline: none;
}

.sgc-site.single-product .quantity .sgc-qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.sgc-site.single-product .quantity .qty {
	border: 1px solid rgba(212, 175, 55, 0.45);
	border-radius: 0;
	border-left: none;
	border-right: none;
	background: var(--sgc-white);
	height: 48px;
	width: 3.25rem;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.sgc-site.single-product .quantity .qty::-webkit-outer-spin-button,
.sgc-site.single-product .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sgc-site.single-product .single_add_to_cart_button,
.sgc-site.single-product .single_add_to_cart_button.alt {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
	letter-spacing: 0.03em;
	border: none;
	border-radius: 2rem;
	padding: 0.9em 2.4em;
	box-shadow: var(--sgc-shadow-glow);
	transition: transform 0.2s, filter 0.2s;
}

.sgc-site.single-product .single_add_to_cart_button:hover {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	transform: translateY(-2px);
	filter: brightness(1.05);
}

/* Trust row under add-to-cart */
.sgc-pdp-trust {
	list-style: none;
	margin: 1.1rem 0 0;
	padding: 0.9rem 1rem;
	background: var(--sgc-gold-pale);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: var(--sgc-radius);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sgc-pdp-trust__item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--sgc-maroon-deep);
}

.sgc-pdp-trust__icon {
	display: inline-flex;
	flex-shrink: 0;
}

.sgc-pdp-trust__icon svg,
.sgc-pdp-delivery svg {
	width: 1.25rem;
	height: 1.25rem;
	stroke: var(--sgc-accent-dk);
	fill: none;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sgc-pdp-delivery {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: var(--sgc-mid);
}

/* Meta (categories/tags) */
.sgc-site.single-product .product_meta {
	font-size: 0.8125rem;
	color: var(--sgc-muted);
}

.sgc-site.single-product .product_meta a {
	color: var(--sgc-maroon);
}

/* Tabs */
.sgc-site.single-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--sgc-maroon-deep);
}

.sgc-site.single-product .woocommerce-tabs .panel h2:first-of-type {
	font-family: var(--sgc-serif);
	font-weight: 700;
	color: var(--sgc-maroon-deep);
}

/* Mobile: horizontal tabs instead of Storefront's vertical accordion list */
@media (max-width: 767px) {
	.sgc-site.single-product .woocommerce-tabs {
		padding-top: 1rem;
		padding-bottom: 1rem;
	}

	.sgc-site.single-product .woocommerce-tabs ul.tabs {
		display: flex;
		flex-direction: row;
		border-top: none;
		border-bottom: 1.5px solid rgba(212, 175, 55, 0.35);
		margin: 0 0 1.25rem;
	}

	.sgc-site.single-product .woocommerce-tabs ul.tabs li {
		flex: 1;
		margin: 0;
		border-bottom: none;
		text-align: center;
	}

	.sgc-site.single-product .woocommerce-tabs ul.tabs li::after {
		display: none !important;
		content: none !important;
	}

	.sgc-site.single-product .woocommerce-tabs ul.tabs li a {
		padding: 0.75em 0.5em;
		font-size: 0.9375rem;
		font-weight: 600;
		color: var(--sgc-mid);
		border-bottom: 3px solid transparent;
		margin-bottom: -1.5px;
		transition: color 0.2s, border-color 0.2s;
	}

	.sgc-site.single-product .woocommerce-tabs ul.tabs li.active a {
		color: var(--sgc-maroon-deep);
		border-bottom-color: var(--sgc-gold);
	}

	.sgc-site.single-product .woocommerce-tabs .panel {
		width: 100%;
		float: none;
		margin: 0;
	}
}

/* Related products heading */
.sgc-site.single-product .related.products > h2,
.sgc-site.single-product .up-sells > h2 {
	font-family: var(--sgc-serif);
	font-weight: 700;
	color: var(--sgc-maroon-deep);
	text-align: center;
}

/* Sticky mobile add-to-cart bar */
.sgc-sticky-atc {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
	background: var(--sgc-ivory);
	border-top: 1px solid rgba(212, 175, 55, 0.4);
	box-shadow: 0 -4px 18px rgba(92, 26, 27, 0.12);
}

.sgc-sticky-atc[hidden] {
	display: none;
}

.sgc-sticky-atc__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.sgc-sticky-atc__name {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sgc-dark);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sgc-sticky-atc__price {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--sgc-maroon);
}

.sgc-sticky-atc__price del {
	font-size: 0.85em;
	color: var(--sgc-muted);
	font-weight: 400;
}

.sgc-sticky-atc__price ins {
	text-decoration: none;
}

.sgc-sticky-atc__btn {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
	border: none;
	border-radius: 2rem;
	padding: 0.7em 1.6em;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.sgc-sticky-atc {
		display: none;
	}
}

/* =====================================================
   CART
   ===================================================== */
.sgc-site table.shop_table {
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: var(--sgc-radius);
	overflow: hidden;
}

.sgc-site table.shop_table th {
	color: var(--sgc-maroon-deep);
}

.sgc-site .cart_totals h2,
.sgc-site .cross-sells > h2 {
	font-family: var(--sgc-serif);
	font-weight: 700;
	color: var(--sgc-maroon-deep);
}

.sgc-site .wc-proceed-to-checkout .checkout-button,
.sgc-site .wc-proceed-to-checkout .checkout-button.alt {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
	border-radius: 2rem;
	box-shadow: var(--sgc-shadow-glow);
	transition: transform 0.2s, filter 0.2s;
}

.sgc-site .wc-proceed-to-checkout .checkout-button:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
	color: var(--sgc-maroon-deep);
}

/* Empty cart */
.sgc-site .cart-empty.woocommerce-info {
	background: transparent;
	color: var(--sgc-maroon-deep);
	font-family: var(--sgc-serif);
	font-size: 1.5rem;
	font-weight: 600;
}

.sgc-site .return-to-shop .button {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
	border-radius: 2rem;
	padding: 0.85em 2.25em;
	box-shadow: var(--sgc-shadow-glow);
}

/* =====================================================
   CHECKOUT
   ===================================================== */
.sgc-site.woocommerce-checkout form .form-row input.input-text,
.sgc-site.woocommerce-checkout form .form-row textarea,
.sgc-site.woocommerce-checkout form .form-row select {
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: var(--sgc-radius);
	background: var(--sgc-white);
}

.sgc-site.woocommerce-checkout form .form-row input.input-text:focus,
.sgc-site.woocommerce-checkout form .form-row textarea:focus {
	border-color: var(--sgc-gold);
	box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
	outline: none;
}

.sgc-site.woocommerce-checkout h3 {
	font-family: var(--sgc-serif);
	font-weight: 700;
	color: var(--sgc-maroon-deep);
}

.sgc-site #place_order,
.sgc-site #place_order.alt {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
	border-radius: 2rem;
	box-shadow: var(--sgc-shadow-glow);
	transition: transform 0.2s, filter 0.2s;
}

.sgc-site #place_order:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
}

/* =====================================================
   CART & CHECKOUT BLOCKS (block-based pages)
   ===================================================== */
.sgc-site .wc-block-components-button:not(.is-link),
.sgc-site .wc-block-cart__empty-cart .wp-block-button__link,
.sgc-site .wp-block-woocommerce-cart .wp-block-button__link {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	font-weight: 700;
	border: none;
	border-radius: 2rem;
	box-shadow: var(--sgc-shadow-glow);
	transition: transform 0.2s, filter 0.2s;
}

.sgc-site .wc-block-components-button:not(.is-link):hover,
.sgc-site .wc-block-cart__empty-cart .wp-block-button__link:hover,
.sgc-site .wp-block-woocommerce-cart .wp-block-button__link:hover {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
	transform: translateY(-2px);
	filter: brightness(1.05);
}

.sgc-site .wc-block-components-text-input input:focus,
.sgc-site .wc-block-components-form .wc-block-components-text-input input:focus {
	border-color: var(--sgc-gold);
	box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.sgc-site .wc-block-components-product-price,
.sgc-site .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--sgc-maroon);
	font-weight: 700;
}

/* =====================================================
   MY ACCOUNT
   ===================================================== */
.sgc-site.woocommerce-account .woocommerce-MyAccount-navigation ul {
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: var(--sgc-radius);
	overflow: hidden;
	background: var(--sgc-white);
}

.sgc-site.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	border-bottom: 1px solid rgba(212, 175, 55, 0.15);
	list-style: none;
}

.sgc-site.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 0.7rem 1rem;
	color: var(--sgc-maroon);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
}

.sgc-site.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.sgc-site.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: var(--sgc-gold-pale);
	color: var(--sgc-maroon-deep);
}

.sgc-site.woocommerce-account .woocommerce-form-login,
.sgc-site.woocommerce-account .woocommerce-form-register {
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: var(--sgc-radius-lg);
	padding: 1.75rem;
	background: var(--sgc-white);
	box-shadow: var(--sgc-shadow-soft);
	max-width: 30rem;
}

.sgc-site.woocommerce-account .woocommerce-form-login .button,
.sgc-site.woocommerce-account .woocommerce-form-register .button {
	background-color: var(--sgc-maroon);
	color: var(--sgc-ivory);
	border-radius: 2rem;
	font-weight: 600;
	padding: 0.7em 2em;
}

.sgc-site.woocommerce-account .woocommerce-form-login .button:hover,
.sgc-site.woocommerce-account .woocommerce-form-register .button:hover {
	background-color: var(--sgc-accent);
	color: #1a1208;
}

/* =====================================================
   STOREFRONT HANDHELD FOOTER BAR (mobile)
   ===================================================== */
.sgc-site .storefront-handheld-footer-bar {
	background: var(--sgc-ivory);
	box-shadow: 0 -2px 12px rgba(92, 26, 27, 0.1);
	border-top: 1px solid rgba(212, 175, 55, 0.35);
}

.sgc-site .storefront-handheld-footer-bar ul li > a {
	color: var(--sgc-maroon);
}

.sgc-site .storefront-handheld-footer-bar ul li.cart .count {
	background-color: var(--sgc-saffron);
	color: var(--sgc-white);
}

/* Keep the sticky ATC above the handheld bar when both exist */
.sgc-site.single-product .storefront-handheld-footer-bar {
	display: none;
}
