/**
 * Theme Name: WoodMart Child
 * Description: Child theme for WoodMart
 * Author: Your Name
 * Template: woodmart
 * Version: 1.0.0
 */

/* Installment Plans Styling - WoodMart Theme Integration */

.wd-installment-plans-section {
	margin: 24px 0;
	padding: 0;
	background: transparent;
}

.wd-installment-plans-header {
	margin-bottom: 16px;
	text-align: left;
}

.wd-installment-plans-title {
	margin: 0 0 4px 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--color-gray-900, #333);
	text-transform: none;
	letter-spacing: 0;
}

.wd-installment-plans-subtitle {
	margin: 0;
	font-size: 13px;
	color: var(--color-gray-500, #666);
	font-weight: 400;
}

.wd-installment-plans-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
	margin-top: 0;
}

.wd-installment-plan-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--brdcolor-gray-200, #e0e0e0);
	border-left: 3px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.2s ease;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	transition: all 0.3s ease;
}

.wd-installment-plan-card:hover {
	border-left-color: var(--wd-primary-color, #0073aa);
	border-color: var(--brdcolor-gray-300, #d0d0d0);
}

.wd-installment-plan-card:has(.wd-installment-plan-radio:checked),
.wd-installment-plan-card.selected {
	border-left-color: var(--wd-primary-color, #0073aa);
	border-color: var(--wd-primary-color, #0073aa);
	border-left-width: 3px;
	background: #fff;
}

/* Add visual hint that selected card can be clicked again to deselect */
.wd-installment-plan-card.selected {
	position: relative;
}

.wd-installment-plan-card.selected::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	pointer-events: none;
	transition: border-color 0.2s ease;
}

.wd-installment-plan-card.selected:hover::before {
	border-color: rgba(0, 115, 170, 0.3);
}

/* Fallback for browsers that don't support :has() */
.wd-installment-plan-card.selected {
	border-left-color: var(--wd-primary-color, #0073aa);
	border-left-width: 3px;
}

.wd-installment-plan-label {
	display: block;
	cursor: pointer;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	position: relative;
	z-index: 1;
}

.wd-installment-plan-radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.wd-installment-plan-content {
	padding: 16px;
	position: relative;
	pointer-events: none;
}

.wd-installment-plan-label {
	pointer-events: auto;
}

.wd-installment-plan-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--brdcolor-gray-200, #e9e9e9);
	position: relative;
}

.wd-installment-plan-badge {
	display: inline-block;
	padding: 4px 10px;
	background: var(--wd-primary-color, #0073aa);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 4px;
	line-height: 1.4;
}

.wd-installment-plan-details {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wd-installment-plan-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--brdcolor-gray-100, #f5f5f5);
}

.wd-installment-plan-row:last-of-type {
	border-bottom: none;
}

.wd-installment-plan-label-text {
	font-size: 13px;
	color: var(--color-gray-600, #666);
	font-weight: 400;
}

.wd-installment-plan-value {
	font-size: 15px;
	color: var(--color-gray-900, #333);
	font-weight: 600;
}

.wd-installment-plan-advance {
	color: var(--wd-primary-color, #0073aa);
	font-weight: 600;
}

.wd-installment-plan-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--brdcolor-gray-200, #e9e9e9);
}

.wd-installment-plan-total-label {
	font-size: 11px;
	color: var(--color-gray-500, #999);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.4;
}

.wd-installment-plan-total-value {
	font-size: 18px;
	color: var(--wd-primary-color, #0073aa);
	font-weight: 700;
	letter-spacing: -0.3px;
}

.wd-installment-plan-total-value::before {
	content: 'Rs ';
	font-size: 15px;
	font-weight: 600;
}

/* Blue left border indicator - already handled by border-left-color above */

/* Radio button custom styling - positioned in header */
.wd-installment-plan-header::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 18px;
	height: 18px;
	border: 2px solid var(--brdcolor-gray-300, #ccc);
	border-radius: 50%;
	background: #fff;
	transition: all 0.2s ease;
	z-index: 2;
}

.wd-installment-plan-card:has(.wd-installment-plan-radio:checked) .wd-installment-plan-header::after,
.wd-installment-plan-card.selected .wd-installment-plan-header::after {
	border-color: var(--wd-primary-color, #0073aa);
	background: var(--wd-primary-color, #0073aa);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M10 3L4.5 8.5 2 6' stroke='none' stroke-width='2' fill-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 8px;
}

/* Make sure label doesn't interfere with card click */
.wd-installment-plan-label {
	position: relative;
	z-index: 1;
}

/* Hide product price when product has no price */
.no-product-price ~ .product-price,
.no-product-price ~ .price,
.single-product .no-product-price ~ * .price,
.single-product .no-product-price ~ * .woocommerce-Price-amount {
	display: none !important;
}

/* Disable add to cart when product has no price and no plan selected */
.no-product-price ~ form.cart button[type="submit"]:not(.plan-selected),
.no-product-price ~ form.cart input[type="submit"]:not(.plan-selected),
.no-product-price ~ form.cart .single_add_to_cart_button:not(.plan-selected),
.single-product .no-product-price ~ form.cart button:not(.plan-selected),
.single-product .no-product-price ~ form.cart input[type="submit"]:not(.plan-selected) {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

/* Enable add to cart when plan is selected */
.no-product-price ~ form.cart button[type="submit"].plan-selected,
.no-product-price ~ form.cart input[type="submit"].plan-selected,
.no-product-price ~ form.cart .single_add_to_cart_button.plan-selected,
.single-product .no-product-price ~ form.cart button.plan-selected,
.single-product .no-product-price ~ form.cart input[type="submit"].plan-selected {
	opacity: 1 !important;
	cursor: pointer !important;
	pointer-events: auto !important;
}

/* Responsive Design */
@media (max-width: 768px) {
	.wd-installment-plans-list {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.wd-installment-plans-title {
		font-size: 16px;
	}
	
	.wd-installment-plan-content {
		padding: 14px;
	}
	
	.wd-installment-plan-total-value {
		font-size: 16px;
	}
}

.shopping-cart-widget-body .cart-info div.quantity , .shopping-cart-widget-body .cart-info span.quantity{display: none !important;}
form fieldset.hidden-fields-container{display:none !important;}
.wd-sticky-nav{overflow-y:scroll;}
.wd-sticky-nav-title{min-width:44px;}
::-webkit-scrollbar{ width: 5px; }
::-webkit-scrollbar-track{ background: #FFFFFF; }
::-webkit-scrollbar-thumb{ background: rgb(230 239 253); border-radius: 0; }
::-webkit-scrollbar-thumb:hover{ background: rgb(29,131,183); }
.wd-hover-simple .wd-brand-item img{filter:none !important;}