/* CrazySneak — Couple bundle cart styling.
 * Phase 3 iter 3: full bundle grouping for cart page (cart-bundle-pair template).
 * Per-item badge + side ribbon styles kept for checkout review-order.php
 * (which still uses per-item rendering with woocommerce_cart_item_name filter).
 */

/* ====================================================== */
/* Per-item badge (checkout review-order)                  */
/* ====================================================== */
.cs-bundle-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 8px;
	padding: 3px 9px;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #B58B5B;
	background: rgba(181, 139, 91, 0.10);
	border: 1px solid rgba(181, 139, 91, 0.28);
	border-radius: 100px;
	vertical-align: middle;
	line-height: 1.4;
}
.cs-bundle-badge--groom {
	color: #1A1412;
	background: rgba(26, 20, 18, 0.05);
	border-color: rgba(26, 20, 18, 0.18);
}
tr.cs-bundle-item::before,
.csn-summary-line.cs-bundle-item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, #B58B5B 0%, #C9A07B 100%);
	border-radius: 0 2px 2px 0;
	pointer-events: none;
}
tr.cs-bundle-item,
.csn-summary-line.cs-bundle-item {
	position: relative;
}
tr.cs-bundle-side-groom::before,
.csn-summary-line.cs-bundle-side-groom::before {
	background: linear-gradient(180deg, #1A1412 0%, #2A2420 100%);
}

/* ====================================================== */
/* Bundle pair card (cart page)                            */
/* ====================================================== */
.cs-cart-bundle {
	background: var(--card, #FFFFFF);
	border: 1px solid var(--line, rgba(42,36,32,.1));
	border-radius: 18px;
	margin-bottom: 16px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 2px 12px rgba(26, 20, 18, .04);
}
.cs-cart-bundle::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, #B58B5B 0%, #C9A07B 50%, #1A1412 100%);
}

.cs-cart-bundle__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px 12px;
	border-bottom: 1px dashed var(--line, rgba(42,36,32,.10));
	flex-wrap: wrap;
}
.cs-cart-bundle__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	background: linear-gradient(135deg, #B58B5B 0%, #C9A07B 100%);
	color: #fff;
	border-radius: 100px;
	font-family: 'Inter', sans-serif;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	flex-shrink: 0;
}
.cs-cart-bundle__ship {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	color: var(--muted, rgba(42,36,32,.55));
	white-space: nowrap;
}

.cs-cart-bundle__pairs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}
.cs-cart-bundle__half {
	padding: 16px 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: relative;
}
.cs-cart-bundle__half + .cs-cart-bundle__half {
	border-left: 1px solid var(--line, rgba(42,36,32,.08));
}
.cs-cart-bundle__half--groom {
	background: linear-gradient(180deg, rgba(26,20,18,.02) 0%, rgba(26,20,18,.01) 100%);
}

.cs-cart-bundle__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'Inter', sans-serif;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent, #B58B5B);
}
.cs-cart-bundle__half--groom .cs-cart-bundle__eyebrow {
	color: #1A1412;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	letter-spacing: 0.10em;
}
.cs-cart-bundle__emoji { font-size: 14px; line-height: 1; }
.cs-cart-bundle__pair-label {
	opacity: 0.65;
	font-weight: 600;
}

