/**
 * Steelway store (WooCommerce): shop, product, cart, checkout, account.
 * Enqueued by inc/store.php on store pages only; everything is scoped to
 * body.sw-store so it wins over the theme CSS hardcoded after wp_head().
 * Colors and components follow assets/css/style.css + inner-page.css.
 */

body.sw-store {
	--sw-indigo: #2D009E;
	--sw-navy: #1F006C;
	--sw-sky: #7ABFFF;
	--sw-ink: #000;
	--sw-text: #646464;
	--sw-muted: #777;
	--sw-line: #e2e2e2;
	--sw-tint: rgba(45, 0, 158, .04);
	--sw-shadow: 0 10px 25px 5px rgb(0 0 0 / 7%);
	--sw-radius: 30px;

	/* WooCommerce's own tokens, so anything we don't restyle still matches. */
	--wc-primary: #2D009E;
	--wc-primary-text: #fff;
	--wc-secondary: #f1f0f8;
	--wc-secondary-text: #1F006C;
	--wc-highlight: #1F006C;
	--wc-highligh-text: #fff;
}

/* ---------- Banner (mirrors .innerPagesBanner h1 for the product-page <p>) ---------- */

body.sw-store .innerPagesBanner .sw-store-banner__title {
	position: relative;
	margin: 0 0 -10px;
	color: #fff;
	font-size: 70px;
	font-weight: bold;
	line-height: 70px;
	text-align: left;
}

/* ---------- Page body ---------- */

body.sw-store .sw-store-main {
	padding: 60px 0 80px;
}

body.sw-store .woocommerce-breadcrumb {
	margin: 0 0 30px;
	color: var(--sw-muted);
	font-size: 14px;
}

body.sw-store .woocommerce-breadcrumb a {
	color: var(--sw-indigo);
}

body.sw-store a:focus-visible,
body.sw-store button:focus-visible,
body.sw-store select:focus-visible,
body.sw-store input:focus-visible {
	outline: 3px solid var(--sw-sky);
	outline-offset: 2px;
}

/* ---------- Buttons: the theme's uppercase "Order Now" CTA ---------- */

body.sw-store a.button,
body.sw-store a.button.alt,
body.sw-store button.button,
body.sw-store button.button.alt,
body.sw-store input.button,
body.sw-store ul.products li.product .button,
body.sw-store .wc-block-components-button:not(.is-link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 30px;
	border: 0;
	border-radius: 16px;
	background: var(--sw-indigo);
	color: #fff;
	font-size: 14px;
	font-weight: bold;
	letter-spacing: 3px;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}

body.sw-store a.button:hover,
body.sw-store a.button.alt:hover,
body.sw-store button.button:hover,
body.sw-store button.button.alt:hover,
body.sw-store input.button:hover,
body.sw-store ul.products li.product .button:hover,
body.sw-store .wc-block-components-button:not(.is-link):hover {
	background: var(--sw-sky);
	color: var(--sw-navy);
}

body.sw-store .wc-block-components-button:not(.is-link) {
	letter-spacing: 1px;
}

.sw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 30px;
	border: 2px solid var(--sw-sky);
	border-radius: 50px;
	background: var(--sw-sky);
	color: var(--sw-navy);
	font-size: 15px;
	font-weight: bold;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s, color .2s, border-color .2s;
}

.sw-btn:hover {
	border-color: #fff;
	background: #fff;
	color: var(--sw-navy);
}

.sw-btn--outline {
	border-color: rgba(255, 255, 255, .6);
	background: transparent;
	color: #fff;
}

/* ---------- Shop intro ---------- */

body.sw-store section.sw-intro {
	overflow: visible;
	padding: 0 0 50px;
}

body.sw-store .sw-intro .title {
	position: relative;
	max-width: 860px;
	margin: 0 auto 40px;
	padding-bottom: 30px;
}

body.sw-store .sw-intro .title::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	width: 118px;
	height: 4px;
	margin: auto;
	background: var(--sw-sky);
}

body.sw-store .sw-intro .title h2 {
	margin: 0 0 12px;
	color: var(--sw-ink);
	font-size: 48px;
	line-height: 1.15;
}

body.sw-store .sw-intro .title p {
	color: var(--sw-indigo);
}

