/**
 * Swatch pack single-product layout — fabric grid + purchase sidebar.
 * Scoped to .cushion-swatch-pack-page so other products are untouched.
 */

.cushion-swatch-pack-page .product {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 28px 40px;
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 8px;
	padding-bottom: 48px;
}

/* Block themes may inject related products inside .product; keep them last. */
.cushion-swatch-pack-page .product > .related.products {
	flex: 1 1 100%;
	width: 100%;
	max-width: 100%;
	order: 4;
	margin-top: 0;
}

.cushion-swatch-pack-page .woocommerce-product-gallery {
	display: none !important;
}

/* ---- Fabric grid (main column) ---- */
.cushion-swatch-pack-page .csp-fabrics {
	flex: 1 1 520px;
	min-width: 0;
	order: 1;
}

.cushion-swatch-pack-page .csp-pack-head {
	margin-bottom: 22px;
}

.cushion-swatch-pack-page .csp-pack-kicker {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #5d8a2f;
}

.cushion-swatch-pack-page .csp-pack-title {
	margin: 0 0 8px;
	font-size: clamp(24px, 2.6vw, 30px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #26342a;
}

.cushion-swatch-pack-page .csp-pack-lede {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 600;
	color: #7c8a7d;
}

.cushion-swatch-pack-page .csp-pack-price {
	color: #26342a;
	font-weight: 800;
}

.cushion-swatch-pack-page .csp-pack-count {
	color: #574f43;
}

.cushion-swatch-pack-page .csp-pack-lede-dot {
	margin: 0 8px;
	color: #b8b0a0;
}

.cushion-swatch-pack-page .csp-fabric-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cushion-swatch-pack-page .csp-fabric-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e7dfce;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 24px -16px rgba(40, 55, 35, 0.28);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.cushion-swatch-pack-page .csp-fabric-card:hover {
	transform: translateY(-2px);
	border-color: #d4c9b0;
	box-shadow: 0 16px 32px -18px rgba(40, 55, 35, 0.34);
}

.cushion-swatch-pack-page .csp-fabric-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: stretch;
	text-decoration: none;
	color: inherit;
}

.cushion-swatch-pack-page .csp-fabric-img-wrap {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #f4eee1;
}

.cushion-swatch-pack-page .csp-fabric-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cushion-swatch-pack-page .csp-fabric-name {
	display: block;
	padding: 14px 14px 4px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: #26342a;
	text-align: center;
}

.cushion-swatch-pack-page .csp-fabric-sku {
	display: block;
	padding: 0 14px 14px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: #7c8a7d;
	text-align: center;
}

.cushion-swatch-pack-page .csp-fabric-design {
	display: block;
	padding: 10px 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	color: #4c7424;
	background: #eef4e2;
	border-top: 1px solid #e3eed2;
	transition: background 0.14s ease, color 0.14s ease;
}

.cushion-swatch-pack-page .csp-fabric-design:hover {
	background: #e3eed2;
	color: #3a5c1c;
}

/* ---- Purchase sidebar ---- */
.cushion-swatch-pack-page .summary.entry-summary {
	flex: 0 1 340px;
	min-width: 280px;
	order: 2;
	position: sticky;
	top: 24px;
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e7dfce;
	border-radius: 20px;
	padding: 24px 22px 22px;
	box-shadow: 0 22px 48px -28px rgba(40, 55, 35, 0.35);
}

.cushion-swatch-pack-page .product_title {
	display: none !important;
}

.cushion-swatch-pack-page .summary > .price {
	display: none;
}

.cushion-swatch-pack-page .csp-pack-meta {
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	border-top: 1px solid #efe9db;
}

.cushion-swatch-pack-page .csp-pack-meta-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #efe9db;
	font-size: 14px;
}

.cushion-swatch-pack-page .csp-pack-meta-label {
	font-weight: 600;
	color: #7c8a7d;
}

.cushion-swatch-pack-page .csp-pack-meta-value {
	font-weight: 700;
	color: #26342a;
	text-align: right;
}

.cushion-swatch-pack-page .csp-pack-meta-price .woocommerce-Price-amount {
	font-size: 18px;
}

.cushion-swatch-pack-page .woocommerce-product-details__short-description {
	display: none;
}