.cs-cart-bundle__photo {
	width: 100%;
	aspect-ratio: 5 / 3;
	background: var(--bg-alt, #F3EDE2);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cs-cart-bundle__photo img {
	width: 90%;
	height: auto;
	object-fit: contain;
	display: block;
}
.cs-cart-bundle__photo-fallback {
	width: 100%;
	height: 100%;
	background: var(--bg-alt, #F3EDE2);
}

.cs-cart-bundle__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.cs-cart-bundle__name {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: -0.005em;
	color: var(--fg, #2A2420);
	margin: 0;
	line-height: 1.25;
}
.cs-cart-bundle__size {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--muted, rgba(42,36,32,.55));
}
.cs-cart-bundle__price {
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: var(--fg, #2A2420);
	font-variant-numeric: tabular-nums;
	margin-top: 3px;
}
.cs-cart-bundle__personalization {
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 14px;
	color: var(--accent, #B58B5B);
	padding: 4px 0 0;
}

.cs-cart-bundle__edit {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 4px;
	font-family: 'Inter', sans-serif;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted, rgba(42,36,32,.55));
	text-decoration: none;
	margin-top: 4px;
	padding: 4px 0;
	border-bottom: 1px dashed transparent;
	transition: color 180ms, border-color 180ms;
}
.cs-cart-bundle__edit:hover {
	color: var(--fg, #2A2420);
	border-bottom-color: var(--muted, rgba(42,36,32,.40));
}

.cs-cart-bundle__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 18px 14px;
	background: linear-gradient(180deg, rgba(181,139,91,.05) 0%, rgba(181,139,91,.08) 100%);
	border-top: 1px dashed rgba(181,139,91,.25);
	flex-wrap: wrap;
}
.cs-cart-bundle__discount-line {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'Inter', sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--accent, #B58B5B);
	letter-spacing: 0.01em;
}
.cs-cart-bundle__remove-all {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 500;
	color: var(--muted, rgba(42,36,32,.55));
	text-decoration: none;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 100px;
	transition: background 180ms, color 180ms;
}
.cs-cart-bundle__remove-all:hover {
	color: var(--fg, #2A2420);
	background: rgba(26, 20, 18, 0.04);
}

/* Mobile: pairs stack vertically */
@media (max-width: 700px) {
	.cs-cart-bundle__pairs {
		grid-template-columns: 1fr;
	}
	.cs-cart-bundle__half + .cs-cart-bundle__half {
		border-left: none;
		border-top: 1px solid var(--line, rgba(42,36,32,.08));
	}
	.cs-cart-bundle__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

/* ====================================================== */
/* Bundle pair card — drawer density (compact, stacked)    */
/* Used in cart drawer where width ~370px and we want a    */
/* compact layout that still groups both halves into one   */
/* visual unit + single "Remove bundle" action.            */
/* ====================================================== */
.cs-cart-bundle.is-drawer {
	border-radius: 12px;
	margin: 0 0 12px;
	box-shadow: none;
	/* Page variant uses overflow:hidden to clip the gold top ribbon to its
	   rounded corners. In the drawer, the bundle is a vertical stack and we
	   need the body to grow with its content — hidden clips bride+groom+foot.
	   The top ribbon's ::before is positioned absolute within the bundle
	   anyway; a small border-radius keeps the top corners clean. */
	overflow: visible;
}
.cs-cart-bundle.is-drawer::before { height: 2px; }

.cs-cart-bundle.is-drawer .cs-cart-bundle__head {
	padding: 10px 12px 8px;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__pill {
	padding: 3px 9px;
	font-size: 9.5px;
	letter-spacing: 0.12em;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__ship { font-size: 11px; }

/* Halves always stacked in drawer (regardless of viewport). */
.cs-cart-bundle.is-drawer .cs-cart-bundle__pairs {
	grid-template-columns: 1fr;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__half + .cs-cart-bundle__half {
	border-left: none;
	border-top: 1px solid var(--line, rgba(42,36,32,.08));
}

/* Half body laid out as: eyebrow full-width, then photo+meta horizontal,
   then personalization full-width, then edit link. */
.cs-cart-bundle.is-drawer .cs-cart-bundle__half {
	padding: 10px 12px;
	display: grid;
	grid-template-columns: 80px 1fr;
	grid-template-areas:
		"eyebrow eyebrow"
		"photo body"
		"pers pers"
		"edit edit";
	column-gap: 10px;
	row-gap: 6px;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__eyebrow {
	grid-area: eyebrow;
	font-size: 9.5px;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__photo {
	grid-area: photo;
	width: 80px;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__photo img { width: 92%; }
.cs-cart-bundle.is-drawer .cs-cart-bundle__body {
	grid-area: body;
	min-width: 0;
	gap: 2px;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__name { font-size: 15px; line-height: 1.2; }
.cs-cart-bundle.is-drawer .cs-cart-bundle__size { font-size: 10px; }
.cs-cart-bundle.is-drawer .cs-cart-bundle__price { font-size: 13.5px; margin-top: 2px; }
.cs-cart-bundle.is-drawer .cs-cart-bundle__personalization {
	grid-area: pers;
	font-size: 12px;
	padding-top: 0;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__edit {
	grid-area: edit;
	font-size: 10.5px;
	margin-top: 0;
	padding: 2px 0;
}

.cs-cart-bundle.is-drawer .cs-cart-bundle__foot {
	padding: 10px 12px;
	gap: 8px;
}
.cs-cart-bundle.is-drawer .cs-cart-bundle__discount-line { font-size: 11.5px; }
.cs-cart-bundle.is-drawer .cs-cart-bundle__remove-all {
	font-size: 10px;
	padding: 4px 9px;
}

/* Pending state — applied during remove AJAX roundtrip on both densities. */
.cs-cart-bundle.is-pending {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 180ms ease;
}