.sw-features {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}

.sw-features li {
	position: relative;
	padding: 10px 20px 10px 46px;
	border: 1px solid var(--sw-line);
	border-radius: 50px;
	background: #fff;
	color: var(--sw-navy);
	font-weight: 600;
}

.sw-features li::before,
body.sw-store .woocommerce-product-details__short-description li::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 14px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--sw-sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231F006C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
	transform: translateY(-50%);
}

.sw-construction {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	max-width: 900px;
	margin: 0 auto;
}

.sw-construction__option {
	padding: 24px 28px;
	border: 1px solid rgba(45, 0, 158, .1);
	border-left: 4px solid var(--sw-sky);
	border-radius: 20px;
	background: var(--sw-tint);
}

body.sw-store .sw-construction__option h3 {
	margin: 0 0 6px;
	color: var(--sw-navy);
	font-size: 22px;
	font-weight: bold;
}

.sw-construction__option p {
	margin: 0;
	color: var(--sw-muted);
}

/* ---------- Product grid (cards follow .pricingColumn) ---------- */

body.sw-store ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 30px;
	margin: 0 0 60px;
	padding: 0;
}

body.sw-store ul.products::before,
body.sw-store ul.products::after {
	content: none;
	display: none;
}

body.sw-store ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 14px 14px 24px;
	border-radius: var(--sw-radius);
	background: #fff;
	box-shadow: var(--sw-shadow);
	text-align: left;
}

body.sw-store ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

