/**
 * SP Featured Product - front-end styles.
 * Inherits theme font; colours from CSS variables injected inline.
 */

.spfp-wrapper {
	width: 100%;
	margin: 0 auto;
	font-family: inherit;
}

.spfp-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 40px;
	align-items: start;
}

/* ---------- Gallery ---------- */
.spfp-gallery {
	display: grid;
	grid-template-columns: 84px 1fr;
	gap: 16px;
	align-items: start;
}

.spfp-thumbs {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.spfp-thumb {
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	background: #f3f3f3;
	aspect-ratio: 3 / 4;
	width: 100%;
	transition: border-color 0.2s ease;
}

.spfp-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.spfp-thumb.is-active {
	border-color: var(--spfp-primary, #3C0008);
}

.spfp-main-image {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: #f3f3f3;
}

.spfp-main-link {
	display: block;
}

.spfp-main-image img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

/* Auto-sliding media gallery */
.spfp-media-slider {
	width: 100%;
}

.spfp-media-slider .splide__slide img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

/* Circular spinning badge */
.spfp-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	width: 110px;
	height: 110px;
	color: var(--spfp-primary, #3C0008);
	pointer-events: none;
	display: block;
}

.spfp-badge-svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
	animation: spfp-spin 16s linear infinite;
}

.spfp-badge-svg text {
	font-family: inherit;
	font-weight: 600;
}

@keyframes spfp-spin {
	to { transform: rotate(360deg); }
}

/* ---------- Details ---------- */
.spfp-details {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.spfp-title {
	font-family: inherit;
	margin: 0;
	font-size: 38px;
	line-height: 1.12;
	font-weight: 800;
}

.spfp-title a,
.spfp-title a:hover,
.spfp-title a:focus {
	color: inherit;
	text-decoration: none !important;
}

.spfp-price {
	font-family: inherit;
	font-size: 20px;
	font-weight: 600;
	color: inherit;
}

.spfp-price del { opacity: 0.5; font-weight: 400; margin-right: 8px; }
.spfp-price ins { text-decoration: none; }

/* Actions row: qty + add to cart side by side */
.spfp-actions {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 460px;
}

.spfp-cart-form {
	display: flex;
	gap: 14px;
	align-items: stretch;
	flex-wrap: nowrap;
}

.spfp-qty {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;          /* never stretch */
	width: auto;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 999px;
	padding: 4px 6px;
	background: #fff;
}

.spfp-qty-btn {
	border: none;
	background: transparent;
	width: 34px;
	min-width: 34px;
	height: 34px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	border-radius: 50%;
	flex: 0 0 auto;
}

.spfp-qty-btn:hover { background: rgba(0, 0, 0, 0.06); }

.spfp-qty-input.spfp-qty-input {
	width: 44px;
	min-width: 44px;
	max-width: 44px;
	flex: 0 0 44px;
	text-align: center;
	border: none;
	background: transparent;
	box-shadow: none;
	font-size: 16px;
	font-family: inherit;
	padding: 0;
	margin: 0;
	height: auto;
	-moz-appearance: textfield;
}

.spfp-qty-input:focus {
	outline: none;
	box-shadow: none;
}

.spfp-qty-input::-webkit-outer-spin-button,
.spfp-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Buttons */
.spfp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	padding: 14px 28px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	text-align: center;
	white-space: nowrap;        /* keep "Add to cart" on one line */
	border: 1.5px solid var(--spfp-primary, #3C0008);
	transition: opacity 0.2s ease, transform 0.15s ease;
	line-height: 1.2;
	width: auto;
}

.spfp-btn:hover { opacity: 0.9; }
.spfp-btn:active { transform: translateY(1px); }

.spfp-btn--cart {
	flex: 1 1 auto;             /* fill remaining space beside qty */
	background: var(--spfp-primary, #3C0008);
	color: var(--spfp-accent, #F5F5DC);
}

.spfp-btn--buynow {
	background: transparent;
	color: var(--spfp-primary, #3C0008);
	width: 100%;
	display: flex;
}

/* View full details */
.spfp-fulldetails {
	margin-top: 6px;
	padding-top: 16px;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	max-width: 460px;
}

.spfp-fulldetails a,
.spfp-fulldetails a:hover,
.spfp-fulldetails a:focus {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	color: inherit;
	font-family: inherit;
	font-size: 15px;
	text-decoration: none !important;
}

.spfp-arrow { transition: transform 0.2s ease; }
.spfp-fulldetails a:hover .spfp-arrow { transform: translateX(4px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.spfp-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
	.spfp-title { font-size: 30px; }
}

@media (max-width: 600px) {
	.spfp-gallery {
		grid-template-columns: 64px 1fr;
		gap: 10px;
	}
	.spfp-title { font-size: 26px; }
	.spfp-cart-form { flex-wrap: wrap; }
	.spfp-btn--cart { flex: 1 1 100%; }
	.spfp-badge { width: 72px; height: 72px; }
}

