/* Shared storefront polish. Keep selectors scoped to Soft Beast components. */
body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item:nth-child(1) { order: 2; }
body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item:nth-child(2) { order: 1; }
body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item:nth-child(3) { order: 3; }
body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item:nth-child(4) { order: 4; }

body.sb-storefront a:focus:not(:focus-visible),
body.sb-storefront button:focus:not(:focus-visible) {
	outline: 0 !important;
	box-shadow: none !important;
}

body.sb-storefront a:focus:not(:focus-visible) img,
body.sb-storefront a:focus:not(:focus-visible) picture {
	outline: 0 !important;
	box-shadow: none !important;
}

body.sb-storefront a:focus-visible,
body.sb-storefront button:focus-visible {
	outline: 2px solid #e99f7a !important;
	outline-offset: 3px !important;
	border-radius: 10px;
	box-shadow: 0 0 0 4px rgba(233, 159, 122, .2) !important;
}

body.sb-storefront header .wp-block-navigation__submenu-container {
	min-width: max-content !important;
	padding: 10px !important;
	border: 1px solid rgba(11, 37, 69, .1) !important;
	border-radius: 14px !important;
	background: #fffaf3 !important;
	box-shadow: 0 14px 34px rgba(11, 37, 69, .12) !important;
}

body.sb-storefront header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 12px !important;
	border-radius: 9px;
	transition: background-color 160ms ease, color 160ms ease;
}

body.sb-storefront header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
body.sb-storefront header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background: #f7ead8;
	color: #0b2545;
}

@media (min-width: 782px) {
	body.sb-storefront header .wp-block-navigation__container {
		flex-wrap: nowrap;
		column-gap: clamp(24px, 2.5vw, 48px);
	}

	body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item {
		flex: 0 0 auto;
		min-width: max-content;
	}

	body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
	body.sb-storefront header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content .wp-block-navigation-item__label {
		width: max-content;
		white-space: nowrap;
		word-break: normal;
		overflow-wrap: normal;
	}
}

.sb-product-grid .sb-product-card,
.sb-product-grid .wc-block-product,
.sb-main-product-collection .wc-block-product {
	min-width: 0;
	display: flex;
	flex-direction: column;
	height: 100%;
	transform: none;
	transition: transform 200ms ease, box-shadow 200ms ease;
}

.sb-product-grid .sb-product-card:hover,
.sb-product-grid .wc-block-product:hover,
.sb-main-product-collection .wc-block-product:hover {
	transform: translateY(-2px);
}

.sb-product-grid .sb-product-card img,
.sb-product-grid .wc-block-components-product-image img,
.sb-main-product-collection .wc-block-components-product-image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.sb-product-grid .wp-block-post-title,
.sb-product-grid .wc-block-components-product-name,
.sb-main-product-collection .wp-block-post-title {
	min-height: 2.6em;
}

.sb-product-grid .wp-block-post-excerpt,
.sb-product-grid .wc-block-components-product-price,
.sb-product-grid .wc-block-grid__product-price,
.sb-main-product-collection .wc-block-components-product-price {
	margin-top: auto;
}

.sb-product-grid .wp-element-button,
.sb-main-product-collection .wp-element-button {
	transition: transform 180ms ease, background-color 180ms ease;
}

.sb-product-grid .wp-element-button:active,
.sb-main-product-collection .wp-element-button:active {
	transform: translateY(1px);
}

.sb-product-grid .wp-element-button:focus-visible,
.sb-main-product-collection .wp-element-button:focus-visible,
.sb-blog-search input:focus-visible,
.sb-blog-search button:focus-visible,
.sb-blog-card a:focus-visible {
	outline: 3px solid #9fdceb;
	outline-offset: 3px;
}

.sb-fallback-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
	margin-top: 24px;
}

.sb-fallback-product-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	padding: 16px;
	border: 1px solid rgba(11, 37, 69, .1);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 8px 22px rgba(11, 37, 69, .06);
}

.sb-fallback-product-card__image {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 14px;
	background: #f4f8fb;
}

.sb-fallback-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sb-fallback-product-card h3 {
	min-height: 2.6em;
	margin: 16px 0 8px;
	font-size: 1.05rem;
	line-height: 1.25;
}

.sb-fallback-product-card h3 a { color: #0b2545; text-decoration: none; }
.sb-fallback-product-card__price { margin-bottom: 14px; color: #627286; }
.sb-fallback-product-card .wp-element-button { margin-top: auto; text-align: center; }

.sb-blog-archive {
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(28px, 5vw, 72px) 20px 84px;
}

.sb-blog-archive__intro {
	max-width: 760px;
	margin: 0 auto 42px;
	text-align: center;
}

.sb-blog-archive__intro h2 {
	margin: 0 0 14px;
	color: #0b2545;
	font-size: clamp(2rem, 4vw, 3.4rem);
	line-height: 1.04;
}

.sb-blog-archive__intro > p:not(.sb-eyebrow) {
	margin: 0 auto;
	max-width: 58ch;
	color: #627286;
}

.sb-eyebrow {
	margin: 0 0 10px;
	color: #0b6f92;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.sb-blog-search {
	max-width: 560px;
	margin: 26px auto 0;
	text-align: left;
}

.sb-blog-search label {
	display: block;
	margin-bottom: 8px;
	color: #0b2545;
	font-weight: 800;
}

.sb-blog-search div {
	display: flex;
	gap: 8px;
}

.sb-blog-search input {
	min-width: 0;
	flex: 1;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid #cddbe3;
	border-radius: 999px;
	font: inherit;
}

.sb-blog-search button {
	min-height: 48px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: #0b2545;
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.sb-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.sb-blog-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(11, 37, 69, .1);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(11, 37, 69, .07);
}

.sb-blog-card__image {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.sb-blog-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}

.sb-blog-card:hover .sb-blog-card__image img {
	transform: scale(1.02);
}

.sb-blog-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px;
}

.sb-blog-card__date {
	margin: 0 0 9px;
	color: #718096;
	font-size: .8rem;
}

.sb-blog-card h2 {
	margin: 0;
	font-size: 1.3rem;
	line-height: 1.2;
}

.sb-blog-card h2 a,
.sb-blog-card__read-more {
	color: #0b2545;
	text-decoration: none;
}

.sb-blog-card__body > p:not(.sb-blog-card__date) {
	margin: 12px 0 18px;
	color: #627286;
	line-height: 1.55;
}

.sb-blog-card__read-more {
	margin-top: auto;
	font-weight: 800;
}

.sb-blog-empty {
	grid-column: 1 / -1;
	padding: 32px;
	border-radius: 18px;
	background: #f4f8fb;
	color: #627286;
	text-align: center;
}

@media (max-width: 900px) {
	.sb-fallback-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sb-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.sb-fallback-product-grid { grid-template-columns: 1fr; }
	.sb-blog-grid { grid-template-columns: 1fr; }
	.sb-blog-search div { flex-direction: column; }
	.sb-blog-search button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.sb-product-grid .sb-product-card,
	.sb-product-grid .wc-block-product,
	.sb-main-product-collection .wc-block-product,
	.sb-blog-card__image img { transition: none; }
}
