/* ==========================================================================
   FormRig Shop Page — Matte Black + Gloss
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

.frig-shop-header {
	background-color: #0D0D0D;
	padding: 72px 0 48px;
	text-align: center;
	border-bottom: 1px solid var(--frig-black-border);
	position: relative;
}

.frig-shop-header::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 160px;
	height: 1px;
	background: linear-gradient( 90deg, transparent, var(--frig-orange), transparent );
}

.frig-shop-header__eyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--frig-orange);
	margin-bottom: 12px;
}

.frig-shop-header__title {
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 800;
	margin-bottom: 16px;
	letter-spacing: -0.5px;
}

.frig-shop-header__sub {
	font-size: 1rem;
	color: var(--frig-text-muted);
	max-width: 600px;
	margin: 0 auto 24px;
	line-height: 1.7;
}

.frig-shop-header__badges {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Shop layout: sidebar + products
   -------------------------------------------------------------------------- */

.frig-shop-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 40px;
	padding: 48px 0 80px;
	align-items: start;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.frig-shop-sidebar {
	position: -webkit-sticky;
	position: sticky;
	top: 82px;
	/* align-self: start is the CRITICAL rule — without it sticky breaks in grid */
	align-self: start;
	height: fit-content;
	max-height: calc( 100vh - 110px );
	overflow-y: auto;
	/* Prevent inner overflow:hidden from eating our sticky context */
	z-index: 10;
}

.frig-shop-sidebar__inner {
	background: var(--frig-black-card);
	border: 1px solid var(--frig-black-border);
	border-radius: var(--frig-radius-lg);
	padding: 24px;
	position: relative;
	/* overflow: hidden removed — it breaks ::before gloss overlay but is NOT needed */
}

/* Gloss sheen on sidebar */
.frig-shop-sidebar__inner::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--frig-gloss-overlay);
	pointer-events: none;
}

.frig-shop-sidebar__heading {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--frig-text-faint);
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--frig-black-border);
}

.frig-shop-sidebar__nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 28px;
}

.frig-shop-sidebar__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: var(--frig-radius);
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--frig-text-muted);
	text-decoration: none;
	transition: background-color var(--frig-transition), color var(--frig-transition);
	border: 1px solid transparent;
}

.frig-shop-sidebar__link:hover {
	background-color: var(--frig-black-raised);
	color: var(--frig-text);
	text-decoration: none;
}

.frig-shop-sidebar__link--active,
.frig-shop-sidebar__link.is-active {
	background-color: var(--frig-orange-subtle);
	color: var(--frig-orange);
	border-color: rgba(244,96,12,0.2);
}

.frig-shop-sidebar__icon { font-size: 1rem; flex-shrink: 0; }

/* Sidebar info block */
.frig-shop-sidebar__info {
	padding-top: 20px;
	border-top: 1px solid var(--frig-black-border);
	margin-bottom: 20px;
}

.frig-shop-sidebar__info-title {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--frig-text-faint);
	margin-bottom: 10px;
}

.frig-shop-sidebar__info-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.frig-shop-sidebar__info-list li {
	font-size: 0.8rem;
	color: var(--frig-text-muted);
	padding: 4px 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.frig-shop-sidebar__info-list li::before {
	content: '✓';
	color: var(--frig-orange);
	font-size: 0.7rem;
	font-weight: 700;
}

/* Sidebar colour swatches */
.frig-shop-sidebar__colours {
	padding-top: 20px;
	border-top: 1px solid var(--frig-black-border);
}

.frig-shop-sidebar__swatches {
	display: flex;
	gap: 8px;
	margin: 10px 0 6px;
}

.frig-sidebar-swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.12);
	display: block;
}

