/*
 * WooCommerce overrides for the Malmö Saluhall theme.
 * WooCommerce's own stylesheets are kept as the base; this file only aligns
 * colours, buttons and spacing with the rest of the site.
 */

/* Header cart link, sits next to the MENY button */
.header-cart {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 50px;
	margin-left: 12px;
	padding: 0 16px 0 0;
	color: #000;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .075em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}
.header-cart__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	color: var(--color-lightbeige);
	background: #000;
}
.header-cart__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	font-size: 12px;
	color: var(--color-lightbeige);
	background: #000;
	border-radius: 11px;
}
.header-cart:hover .header-cart__icon,
.header-cart:hover .header-cart__count {
	opacity: .7;
}
/* Empty cart: only shown on shop pages */
.header-cart.is-empty {
	display: none;
}
body.woocommerce .header-cart.is-empty,
body.woocommerce-cart .header-cart.is-empty {
	display: inline-flex;
}
.header-cart.is-empty .header-cart__count {
	display: none;
}
/* Checkout: no way to wander off */
body.woocommerce-checkout .header-cart {
	display: none;
}
@media (max-width: 640px) {
	.header-cart__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
	.header-cart {
		gap: 6px;
		padding-right: 0;
	}
}

.woocommerce-section {
	padding-top: calc(var(--content-padding-vert) * 2);
	padding-bottom: calc(var(--content-padding-vert) * 2);
}
.woocommerce-section .page-title,
.woocommerce-section .entry-title {
	margin-bottom: 1em;
}

/* Buttons: same black, square, uppercase style as the theme's forms */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce-section .wc-block-components-button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-height: 44px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .05em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--color-lightbeige);
	background: #000;
	border-radius: 0;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	color: #fff;
	background: #000;
	opacity: .8;
}
.woocommerce a.button.disabled,
.woocommerce button.button.disabled,
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled] {
	color: var(--color-lightbeige);
	background: #000;
	opacity: .4;
}

/* Product grid */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 1.125em;
	padding-top: .75em;
}
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
	color: #000;
	font-size: 1em;
}
.woocommerce ul.products li.product a img {
	margin-bottom: 0;
	background: var(--color-lightgray);
}
.woocommerce ul.products li.product .button {
	margin-top: .75em;
}

/* Single product */
.woocommerce div.product .product_title {
	font-size: 2em;
}
.woocommerce div.product div.images img {
	background: var(--color-lightgray);
}
.woocommerce div.product form.cart .button {
	margin: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	border-radius: 0;
	background: var(--color-lightgray);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background: #fff;
}

/* Cart & checkout tables */
.woocommerce table.shop_table {
	border-radius: 0;
	border-color: var(--border-color);
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-color: rgba(0, 0, 0, .15);
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	font-size: 14px;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row .select2-container .select2-selection--single {
	border: 1px solid var(--border-color);
	border-radius: 0;
	padding: 10px;
	height: auto;
}
.woocommerce-checkout #payment {
	background: var(--color-lightgray);
	border-radius: 0;
}
.woocommerce-checkout #payment div.payment_box {
	background: #fff;
	border-radius: 0;
}
.woocommerce-checkout #payment div.payment_box::before {
	border-bottom-color: #fff;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: #000;
	background: var(--color-lightgray);
}
.woocommerce-message::before,
.woocommerce-info::before {
	color: #000;
}

/* Order received */
.woocommerce ul.order_details {
	background: var(--color-lightgray);
	padding: 1.5em;
	margin: 0 0 2em;
}
.woocommerce ul.order_details li {
	border-right-color: rgba(0, 0, 0, .15);
}
