/*
Theme Name: Madelyn E-Commerce Site
Theme URI: https://example.com/madelyn-e-commerce-site
Author: Your Name / Agency
Author URI: https://example.com
Description: Custom WordPress theme foundation for Madelyn E-Commerce Site.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: madelyn-e-commerce-site
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool.
*/

/* Import Fonts globally */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* This file is primarily used by WordPress to identify the theme details. */

body {
	font-family: 'Inter', sans-serif;
	background-image: url('assets/images/page-bg.png');
	background-repeat: no-repeat;
	background-position: center center;
	background-attachment: fixed;
	background-size: cover;
}

/* Global Font Overrides */
h1, h2, h3, h4, h5, h6, .font-plus-jakarta {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
}

body, p, span, a, button, input, select, textarea {
	font-family: 'Inter', sans-serif;
}

/* Header Navigation Exact Styles */
#primary-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

#primary-menu li {
	display: inline-block;
}

#primary-menu li a {
	color: #64748b; /* slate-500 */
	font-weight: 600;
	font-size: 15px;
	padding: 0.5rem 0.25rem;
	transition: color 0.3s ease;
}

/* Hover state */
#primary-menu a:hover,
#primary-menu li a:hover,
.main-navigation a:hover {
	color: #8127CF !important;
}

/* Style active/current items robustly */
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a,
#primary-menu .current-menu-item > a,
#primary-menu .current_page_item > a,
#primary-menu li.current-menu-item a,
#primary-menu li.current_page_item a,
li.current-menu-item > a,
li.current_page_item > a {
	color: #8127CF !important;
	font-weight: 700 !important;
}

/* Footer Hover State */
.footer-navigation a {
	transition: color 0.3s ease;
}
.footer-navigation a:hover {
	color: #8D70F8 !important;
}

/* ==========================================================================
   WooCommerce Checkout Theme Styling Overrides
   ========================================================================== */

/* Headings */
.woocommerce-checkout h3,
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 700 !important;
	font-size: 20px !important;
	color: #8D70F8 !important;
	margin-bottom: 1.25rem !important;
	letter-spacing: -0.025em;
}

/* Form Fields */
.woocommerce-checkout .form-row {
	margin-bottom: 1.25rem !important;
	display: flex;
	flex-direction: column;
}

.woocommerce-checkout label {
	font-family: 'Inter', sans-serif !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	color: #475569 !important; /* slate-600 */
	margin-bottom: 6px !important;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
	width: 100% !important;
	padding: 12px 16px !important;
	border-radius: 12px !important;
	border: 1px solid #e2e8f0 !important; /* slate-200 */
	outline: none !important;
	color: #1e293b !important; /* slate-800 */
	background-color: #ffffff !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 14px !important;
	transition: all 0.3s ease !important;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
	border-color: #8D70F8 !important;
	box-shadow: 0 0 0 3px rgba(141, 112, 248, 0.15) !important;
}

/* Customizing Select Elements */
.woocommerce-checkout select {
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px;
	padding-right: 40px !important;
}

/* Required fields indicator */
.woocommerce-checkout abbr.required {
	color: #ef4444 !important; /* red-500 */
	text-decoration: none !important;
}

/* WooCommerce Review Table Styles */
.shop_table.woocommerce-checkout-review-order-table {
	width: 100% !important;
	border-collapse: collapse !important;
	margin-bottom: 1.5rem !important;
	border: none !important; /* Remove outer borders */
}

.shop_table.woocommerce-checkout-review-order-table th,
.shop_table.woocommerce-checkout-review-order-table td {
	padding: 12px 0 !important;
	border: none !important;
	border-bottom: 1px solid #f1f5f9 !important; /* Keep only thin row dividers */
	font-size: 14px !important;
	color: #475569 !important; /* slate-600 */
}

.shop_table.woocommerce-checkout-review-order-table th {
	font-weight: 600 !important;
	color: #1e293b !important; /* slate-800 */
	text-align: left !important; /* Align footer headers to left */
}