.frig-sidebar-swatch--black  { background: #2A2A2A; }
.frig-sidebar-swatch--white  { background: #E8E8E4; border-color: rgba(255,255,255,0.3); }
.frig-sidebar-swatch--orange { background: var(--frig-orange); box-shadow: 0 0 8px rgba(244,96,12,0.4); }

.frig-shop-sidebar__colour-note {
	font-size: 0.72rem;
	color: var(--frig-text-faint);
}

/* --------------------------------------------------------------------------
   Product sections
   -------------------------------------------------------------------------- */

.frig-product-section { margin-bottom: 64px; }
.frig-product-section:last-child { margin-bottom: 0; }

.frig-product-section__header { margin-bottom: 24px; }

.frig-product-section__title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--frig-text);
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Orange left bar on section title */
.frig-product-section__title::before {
	content: '';
	display: block;
	width: 3px;
	height: 1.4em;
	background: linear-gradient( 180deg, rgba(255,255,255,0.2) 0%, transparent 60% ), var(--frig-orange);
	border-radius: 3px;
	flex-shrink: 0;
}

.frig-product-section__desc {
	font-size: 0.9rem;
	color: var(--frig-text-muted);
	margin: 0;
	padding-left: 13px;
}

/* --------------------------------------------------------------------------
   Product grid
   -------------------------------------------------------------------------- */

.frig-product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

/* --------------------------------------------------------------------------
   Product card — matte black + gloss
   -------------------------------------------------------------------------- */

.frig-product-card {
	background: var(--frig-black-card);
	border: 1px solid var(--frig-black-border);
	border-radius: var(--frig-radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color var(--frig-transition), box-shadow var(--frig-transition), transform var(--frig-transition);
	position: relative;
}

.frig-product-card:hover {
	border-color: rgba(244,96,12,0.45);
	box-shadow: var(--frig-shadow-orange);
	transform: translateY(-3px);
}

/* Top-edge gloss line on hover */
.frig-product-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.12), transparent );
	pointer-events: none;
}

/* Image */
.frig-product-card__image-wrap {
	display: block;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: var(--frig-black-raised);
}

.frig-product-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms ease;
}

.frig-product-card:hover .frig-product-card__image { transform: scale(1.04); }

.frig-product-card__image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient( 135deg, rgba(244,96,12,0.05) 0%, transparent 60% ), var(--frig-black-raised);
	border-bottom: 1px solid var(--frig-black-border);
}

.frig-product-card__image-placeholder span {
	font-size: 0.75rem;
	color: var(--frig-text-faint);
	font-weight: 500;
}

/* Body */
.frig-product-card__body {
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0;
}

.frig-product-card__title {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.3;
}

.frig-product-card__title a {
	color: var(--frig-text);
	text-decoration: none;
}

.frig-product-card__title a:hover { color: var(--frig-orange); }

.frig-product-card__desc {
	font-size: 0.82rem;
	color: var(--frig-text-muted);
	line-height: 1.55;
	margin: 0 0 14px;
	flex: 1;
}

.frig-product-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.frig-product-card__price {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--frig-orange);
}

/* Mini colour swatches on card */
.frig-product-card__colours {
	display: flex;
	gap: 5px;
	margin-bottom: 14px;
}

.frig-mini-swatch {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.1);
	display: block;
}

