/* =====================================================
   ShubhCraft — Product card component (shared).
   Used on the homepage sections AND the WooCommerce loop
   (shop/category/related) via woocommerce/content-product.php.
   ===================================================== */

.sgc-product-card {
	background: var(--sgc-white);
	border-radius: var(--sgc-radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: var(--sgc-shadow-soft);
	border: 1px solid rgba(212, 175, 55, 0.12);
	transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.sgc-product-card:hover {
	box-shadow: var(--sgc-shadow-glow);
	transform: translateY(-6px);
	border-color: rgba(212, 175, 55, 0.45);
}

.sgc-product-card__img-wrap {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--sgc-light);
}

/* Shared hover slide for product + category tiles */
.sgc-img-slide {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.sgc-img-slide__track {
	display: flex;
	height: 100%;
	transition: transform 0.675s ease;
	transform: translateX(calc(-100% * var(--slide-index, 0) / var(--slide-count, 1)));
}

.sgc-img-slide__track img {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
	border-radius: 0;
	display: block;
}

.sgc-img-slide--multi .sgc-img-slide__track {
	width: calc(var(--slide-count) * 100%);
}

.sgc-img-slide--multi .sgc-img-slide__track img {
	flex: 0 0 calc(100% / var(--slide-count));
	width: calc(100% / var(--slide-count));
}

.sgc-product-card:hover .sgc-img-slide--multi,
.sgc-catcard:hover .sgc-img-slide--multi {
	--slide-index: 1;
}

.sgc-badge {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	padding: 0.2em 0.6em;
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 2px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	z-index: 2;
}

.sgc-badge--sale {
	background: var(--sgc-gradient-gold);
	color: var(--sgc-maroon-deep);
}

.sgc-product-card__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.5rem;
}

.sgc-product-card__title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.35;
}

.sgc-product-card__title a {
	color: var(--sgc-dark);
	text-decoration: none;
}

.sgc-product-card__title a:hover {
	color: var(--sgc-accent);
}

.sgc-product-card__price {
	font-size: 0.9375rem;
}

.sgc-product-card__price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--sgc-dark);
}

.sgc-product-card__price del {
	color: var(--sgc-muted);
	font-size: 0.875em;
}

.sgc-product-card__actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	flex-wrap: wrap;
}

.sgc-btn--cart,
.sgc-btn--cart:visited {
	flex: 1;
	text-align: center;
	background-color: var(--sgc-maroon);
	border-color: var(--sgc-maroon);
	color: var(--sgc-ivory) !important;
	font-size: 0.8125rem;
	padding: 0.55em 0.75em;
	text-decoration: none;
	border-radius: var(--sgc-radius);
	font-weight: 600;
	transition: background-color 0.2s;
}

.sgc-btn--cart:hover,
.sgc-btn--cart:focus {
	background-color: var(--sgc-accent);
	border-color: var(--sgc-accent);
	color: #1a1208 !important;
}

.sgc-btn--visit,
.sgc-btn--visit:visited {
	flex: 1;
	text-align: center;
	background-color: transparent;
	border: 1px solid var(--sgc-mid);
	color: var(--sgc-dark) !important;
	font-size: 0.8125rem;
	padding: 0.55em 0.75em;
	text-decoration: none;
	border-radius: var(--sgc-radius);
	font-weight: 600;
	transition: border-color 0.2s, color 0.2s;
}

.sgc-btn--visit:hover,
.sgc-btn--visit:focus {
	border-color: var(--sgc-accent);
	color: var(--sgc-accent-dk) !important;
}

/* WooCommerce appends a "View cart" link after AJAX add-to-cart; we morph
   the original button instead (cart-button.js), so hide the extra link. */
.sgc-product-card__actions .added_to_cart {
	display: none;
}
