/* ScentMoire — WooCommerce Style Overrides */

/*
 * Custom WooCommerce styles that integrate with the theme's design system.
 * These are loaded only when WooCommerce is active.
 */

/* Product Grid */
.woocommerce ul.products li.product {
	border-radius: var(--wp--custom--border-radius--lg);
	overflow: hidden;
	transition: transform var(--wp--custom--transition--normal),
	            box-shadow var(--wp--custom--transition--normal);
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--lg);
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	color: var(--wp--preset--color--text-primary);
}

/* Price */
.woocommerce ul.products li.product .price {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	color: var(--wp--preset--color--secondary);
}

.woocommerce ul.products li.product .price del {
	color: var(--wp--preset--color--text-secondary);
	opacity: 0.6;
}

/* Sale Badge */
.woocommerce span.onsale {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--text-light);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: var(--wp--custom--border-radius--sm);
	padding: 4px 10px;
	min-width: auto;
	min-height: auto;
	line-height: 1.4;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--text-light);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: none;
	border-radius: var(--wp--custom--border-radius--md);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	transition: background var(--wp--custom--transition--normal);
}

.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--text-light);
}

/* Single Product */
.woocommerce div.product .product_title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xx-large);
	color: var(--wp--preset--color--primary);
}

.woocommerce div.product p.price {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	color: var(--wp--preset--color--secondary);
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	color: var(--wp--preset--color--text-secondary);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--secondary);
}

/* Cart & Checkout */
.woocommerce table.shop_table {
	border-radius: var(--wp--custom--border-radius--lg);
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border-subtle, #e0dcd5);
}

.woocommerce table.shop_table th {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	text-transform: uppercase;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--text-secondary);
}

/* Checkout */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid var(--wp--preset--color--border-subtle, #e0dcd5);
	border-radius: var(--wp--custom--border-radius--md);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--body);
	transition: border-color var(--wp--custom--transition--fast);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: var(--wp--preset--color--secondary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* Star Rating */
.woocommerce .star-rating span::before {
	color: var(--wp--preset--color--secondary);
}

/* Notices */
.woocommerce .woocommerce-message {
	border-top-color: var(--wp--preset--color--success);
}

.woocommerce .woocommerce-error {
	border-top-color: var(--wp--preset--color--error);
}

.woocommerce .woocommerce-info {
	border-top-color: var(--wp--preset--color--secondary);
}

/* My Account styles live in assets/css/account.css (loaded on account pages only). */

/* Order confirmation */
.woocommerce-order .woocommerce-thankyou-order-received,
.wc-block-order-confirmation-status {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--primary);
}

.wc-block-order-confirmation-totals table,
.woocommerce-order-overview {
	border: 1px solid var(--wp--preset--color--border-subtle, #e0dcd5);
	border-radius: var(--wp--custom--border-radius--md);
}

.scentmoire-pdp-notice,
.scentmoire-checkout__notice,
.scentmoire-cart .scentmoire-checkout__notice {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-left: 3px solid var(--wp--preset--color--error);
	background: var(--wp--preset--color--surface-alt);
}

.scentmoire-pdp-notice.is-success,
.scentmoire-checkout__notice.is-success {
	border-left-color: var(--wp--preset--color--success);
}

/* ==========================================================================
   Catalog sort links and result count (Shop, category, tag, search).
   Matches the Shop filters block toolbar on the Winter collection page.
   ========================================================================== */
.scentmoire-catalog-sort {
	display: flex;
	align-items: center;
	gap: 20px;
}

.scentmoire-catalog-sort__link {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	min-height: 44px;
	color: var(--wp--preset--color--text-secondary, #6b6b80);
	font-size: 0.8125rem;
	text-decoration: none;
}

.scentmoire-catalog-sort__link:hover,
.scentmoire-catalog-sort__link:focus-visible,
.scentmoire-catalog-sort__link.is-active {
	color: var(--wp--preset--color--text-primary, #1a1a2e);
}

.scentmoire-catalog-sort__link.is-active {
	font-weight: 600;
}

.scentmoire-catalog-sort__chevron {
	transition: transform 0.15s ease;
}

.scentmoire-catalog-sort__link.is-active:not(.is-desc) .scentmoire-catalog-sort__chevron {
	transform: rotate(180deg);
}

.wc-block-product-results-count .woocommerce-result-count {
	margin: 0;
	color: var(--wp--preset--color--text-primary, #1a1a2e);
	font-size: 0.875rem;
	font-weight: 600;
}

/* Thank-you page next steps: dark "View order", outline "Continue shopping". */
.scentmoire-order-actions {
	margin-top: var(--wp--preset--spacing--50, 2rem);
	gap: 0.75rem;
}

.scentmoire-order-actions .wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.scentmoire-order-actions__view .wp-block-button__link {
	background: var(--wp--preset--color--dark, #0d0d1a);
	color: var(--wp--preset--color--text-light, #fff);
	border: 1px solid var(--wp--preset--color--dark, #0d0d1a);
}

.scentmoire-order-actions__view .wp-block-button__link:hover,
.scentmoire-order-actions__view .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--primary, #1a1a2e);
	color: var(--wp--preset--color--text-light, #fff);
}

@media (max-width: 600px) {
	.scentmoire-order-actions .wp-block-button {
		width: 100%;
	}

	.scentmoire-order-actions .wp-block-button__link {
		width: 100%;
	}
}

/* 404 and empty search: next steps. */
.scentmoire-browse-links {
	margin-top: var(--wp--preset--spacing--50, 2rem);
	gap: 1rem;
}

.scentmoire-no-results .scentmoire-browse-links {
	align-items: center;
}

.scentmoire-browse-links__all .wp-block-button__link {
	background: var(--wp--preset--color--dark, #0d0d1a);
	color: var(--wp--preset--color--text-light, #fff);
	min-height: 44px;
}

.scentmoire-browse-links__all .wp-block-button__link:hover,
.scentmoire-browse-links__all .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--primary, #1a1a2e);
	color: var(--wp--preset--color--text-light, #fff);
}

.scentmoire-browse-links__label {
	margin: 0.5rem 0 0;
	color: var(--wp--preset--color--text-primary, #1a1a2e);
}

.scentmoire-browse-links__cats {
	gap: 0.5rem;
}

.scentmoire-browse-links__cats .wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.scentmoire-no-results .scentmoire-browse-links__cats {
	justify-content: center;
}

/* Cart cross-sells: hide the heading if the collection has no products (e.g. last item removed without reload). */
.scentmoire-cart-cross-sells:not(:has(.wc-block-product)) {
	display: none;
}
