/* ==========================================================================
   JobDriveNow — WooCommerce skin (shop, product, cart, checkout, account)
   Sits on top of WooCommerce's own layout CSS and re-uses the theme tokens.
   ========================================================================== */

.dsh-woo { padding-top: 3rem; }
.dsh-shop-header { margin-bottom: 2.5rem; }
.dsh-shop-header .h-display { margin-top: .5rem; }

/* Breadcrumb */
.woocommerce .woocommerce-breadcrumb { margin: 0 0 1.5rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }
.woocommerce .woocommerce-breadcrumb a { color: hsl(var(--muted-foreground)); }
.woocommerce .woocommerce-breadcrumb a:hover { color: hsl(var(--foreground)); }
.woocommerce .woocommerce-breadcrumb .sep { margin: 0 .5rem; opacity: .6; }

/* Toolbar */
.woocommerce .woocommerce-result-count { font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: hsl(var(--muted-foreground)); margin: 0 0 1.5rem; line-height: 2.5rem; }
.woocommerce .woocommerce-ordering { margin: 0 0 1.5rem; }
.woocommerce .woocommerce-ordering select { height: 2.5rem; border-radius: 9999px; border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); padding: 0 1rem; font-size: .875rem; }

/* Product grid → theme cards */
.woocommerce ul.products { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 0 0 2rem; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
@media (min-width: 640px) { .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	float: none; width: auto !important; margin: 0 !important;
	display: flex; flex-direction: column;
	border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card));
	box-shadow: var(--shadow-sm); overflow: hidden; padding: 0 0 1.5rem;
	transition: transform .15s, border-color .15s, box-shadow .15s;
}
.woocommerce ul.products li.product:hover { transform: translateY(-2px); border-color: hsl(var(--primary) / .4); box-shadow: var(--shadow-md); }
.woocommerce ul.products li.product a img { margin: 0 0 1.25rem; aspect-ratio: 16/10; object-fit: cover; width: 100%; background: hsl(var(--primary) / .08); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0 1.5rem; font-size: 1.125rem; font-weight: 600; color: hsl(var(--foreground)); }
.woocommerce ul.products li.product .dsh-course-chips { padding: 0 1.5rem; margin-top: .5rem; }
.woocommerce ul.products li.product .price { padding: 0 1.5rem; margin-top: .75rem; font-size: 1.25rem; font-weight: 700; color: hsl(var(--foreground)); }
.woocommerce ul.products li.product .star-rating { margin: .5rem 1.5rem 0; }
.woocommerce ul.products li.product .button { margin: auto 1.5rem 0; align-self: flex-start; }
.woocommerce ul.products li.product .added_to_cart { margin: .5rem 1.5rem 0; font-size: .875rem; font-weight: 600; color: hsl(var(--primary)); }
.woocommerce ul.products li.product > a:first-child { display: flex; flex-direction: column; flex: 1; }

/* Prices */
.woocommerce div.product p.price, .woocommerce div.product span.price { color: hsl(var(--foreground)); font-size: 1.75rem; font-weight: 800; }
.woocommerce .price del { color: hsl(var(--muted-foreground)); font-weight: 400; font-size: .7em; opacity: 1; }
.woocommerce .price ins { text-decoration: none; }

