.swc-ccr-product-notice {
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	color: #1d2327;
	padding: 12px 16px;
	margin: 12px 0;
	font-size: 0.95em;
	line-height: 1.5;
	border-radius: 2px;
}

/* Scoped to the free-text message only, so it never bleeds into the card
   titles/links below it (those get their own text-decoration: none). */
.swc-ccr-product-notice-text a {
	font-weight: 600;
	text-decoration: underline;
}

.swc-ccr-discount-label {
	display: inline-block;
	margin-top: 2px;
	font-size: 0.85em;
	font-weight: 600;
	color: #2271b1;
}

.swc-ccr-free-text {
	font-weight: 600;
	color: #1a7f37;
}

.swc-ccr-product-notice-text + .swc-ccr-companion-cards {
	margin-top: 12px;
}

/* Card grid — default (2/3/4 columns): image on top, details below. */
.swc-ccr-companion-cards {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, 1fr);
}

.swc-ccr-companion-cards.swc-ccr-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.swc-ccr-companion-cards.swc-ccr-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.swc-ccr-companion-cards.swc-ccr-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

.swc-ccr-companion-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 10px;
	background: #fff;
	border: 1px solid #d5dbe0;
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.swc-ccr-companion-card,
.swc-ccr-companion-card * {
	text-decoration: none;
}

.swc-ccr-companion-card:hover {
	border-color: #2271b1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.swc-ccr-companion-card-image {
	display: block;
	width: 100%;
	margin-bottom: 6px;
}

.swc-ccr-companion-card-image img {
	width: 100%;
	height: auto;
	border-radius: 2px;
	display: block;
}

.swc-ccr-companion-card-details {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.swc-ccr-companion-card-title {
	display: block;
	font-size: 0.85em;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 4px;
	line-height: 1.3;
}

.swc-ccr-companion-card-price {
	display: block;
	font-size: 0.85em;
	color: #50575e;
}

.swc-ccr-companion-card-badge {
	display: inline-block;
	margin-top: 6px;
	padding: 2px 8px;
	font-size: 0.75em;
	font-weight: 700;
	color: #fff;
	background: #2271b1;
	border-radius: 12px;
}

/* 1-column layout: wide horizontal cards, image on the left, details on the
   right. The grid becomes a single-column stack; each card switches from a
   vertical to a horizontal flex layout. */
.swc-ccr-companion-cards.swc-ccr-cols-1 {
	display: flex;
	flex-direction: column;
	grid-template-columns: none;
}

.swc-ccr-companion-cards.swc-ccr-cols-1 .swc-ccr-companion-card {
	flex-direction: row;
	align-items: center;
	text-align: left;
	width: 100%;
}

.swc-ccr-companion-cards.swc-ccr-cols-1 .swc-ccr-companion-card-image {
	width: 90px;
	flex: 0 0 90px;
	margin-bottom: 0;
	margin-right: 12px;
}

.swc-ccr-companion-cards.swc-ccr-cols-1 .swc-ccr-companion-card-details {
	align-items: flex-start;
	flex: 1;
}

/* Expandable card variant: static preview + "Show details" trigger that
   expands an inline panel below the card, plus a separate "view full
   product" link. Uses `all: unset` on the button/link to strip out
   whatever global button or link styling the site's theme applies (many
   WooCommerce themes style every <button> element with their brand color),
   then re-declares only the properties actually needed. */
.swc-ccr-companion-card-expandable {
	display: flex !important;
	flex-direction: column !important;
	padding: 0 !important;
	border: 1px solid #d5dbe0 !important;
	border-radius: 4px !important;
	overflow: hidden !important;
	background: #fff !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.swc-ccr-companion-card-static {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100%;
	padding: 10px;
	box-sizing: border-box;
}

.swc-ccr-cols-1 .swc-ccr-companion-card-static {
	flex-direction: row;
	align-items: center;
	text-align: left;
}

.swc-ccr-cols-1 .swc-ccr-companion-card-static .swc-ccr-companion-card-image {
	width: 90px;
	flex: 0 0 90px;
	margin-bottom: 0;
	margin-right: 12px;
}

.swc-ccr-companion-card-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 0 10px 10px;
	border-top: 1px solid #eef1f4;
	padding-top: 8px;
}

.swc-ccr-quick-view-trigger {
	all: unset !important;
	display: inline-block !important;
	cursor: pointer !important;
	font-size: 0.82em !important;
	font-weight: 700 !important;
	color: #2271b1 !important;
	background: none !important;
	background-image: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: normal !important;
	width: auto !important;
	height: auto !important;
	box-sizing: border-box !important;
}

.swc-ccr-quick-view-trigger:hover {
	text-decoration: underline !important;
}

.swc-ccr-view-full-product {
	all: unset !important;
	display: inline-block !important;
	cursor: pointer !important;
	font-size: 0.78em !important;
	color: #646970 !important;
	text-decoration: underline !important;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
	height: auto !important;
	box-sizing: border-box !important;
}

.swc-ccr-inline-expand-panel {
	border-top: 1px solid #eef1f4;
	padding: 16px;
	background: #fafbfc;
}

.swc-ccr-qv-loading,
.swc-ccr-qv-error {
	text-align: center;
	padding: 24px 16px;
	color: #50575e;
}

.swc-ccr-qv-success-banner {
	background: #edfaef;
	border-left: 4px solid #1a7f37;
	padding: 12px 16px;
	margin-bottom: 16px;
	border-radius: 2px;
}

.swc-ccr-qv-success-banner .swc-ccr-qv-view-cart {
	display: inline-block;
	margin-top: 8px;
	font-weight: 600;
	color: #2271b1;
	text-decoration: underline;
}

.swc-ccr-qv-error-banner {
	margin-bottom: 16px;
}

/* Blocking the current product's own Add to Cart until a companion is
   added. Applied directly to the specific button element (identified by
   its exact product id), never via a descendant selector on a wrapping
   form/container — that would risk visually blocking an unrelated button
   (e.g. a companion's own Add to Cart inside an inline expand panel) if it
   ever ends up nested within the same form for any reason. */
.swc-ccr-blocked-button {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.swc-ccr-block-message {
	background: #fcf0f1;
	border-left: 4px solid #d63638;
	color: #1d2327;
	padding: 12px 16px;
	margin: 12px 0;
	border-radius: 2px;
	font-size: 0.95em;
}
