/**
 * Cloud 9 Club — Current Product Sections: Public Card Styles
 *
 * Minimal CSS for [cloud9_current_product_sections] shortcode output.
 * Inherits Madhaus palette variables from cloud9.css where available.
 * Standalone-safe: uses explicit fallback values throughout.
 *
 * @package Cloud9Club
 * @since   2.5.0
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */

.c9-ps-wrap {
	margin: 0 0 2.5rem;
}

/* ── Section block ────────────────────────────────────────────────────────── */

.c9-ps-section {
	margin-bottom: 2.5rem;
}

.c9-ps-section__header {
	margin-bottom: 1rem;
}

.c9-ps-section__title {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--c9-lime, #c8ff1e);
	margin: 0 0 0.2rem;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.c9-ps-section__subtitle {
	font-size: 0.9rem;
	color: var(--c9-text-muted, #a0a0b8);
	margin: 0;
}

/* ── Product grid ─────────────────────────────────────────────────────────── */

.c9-ps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ── Product card ─────────────────────────────────────────────────────────── */

.c9-ps-card {
	display: flex;
	flex-direction: column;
	background: var(--c9-card-bg, #0f0f1a);
	border: 1px solid var(--c9-border, #1e1e36);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.c9-ps-card:hover {
	border-color: var(--c9-lime, #c8ff1e);
	transform: translateY(-2px);
}

/* Image */

.c9-ps-card__img-wrap {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--c9-surface, #0a0a12);
}

.c9-ps-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.c9-ps-card__img--placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--c9-text-muted, #a0a0b8);
	font-size: 2.5rem;
	background: var(--c9-surface, #0a0a12);
}

/* Sale ribbon */

.c9-ps-card__sale-ribbon {
	position: absolute;
	top: 8px;
	right: 8px;
	background: var(--c9-magenta, #ff2d95);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 2px 6px;
	border-radius: 3px;
	line-height: 1.4;
}

/* Body */

.c9-ps-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 0.75rem;
	gap: 0.35rem;
}

.c9-ps-card__title {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--c9-text, #e8e8f0);
	margin: 0;
	line-height: 1.35;
}

.c9-ps-card__note {
	font-size: 0.78rem;
	color: var(--c9-text-muted, #a0a0b8);
	margin: 0;
	line-height: 1.4;
}

/* Price — WC-formatted output */

.c9-ps-card__price {
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--c9-gold, #ffb020);
	margin: 0;
	line-height: 1.3;
}

/* Strip WooCommerce's inline color from del/ins so palette overrides work */
.c9-ps-card__price del {
	color: var(--c9-text-muted, #a0a0b8);
	font-weight: 400;
	font-size: 0.8em;
	margin-right: 4px;
}

.c9-ps-card__price ins {
	text-decoration: none;
	color: var(--c9-magenta, #ff2d95);
}

.c9-ps-card__pricing-note {
	font-size: 0.75rem;
	color: var(--c9-text-muted, #a0a0b8);
	margin: 0;
	line-height: 1.4;
	font-style: italic;
}

/* Stock labels */

.c9-ps-card__stock {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0;
	line-height: 1;
}

.c9-ps-stock--instock {
	color: var(--c9-lime, #c8ff1e);
}

.c9-ps-stock--lowstock {
	color: var(--c9-gold, #ffb020);
}

.c9-ps-stock--outofstock {
	color: var(--c9-text-muted, #a0a0b8);
}

/* CTA button — pushed to bottom of card */

.c9-ps-card__btn-wrap {
	margin-top: auto;
	padding-top: 0.5rem;
}

.c9-ps-card__btn {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--c9-lime, #c8ff1e);
	color: #070708 !important;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.5rem 0.75rem;
	border-radius: 5px;
	text-decoration: none !important;
	border: none;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
	line-height: 1.4;
}

.c9-ps-card__btn:hover,
.c9-ps-card__btn:focus {
	background: #d9ff3a;
	color: #070708 !important;
	text-decoration: none !important;
	opacity: 0.92;
}

/* ── Compliance / access-restricted placeholder ───────────────────────────── */

.c9-ps-section--restricted .c9-ps-restricted-msg {
	background: var(--c9-surface, #0a0a12);
	border: 1px solid var(--c9-border, #1e1e36);
	border-left: 3px solid var(--c9-gold, #ffb020);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	color: var(--c9-text-muted, #a0a0b8);
	font-size: 0.88rem;
	line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

/* Tablet: two columns minimum */
@media (max-width: 768px) {
	.c9-ps-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}
}

/* Mobile: honour natural flow; prevent cards from going too narrow */
@media (max-width: 480px) {
	.c9-ps-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

	.c9-ps-card__body {
		padding: 0.6rem;
	}

	.c9-ps-card__title {
		font-size: 0.82rem;
	}

	.c9-ps-section__title {
		font-size: 1.1rem;
	}
}

/* Very narrow: single column */
@media (max-width: 320px) {
	.c9-ps-grid {
		grid-template-columns: 1fr;
	}
}
