/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ================================================
   Custom Cart Page Styling
   ================================================ */

/* Wrap all cart styles to apply only on cart page */
body.woocommerce-cart {

/* Cart Header */
.custom-cart-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.cart-header-section {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
}

.cart-page-title {
	font-size: 24px;
	font-weight: 600;
	margin: 0;
	color: #000;
}

.clear-cart-link {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #dc3545;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: opacity 0.3s;
}

.clear-cart-link:hover {
	opacity: 0.7;
	color: #dc3545;
}

.clear-cart-link svg {
	width: 16px;
	height: 16px;
}

/* Cart Grid Layout */
.cart-content-grid {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 30px;
	margin-top: 20px;
}

@media (max-width: 992px) {
	.cart-content-grid {
		grid-template-columns: 1fr;
	}
}

/* Free Shipping Notice */
.free-shipping-notice {
	background: linear-gradient(90deg, #0066ff 0%, #0052cc 100%);
	color: white;
	padding: 16px 20px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	position: relative;
}

.free-shipping-notice svg {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
}

.free-shipping-notice span {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
}

.free-shipping-notice .close-notice {
	background: transparent;
	border: none;
	color: white;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s;
}

.free-shipping-notice .close-notice:hover {
	opacity: 0.7;
}

/* Cart Items */
.cart-items-column {
	background: white;
}

.cart-items-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cart-item {
	display: flex;
	gap: 16px;
	padding: 20px 0;
	border: none;
	border-bottom: 1px solid #f0f0f0;
	border-radius: 0;
	background: white;
	transition: none;
}

.cart-item:last-child {
	border-bottom: none;
}

.cart-item:hover {
	box-shadow: none;
}

.cart-item-image {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	border-radius: 0;
	overflow: hidden;
	background: #f5f5f5;
}

.cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cart-item-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	justify-content: space-between;
}

.cart-item-name {
	font-size: 15px;
	font-weight: 400;
	margin: 0;
	line-height: 1.5;
	color: #000;
}

.cart-item-name a {
	color: #000;
	text-decoration: none;
}

.cart-item-name a:hover {
	color: #0066ff;
}

.cart-item-meta {
	display: flex;
	gap: 16px;
	font-size: 14px;
	color: #666;
	flex-wrap: wrap;
}

.cart-item-meta .variation {
	display: inline-flex;
	gap: 4px;
	background: #f5f5f5;
	padding: 4px 10px;
	border-radius: 4px;
}

.cart-item-meta .variation dt,
.cart-item-meta .variation dd {
	display: inline;
	margin: 0;
}

.cart-item-meta .variation dt {
	font-weight: normal;
	display: none;
}

.cart-item-meta .variation dd {
	font-weight: 400;
	color: #333;
}

.cart-item-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 0;
}

.cart-item-remove a {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #dc3545;
	text-decoration: none;
	transition: opacity 0.3s;
}

.cart-item-remove a:hover {
	opacity: 0.7;
}

.cart-item-remove svg {
	width: 16px;
	height: 16px;
}

.cart-item-quantity {
	display: flex;
	align-items: center;
	gap: 0;
	border: none;
	border-radius: 50px;
	padding: 0 10px;
	background-color: #E7EFF6 !important;
}

.cart-item-quantity input.qty {
	width: 40px;
	text-align: center;
	border: none !important;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	background: transparent !important;
	appearance: textfield;
	-moz-appearance: textfield;
}

.cart-item-quantity input.qty::-webkit-outer-spin-button,
.cart-item-quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cart-item-quantity .quantity-label {
	font-size: 14px;
	color: #666;
	margin-left: 4px;
}

/* Hide the default quantity wrapper borders */
.cart-item-quantity .quantity,
.cart-item-quantity .wd-quantity-wrapper {
	border: none !important;
	background: transparent !important;
}

.cart-item-increment {
	display: flex;
	gap: 4px;
}

.cart-item-increment button {
	width: 32px;
	height: 32px;
	border: none !important;
	background: transparent !important;
	color: #dc3545;
	font-size: 18px;
	border-radius: 0 !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s;
	padding: 0;
}

.cart-item-increment button:hover {
	background: transparent !important;
	color: #999;
}

/* Additional overrides for qty buttons */
.qty-minus,
.qty-plus {
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #dc3545 !important;
}

.qty-minus:hover,
.qty-plus:hover {
	color: #999 !important;
}

.cart-item-pricing {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	margin-left: auto;
	align-self: flex-start;
}

