*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	color: #111;
	background: #fff;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea {
	font-family: inherit;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: transparent;
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: none;
	margin: 0 auto;
	padding: 16px 32px;
}
.site-header__logo {
	display: flex;
	align-items: center;
	margin-right: auto; /* pins the logo to the left regardless of what's in the middle/right */
}
.site-header__logo-text {
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	font-size: 18px;
	color: #fff;
}
.site-header__menu {
	display: flex;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-header__menu a {
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.site-header__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: #fff;
	transition: transform 320ms ease;
}
.site-header__cart-icon {
	width: 24px;
	height: 24px;
}
.site-header__cart-count {
	position: absolute;
	top: -8px;
	right: -10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: #ff7a1a;
	color: #fff;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}
@keyframes shadowstandCartBump {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.4); }
	100% { transform: scale(1); }
}
.site-header__cart.is-bumping {
	animation: shadowstandCartBump 420ms ease;
}
@media (prefers-reduced-motion: reduce) {
	.site-header__cart.is-bumping { animation: none; }
}

/* The dot that flies from the Add to Cart button to the basket icon.
   Uses a keyframe animation (not a simple transition) so it can pop up
   and grow briefly before flying to the target — much easier to notice
   than a small dot sliding in a straight line. --dx/--dy (the distance
   to the cart icon) are set inline by JS per click. */
.shadowstand-fly-dot {
	position: fixed;
	left: 0;
	top: 0;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	margin-top: -11px;
	border-radius: 50%;
	background: #ff7a1a;
	box-shadow: 0 0 0 7px rgba(255, 122, 26, 0.22), 0 6px 18px rgba(255, 122, 26, 0.45);
	z-index: 9999;
	pointer-events: none;
	animation: shadowstandFlyDot 950ms cubic-bezier(0.5, 0, 0.5, 1) forwards;
}
@keyframes shadowstandFlyDot {
	0%   { transform: translate(0, 0) scale(1); opacity: 1; }
	18%  { transform: translate(calc(var(--dx) * 0.06), calc(var(--dy) * 0.06 - 34px)) scale(1.5); opacity: 1; }
	100% { transform: translate(var(--dx), var(--dy)) scale(0.25); opacity: 0.2; }
}
@media (prefers-reduced-motion: reduce) {
	.shadowstand-fly-dot { display: none; }
}

.site-header__cart .single_add_to_cart_button.loading,
.shadowstand-add-to-cart.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------------- Cart page ---------------- */
.cart-page-hero {
	min-height: 100vh;
	background-image: url('../img/cart-bg.jpg');
	background-size: cover;
	background-position: center;
	margin-top: calc(-1 * var(--header-h, 0px));
	padding: calc(var(--header-h, 0px) + 60px) 20px 80px;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
}
.cart-page-wrap {
	width: 100%;
	max-width: 700px;
	min-width: 0; /* flex items default to min-width:auto, which lets wide content
	                 override max-width entirely — this is the actual fix */
	background: #fff;
	border-radius: 4px;
	padding: 40px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	height: fit-content;
	overflow: hidden; /* contain any child that still tries to break out */
}
/* WooCommerce's block-based Cart applies `alignwide`/`alignfull` to itself,
   which are WordPress block-alignment classes specifically designed to
   break OUT of their container via negative viewport-relative margins —
   exactly what fights our 700px wrap. Neutralize that here so it respects
   our width instead. */
.cart-page-wrap .alignwide,
.cart-page-wrap .alignfull,
.cart-page-wrap .wp-block-woocommerce-cart {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
@media (max-width: 860px) {
	.cart-page-wrap { padding: 28px 20px; }
}

/* Recolor the header for legibility over the cart page's background photo. */
body.woocommerce-cart .site-header__logo-text,
body.woocommerce-cart .site-header__menu a {
	color: #111;
}
body.woocommerce-cart .site-header__cart {
	color: #fff;
}

/* ---------------- Checkout page ---------------- */
.checkout-page-hero {
	min-height: 100vh;
	background-image: url('../img/checkout-bg.jpg');
	background-size: cover;
	background-position: center;
	margin-top: calc(-1 * var(--header-h, 0px));
	padding: calc(var(--header-h, 0px) + 60px) 20px 80px;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
}
.checkout-page-wrap {
	width: 100%;
	max-width: 1024px; /* wider than the cart's 700px — checkout has two columns (form + order summary) */
	min-width: 0;
	background: #fff;
	border-radius: 4px;
	padding: 40px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	height: fit-content;
	overflow: hidden;
}
/* Same alignwide/alignfull breakout neutralization as the cart page —
   the block-based Checkout applies these classes too. */
.checkout-page-wrap .alignwide,
.checkout-page-wrap .alignfull,
.checkout-page-wrap .wp-block-woocommerce-checkout {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
@media (max-width: 860px) {
	.checkout-page-wrap { padding: 28px 20px; }
}

/* Recolor the header for legibility over the checkout page's background photo. */
body.woocommerce-checkout .site-header__logo-text,
body.woocommerce-checkout .site-header__menu a {
	color: #111;
}
body.woocommerce-checkout .site-header__cart {
	color: #fff;
}
