/* ============ Showcase (image + content, 2-col) ============
   Used by the homepage About Banner and the About page — lives here
   (not a page.css) since it's shared across more than one template. */
.cb-showcase { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--cb-space-xl); align-items: center; }
@media (min-width: 1024px) { .cb-showcase { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--cb-space-xl); } }
.cb-showcase__visual { position: relative; }
.cb-showcase__main { aspect-ratio: 5/6; border-radius: var(--cb-radius); background-size: cover; background-position: top center; box-shadow: var(--cb-shadow-md); background-color: var(--cb-color-surface-alt); }
.cb-showcase__inset {
	position: absolute; bottom: -1.5rem; right: -1rem; width: 42%; max-width: 220px; aspect-ratio: 1/1;
	border-radius: var(--cb-radius); overflow: hidden; box-shadow: var(--cb-shadow-md);
	border: 4px solid var(--cb-color-background);
}
.cb-showcase__inset img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-showcase__content { padding-top: var(--cb-space-md); }
.cb-showcase__eyebrow { display: flex; align-items: center; gap: var(--cb-space-sm); margin-bottom: var(--cb-space-sm); }
.cb-showcase__eyebrow .cb-label-caps { color: var(--cb-color-primary); }
.cb-showcase__line { width: 2rem; height: 1px; background: var(--cb-color-primary); }
.cb-showcase__pillars {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cb-space-md);
	margin: var(--cb-space-lg) 0; padding-top: var(--cb-space-md); border-top: 1px solid var(--cb-color-border);
}
.cb-showcase__pillar { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; }
.cb-showcase__pillar svg { color: var(--cb-color-primary); }
.cb-showcase__pillar span { font-size: var(--cb-text-label-caps); letter-spacing: 0.06em; text-transform: uppercase; color: var(--cb-color-text-muted); }
.cb-showcase__actions { display: flex; align-items: center; gap: var(--cb-space-lg); flex-wrap: wrap; }
.cb-showcase__link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--cb-text-label-caps); letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--cb-color-text); padding-bottom: 2px; }

/* ============ Buttons ============ */
.cb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--cb-space-xs);
	padding: 0.9rem 2rem;
	border-radius: var(--cb-radius);
	font-family: var(--cb-font-body);
	font-size: var(--cb-text-label-caps);
	letter-spacing: 0.16em;
	font-weight: 600;
	text-transform: uppercase;
	transition: background var(--cb-transition-fast), box-shadow var(--cb-transition-fast), transform var(--cb-transition-fast);
	border: 1px solid transparent;
	white-space: nowrap;
}
.cb-btn--primary {
	background: var(--cb-color-button);
	color: var(--cb-color-button-text);
	box-shadow: var(--cb-shadow-card);
}
.cb-btn--primary:hover { background: var(--cb-color-button-hover); box-shadow: var(--cb-shadow-md); transform: translateY(-1px); }
.cb-btn--secondary {
	background: transparent;
	border-color: var(--cb-color-text);
	color: var(--cb-color-text);
}
.cb-btn--secondary:hover { background: var(--cb-color-surface-alt); }
.cb-btn--ghost {
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border-radius: var(--cb-radius-full);
	background: var(--cb-color-surface);
	border-color: var(--cb-color-border);
}
.cb-btn--ghost:hover { background: var(--cb-color-primary); }
.cb-btn--block { width: 100%; }
.cb-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ Section heading ============ */
.cb-section-heading { display: flex; flex-direction: column; gap: var(--cb-space-xs); margin-bottom: var(--cb-space-xl); }
.cb-section-heading__eyebrow { color: var(--cb-color-dusty-rose); }
.cb-section-heading--row { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--cb-space-md); }
.cb-section-heading__link {
	display: inline-flex; align-items: center; gap: var(--cb-space-xs);
	border-bottom: 1px solid var(--cb-color-dusty-rose); padding-bottom: 2px;
	transition: color var(--cb-transition-fast);
}
.cb-section-heading__link:hover { color: var(--cb-color-dusty-rose); }

/* ============ Badges / chips ============ */
.cb-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: var(--cb-radius-full);
	font-size: var(--cb-text-label-caps);
	letter-spacing: var(--cb-tracking-label-caps);
	font-weight: 600;
	text-transform: uppercase;
	background: var(--cb-color-primary);
	color: var(--cb-color-text);
}
.cb-badge--sale { background: var(--cb-color-dusty-rose); color: var(--cb-white); }
.cb-badge--outline { background: transparent; border: 1px solid var(--cb-color-border); }
.cb-chip {
	display: inline-flex; align-items: center; gap: var(--cb-space-xs);
	padding: 0.4rem 0.9rem; border-radius: var(--cb-radius-full);
	background: color-mix(in srgb, var(--cb-color-secondary) 25%, transparent);
	border: 1px solid var(--cb-misty-blue);
	font-size: var(--cb-text-label-md); text-transform: uppercase; letter-spacing: var(--cb-tracking-label-md);
	transition: background var(--cb-transition-fast), color var(--cb-transition-fast);
}
.cb-chip.is-active { background: var(--cb-misty-blue); color: var(--cb-white); border-color: var(--cb-misty-blue); }