.cushion-swatch-pack-page form.cart {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	margin: 0 0 18px !important;
	padding: 0 !important;
}

.cushion-swatch-pack-page form.cart .csp-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 14px 0 4px;
	border-top: 1px solid #efe9db;
}

.cushion-swatch-pack-page form.cart .csp-qty-label {
	font-size: 14.5px;
	font-weight: 600;
	color: #7c8a7d;
	flex: 1;
}

.cushion-swatch-pack-page form.cart .quantity {
	margin: 0 !important;
	flex: 0 0 auto;
}

.cushion-swatch-pack-page form.cart .csp-qty-stepper {
	display: flex;
	align-items: stretch;
	border: 1.5px solid #e7dfce;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.cushion-swatch-pack-page form.cart .csp-qty-stepper .csp-qbtn {
	width: 40px;
	height: 42px;
	border: 0;
	background: transparent;
	font-size: 20px;
	font-weight: 600;
	line-height: 1;
	color: #26342a;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.12s ease;
}

.cushion-swatch-pack-page form.cart .csp-qty-stepper .csp-qbtn:hover {
	background: #fbf8f1;
}

.cushion-swatch-pack-page form.cart .csp-qty-stepper .csp-qbtn:active {
	background: #efe9db;
}

.cushion-swatch-pack-page form.cart .csp-qty-stepper input.qty {
	width: 48px;
	height: 42px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 1.5px solid #e7dfce !important;
	border-right: 1.5px solid #e7dfce !important;
	border-radius: 0 !important;
	text-align: center;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #26342a !important;
	background: #fff !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
}

.cushion-swatch-pack-page form.cart .csp-qty-stepper input.qty::-webkit-outer-spin-button,
.cushion-swatch-pack-page form.cart .csp-qty-stepper input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cushion-swatch-pack-page form.cart .single_add_to_cart_button {
	flex: 1 1 auto;
	width: 100%;
	margin: 0 !important;
	padding: 14px 20px !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border-radius: 999px !important;
	background: #5d8a2f !important;
	border-color: #5d8a2f !important;
	color: #fff !important;
	transition: background 0.14s ease, transform 0.14s ease;
}

.cushion-swatch-pack-page form.cart .single_add_to_cart_button:hover {
	background: #4c7424 !important;
	border-color: #4c7424 !important;
	transform: translateY(-1px);
}

.cushion-swatch-pack-page .csp-description {
	margin: 0 0 16px;
	font-size: 14.5px;
	line-height: 1.65;
	color: #3c4c40;
}

.cushion-swatch-pack-page .csp-description p {
	margin: 0 0 12px;
}

.cushion-swatch-pack-page .csp-description p:last-child {
	margin-bottom: 0;
}

.cushion-swatch-pack-page .csp-disclaimers {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.cushion-swatch-pack-page .summary.entry-summary .csp-about {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #efe9db;
}

.cushion-swatch-pack-page .csp-about {
	margin-top: 4px;
}

.cushion-swatch-pack-page .csp-about-heading {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #5d8a2f;
}

.cushion-swatch-pack-page .csp-about-body .csp-disclaimers {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #efe9db;
}

.cushion-swatch-pack-page .product_meta {
	display: none;
}

/* Full-width about + related below the two-column product layout */
.cushion-swatch-pack-page .related.products {
	clear: both;
	width: 100%;
	max-width: 1180px;
	margin: 40px auto 0;
	padding: 0;
}

.cushion-swatch-pack-page .related.products > h2 {
	font-family: var(--serif, Georgia, serif);
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 540;
	letter-spacing: -0.3px;
	margin: 0 0 20px;
	color: #26342a;
}

/* Full-width, evenly-spread grid (override WooCommerce's floated fixed widths). */
.cushion-swatch-pack-page .related.products ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin: 0;
	width: 100%;
	float: none;
}

.cushion-swatch-pack-page .related.products ul.products::before,
.cushion-swatch-pack-page .related.products ul.products::after {
	content: none;
}

/* Give each related swatch-pack a real card: border, padding, and bottom-aligned
   button so titles that wrap to two lines don't push the CTA out of alignment. */