body.sw-store ul.products li.product a img {
	width: 100%;
	margin: 0 0 18px;
	border-radius: 20px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

body.sw-store ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 6px;
	padding: 0 10px;
	color: var(--sw-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

body.sw-store ul.products li.product .price {
	display: block;
	margin: auto 0 0;
	padding: 0 10px;
	color: var(--sw-navy);
	font-size: 18px;
	font-weight: 600;
}

body.sw-store ul.products li.product .sw-price-row__label {
	font-size: 11px;
	letter-spacing: 1px;
}

/* One row per construction (inc/store.php, woocommerce_get_price_html). */
.sw-price-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	border-top: 1px solid var(--sw-line);
}

.sw-price-row:first-child {
	border-top: 0;
}

.sw-price-row__label {
	color: var(--sw-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	white-space: nowrap;
}

body.sw-store ul.products li.product .button {
	align-self: flex-start;
	margin: 18px 10px 0;
}

.sw-badge {
	display: inline-block;
	margin: 0 0 14px;
	padding: 6px 14px;
	border-radius: 50px;
	background: var(--sw-navy);
	color: #fff;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 2px;
	line-height: 1.2;
}

body.sw-store ul.products li.product .sw-badge {
	position: absolute;
	z-index: 1;
	top: 28px;
	left: 28px;
	margin: 0;
}

.sw-dims {
	margin: 0 0 14px;
	color: var(--sw-muted);
	font-size: 15px;
}

body.sw-store ul.products li.product .sw-dims {
	padding: 0 10px;
}

/* ---------- Custom-size CTA ---------- */

body.sw-store section.sw-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	padding: 44px 50px;
	border-radius: var(--sw-radius);
	background: linear-gradient(135deg, var(--sw-indigo), var(--sw-navy));
	color: #fff;
}

body.sw-store .sw-cta h2 {
	margin: 0 0 8px;
	color: #fff;
	font-size: 36px;
	font-weight: 300;
}

.sw-cta p {
	margin: 0;
	color: rgba(255, 255, 255, .8);
	font-size: 18px;
}

.sw-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

/* ---------- Single product ---------- */

body.sw-store div.product {
	margin-bottom: 20px;
}

body.sw-store div.product div.images img {
	border-radius: var(--sw-radius);
}

body.sw-store div.product .product_title {
	margin: 0 0 8px;
	color: var(--sw-ink);
	font-size: 40px;
	font-weight: 400;
	line-height: 1.15;
}

body.sw-store div.product .summary .sw-dims {
	font-size: 17px;
}

body.sw-store div.product p.price,
body.sw-store div.product span.price {
	color: var(--sw-navy);
	font-size: 26px;
	font-weight: 600;
}

body.sw-store div.product .summary p.price {
	max-width: 420px;
	margin: 18px 0;
}

body.sw-store .woocommerce-product-details__short-description ul {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

body.sw-store .woocommerce-product-details__short-description li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 34px;
	color: var(--sw-ink);
}

body.sw-store .woocommerce-product-details__short-description li::before {
	left: 0;
}

body.sw-store div.product form.cart {
	margin: 24px 0;
	padding: 24px;
	border-radius: 24px;
	background: var(--sw-tint);
}

body.sw-store div.product form.cart table.variations,
body.sw-store div.product form.cart table.variations tbody,
body.sw-store div.product form.cart table.variations tr,
body.sw-store div.product form.cart table.variations th,
body.sw-store div.product form.cart table.variations td {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	line-height: 1.4;
}

body.sw-store div.product form.cart table.variations th label,
.sw-extension label {
	display: block;
	margin: 0 0 8px;
	color: var(--sw-navy);
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.sw-extension label span {
	color: var(--sw-muted);
	font-weight: normal;
	letter-spacing: 1px;
}

body.sw-store div.product form.cart select,
body.sw-store div.product form.cart .variations select {
	width: 100%;
	min-width: 0;
	max-width: none;
	height: 52px;
	margin: 0;
	padding: 0 44px 0 16px;
	border: 1px solid #d5d3e3;
	border-radius: 12px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%232D009E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
	color: var(--sw-ink);
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

.sw-extension {
	margin: 20px 0 0;
}

.sw-extension__note {
	margin: 8px 0 0;
	color: var(--sw-muted);
	font-size: 14px;
}

body.sw-store div.product .single_variation_wrap .woocommerce-variation-price {
	margin: 20px 0 0;
}

body.sw-store div.product form.cart .woocommerce-variation-add-to-cart,
body.sw-store div.product form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
}

body.sw-store div.product form.cart .woocommerce-variation-add-to-cart {
	margin-top: 20px;
}

body.sw-store div.product form.cart div.quantity {
	float: none;
	margin: 0;
}

body.sw-store div.product form.cart div.quantity .qty {
	width: 84px;
	height: 56px;
	border: 1px solid #d5d3e3;
	border-radius: 12px;
	font-size: 16px;
}

body.sw-store div.product form.cart .single_add_to_cart_button {
	float: none;
	min-height: 56px;
	padding: 0 36px;
}

body.sw-store div.product .product_meta {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--sw-line);
	color: var(--sw-muted);
	font-size: 14px;
}

body.sw-store div.product .product_meta a {
	color: var(--sw-indigo);
}

/* Tabs */
body.sw-store div.product .woocommerce-tabs {
	clear: both;
	padding-top: 20px;
}

body.sw-store div.product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	border-bottom: 1px solid var(--sw-line);
}

body.sw-store div.product .woocommerce-tabs ul.tabs::before,
body.sw-store div.product .woocommerce-tabs ul.tabs li::before,
body.sw-store div.product .woocommerce-tabs ul.tabs li::after {
	display: none;
}

body.sw-store div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

body.sw-store div.product .woocommerce-tabs ul.tabs li a {
	padding: 12px 18px;
	color: var(--sw-muted);
	font-weight: 600;
}

body.sw-store div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--sw-navy);
	box-shadow: inset 0 -3px 0 var(--sw-sky);
}

body.sw-store div.product .woocommerce-tabs .panel h2 {
	margin: 0 0 16px;
	color: var(--sw-ink);
	font-size: 28px;
	font-weight: 400;
}

body.sw-store div.product .woocommerce-tabs .panel h3 {
	margin: 24px 0 10px;
	color: var(--sw-navy);
	font-size: 20px;
	font-weight: bold;
}

body.sw-store div.product .woocommerce-tabs .panel li {
	margin: 0 0 4px;
	padding: 0;
}

body.sw-store table.woocommerce-product-attributes th {
	width: 180px;
	color: var(--sw-navy);
	font-weight: 600;
}

/* Related products */
body.sw-store section.related,
body.sw-store section.up-sells {
	clear: both;
	overflow: visible;
	padding: 40px 0 0;
}