.cart-item-price-original {
	font-size: 14px;
	color: #999;
	text-decoration: line-through;
	font-weight: 400;
}

.cart-item-price-current {
	font-size: 18px;
	font-weight: 700;
	color: #00c9a7;
}

/* Ensure pricing appears on right side and aligns properly */
.cart-item-details {
	position: relative;
}

.cart-item-pricing {
	position: absolute;
	top: 0;
	right: 0;
}

/* Order Summary */
.order-summary-column {
	position: sticky;
	top: 20px;
	height: fit-content;
}

.order-summary-box {
	background: #f5f5f5;
	border-radius: 8px;
	padding: 28px 24px;
}

.order-summary-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 24px 0;
	color: #1a1a1a;
}

.order-summary-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* White background wrapper for summary rows */
.summary-rows-wrapper {
	background: white;
	border-radius: 8px;
	padding: 0 20px;
}

.summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid #e0e0e0;
	background: transparent;
}

.summary-row:first-child {
	padding-top: 16px;
}

.summary-row:last-child {
	border-bottom: none;
	padding-bottom: 16px;
}

.summary-row.summary-total {
	border-top: 1px solid #e0e0e0;
	border-bottom: none;
	padding-top: 16px;
	padding-bottom: 16px;
	margin-top: 0;
}

.summary-label {
	font-size: 15px;
	color: #1a1a1a;
	font-weight: 400;
}

.summary-value {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.summary-total .summary-label {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
}

.summary-total .summary-value {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
}

.summary-checkout {
	margin-top: 20px;
	margin-bottom: 20px;
}

.checkout-button {
	display: block;
	width: 100%;
	background: #0052cc;
	color: white;
	text-align: center;
	padding: 16px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.3s;
	border: none;
	cursor: pointer;
}

.checkout-button:hover {
	background: #003d99;
	color: white;
}

/* Accordion Sections */
.summary-accordion {
	background: white;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 12px;
}

.summary-accordion:last-child {
	margin-bottom: 0;
}

.accordion-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	text-align: left;
	transition: color 0.3s;
}

.accordion-toggle:hover {
	color: #0066ff;
}

.accordion-toggle svg:first-child {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	color: #0052cc;
}

.accordion-toggle span {
	flex: 1;
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
}

.accordion-toggle .accordion-arrow {
	width: 20px;
	height: 20px;
	transition: transform 0.3s;
	color: #666;
}

.accordion-toggle.active .accordion-arrow {
	transform: rotate(180deg);
}

.accordion-content {
	display: none;
	padding: 16px 0;
}

.coupon-form {
	display: flex;
	gap: 8px;
}

.coupon-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
}

.apply-coupon-button {
	padding: 10px 20px;
	background: #0066ff;
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
}

.apply-coupon-button:hover {
	background: #0052cc;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.custom-cart-wrapper {
		padding: 15px;
	}

	.cart-page-title {
		font-size: 20px;
	}

	.cart-item {
		flex-direction: column;
	}

	.cart-item-image {
		width: 100%;
		height: 200px;
	}

	.cart-item-pricing {
		margin-left: 0;
		align-items: flex-start;
	}

	.order-summary-column {
		position: static;
	}
}

/* Hide default WooCommerce elements */
.woocommerce-cart .woocommerce-cart-form table.shop_table {
	display: none;
}

.woocommerce-cart .cart-actions {
	display: none;
}

/* Remove borders and border radius from ALL quantity buttons */
.quantity .qty,
.quantity input[type="number"],
.quantity input[type="text"],
.quantity button,
.quantity .plus,
.quantity .minus,
.cart-item-quantity button,
.cart-item-quantity .plus,
.cart-item-quantity .minus,
.input-text.qty,
button.plus,
button.minus,
.wd-plus,
.wd-minus,
.quantity-plus,
.quantity-minus {
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
}

/* Woodmart specific quantity buttons */
.wd-quantity-wrapper,
.wd-quantity-wrapper button,
.wd-quantity-wrapper .wd-plus,
.wd-quantity-wrapper .wd-minus {
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
}

/* Remove background and borders from quantity wrappers */
.cart-item-quantity .quantity,
.cart-item-actions .quantity,
.woocommerce .quantity,
.quantity {
	border: none !important;
	background: transparent !important;
}

/* Style the plus/minus buttons to look like text/icons */
.woocommerce .cart-item-quantity button,
.woocommerce button.plus,
.woocommerce button.minus,
.woocommerce .wd-plus,
.woocommerce .wd-minus {
	color: #dc3545 !important;
	background: transparent !important;
	border: none !important;
	font-size: 16px !important;
	line-height: 1 !important;
	padding: 0 !important;
	width: auto !important;
	height: auto !important;
	min-width: 20px !important;
}