/* Sale badge */
.woocommerce span.onsale { background: hsl(var(--primary)); color: #fff; border-radius: 9999px; min-height: 0; min-width: 0; padding: .25rem .75rem; line-height: 1.5; font-size: .75rem; font-weight: 700; top: .75rem; left: .75rem; margin: 0; }
.woocommerce ul.products li.product .onsale { top: .75rem; right: .75rem; left: auto; margin: 0; }

/* Buttons */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.woocommerce .wc-block-components-button:not(.is-link), .wp-element-button.wc-block-components-button,
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 2.75rem; padding: 0 1.5rem; border-radius: .75rem; border: 1px solid transparent;
	background: hsl(var(--primary)); color: hsl(var(--primary-foreground)) !important;
	font-size: .875rem; font-weight: 500; line-height: 1.2; text-decoration: none; box-shadow: var(--shadow-sm);
	transition: background-color .15s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce .wc-block-components-button:not(.is-link):hover {
	background: hsl(var(--primary) / .9); color: hsl(var(--primary-foreground));
}
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled], .woocommerce button.button.alt.disabled { background: hsl(var(--primary) / .5); color: #fff; padding: 0 1.5rem; }
.woocommerce a.button.loading::after, .woocommerce button.button.loading::after { position: static; margin-left: .25rem; }

/* Single product */
.woocommerce div.product { margin-top: 0; }
.woocommerce div.product div.images img { border-radius: 1rem; }
.woocommerce div.product div.images .flex-control-thumbs li img { border-radius: .5rem; }
.woocommerce div.product .product_title { font-size: 2.25rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.woocommerce div.product .dsh-course-chips { margin: 1rem 0; gap: .5rem; }
.woocommerce div.product .woocommerce-product-details__short-description { color: hsl(var(--muted-foreground)); font-size: 1.0625rem; line-height: 1.6; margin: 1rem 0 1.5rem; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.5rem 0; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce div.product form.cart .button { float: none; height: 3rem; padding: 0 2rem; font-size: 1rem; }
.woocommerce .quantity .qty { height: 3rem; width: 4.5rem; border: 1px solid hsl(var(--input)); border-radius: .75rem; background: transparent; text-align: center; }
.woocommerce div.product .product_meta { font-size: .875rem; color: hsl(var(--muted-foreground)); border-top: 1px solid hsl(var(--border)); padding-top: 1rem; }
.woocommerce div.product .product_meta a { color: hsl(var(--primary)); }
.woocommerce div.product .woocommerce-tabs { margin-top: 3rem; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: .25rem; margin: 0 0 1.5rem; display: inline-flex; gap: .25rem; border-radius: 9999px; background: hsl(var(--muted)); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border: 0; background: transparent; border-radius: 9999px; margin: 0; padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: .375rem 1rem; font-size: .875rem; font-weight: 500; color: hsl(var(--foreground)); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: hsl(var(--primary)); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }
.woocommerce div.product .woocommerce-tabs .panel { margin: 0; color: hsl(var(--muted-foreground)); line-height: 1.65; }
.woocommerce div.product .woocommerce-tabs .panel h2 { color: hsl(var(--foreground)); font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }
.woocommerce div.product .woocommerce-tabs .panel > * + * { margin-top: 1rem; }
.woocommerce .related > h2, .woocommerce .upsells > h2, .woocommerce .cross-sells > h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 3rem 0 1.5rem; }
.woocommerce .star-rating span::before, .woocommerce p.stars a { color: hsl(var(--primary)); }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.woocommerce-notices-wrapper .wc-block-components-notice-banner {
	border: 1px solid hsl(var(--border)); border-left: 4px solid hsl(var(--primary));
	border-radius: .75rem; background: hsl(var(--card)); color: hsl(var(--foreground));
	padding: 1rem 1.25rem 1rem 3rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.woocommerce-message::before, .woocommerce-info::before { color: hsl(var(--primary)); top: 1rem; left: 1.125rem; }
.woocommerce-error { border-left-color: hsl(var(--destructive)); }
.woocommerce-error::before { color: hsl(var(--destructive)); top: 1rem; left: 1.125rem; }
.woocommerce-message .button, .woocommerce-info .button { float: right; min-height: 2.25rem; }
.woocommerce-message a:not(.button), .woocommerce-info a:not(.button) { color: hsl(var(--primary)); }

/* Forms (classic checkout, account, reviews) */
.woocommerce form .form-row label { font-size: .875rem; font-weight: 500; }
.woocommerce form .form-row .required { color: hsl(var(--destructive)); text-decoration: none; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single, .woocommerce #reviews #comment {
	border: 1px solid hsl(var(--input)); border-radius: .375rem; background: transparent; color: hsl(var(--foreground));
	padding: .5rem .75rem; min-height: 2.5rem; font-size: .875rem; box-shadow: var(--shadow-sm);
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { outline: none; border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--primary) / .2); }
.woocommerce .select2-container .select2-selection--single { height: 2.5rem; padding: .25rem .5rem; }
.select2-dropdown { background: hsl(var(--background)); border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register { border: 1px solid hsl(var(--border)); border-radius: 1rem; padding: 1.5rem; }

/* Tables (classic cart, orders, account) */
.woocommerce table.shop_table { border: 1px solid hsl(var(--border)); border-radius: 1rem; border-collapse: separate; overflow: hidden; }
.woocommerce table.shop_table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: hsl(var(--muted-foreground)); font-weight: 600; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-top-color: hsl(var(--border)); padding: 1rem; }
.woocommerce table.shop_table td.actions .coupon .input-text { min-width: 10rem; border: 1px solid hsl(var(--input)); border-radius: .5rem; height: 2.75rem; padding: 0 .75rem; background: transparent; }
.woocommerce a.remove { color: hsl(var(--destructive)) !important; }
.woocommerce a.remove:hover { background: hsl(var(--destructive)); color: #fff !important; }
.woocommerce .cart-collaterals .cart_totals h2, .woocommerce-checkout h3, #order_review_heading { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.woocommerce-checkout #payment { background: hsl(var(--muted) / .5); border-radius: 1rem; }
.woocommerce-checkout #payment div.payment_box { background: hsl(var(--card)); color: hsl(var(--foreground)); border-radius: .5rem; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: hsl(var(--card)); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom-color: hsl(var(--border)); }

/* My account */
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; display: grid; gap: .25rem; }
.woocommerce-account .woocommerce-MyAccount-navigation a { display: block; padding: .625rem 1rem; border-radius: .75rem; font-size: .875rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
.woocommerce-account .woocommerce-MyAccount-navigation a:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { background: hsl(var(--primary)); color: #fff; }
.woocommerce-account .woocommerce-MyAccount-content p { color: hsl(var(--muted-foreground)); }
.woocommerce-account .woocommerce-MyAccount-content a { color: hsl(var(--primary)); }

/* Pagination */
.woocommerce nav.woocommerce-pagination ul { border: 0; display: inline-flex; gap: .5rem; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 500; }
.woocommerce nav.woocommerce-pagination ul li span.current, .woocommerce nav.woocommerce-pagination ul li a:hover { background: hsl(var(--primary)); color: #fff; }

/* Block-based Cart & Checkout (WooCommerce 8+ default) */
.wc-block-cart, .wc-block-checkout { color: hsl(var(--foreground)); }
.wc-block-components-sidebar-layout .wc-block-components-main, .wc-block-components-sidebar { padding-top: 0; }
.wp-block-woocommerce-cart-order-summary-block, .wc-block-components-sidebar .wc-block-components-panel,
.wc-block-checkout__sidebar .wc-block-components-totals-wrapper { border-color: hsl(var(--border)) !important; }
.wc-block-components-sidebar { border: 1px solid hsl(var(--border)); border-radius: 1rem; padding: 1.5rem !important; background: hsl(var(--card)); }
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select, .wc-block-components-textarea {
	border-radius: .5rem !important; border-color: hsl(var(--input)) !important; background: hsl(var(--background)) !important; color: hsl(var(--foreground)) !important;
}
.wc-block-components-text-input label, .wc-blocks-components-select__label { color: hsl(var(--muted-foreground)) !important; }
.wc-block-components-text-input.is-active input:focus, .wc-block-components-text-input input:focus { border-color: hsl(var(--primary)) !important; box-shadow: 0 0 0 1px hsl(var(--primary)) !important; }
.wc-block-components-radio-control__input:checked { border-color: hsl(var(--primary)) !important; }
.wc-block-components-radio-control__input:checked::before { background: hsl(var(--primary)) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked { background: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.wc-block-components-product-name { color: hsl(var(--foreground)) !important; font-weight: 600; }
.wc-block-components-title.wc-block-components-title { font-size: 1.125rem; font-weight: 700; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 1.25rem; font-weight: 800; }
.wc-block-components-quantity-selector { border-radius: .5rem !important; }
.wc-block-components-quantity-selector::after { border-color: hsl(var(--input)) !important; border-radius: .5rem !important; }
.wc-block-cart-items th, .wc-block-cart-items td { border-color: hsl(var(--border)) !important; }
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title { font-size: 1.5rem; font-weight: 700; }
.wc-block-components-panel__button, .wc-block-components-totals-coupon-link { color: hsl(var(--primary)) !important; }

/* Dark-mode fixes for colours hard-coded by WooCommerce */
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li { background: transparent; }
html[data-theme="dark"] .woocommerce table.shop_table, html[data-theme="dark"] .woocommerce-checkout #payment { color: hsl(var(--foreground)); }
html[data-theme="dark"] .woocommerce .quantity .qty, html[data-theme="dark"] .woocommerce form .form-row select { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
	html[data-theme="system"] .woocommerce table.shop_table, html[data-theme="system"] .woocommerce-checkout #payment { color: hsl(var(--foreground)); }
}

/* Small screens */
@media (max-width: 767px) {
	.woocommerce div.product .product_title { font-size: 1.75rem; }
	.woocommerce div.product .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; border-radius: 1rem; }
	.woocommerce .woocommerce-ordering, .woocommerce .woocommerce-result-count { float: none; }
}