body.sw-store section.related > h2,
body.sw-store section.up-sells > h2 {
	position: relative;
	margin: 0 0 50px;
	padding-bottom: 24px;
	color: var(--sw-ink);
	font-size: 36px;
	font-weight: 300;
	text-align: center;
}

body.sw-store section.related > h2::after,
body.sw-store section.up-sells > h2::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	width: 118px;
	height: 4px;
	margin: auto;
	background: var(--sw-sky);
}

/* ---------- Notices ---------- */

body.sw-store .woocommerce-message {
	border-top-color: var(--sw-indigo);
}

body.sw-store .woocommerce-message::before {
	color: var(--sw-indigo);
}

body.sw-store .woocommerce-info {
	border-top-color: var(--sw-sky);
}

body.sw-store .woocommerce-info::before {
	color: var(--sw-indigo);
}

body.sw-store .woocommerce-message .button,
body.sw-store .woocommerce-info .button {
	min-height: 40px;
	padding: 0 18px;
	font-size: 12px;
}

/* ---------- Cart / checkout blocks, account forms ---------- */

body.sw-store .wp-block-woocommerce-cart,
body.sw-store .wp-block-woocommerce-checkout {
	margin: 0;
}

/* The theme stripes table rows grey; the cart block's item table shouldn't be. */
body.sw-store .wc-block-cart table.wc-block-cart-items,
body.sw-store .wc-block-cart table.wc-block-cart-items tr,
body.sw-store .wc-block-cart table.wc-block-cart-items th,
body.sw-store .wc-block-cart table.wc-block-cart-items td {
	background: transparent;
}

body.sw-store .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.sw-store .wc-block-components-product-price {
	color: var(--sw-navy);
}

body.sw-store .wc-block-components-product-name {
	color: var(--sw-ink);
	font-weight: 600;
}

body.sw-store form.login,
body.sw-store form.register {
	border-color: var(--sw-line);
	border-radius: 24px;
}

body.sw-store form .form-row input.input-text {
	height: 50px;
	border: 1px solid #d5d3e3;
	border-radius: 12px;
}

/*
 * ---------- Overrides for Customizer > Additional CSS ----------
 * The Feb 2024 store attempt left !important rules there (card padding and
 * grey background, image drop shadow, navy buttons). Countered here, inside
 * the store scope, rather than editing the client's Customizer CSS.
 */

body.sw-store ul.products li.product.post {
	height: auto;
	padding: 14px 14px 24px !important;
}

body.sw-store .type-product img {
	box-shadow: none !important;
}

body.sw-store img.woocommerce-placeholder {
	border: 0;
}

body.sw-store .single_add_to_cart_button,
body.sw-store .product_type_variable {
	padding: 0 30px !important;
	background: var(--sw-indigo) !important;
	color: #fff !important;
}

body.sw-store div.product form.cart .single_add_to_cart_button {
	padding: 0 36px !important;
}

body.sw-store .single_add_to_cart_button:hover,
body.sw-store .product_type_variable:hover {
	background: var(--sw-sky) !important;
	color: var(--sw-navy) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
	body.sw-store ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	body.sw-store section.sw-cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 36px 30px;
	}
}

@media (max-width: 767px) {
	body.sw-store #hero-sec.innerPagesBanner .sw-store-banner__title {
		margin-bottom: -7px;
		font-size: 44px;
		line-height: 1;
	}

	body.sw-store .sw-store-main {
		padding: 40px 0 60px;
	}

	body.sw-store .sw-intro .title h2 {
		font-size: 32px;
	}

	.sw-construction {
		grid-template-columns: 1fr;
	}

	body.sw-store ul.products {
		gap: 24px;
	}

	body.sw-store div.product .product_title {
		font-size: 30px;
	}

	body.sw-store .sw-cta h2 {
		font-size: 28px;
	}
}

@media (max-width: 575px) {
	body.sw-store ul.products {
		grid-template-columns: 1fr;
	}

	body.sw-store div.product form.cart {
		padding: 18px;
	}

	body.sw-store div.product form.cart .single_add_to_cart_button {
		flex: 1;
	}

	.sw-cta__actions,
	.sw-cta__actions .sw-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.sw-store a.button,
	body.sw-store button.button,
	.sw-btn {
		transition: none;
	}
}