.frig-mini-swatch--black  { background: #2A2A2A; }
.frig-mini-swatch--white  { background: #D8D8D4; border-color: rgba(255,255,255,0.25); }
.frig-mini-swatch--orange { background: var(--frig-orange); box-shadow: 0 0 5px rgba(244,96,12,0.4); }

/* Card CTA button */
.frig-product-card__btn {
	display: block;
	text-align: center;
	padding: 10px 16px;
	background: linear-gradient( 180deg, rgba(255,255,255,0.12) 0%, transparent 55% ), var(--frig-orange);
	color: #fff;
	font-size: 0.82rem;
	font-weight: 600;
	border-radius: var(--frig-radius);
	text-decoration: none;
	border: 1px solid var(--frig-orange-dark);
	transition: all var(--frig-transition);
	box-shadow: 0 2px 8px rgba(244,96,12,0.35);
}

.frig-product-card__btn:hover {
	background: linear-gradient( 180deg, rgba(255,255,255,0.12) 0%, transparent 55% ), var(--frig-orange-dark);
	color: #fff;
	box-shadow: var(--frig-shadow-orange);
	transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Product card — colour swatches + dynamic ATC button
   -------------------------------------------------------------------------- */

.frig-card-swatches {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
	align-items: center;
}

.frig-card-swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
	flex-shrink: 0;
	background: none;
	padding: 0;
}

.frig-card-swatch--black  { background-color: #2A2A2A; border-color: rgba(255,255,255,0.15); }
.frig-card-swatch--white  { background-color: #F0F0EC; border-color: rgba(255,255,255,0.3); }
.frig-card-swatch--orange { background-color: #F4600C; border-color: rgba(244,96,12,0.5); }

/* Pin swatch colours across ALL states. Storefront styles bare <button> with a
   grey background on :hover / :focus / :active (specificity 0,1,1), which would
   otherwise override the single-class colour and turn swatches grey on hover/tap
   (and stick on mobile). Doubling the class (specificity 0,2,0) always wins. */
.frig-card-swatch.frig-card-swatch--black,
.frig-card-swatch.frig-card-swatch--black:hover,
.frig-card-swatch.frig-card-swatch--black:focus,
.frig-card-swatch.frig-card-swatch--black:active   { background-color: #2A2A2A; }
.frig-card-swatch.frig-card-swatch--white,
.frig-card-swatch.frig-card-swatch--white:hover,
.frig-card-swatch.frig-card-swatch--white:focus,
.frig-card-swatch.frig-card-swatch--white:active   { background-color: #F0F0EC; }
.frig-card-swatch.frig-card-swatch--orange,
.frig-card-swatch.frig-card-swatch--orange:hover,
.frig-card-swatch.frig-card-swatch--orange:focus,
.frig-card-swatch.frig-card-swatch--orange:active  { background-color: #F4600C; }

button.frig-card-swatch:hover {
	transform: scale(1.15);
	border-color: var(--frig-orange) !important;
	box-shadow: 0 0 0 3px rgba(244,96,12,0.25);
}

button.frig-card-swatch.is-selected {
	border-color: var(--frig-orange) !important;
	box-shadow: 0 0 0 3px rgba(244,96,12,0.35);
	transform: scale(1.1);
}

/* Orange swatch glow */
button.frig-card-swatch--orange.is-selected {
	box-shadow: 0 0 12px rgba(244,96,12,0.6), 0 0 0 3px rgba(244,96,12,0.35);
}

/* Display-only swatches (no live product) */
.frig-card-swatches--display .frig-card-swatch {
	cursor: default;
	width: 14px;
	height: 14px;
}

/* --------------------------------------------------------------------------
   Quantity stepper (Build page component cards)
   -------------------------------------------------------------------------- */

.frig-card-qty-wrap {
	display: inline-flex;
	align-items: center;
	align-self: center;
	background: #1A1A1A;
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	border-radius: 100px;
	overflow: hidden;
	margin-bottom: 14px;
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.frig-card-qty-wrap:hover,
.frig-card-qty-wrap:focus-within {
	border-color: rgba( 244, 96, 12, 0.5 );
	box-shadow: 0 0 0 3px rgba( 244, 96, 12, 0.12 );
}

.frig-card-qty-btn {
	background: none;
	border: none;
	color: rgba( 240, 240, 236, 0.45 );
	width: 40px;
	height: 40px;
	cursor: pointer;
	font-size: 1.15rem;
	font-weight: 300;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 150ms ease, background-color 150ms ease;
	user-select: none;
	flex-shrink: 0;
}

.frig-card-qty-btn:hover {
	color: var(--frig-orange);
	background-color: rgba( 244, 96, 12, 0.1 );
}

.frig-card-qty-btn:active {
	color: var(--frig-orange-dark);
	background-color: rgba( 244, 96, 12, 0.18 );
}

.frig-card-qty-input {
	width: 42px;
	text-align: center;
	background: transparent;
	border: none;
	border-left: 1px solid rgba( 255, 255, 255, 0.07 );
	border-right: 1px solid rgba( 255, 255, 255, 0.07 );
	color: var(--frig-text);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0;
	height: 40px;
	-moz-appearance: textfield;
}

.frig-card-qty-input::-webkit-outer-spin-button,
.frig-card-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.frig-card-qty-input:focus { outline: none; }

.frig-card-atc-form { margin: 0; }

/* Dynamic ATC button */
.frig-card-atc-btn {
	width: 100%;
}

.frig-card-atc-btn:disabled {
	background: rgba(255,255,255,0.07) !important;
	color: #666660 !important;
	border-color: rgba(255,255,255,0.08) !important;
	box-shadow: none !important;
	cursor: not-allowed;
	transform: none !important;
}

.frig-card-atc-btn:disabled::after {
	display: none;
}

.frig-price-unit {
	font-size: 0.65rem;
	font-weight: 400;
	color: var(--frig-text-muted);
}

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

@media ( max-width: 1024px ) {
	.frig-product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media ( max-width: 900px ) {
	.frig-shop-layout {
		grid-template-columns: 1fr;
	}

	.frig-shop-sidebar {
		position: static;
	}

	.frig-shop-sidebar__inner {
		display: flex;
		flex-wrap: wrap;
		gap: 16px;
	}

	.frig-shop-sidebar__nav {
		flex-direction: row;
		flex-wrap: wrap;
		margin-bottom: 0;
	}

	.frig-shop-sidebar__link {
		padding: 7px 12px;
	}

	.frig-shop-sidebar__info,
	.frig-shop-sidebar__colours {
		display: none;
	}
}

@media ( max-width: 600px ) {
	.frig-product-grid { grid-template-columns: 1fr; }
}