.shop_table.woocommerce-checkout-review-order-table th.product-name {
	text-align: left !important;
}

.shop_table.woocommerce-checkout-review-order-table th.product-total {
	text-align: right !important;
}

.shop_table.woocommerce-checkout-review-order-table td {
	text-align: right !important; /* Align details/totals to right */
}

.shop_table.woocommerce-checkout-review-order-table td.product-name {
	text-align: left !important; /* Keep product flex container left-aligned */
}

.shop_table.woocommerce-checkout-review-order-table tr.cart-subtotal td,
.shop_table.woocommerce-checkout-review-order-table tr.shipping td,
.shop_table.woocommerce-checkout-review-order-table tr.tax td {
	font-weight: 600 !important;
	color: #1e293b !important;
	text-align: right !important;
}

/* Shipping Method Selection Styling */
ul#shipping_method {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	text-align: right !important;
}

ul#shipping_method li {
	margin-bottom: 6px !important;
	font-size: 13px !important;
	color: #475569 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 6px !important;
}

ul#shipping_method li input[type="radio"] {
	accent-color: #8D70F8 !important;
	margin: 0 !important;
}


.shop_table.woocommerce-checkout-review-order-table tr.order-total th,
.shop_table.woocommerce-checkout-review-order-table tr.order-total td {
	border-top: 1px solid #e2e8f0 !important;
	border-bottom: none !important;
	padding: 16px 0 !important;
}

.shop_table.woocommerce-checkout-review-order-table tr.order-total th {
	font-size: 16px !important;
	font-weight: 700 !important;
}

.shop_table.woocommerce-checkout-review-order-table tr.order-total td .woocommerce-Price-amount {
	font-size: 24px !important;
	font-weight: 800 !important;
	color: #8127CF !important;
}

/* Payment Methods Area */
#payment {
	background: transparent !important;
	border-radius: 0 !important;
	padding: 0 !important;
}

#payment ul.payment_methods {
	padding: 0 !important;
	margin: 0 0 1.5rem 0 !important;
	list-style: none !important;
	border-bottom: 1px solid #f1f5f9 !important;
}

#payment ul.payment_methods li {
	margin-bottom: 1rem !important;
	font-size: 14px !important;
}

#payment ul.payment_methods li label {
	display: inline-block !important;
	font-weight: 600 !important;
	color: #1e293b !important;
	cursor: pointer;
	margin-left: 8px !important;
}

#payment ul.payment_methods li input[type="radio"] {
	accent-color: #8D70F8 !important;
	transform: scale(1.1);
}

#payment div.payment_box {
	background: #f8fafc !important;
	border-radius: 12px !important;
	padding: 12px 16px !important;
	font-size: 13px !important;
	color: #64748b !important;
	margin: 8px 0 12px 0 !important;
	line-height: 1.5 !important;
	border: 1px solid #e2e8f0 !important;
}

#payment div.payment_box::before {
	display: none !important;
}

/* Place Order Button styling overrides */
#payment #place_order, 
.woocommerce-checkout #place_order {
	width: 100% !important;
	padding: 16px 24px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	background: linear-gradient(135deg, #7CD6FF 0%, #A084E8 100%) !important;
	border: none !important;
	border-radius: 16px !important;
	cursor: pointer !important;
	box-shadow: 0 10px 25px -5px rgba(160, 132, 232, 0.4) !important;
	transition: all 0.3s ease !important;
}

#payment #place_order:hover,
.woocommerce-checkout #place_order:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 12px 30px -5px rgba(160, 132, 232, 0.5) !important;
	background: linear-gradient(135deg, #6bd1ff 0%, #9072e5 100%) !important;
}

#payment #place_order:active,
.woocommerce-checkout #place_order:active {
	transform: translateY(0) !important;
}

/* Input layout grids helpers */
.col2-set {
	display: flex !important;
	flex-direction: column !important;
}

.col2-set .col-1, 
.col2-set .col-2 {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Shipping column show/hide checkbox layout */
#ship-to-different-address {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	color: #1e293b !important;
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
}