.woocommerce .cart-item-quantity button:hover,
.woocommerce button.plus:hover,
.woocommerce button.minus:hover,
.woocommerce .wd-plus:hover,
.woocommerce .wd-minus:hover {
	color: #999 !important;
	background: transparent !important;
}



/* But keep these elements rounded */
.free-shipping-notice,
.cart-item,
.cart-item-image,
.order-summary-box,
.checkout-button,
.coupon-input,
.apply-coupon-button {
	border-radius: revert !important;
}

.free-shipping-notice {
	border-radius: 8px !important;
}

.cart-item {
	border-radius: 8px !important;
}

.cart-item-image {
	border-radius: 8px !important;
}

.order-summary-box {
	border-radius: 12px !important;
}

.checkout-button {
	border-radius: 8px !important;
}

.coupon-input,
.apply-coupon-button {
	border-radius: 6px !important;
}

} /* End of body.woocommerce-cart */

/* ================================================
   Custom Checkout Page Styling
   ================================================ */

/* Wrap all checkout styles to apply only on checkout page */
body.woocommerce-checkout {

.custom-checkout-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Checkout Grid Layout */
.checkout-content-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-top: 20px;
}

@media (max-width: 992px) {
	.checkout-content-grid {
		grid-template-columns: 1fr;
	}
}

/* Customer Details Section */
.checkout-customer-column {
	background: white;
}

.customer-details-section {
	background: white;
	/* padding: 28px 24px; */
	border-radius: 8px;
	margin-bottom: 20px;
}

.section-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 24px 0;
	color: #1a1a1a;
}

.billing-fields,
.shipping-fields {
	margin-bottom: 20px;
}

/* Hide Additional Information Section */
.woocommerce-additional-fields {
	display: none !important;
}

/* Payment Section */
.checkout-payment-section {
	background: white;
	/* padding: 28px 24px; */
	border-radius: 8px;
}

.checkout-payment-section #order_review {
	margin-top: 0;
}

/* Payment methods styling */
.woocommerce-checkout-payment {
	background: transparent !important;
	border-radius: 0 !important;
}

#payment {
	background: transparent !important;
}

#payment .payment_methods {
	border: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin-bottom: 20px !important;
}

#payment .payment_method {
	background: #f5f5f5;
	padding: 16px;
	margin-bottom: 10px;
	border-radius: 8px;
	border: 2px solid transparent;
}

#payment .payment_method.active,
#payment .payment_method input:checked + label {
	border-color: #2b2b40;
}

#payment .place-order {
	margin: 20px 0 0 0;
	padding: 0;
}

#payment .place-order button,
#payment .place-order .button {
	width: 100%;
	background: #2b2b40;
	color: white;
	text-align: center;
	padding: 16px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: background 0.3s;
}

#payment .place-order button:hover,
#payment .place-order .button:hover {
	background: #003d99;
}

/* Order Summary Column */
.checkout-order-summary-column {
	position: sticky;
	top: 20px;
	height: fit-content;
	background: #f5f5f5;
	border-radius: 8px;
	padding: 0;
}

.order-summary-box {
	background: transparent;
	border-radius: 0;
	overflow: hidden;
}

/* Cart Items Accordion */
.checkout-cart-items {
	background: transparent;
	border-bottom: none;
	margin-bottom: 20px;
}

.cart-items-accordion-toggle {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	background: white;
	border: none;
	cursor: pointer;
	transition: background 0.3s, border-radius 0.3s;
	border-radius: 6px;
	margin: 0 20px;
	width: calc(100% - 40px);
	margin-bottom: 0;
	margin-top: 20px;
}

.cart-items-accordion-toggle:hover {
	background: #fafafa;
}

.accordion-title {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.accordion-arrow {
	width: 16px;
	height: 16px;
	transition: transform 0.3s;
	color: #666;
	flex-shrink: 0;
}

.cart-items-accordion-toggle.active .accordion-arrow {
	transform: rotate(180deg);
}

.cart-items-accordion-content {
	display: block;
	background: white;
	border-radius: 0 0 8px 8px;
	margin: 0 20px 20px 20px;
	max-height: 400px;
	overflow-y: auto;
}

/* Scrollbar styling for cart items */
.cart-items-accordion-content::-webkit-scrollbar {
	width: 6px;
}

.cart-items-accordion-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.cart-items-accordion-content::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 4px;
}

