/**
 * Featured Product Block styles
 *
 * @package woodmart-child
 */

.wdc-featured-product {
	max-width: 640px;
	margin: 0 auto;
	padding: 20px;
	text-align: center;
}

.wdc-featured-product .wdc-fp-inner {
	position: relative;
}

/* Badge */
.wdc-featured-product .wdc-fp-badge {
	display: inline-block;
	margin-bottom: 26px;
	padding: 9px 20px;
	border-radius: 6px;
	background-color: #ff3b3b;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}

/* Image */
.wdc-featured-product .wdc-fp-image {
	margin-bottom: 8px;
}

.wdc-featured-product .wdc-fp-image img {
	display: inline-block;
	width: auto;
	max-width: 340px;
	height: auto;
}

/* Wishlist + quick view icons */
.wdc-featured-product .wdc-fp-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 14px 0 18px;
}

.wdc-featured-product .wdc-fp-actions .wd-wishlist-btn,
.wdc-featured-product .wdc-fp-actions .wd-quick-view-btn {
	margin: 0;
}

/* Title */
.wdc-featured-product .wdc-fp-title {
	margin: 6px 0 10px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
}

.wdc-featured-product .wdc-fp-title a {
	color: var(--wd-title-color, #2d2a2a);
	text-decoration: none;
}

.wdc-featured-product .wdc-fp-title a:hover {
	color: var(--wd-primary-color, #1a36e8);
}

/* Subtitle */
.wdc-featured-product .wdc-fp-subtitle {
	margin: 0 0 16px;
	color: var(--wd-text-color, #777);
	font-size: 18px;
	line-height: 1.5;
}

/* Rating */
.wdc-featured-product .wdc-fp-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 14px;
}

.wdc-featured-product .wdc-fp-rating .star-rating {
	margin: 0;
}

.wdc-featured-product .wdc-fp-rating-count {
	color: var(--wd-title-color, #2d2a2a);
	font-size: 15px;
	font-weight: 600;
}

/* Price */
.wdc-featured-product .wdc-fp-price {
	margin: 10px 0 26px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.wdc-featured-product .wdc-fp-price ins,
.wdc-featured-product .wdc-fp-price ins .amount {
	color: #e10000;
	font-weight: 700;
	text-decoration: none;
}

.wdc-featured-product .wdc-fp-price del,
.wdc-featured-product .wdc-fp-price del .amount {
	margin-inline-start: 8px;
	color: #9a9a9a;
	font-size: 0.82em;
	font-weight: 400;
	text-decoration: line-through;
	opacity: 1;
}

/* Respect Woodmart "Hide 'to' price" option (body.hide-larger-price) on variable products.
   Hides the larger "to" amount and the range separator, keeping the starting price.
   Scoped to <span> separators so <del>/<ins> wrappers (regular + sale) stay visible. */
.hide-larger-price .wdc-fp-price:has( .amount ~ .amount ) :is( .amount ~ .amount, span[aria-hidden="true"]:not( .amount ) ) {
	display: none;
}

.hide-larger-price .wdc-fp-price:has( .amount ~ .amount ) > small {
	margin-inline-start: 0.2em;
}

/* Buy now button */
.wdc-featured-product .wdc-fp-buy {
	margin-top: 6px;
}

.wdc-featured-product .wdc-fp-buy-btn {
	--btn-bgcolor: #1a36e8;
	--btn-bgcolor-hover: #1429bd;
	--btn-color: #fff;
	--btn-color-hover: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 320px;
	max-width: 100%;
	padding: 17px 44px !important;
	border: 0 !important;
	border-radius: 40px !important;
	background-color: #1a36e8 !important;
	color: #fff !important;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.wdc-featured-product .wdc-fp-buy-btn:hover,
.wdc-featured-product .wdc-fp-buy-btn:focus {
	background-color: #1429bd !important;
	color: #fff !important;
}

.wdc-featured-product .wdc-fp-buy-arrow {
	font-size: 22px;
	line-height: 1;
}

/* Alignment variants */
.wdc-featured-product.wdc-fp-align-left {
	text-align: left;
}

.wdc-featured-product.wdc-fp-align-right {
	text-align: right;
}

.wdc-featured-product.wdc-fp-align-left .wdc-fp-actions,
.wdc-featured-product.wdc-fp-align-left .wdc-fp-rating {
	justify-content: flex-start;
}

.wdc-featured-product.wdc-fp-align-right .wdc-fp-actions,
.wdc-featured-product.wdc-fp-align-right .wdc-fp-rating {
	justify-content: flex-end;
}

/* Empty / no product notice */
.wdc-fp-empty {
	padding: 30px 20px;
	color: #9a9a9a;
	text-align: center;
}

/* Responsive */
@media ( max-width: 768px ) {
	.wdc-featured-product .wdc-fp-title {
		font-size: 24px;
	}

	.wdc-featured-product .wdc-fp-subtitle {
		font-size: 16px;
	}

	.wdc-featured-product .wdc-fp-image img {
		max-width: 260px;
	}

	.wdc-featured-product .wdc-fp-buy-btn {
		min-width: 0;
		width: 100%;
	}
}