.cushion-swatch-pack-page .related.products ul.products li.product {
	display: flex;
	flex-direction: column;
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 14px;
	background: #fff;
	border: 1px solid #e7dfce;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(38, 52, 42, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cushion-swatch-pack-page .related.products ul.products li.product:hover {
	border-color: #cdbf9e;
	box-shadow: 0 6px 18px rgba(38, 52, 42, 0.1);
	transform: translateY(-2px);
}

.cushion-swatch-pack-page .related.products ul.products li.product > a {
	display: block;
}

.cushion-swatch-pack-page .related.products ul.products li.product img {
	border-radius: 10px;
	margin: 0 0 14px;
	width: 100%;
	height: auto;
}

.cushion-swatch-pack-page .related.products ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--serif, Georgia, serif);
	font-size: 16px;
	font-weight: 540;
	line-height: 1.3;
	letter-spacing: -0.2px;
	color: #26342a;
	padding: 0;
	margin: 0 0 6px;
}

.cushion-swatch-pack-page .related.products ul.products li.product .price {
	display: block;
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: #5d8a2f;
}

.cushion-swatch-pack-page .related.products ul.products li.product .price .woocommerce-Price-amount {
	color: #5d8a2f;
}

/* Add to Cart — match the site's sage-green pill button; pinned to card bottom. */
.cushion-swatch-pack-page .related.products ul.products li.product .button,
.cushion-swatch-pack-page .related.products ul.products li.product a.add_to_cart_button {
	margin-top: auto !important;
	width: 100%;
	padding: 12px 18px !important;
	font-size: 12.5px !important;
	font-weight: 800 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	border-radius: 999px !important;
	background: #5d8a2f !important;
	border: 1px solid #5d8a2f !important;
	color: #fff !important;
	text-shadow: none !important;
	box-shadow: none !important;
	transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.cushion-swatch-pack-page .related.products ul.products li.product .button:hover,
.cushion-swatch-pack-page .related.products ul.products li.product a.add_to_cart_button:hover,
.cushion-swatch-pack-page .related.products ul.products li.product .button:focus,
.cushion-swatch-pack-page .related.products ul.products li.product a.add_to_cart_button:focus {
	background: #4c7424 !important;
	border-color: #4c7424 !important;
	transform: translateY(-1px);
}

.cushion-swatch-pack-page .related.products ul.products li.product a.added_to_cart {
	margin-top: 8px !important;
	width: 100%;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: #5d8a2f !important;
	text-decoration: underline;
}

.cushion-swatch-pack-page .related.products {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
}

.cushion-swatch-pack-page .csp-note {
	margin: 0 0 10px;
	font-size: 12.5px;
	line-height: 1.6;
	color: #7c8a7d;
}

.cushion-swatch-pack-page .csp-note--small {
	font-size: 11.5px;
	font-style: italic;
	margin-bottom: 0;
}

.cushion-swatch-pack-page .woocommerce-tabs {
	display: none !important;
}

.csp-sticky-buy {
	display: none;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
	.cushion-swatch-pack-page .product {
		gap: 24px;
		padding-top: 0;
		padding-bottom: 24px;
	}

	.cushion-swatch-pack-page .csp-fabrics {
		flex: 1 1 100%;
		order: 1;
	}

	.cushion-swatch-pack-page .summary.entry-summary {
		position: static;
		flex: 1 1 100%;
		order: 2;
		box-shadow: none;
		border: none;
		border-radius: 0;
		padding: 0 16px 16px;
		background: transparent;
	}

	.cushion-swatch-pack-page .csp-pack-head {
		padding: 20px 16px 18px;
		margin: 0 0 4px;
		border-bottom: 1px solid #efe9db;
	}

	.cushion-swatch-pack-page .csp-pack-kicker {
		display: none;
	}

	.cushion-swatch-pack-page .csp-pack-title {
		margin-bottom: 12px;
		font-size: 22px;
		line-height: 1.2;
	}

	.cushion-swatch-pack-page .csp-fabric-grid {
		padding: 8px 16px 0;
	}

	.cushion-swatch-pack-page .csp-pack-meta {
		display: none;
	}

	.cushion-swatch-pack-page .summary form.cart {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.cushion-swatch-pack-page .csp-about {
		margin-top: 24px;
		padding: 20px 16px;
		border-radius: 16px;
	}

	.cushion-swatch-pack-page .related.products {
		margin-top: 28px;
		padding: 0 16px;
	}

	.cushion-swatch-pack-page .related.products ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.cushion-swatch-pack-page .csp-about-heading {
		margin-bottom: 14px;
		font-size: 12px;
	}

	.cushion-swatch-pack-page .csp-description {
		font-size: 14px;
		line-height: 1.65;
	}

	.csp-sticky-buy {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 50;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
		background: rgba(255, 255, 255, 0.96);
		border-top: 1px solid #e7dfce;
		box-shadow: 0 -8px 24px -12px rgba(40, 55, 35, 0.28);
		backdrop-filter: blur(8px);
	}

	.csp-sticky-buy-inner {
		display: flex;
		align-items: center;
		gap: 12px;
		max-width: 1180px;
		margin: 0 auto;
	}

	.csp-sticky-price {
		flex-shrink: 0;
		font-size: 18px;
		font-weight: 800;
		color: #26342a;
	}

	.csp-sticky-buy-btn {
		flex: 1;
		padding: 14px 18px;
		font-size: 13px;
		font-weight: 800;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		border: none;
		border-radius: 999px;
		background: #5d8a2f;
		color: #fff;
		cursor: pointer;
	}

	body.cushion-swatch-pack-page {
		padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 640px) {
	.cushion-swatch-pack-page .csp-fabric-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.cushion-swatch-pack-page .csp-fabric-name {
		padding: 10px 10px 2px;
		font-size: 13px;
	}

	.cushion-swatch-pack-page .csp-fabric-sku {
		padding: 0 10px 10px;
		font-size: 11px;
	}

	.cushion-swatch-pack-page .csp-fabric-design {
		padding: 8px 10px;
		font-size: 10px;
		letter-spacing: 0.03em;
	}

	.cushion-swatch-pack-page .csp-fabric-card {
		border-radius: 14px;
	}
}

/* Cart toast (matches fabric library / designer) */
.fab-toast-stack{
	position:fixed;top:84px;right:20px;z-index:100050;display:flex;flex-direction:column;gap:10px;
	max-width:min(360px,calc(100vw - 32px));pointer-events:none;
}
.fab-toast{
	display:flex;align-items:flex-start;gap:12px;padding:14px 16px;
	background:#fffdf8;border:1px solid #e6dcc8;
	border-radius:16px;box-shadow:0 14px 30px -18px rgba(44,41,34,.34);
	pointer-events:auto;opacity:0;transform:translateX(16px);transition:opacity .22s ease,transform .22s ease;
}
.fab-toast.in{opacity:1;transform:none}
.fab-toast.out{opacity:0;transform:translateX(12px)}
.fab-toast-icon{
	flex:none;width:28px;height:28px;border-radius:50%;background:#edefe1;
	color:#5d6740;display:grid;place-items:center;font-size:14px;font-weight:900;
}
.fab-toast-body{flex:1;min-width:0}
.fab-toast-title{font-size:14px;font-weight:800;color:#2c2922;line-height:1.35}
.fab-toast-sub{font-size:13px;color:#938b79;font-weight:600;margin-top:2px}
.fab-toast-link{
	display:inline-block;margin-top:8px;font-size:13px;font-weight:700;color:#9f5530;
}
.fab-toast-link:hover{text-decoration:underline}
.fab-toast-x{
	flex:none;width:28px;height:28px;border-radius:8px;background:transparent;
	color:#938b79;font-size:20px;line-height:1;cursor:pointer;border:0;padding:0;
}
.fab-toast-x:hover{background:#f8f1e5;color:#2c2922}

.cushion-swatch-pack-page .woocommerce-notices-wrapper,
.cushion-swatch-pack-page .woocommerce-message,
.cushion-swatch-pack-page .wc-block-store-notice{
	display:none!important;
}

.cushion-swatch-pack-page form.cart .single_add_to_cart_button.added{
	opacity:.85;
}

@media (max-width:760px){
	.fab-toast-stack{top:72px;right:12px;left:12px;max-width:none}
}