/* ============ Product card ============ */
.cb-product-card {
	display: flex; flex-direction: column;
	min-width: 0;
	background: var(--cb-color-surface);
	border-radius: var(--cb-radius);
	box-shadow: var(--cb-shadow-card);
	transition: transform var(--cb-transition), box-shadow var(--cb-transition);
	position: relative;
}
.cb-product-card:hover { transform: translateY(-4px); box-shadow: var(--cb-shadow-md); }
.cb-product-card__media { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--cb-radius) var(--cb-radius) 0 0; background: var(--cb-color-surface-alt); }
.cb-product-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--cb-transition-slow); }
.cb-product-card:hover .cb-product-card__media img { transform: scale(1.05); }
.cb-product-card__badges { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; z-index: 2; }
/* Quick-add sits inline next to the price, always visible, sized to its
   own content — never overlays the image or pushes other content around. */
.cb-product-card__quick-add { flex-shrink: 0; }
.cb-product-card__quick-add .button,
.cb-product-card__quick-add a {
	display: inline-block; white-space: nowrap;
	padding: 0.3rem 0.75rem !important; border-radius: var(--cb-radius-full) !important;
	background: transparent !important; border: 1px solid var(--cb-color-border) !important;
	color: var(--cb-color-text) !important;
	font-size: 10px !important; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600 !important;
	box-shadow: none !important;
	transition: background var(--cb-transition-fast), border-color var(--cb-transition-fast), color var(--cb-transition-fast);
}
.cb-product-card__quick-add .button:hover,
.cb-product-card__quick-add a:hover { background: var(--cb-color-text) !important; border-color: var(--cb-color-text) !important; color: var(--cb-white) !important; }
.cb-product-card__body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; }
.cb-product-card__title {
	font-family: var(--cb-font-heading); font-size: var(--cb-text-headline-sm); line-height: var(--cb-leading-headline-sm);
	transition: color var(--cb-transition-fast);
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cb-product-card:hover .cb-product-card__title { color: var(--cb-color-dusty-rose); }
.cb-product-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: var(--cb-text-body-md); }
.cb-product-card__meta .cb-product-card__price { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-product-card__variant { color: var(--cb-color-text-muted); }
.cb-product-card__price { font-weight: 500; }
.cb-product-card__price del { color: var(--cb-color-text-faint); font-weight: 400; margin-right: 0.4rem; text-decoration: line-through; }
.cb-product-card__price ins { text-decoration: none; color: var(--cb-color-dusty-rose); }
.cb-product-card__fabric { font-size: var(--cb-text-label-caps); letter-spacing: var(--cb-tracking-label-caps); text-transform: uppercase; color: color-mix(in srgb, var(--cb-color-dusty-rose) 80%, var(--cb-color-text)); }

/* ============ Collection / category cards ============ */
/* Shared by the [dandelion_collections] and [dandelion_shop_by_category]
   shortcodes — styled to match .cb-product-card above so the Collections
   page reads as a card grid, not a text list. */
.dandelion-collections-grid, .dandelion-category-grid {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cb-gutter);
}
@media (min-width: 768px) { .dandelion-collections-grid, .dandelion-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.dandelion-collection-card, .dandelion-category-card {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--cb-color-surface); border-radius: var(--cb-radius); box-shadow: var(--cb-shadow-card);
	overflow: hidden; transition: transform var(--cb-transition), box-shadow var(--cb-transition);
}
.dandelion-collection-card:hover, .dandelion-category-card:hover { transform: translateY(-4px); box-shadow: var(--cb-shadow-md); }

.dandelion-collection-card__image, .dandelion-category-card__image {
	display: block; width: 100%; aspect-ratio: 3 / 4; background-size: cover; background-position: top center; background-color: var(--cb-color-surface-alt);
}
.dandelion-collection-card__name, .dandelion-category-card__name {
	display: block; font-family: var(--cb-font-heading); font-size: var(--cb-text-headline-sm); color: var(--cb-color-text);
	padding: var(--cb-space-md) var(--cb-space-md) 0;
}
.dandelion-collection-card__desc {
	display: block; font-size: var(--cb-text-body-sm); color: var(--cb-color-text-muted);
	padding: 0.35rem var(--cb-space-md) 0;
}
.dandelion-collection-card__count {
	display: block; font-size: var(--cb-text-label-caps); letter-spacing: var(--cb-tracking-label-caps); text-transform: uppercase;
	color: color-mix(in srgb, var(--cb-color-dusty-rose) 80%, var(--cb-color-text));
	padding: 0.5rem var(--cb-space-md) var(--cb-space-md);
}

