/* WooCommerce basics */

.woocommerce-active .woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-active .woocommerce ul.products::before,
.woocommerce-active .woocommerce ul.products::after {
	display: none;
}

.woocommerce-active .woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: var(--space-lg);
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.woocommerce-active .woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: var(--space-md) 0 var(--space-sm);
	font-size: var(--font-size-md);
	font-weight: var(--font-weight-semibold);
}

.woocommerce-active .woocommerce ul.products li.product .price {
	margin-bottom: var(--space-md);
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-bold);
	color: var(--color-accent-700);
}

.woocommerce-active .woocommerce ul.products li.product .price del {
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-normal);
	color: var(--color-text-muted);
}

.woocommerce-active .woocommerce ul.products li.product .price ins {
	text-decoration: none;
}

.woocommerce-active .woocommerce ul.products li.product .button {
	margin-top: auto;
	align-self: flex-start;
}

.woocommerce-active .woocommerce .woocommerce-notices-wrapper {
	margin-bottom: var(--space-lg);
}

.woocommerce-active .woocommerce-message,
.woocommerce-active .woocommerce-info,
.woocommerce-active .woocommerce-error {
	margin-bottom: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	border-radius: var(--radius-md);
	border-left: 4px solid var(--color-info);
	background-color: var(--color-surface-muted);
}

.woocommerce-active .woocommerce-message {
	border-left-color: var(--color-success);
}

.woocommerce-active .woocommerce-error {
	border-left-color: var(--color-error);
}

/* Single product */
.woocommerce-active .woocommerce div.product {
	display: grid;
	gap: var(--space-2xl);
}

.woocommerce-active .woocommerce div.product .woocommerce-product-gallery {
	margin-bottom: 0;
}

.woocommerce-active .woocommerce div.product .summary {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.woocommerce-active .woocommerce div.product .product_title {
	font-size: var(--font-size-2xl);
	line-height: var(--line-height-tight);
}

.woocommerce-active .woocommerce div.product p.price {
	font-size: var(--font-size-xl);
	font-weight: var(--font-weight-bold);
	color: var(--color-accent-700);
}

.woocommerce-active .woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-md);
	margin-top: var(--space-md);
}

.woocommerce-active .woocommerce div.product form.cart .quantity {
	margin: 0;
}

.woocommerce-active .woocommerce div.product form.cart .quantity input {
	width: 4.5rem;
	text-align: center;
}

/* Header mini-cart dropdown */
.header-mini-cart .woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
}

.header-mini-cart .woocommerce-mini-cart-item {
	display: grid;
	grid-template-columns: 4rem minmax(0, 1fr) auto;
	gap: var(--space-sm);
	align-items: start;
	padding-block: var(--space-sm);
	border-bottom: 1px solid var(--color-border);
}

.header-mini-cart .woocommerce-mini-cart-item:last-child {
	border-bottom: 0;
}

.header-mini-cart .woocommerce-mini-cart-item a:not(.remove) {
	display: block;
	color: var(--color-text);
	font-weight: var(--font-weight-semibold);
	text-decoration: none;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.header-mini-cart .woocommerce-mini-cart-item a:not(.remove):hover {
	color: var(--color-accent-700);
}

.header-mini-cart .woocommerce-mini-cart-item img {
	display: block;
	width: 4rem;
	height: 4rem;
	object-fit: cover;
	border-radius: var(--radius-md);
}

.header-mini-cart .woocommerce-mini-cart-item .quantity {
	display: block;
	margin-top: var(--space-xs);
	font-size: var(--font-size-sm);
	color: var(--color-text-muted);
}

.header-mini-cart .woocommerce-mini-cart-item .remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	color: var(--color-text-muted);
	font-size: 1.25rem;
	line-height: 1;
	text-decoration: none;
	border-radius: var(--radius-full);
}

.header-mini-cart .woocommerce-mini-cart-item .remove:hover {
	color: var(--color-error);
	background-color: var(--color-surface-muted);
}

.header-mini-cart .woocommerce-mini-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	margin-block: var(--space-md) 0;
	padding-top: var(--space-md);
	border-top: 1px solid var(--color-border);
	font-weight: var(--font-weight-bold);
}

.header-mini-cart .woocommerce-mini-cart__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-sm);
	margin-top: var(--space-md);
}

.header-mini-cart .woocommerce-mini-cart__buttons .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: var(--space-sm) var(--space-md);
	font-size: var(--font-size-sm);
	text-align: center;
}

.header-mini-cart .woocommerce-mini-cart__empty-message {
	margin: 0;
	padding-block: var(--space-sm);
	color: var(--color-text-muted);
	text-align: center;
}

/* Cart and checkout */
.woocommerce-active .woocommerce-cart .woocommerce,
.woocommerce-active .woocommerce-checkout .woocommerce {
	display: flex;
	flex-direction: column;
	gap: var(--space-xl);
}

.woocommerce-active .woocommerce table.shop_table {
	width: 100%;
	margin-bottom: var(--space-lg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.woocommerce-active .woocommerce table.shop_table th,
.woocommerce-active .woocommerce table.shop_table td {
	padding: var(--space-md);
	border-bottom: 1px solid var(--color-border);
	text-align: left;
	vertical-align: middle;
}

.woocommerce-active .woocommerce table.shop_table th {
	background-color: var(--color-surface-muted);
	font-weight: var(--font-weight-semibold);
}

.woocommerce-active .woocommerce .cart-collaterals,
.woocommerce-active .woocommerce-checkout #order_review {
	padding: var(--space-lg);
	background-color: var(--color-surface-muted);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}

.woocommerce-active .woocommerce form .form-row {
	margin-bottom: var(--space-md);
}

.woocommerce-active .woocommerce form .form-row label {
	margin-bottom: var(--space-xs);
}

/* Buttons — align with theme primary (Red Orange accent) */
.woocommerce-active .woocommerce a.button,
.woocommerce-active .woocommerce button.button,
.woocommerce-active .woocommerce input.button,
.woocommerce-active .woocommerce #respond input#submit {
	color: var(--color-button-primary-text);
	background-color: var(--color-button-primary-bg);
	border-color: var(--color-button-primary-bg);
}

.woocommerce-active .woocommerce a.button:hover,
.woocommerce-active .woocommerce button.button:hover,
.woocommerce-active .woocommerce input.button:hover,
.woocommerce-active .woocommerce #respond input#submit:hover {
	color: var(--color-button-primary-text);
	background-color: var(--color-button-primary-bg-hover);
	border-color: var(--color-button-primary-bg-hover);
}
