/* Trademaster Supply — WooCommerce */

body.tms-site.woocommerce,
body.tms-site.woocommerce-page {
	background: var(--tms-white);
}

.tms-woocommerce {
	padding: 0 0 6.4rem;
}

.tms-woocommerce > *:not(.tms-shop-banner) {
	max-width: var(--tms-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: 2.4rem;
	padding-right: 2.4rem;
}

.tms-shop-banner {
	background: var(--tms-soft);
	border-bottom: 1px solid var(--tms-border);
	margin: 0 0 2.4rem;
	padding: 3.2rem 2.4rem;
}

.tms-shop-banner-inner {
	max-width: var(--tms-max);
	margin: 0 auto;
}

.tms-shop-banner-title {
	margin: 0;
	color: var(--tms-navy);
	font-size: clamp(2.4rem, 3vw, 3.4rem);
}

.tms-shop-banner-desc {
	margin: 1rem 0 0;
	max-width: 70rem;
	color: var(--tms-muted);
}

.tms-breadcrumb {
	margin: 0 0 2.4rem;
	font-size: 1.3rem;
	color: var(--tms-muted);
}

.tms-breadcrumb a {
	color: var(--tms-muted);
	text-decoration: none;
}

.tms-breadcrumb a:hover {
	color: var(--tms-navy);
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	margin-bottom: 2rem;
}

.woocommerce .woocommerce-ordering select {
	border: 1px solid var(--tms-border);
	padding: 0.8rem 1.2rem;
	background: var(--tms-white);
	color: var(--tms-text);
}

/* Product grid */
body.tms-site ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2.4rem;
	list-style: none;
	margin: 0 0 3.2rem;
	padding: 0;
	width: 100%;
	float: none;
}

body.tms-site ul.products::before,
body.tms-site ul.products::after {
	content: none;
	display: none;
}

body.tms-site ul.products li.product,
body.tms-site ul.products li.tms-product-card {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0;
	display: flex;
	flex-direction: column;
	background: var(--tms-white);
	border: 1px solid var(--tms-border);
	position: relative;
}

body.tms-site .tms-product-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
}

body.tms-site .tms-product-card__link:hover,
body.tms-site .tms-product-card__link:focus {
	text-decoration: none;
	color: inherit;
}

body.tms-site .tms-product-card__media {
	position: relative;
	background: var(--tms-soft);
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

body.tms-site ul.products li.product img,
body.tms-site .tms-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
}

body.tms-site .tms-product-card__body {
	padding: 1.6rem 1.6rem 0.8rem;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	flex: 1;
}

body.tms-site ul.products li.product .woocommerce-loop-product__title {
	font-size: 1.45rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	letter-spacing: -0.015em;
	color: var(--tms-navy);
}

body.tms-site ul.products li.product .price {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--tms-navy);
	margin: 0;
}

body.tms-site ul.products li.product .price del {
	color: var(--tms-muted);
	opacity: 0.8;
	font-weight: 500;
}

body.tms-site .tms-product-card__actions {
	padding: 0 1.6rem 1.6rem;
	margin-top: auto;
}

body.tms-site ul.products li.product .button,
body.tms-site .woocommerce a.button,
body.tms-site .woocommerce button.button,
body.tms-site .woocommerce input.button,
body.tms-site .woocommerce #respond input#submit,
body.tms-site .woocommerce a.button.alt,
body.tms-site .woocommerce button.button.alt,
body.tms-site .woocommerce input.button.alt,
body.tms-site .woocommerce #respond input#submit.alt {
	background: var(--tms-navy);
	border: 1px solid var(--tms-navy);
	border-radius: 2px;
	color: var(--tms-white);
	font-weight: 600;
	padding: 1rem 1.4rem;
	text-decoration: none;
	display: inline-block;
	width: 100%;
	text-align: center;
	transition: background 0.15s ease;
}

body.tms-site ul.products li.product .button:hover,
body.tms-site .woocommerce a.button:hover,
body.tms-site .woocommerce button.button:hover,
body.tms-site .woocommerce input.button:hover,
body.tms-site .woocommerce a.button.alt:hover,
body.tms-site .woocommerce button.button.alt:hover {
	background: var(--tms-navy-deep);
	color: var(--tms-white);
}

body.tms-site .woocommerce span.onsale {
	background: var(--tms-blue);
	color: var(--tms-navy-deep);
	border-radius: 2px;
	padding: 0.4rem 0.8rem;
	min-height: 0;
	line-height: 1.2;
	font-weight: 700;
}

body.tms-site .woocommerce nav.woocommerce-pagination ul {
	border: 0;
}

body.tms-site .woocommerce nav.woocommerce-pagination ul li {
	border: 0;
	margin-right: 0.6rem;
}