.cart-items-accordion-content::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

.cart-items-list {
	padding: 0;
}

/* Individual Cart Items in Checkout */
.checkout-cart-item {
	display: flex;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
	background: white;
}

.checkout-cart-item:first-child {
	padding-top: 20px;
}

.checkout-cart-item:last-child {
	border-bottom: none;
	padding-bottom: 20px;
}

.checkout-cart-item .cart-item-image {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: 4px;
	overflow: hidden;
	background: #f5f5f5;
}

.checkout-cart-item .cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.checkout-cart-item .cart-item-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.checkout-cart-item .cart-item-name {
	font-size: 13px;
	font-weight: 400;
	margin: 0;
	line-height: 1.4;
	color: #1a1a1a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.checkout-cart-item .cart-item-name a {
	color: #1a1a1a;
	text-decoration: none;
}

.checkout-cart-item .cart-item-name a:hover {
	color: #0066ff;
}

.checkout-cart-item .cart-item-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	color: #666;
	align-items: center;
}

.checkout-cart-item .cart-item-meta .variation {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #f5f5f5;
	padding: 2px 8px;
	border-radius: 4px;
	width: fit-content;
	font-size: 11px;
}

.checkout-cart-item .cart-item-meta .variation dt,
.checkout-cart-item .cart-item-meta .variation dd {
	display: inline;
	margin: 0;
	font-size: 11px;
}

.checkout-cart-item .cart-item-meta .variation dt {
	font-weight: normal;
	display: none;
}

.checkout-cart-item .cart-item-meta .variation dd {
	font-weight: 500;
	color: #333;
}

.checkout-cart-item .cart-item-quantity-info {
	font-size: 12px;
	color: #666;
	display: inline-flex;
	align-items: center;
}

.checkout-cart-item .cart-item-pricing {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	margin-left: 12px;
	flex-shrink: 0;
}

.checkout-cart-item .cart-item-price-original {
	font-size: 12px;
	color: #999;
	text-decoration: line-through;
	font-weight: 400;
}

.checkout-cart-item .cart-item-price-current {
	font-size: 15px;
	font-weight: 700;
	color: #00c9a7;
}

/* Order Summary Content */
.order-summary-content {
	padding: 20px 24px 28px 24px;
	background: white;
	border-radius: 8px;
	margin: 0 20px 20px 20px;
}

.summary-section-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 20px 0;
	color: #1a1a1a;
}

/* Summary Rows */
.summary-rows-wrapper {
	background: transparent;
	border-radius: 0;
	padding: 0;
	margin-bottom: 20px;
}

.summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid #e0e0e0;
}

.summary-row:last-child {
	border-bottom: none;
}

.summary-row.summary-total {
	border-top: 1px solid #e0e0e0;
	padding-top: 16px;
	margin-top: 0;
}

.summary-label {
	font-size: 15px;
	color: #1a1a1a;
	font-weight: 400;
}

.summary-value {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.summary-value.shipping-value {
	color: #1a1a1a;
}

.free-shipping-text {
	color: #00c9a7;
	font-weight: 700;
}

.summary-total .summary-label {
	font-size: 16px;
	font-weight: 700;
}

.summary-total .summary-value {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
}

/* Payment Methods in order_review */
#order_review {
	margin-top: 20px;
}

/* Hide default WooCommerce checkout review order table */
.woocommerce-checkout-review-order-table {
	display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.custom-checkout-wrapper {
		padding: 15px;
	}

	.checkout-content-grid {
		grid-template-columns: 1fr;
	}

	.checkout-order-summary-column {
		position: static;
	}

	.customer-details-section {
		padding: 20px 16px;
	}

	.order-summary-content {
		padding: 20px 16px;
	}

	.cart-items-list {
		padding: 0 16px 16px 16px;
	}
}

} /* End of body.woocommerce-checkout */

/* ================================================
   Out-of-Stock Product Styling
   ================================================ */

/* Larger out-of-stock badge on thumbnail */
.product-labels .out-of-stock.product-label {
    font-size: 13px !important;
    padding: 6px 12px !important;
    letter-spacing: 0.3px;
}

/* Dimmed thumbnail overlay for out-of-stock products */
li.outofstock .product-image-link {
    position: relative;
}

li.outofstock .product-image-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 1;
}

/* Keep labels above the overlay */
li.outofstock .product-image-link .product-labels {
    position: relative;
    z-index: 2;
}