#ship-to-different-address input {
	accent-color: #8D70F8 !important;
	transform: scale(1.1);
}

/* Notices and Errors info */
.woocommerce-error, 
.woocommerce-message, 
.woocommerce-info {
	background-color: rgba(255, 255, 255, 0.9) !important;
	backdrop-filter: blur(24px) !important;
	border-radius: 16px !important;
	padding: 16px 24px 16px 56px !important;
	border: 1px solid rgba(226, 232, 240, 0.8) !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
	font-size: 14px !important;
	list-style: none !important;
	margin-bottom: 1.5rem !important;
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Fix default WooCommerce notice icons and text alignment */
.woocommerce-error::before, 
.woocommerce-message::before, 
.woocommerce-info::before {
	position: absolute !important;
	left: 20px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	font-size: 18px !important;
	display: inline-block !important;
}

.woocommerce-message {
	border-left: 4px solid #10b981 !important; /* green-500 */
	color: #065f46 !important;
}

.woocommerce-info {
	border-left: 4px solid #3b82f6 !important; /* blue-500 */
	color: #1e3a8a !important;
}

.woocommerce-error {
	border-left: 4px solid #ef4444 !important; /* red-500 */
	color: #991b1b !important;
}

/* Style default WooCommerce buttons inside notices (e.g. "View cart") */
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
	margin-left: auto !important;
	background: #f1f5f9 !important; /* slate-100 */
	color: #475569 !important; /* slate-600 */
	border-radius: 8px !important;
	padding: 6px 14px !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	transition: all 0.2s ease !important;
	border: 1px solid #e2e8f0 !important;
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover,
.woocommerce-error a.button:hover {
	background: #e2e8f0 !important;
	color: #1e293b !important;
}

/* Hide default theme entry-header on WooCommerce checkout page */
.woocommerce-checkout .entry-header {
	display: none !important;
}

/* Hide default WooCommerce coupon toggle banner and coupon form */
.woocommerce-form-coupon-toggle,
.checkout_coupon.woocommerce-form-coupon {
	display: none !important;
}

/* ==========================================================================
   WooCommerce Thank You / Order Received Styling Overrides
   ========================================================================== */

/* Thank You Success message text */
.woocommerce-thankyou-order-received {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: #1e293b !important; /* slate-800 */
	margin-bottom: 2rem !important;
	text-align: center !important;
}

/* Order Details section headers */
.woocommerce-order-details__title,
.woocommerce-column__title {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 700 !important;
	font-size: 20px !important;
	color: #8D70F8 !important;
	margin-bottom: 1.25rem !important;
	letter-spacing: -0.025em;
}

/* Order received details table */
.shop_table.order_details {
	width: 100% !important;
	border-collapse: collapse !important;
	margin-bottom: 2rem !important;
	border: none !important;
}

.shop_table.order_details th,
.shop_table.order_details td {
	padding: 14px 0 !important;
	border: none !important;
	border-bottom: 1px solid #f1f5f9 !important; /* slate-100 */
	font-size: 14px !important;
	color: #475569 !important;
}

.shop_table.order_details th {
	font-weight: 600 !important;
	color: #1e293b !important;
	text-align: left !important;
}

.shop_table.order_details td {
	text-align: right !important;
}

.shop_table.order_details td.product-name {
	text-align: left !important;
	font-weight: 500 !important;
	color: #1e293b !important;
}

/* Bold values for subtotal, total, payment method rows */
.shop_table.order_details tfoot th {
	font-weight: 600 !important;
	color: #1e293b !important;
	text-align: left !important;
}

.shop_table.order_details tfoot td {
	font-weight: 600 !important;
	color: #1e293b !important;
	text-align: right !important;
}

.shop_table.order_details tfoot tr:last-child th {
	font-size: 16px !important;
	font-weight: 700 !important;
}

.shop_table.order_details tfoot tr:last-child td {
	font-size: 20px !important;
	font-weight: 800 !important;
	color: #8127CF !important;
}

/* Customer details layout cleanup (disable floats, enforce responsive grid) */
.woocommerce-customer-details .col2-set {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 1.5rem !important;
	float: none !important;
	width: 100% !important;
}

@media (min-width: 768px) {
	.woocommerce-customer-details .col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

.woocommerce-customer-details .col-1,
.woocommerce-customer-details .col-2 {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Premium Card style for customer address details */
.woocommerce-customer-details address {
	font-style: normal !important;
	box-sizing: border-box !important;
}

/* WooCommerce Order Details Metadata Cards Reset (Neutralizes default float layout) */
.woocommerce-order ul.order_details {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 2rem 0 !important;
	float: none !important;
	width: 100% !important;
}

.woocommerce-order ul.order_details li {
	float: none !important;
	border-right: none !important;
	padding: 0 !important;
	margin: 0 !important;
}


/* WooCommerce downloads list styling on thank you page */
.woocommerce-order-downloads {
	margin-bottom: 2rem !important;
	background: rgba(255, 255, 255, 0.9) !important;
	border: 1px solid rgba(226, 232, 240, 0.8) !important;
	border-radius: 24px !important;
	padding: 24px !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

.woocommerce-order-downloads__title {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 700 !important;
	font-size: 18px !important;
	color: #8D70F8 !important;
	margin-bottom: 1rem !important;
}

.woocommerce-table--order-downloads {
	width: 100% !important;
	border-collapse: collapse !important;
}

.woocommerce-table--order-downloads th,
.woocommerce-table--order-downloads td {
	padding: 12px 8px !important;
	border-bottom: 1px solid #f1f5f9 !important;
	font-size: 13.5px !important;
	text-align: left !important;
}

.woocommerce-table--order-downloads th {
	font-weight: 600 !important;
	color: #1e293b !important;
}

.woocommerce-table--order-downloads td.download-file a.woocommerce-MyAccount-downloads-file {
	display: inline-block !important;
	padding: 8px 16px !important;
	background: linear-gradient(135deg, #7CD6FF 0%, #A084E8 100%) !important;
	color: #ffffff !important;
	font-weight: 700 !important;
	font-size: 12.5px !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	box-shadow: 0 4px 10px rgba(160, 132, 232, 0.2) !important;
	transition: all 0.2s ease !important;
}

.woocommerce-table--order-downloads td.download-file a.woocommerce-MyAccount-downloads-file:hover {
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 14px rgba(160, 132, 232, 0.3) !important;
}

/* Reset WooCommerce default my-account page layout floats */
.woocommerce-MyAccount-navigation {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}

.woocommerce-MyAccount-content {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
}

/* My Account View Order styling overrides */
.woocommerce-MyAccount-content mark {
	background: transparent !important;
	color: #8D70F8 !important;
	font-weight: 700 !important;
	padding: 0 !important;
}

.woocommerce-MyAccount-content > p:first-of-type {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 15px !important;
	line-height: 1.6 !important;
	color: #475569 !important;
	background: #f8fafc !important;
	border: 1px solid #f1f5f9 !important;
	padding: 18px 24px !important;
	border-radius: 20px !important;
	margin-bottom: 2rem !important;
}

/* Customer order details table row adjustments for my account */
.woocommerce-MyAccount-content .shop_table.order_details th,
.woocommerce-MyAccount-content .shop_table.order_details td {
	padding: 18px 0 !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.woocommerce-MyAccount-content .shop_table.order_details td.product-name a {
	color: #8D70F8 !important;
	font-weight: 600 !important;
	text-decoration: none !important;
}

.woocommerce-MyAccount-content .shop_table.order_details td.product-name a:hover {
	text-decoration: underline !important;
}

/* Adjust Note section styling */
.woocommerce-MyAccount-content .shop_table.order_details tfoot tr th:contains('Note:'),
.woocommerce-MyAccount-content .shop_table.order_details tfoot tr td {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* My Account Form & Form Field Styles */
.woocommerce-MyAccount-content form .form-row,
.woocommerce-address-fields .form-row {
	margin-bottom: 1.5rem !important;
	float: none !important;
	width: 100% !important;
}

.woocommerce-MyAccount-content form label,
.woocommerce-MyAccount-content form .form-row label,
.woocommerce-address-fields label,
.woocommerce-address-fields .form-row label {
	display: block !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #64748b !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	margin-bottom: 0.5rem !important;
}

.woocommerce-MyAccount-content form input.input-text,
.woocommerce-MyAccount-content form select,
.woocommerce-MyAccount-content form textarea,
.woocommerce-MyAccount-content form .select2-selection,
.woocommerce-address-fields input.input-text,
.woocommerce-address-fields select,
.woocommerce-address-fields textarea,
.woocommerce-address-fields .select2-selection {
	width: 100% !important;
	padding: 16px 20px !important;
	border-radius: 16px !important;
	border: 1px solid #e2e8f0 !important;
	background: #ffffff !important;
	color: #1e293b !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	box-shadow: none !important;
	outline: none !important;
	transition: all 0.3s ease !important;
	box-sizing: border-box !important;
	height: auto !important;
	line-height: normal !important;
}

.woocommerce-MyAccount-content form input.input-text:focus,
.woocommerce-MyAccount-content form select:focus,
.woocommerce-MyAccount-content form textarea:focus,
.woocommerce-MyAccount-content form .select2-selection:focus,
.woocommerce-address-fields input.input-text:focus,
.woocommerce-address-fields select:focus,
.woocommerce-address-fields textarea:focus,
.woocommerce-address-fields .select2-selection:focus {
	border-color: #8D70F8 !important;
	box-shadow: 0 0 0 4px rgba(141, 112, 248, 0.1) !important;
}

.woocommerce-MyAccount-content form button.button,
.woocommerce-address-fields button.button,
.woocommerce-MyAccount-content form input[type="submit"],
.woocommerce-address-fields input[type="submit"] {
	width: 100% !important;
	padding: 16px !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	color: #ffffff !important;
	border-radius: 16px !important;
	border: none !important;
	background: linear-gradient(135deg, #63b3f4 0%, #8f82f2 100%) !important;
	box-shadow: 0 10px 20px rgba(143, 130, 242, 0.3) !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
}

.woocommerce-MyAccount-content form button.button:hover,
.woocommerce-address-fields button.button:hover,
.woocommerce-MyAccount-content form input[type="submit"]:hover,
.woocommerce-address-fields input[type="submit"]:hover {
	background: linear-gradient(135deg, #51a4e5 0%, #7f71df 100%) !important;
	box-shadow: 0 12px 24px rgba(143, 130, 242, 0.4) !important;
	transform: translateY(-1px) !important;
}

/* WooCommerce Checkout Form Responsive Overrides */
.woocommerce-checkout .col2-set {
	width: 100% !important;
	float: none !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 1.5rem !important;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Ensure form fields take full width on mobile checkouts */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
	float: none !important;
	width: 100% !important;
}

@media (min-width: 640px) {
	.woocommerce-checkout .form-row-first {
		float: left !important;
		width: 48% !important;
	}
	.woocommerce-checkout .form-row-last {
		float: right !important;
		width: 48% !important;
	}
}

/* ==========================================================================
   Consolidated & Optimized Custom Scrollbar Styles
   ========================================================================== */
#filter-sidebar::-webkit-scrollbar {
	width: 6px;
}

#filter-sidebar::-webkit-scrollbar-track {
	background: #FFF0F2; /* Soft pink matching theme inputs */
	border-radius: 8px;
}

#filter-sidebar::-webkit-scrollbar-thumb {
	background: #8D70F8; /* Purple theme color */
	border-radius: 8px;
}

#filter-sidebar::-webkit-scrollbar-thumb:hover {
	background: #795de0;
}

/* Firefox support for sidebar scrollbar */
#filter-sidebar {
	scrollbar-width: thin;
	scrollbar-color: #8D70F8 #FFF0F2;
}

/* Scrollbar Hiding Utility */
.scrollbar-hide::-webkit-scrollbar {
	display: none;
}