body.tms-site .woocommerce nav.woocommerce-pagination ul li a,
body.tms-site .woocommerce nav.woocommerce-pagination ul li span {
	padding: 0.8rem 1.2rem;
	border: 1px solid var(--tms-border);
	background: var(--tms-white);
	color: var(--tms-navy);
}

body.tms-site .woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--tms-navy);
	border-color: var(--tms-navy);
	color: var(--tms-white);
}

/* Single product */
body.tms-site.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 4rem;
	align-items: start;
}

body.tms-site.single-product div.product .woocommerce-product-gallery,
body.tms-site.single-product div.product .summary {
	float: none;
	width: 100% !important;
	margin: 0;
}

body.tms-site.single-product div.product .summary {
	padding-top: 0.4rem;
}

body.tms-site.single-product div.product .product_title {
	margin: 0 0 1rem;
	color: var(--tms-navy);
	font-size: 2.8rem;
}

body.tms-site .tms-product-sku {
	margin: 0 0 1.4rem;
	color: var(--tms-muted);
	font-size: 1.4rem;
}

body.tms-site.single-product .product_meta .sku_wrapper {
	display: none;
}

body.tms-site.single-product div.product p.price {
	font-size: 2.4rem;
	font-weight: 700;
	color: var(--tms-navy);
	margin: 0 0 1.6rem;
}

body.tms-site.single-product form.cart {
	display: flex;
	align-items: center;
	gap: 1.2rem;
	margin: 2.4rem 0;
}

body.tms-site.single-product form.cart .quantity .qty {
	width: 7rem;
	height: 4.8rem;
	border: 1px solid var(--tms-border);
	text-align: center;
}

body.tms-site.single-product form.cart .button {
	width: auto;
	min-width: 18rem;
	height: 4.8rem;
}

body.tms-site.single-product div.product .woocommerce-tabs,
body.tms-site.single-product div.product .related,
body.tms-site.single-product div.product .upsells {
	grid-column: 1 / -1;
}

body.tms-site.single-product .woocommerce-tabs ul.tabs {
	padding: 0;
	margin: 0 0 2rem;
	border-bottom: 1px solid var(--tms-border);
}

body.tms-site.single-product .woocommerce-tabs ul.tabs li {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	margin: 0 2rem 0 0;
	padding: 0;
	border-radius: 0;
}

body.tms-site.single-product .woocommerce-tabs ul.tabs li.active {
	border-bottom-color: var(--tms-navy);
}

body.tms-site.single-product .woocommerce-tabs ul.tabs li a {
	color: var(--tms-navy);
	font-weight: 600;
	padding: 1rem 0;
}

body.tms-site.single-product .related > h2,
body.tms-site.single-product .upsells > h2 {
	color: var(--tms-navy);
	font-size: 2.2rem;
}

/* Cart / checkout / account */
body.tms-site.woocommerce-cart .tms-woocommerce,
body.tms-site.woocommerce-checkout .tms-woocommerce,
body.tms-site.woocommerce-account .tms-woocommerce {
	padding-top: 3.2rem;
}

body.tms-site .woocommerce table.shop_table {
	border: 1px solid var(--tms-border);
	border-radius: 0;
}

body.tms-site .woocommerce table.shop_table th {
	background: var(--tms-soft);
	color: var(--tms-navy);
	font-weight: 700;
}

body.tms-site .woocommerce-checkout #customer_details,
body.tms-site .woocommerce-checkout .woocommerce-checkout-review-order {
	background: var(--tms-white);
}

body.tms-site .woocommerce form .form-row input.input-text,
body.tms-site .woocommerce form .form-row textarea,
body.tms-site .woocommerce form .form-row select {
	border: 1px solid var(--tms-border);
	border-radius: 2px;
	padding: 1rem 1.2rem;
}

body.tms-site .woocommerce-message,
body.tms-site .woocommerce-info,
body.tms-site .woocommerce-error {
	border-top-color: var(--tms-navy);
}

body.tms-site .woocommerce-account .woocommerce-MyAccount-navigation {
	border: 1px solid var(--tms-border);
	padding: 1.6rem;
	background: var(--tms-soft);
}

body.tms-site .woocommerce-account .woocommerce-MyAccount-navigation a {
	text-decoration: none;
	color: var(--tms-navy);
}

body.tms-site .woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	font-weight: 700;
}

/* Hide default WooCommerce sidebar if a widget area still prints */
body.tms-site #secondary.widget-area {
	display: none;
}

@media (max-width: 1100px) {
	body.tms-site ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 800px) {
	body.tms-site ul.products,
	body.tms-site.single-product div.product {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tms-woocommerce > *:not(.tms-shop-banner) {
		padding-left: 1.6rem;
		padding-right: 1.6rem;
	}

	body.tms-site.single-product form.cart {
		flex-wrap: wrap;
	}

	body.tms-site.single-product form.cart .button {
		width: 100%;
	}
}

@media (max-width: 560px) {
	body.tms-site ul.products {
		grid-template-columns: 1fr;
	}
}