/* ============ Generic page content (legal/support pages) ============ */
/* page.php just calls the_content() into this wrapper. Global resets
   (ul/ol/p margins stripped, headings sized like body text) leave raw
   post content — Delivery, Returns, Terms, Privacy, Contact — looking
   unstyled/run-together without this. */
.cb-page-content > * + * { margin-top: var(--cb-space-md); }
.cb-page-content h2 { font-size: var(--cb-text-headline-sm); margin-top: var(--cb-space-xl); }
.cb-page-content h2:first-child { margin-top: 0; }
.cb-page-content p { line-height: 1.7; color: var(--cb-color-text-muted); }
.cb-page-content ul, .cb-page-content ol { list-style: disc; padding-left: 1.25rem; color: var(--cb-color-text-muted); }
.cb-page-content ol { list-style: decimal; }
.cb-page-content li + li { margin-top: 0.4rem; }
.cb-page-content li { line-height: 1.6; }
.cb-page-content a { color: var(--cb-color-dusty-rose); text-decoration: underline; }
.cb-page-content strong { color: var(--cb-color-text); }

/* ============ Forms ============ */
.cb-field { display: flex; flex-direction: column; gap: 0.4rem; }
.cb-field label { font-size: var(--cb-text-label-md); text-transform: uppercase; letter-spacing: var(--cb-tracking-label-md); color: var(--cb-color-text-muted); }
.cb-field input, .cb-field select, .cb-field textarea {
	background: var(--cb-color-surface-alt);
	border: 1px solid var(--cb-color-border);
	border-radius: var(--cb-radius);
	padding: 0.75rem 1rem;
	font-size: var(--cb-text-body-md);
	transition: border-color var(--cb-transition-fast);
}
.cb-field input:focus, .cb-field select:focus, .cb-field textarea:focus { border-color: var(--cb-color-dusty-rose); outline: none; }

/* ============ Swatches (colour / size) ============ */
.cb-swatches { display: flex; flex-wrap: wrap; gap: var(--cb-space-sm); }
.cb-swatch--colour { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 2px solid var(--cb-white); box-shadow: 0 0 0 1px var(--cb-color-border); cursor: pointer; transition: box-shadow var(--cb-transition-fast); }
.cb-swatch--colour.is-active { box-shadow: 0 0 0 2px var(--cb-color-dusty-rose); }
.cb-swatch--size {
	min-width: 3rem; height: 3rem; padding: 0 0.75rem;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--cb-color-border); border-radius: var(--cb-radius);
	background: var(--cb-color-surface); font-size: var(--cb-text-body-md);
	transition: border-color var(--cb-transition-fast), background var(--cb-transition-fast), color var(--cb-transition-fast);
}
.cb-swatch--size.is-active { background: var(--cb-color-text); color: var(--cb-white); border-color: var(--cb-color-text); }
.cb-swatch--size:disabled { color: var(--cb-color-text-faint); text-decoration: line-through; cursor: not-allowed; }

/* ============ Accordion ============ */
.cb-accordion { border-top: 1px solid var(--cb-color-border); }
.cb-accordion:last-child { border-bottom: 1px solid var(--cb-color-border); }
.cb-accordion summary {
	cursor: pointer; padding: 1.1rem 0; display: flex; align-items: center; justify-content: space-between;
	font-size: var(--cb-text-label-md); text-transform: uppercase; letter-spacing: var(--cb-tracking-label-md);
	list-style: none;
}
.cb-accordion summary::-webkit-details-marker { display: none; }
.cb-accordion__content { padding-bottom: 1.1rem; color: var(--cb-color-text-muted); font-size: var(--cb-text-body-md); line-height: 1.7; }

/* ============ Reviews / stars ============ */
.cb-stars { display: inline-flex; gap: 2px; color: var(--cb-color-dusty-rose); }

/* ---- Phones: smaller product names that wrap (up to two lines) instead of being cut off ---- */
@media (max-width: 767px) {
	.cb-product-card__body { padding: 0.75rem; gap: 0.4rem; }
	.cb-product-card__title {
		font-size: 1rem; line-height: 1.25;
		white-space: normal; overflow: hidden; text-overflow: clip;
		display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
		min-height: 2.5em; /* two lines, so every card's price row lines up */
	}
	/* Price and the Select/Add pill share a narrow row; let them wrap rather than truncate the price. */
	.cb-product-card__meta { flex-wrap: wrap; row-gap: 0.4rem; }
	.cb-product-card__meta .cb-product-card__price { overflow: visible; text-overflow: clip; white-space: normal; }
}
