/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SMOUSE STUDIO — PRODUCT CARDS (shared / single source of truth)
   Styles the data-driven product grid that products.js renders on every page.
   Card CONTENT lives in config.js (each product's `card` + price/badge/link).
   Typography here intentionally mirrors the original Carrd card styles (DM Sans /
   DM Mono, em-based sizes) so the cards look exactly as before.

   ── Quick knobs ──
     columns (desktop)      → .sm-products__grid { grid-template-columns }
     columns (mobile)       → the @media block
     gap between cards       → .sm-products__grid { gap }
     card padding / height   → .sm-card { padding / min-height }
     image shape             → .sm-card__media { aspect-ratio }
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.sm-products { width: 100%; }

.sm-products__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);   /* 3 cards per row (desktop/tablet) */
	gap: 0.35rem;                            /* gap between cards */
	align-items: stretch;                    /* equal-height cards per row */
	transition: max-height 0.4s ease;        /* the "wipe down" reveal (height driven by products.js) */
}

/* ── The card ── */
.sm-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 23rem;                       /* equal-size floor — adjust to taste */
	padding: 0.55rem;
	background-color: #131313;
	border: 1px solid #1F1F1F;
	border-radius: 0.5rem;
	box-sizing: border-box;
	--accent: #FD6215;                       /* default badge/tag colour (overridden per card) */
	--hover-zoom-speed: 0.15s;               /* image hover-zoom speed/duration */
}

/* "Blender 3.6 - 5.1+"  (matches Carrd .style-2) */
.sm-card__blender {
	margin: 0 0 0.7em;
	font-family: 'DM Mono', monospace;
	font-size: 0.5em;
	line-height: 0.75;
	font-weight: 400;
	color: #6B6B6B;
	text-align: left;
}

.sm-card__media {
	position: relative;
	display: block;
	border-radius: 0.375rem;
	overflow: hidden;
	aspect-ratio: 2 / 1;                    /* image shape */
	background: #000;
	box-shadow: 0 0 24px 1px var(--glow, transparent);   /* per-product glow (config: card.glow) */
	transition: transform var(--hover-zoom-speed, 0.25s) ease;
}
.sm-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* hover: physically grow the whole image (badge rides along, since it's inside) */
.sm-card__media:hover {
	transform: scale(1.015);
	z-index: 1;                            /* grow above neighbouring cards */
}

.sm-card__badge {
	position: absolute;
	top: 0; right: 0;
	background: #000;
	color: var(--accent);
	font-family: 'DM Mono', monospace;
	font-size: 0.72rem;
	font-weight: 100;
	letter-spacing: 0.08em;
	padding: 0.4em 0.9em;
	border-radius: 0 0 0 6px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.55);
}

/* "SHADER ADDON - CYCLES & EEVEE [BEST SELLER]"  (matches Carrd .instance-67) */
.sm-card__eyebrow {
	margin: 0.9em 0 1.75em;
	font-family: 'DM Mono', monospace;
	font-size: 0.5em;
	line-height: 0.75;
	font-weight: 400;
	color: #6B6B6B;
	text-align: left;
}
.sm-card__tag { color: var(--accent); font-weight: 700; }

/* Product title  (matches Carrd .instance-45) */
.sm-card__title {
	margin-top: 1.0rem;
	margin: 0 0 0.4em;
	font-family: 'DM Sans', sans-serif;
	font-size: 1.25em;
	line-height: 0.75;
	font-weight: 700;
	color: #FFFFFF;
	text-align: left;
}

/* Description  (matches Carrd .instance-46) */
.sm-card__desc {
	margin: 0;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.625em;
	line-height: 1.5;
	font-weight: 400;
	color: #6B6B6B;
	text-align: left;
}
.sm-card__desc strong { color: #E35300; }    /* the bold tagline reads orange (Carrd --smouse-orange) */

/* ── Bottom group: pushed down so price + button line up across the row ── */
.sm-card__foot {
	margin-top: auto;                        /* dynamic blank space above (replaces the old divider hack) */
	padding-top: 0.9rem;
}
/* Price  (matches Carrd .style-1) */
.sm-card__price {
	margin: 0 0 0.7rem;
	border-top: 1px solid #262626;           /* the thin line above the price */
	padding-top: 0.7rem;
	font-family: 'DM Sans', sans-serif;
	font-size: 1em;
	line-height: 0.75;
	font-weight: 700;
	color: #FFFFFF;
	text-align: left;
}
/* View Product button  (matches Carrd .buttons-component.style-1, made full-width) */
.sm-card__btn {
	display: block;
	width: 100%;
	text-align: center;
	height: 1.5rem;
	line-height: 1.5rem;
	padding: 0 0.75rem;
	background-color: #E35300;
	color: #FFFFFF;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.625em;
	font-weight: 700;
	border-radius: 3rem;
	text-decoration: none;
	box-shadow: 0 0 0.75rem 0 #662310;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: transform 0.25s ease, background-color 0.25s ease;
}
.sm-card__btn:hover { background-color: #C74522; transform: scale(1.025); }
.sm-card__btn.is-disabled {
	background-color: #2a2a2a;
	color: #8a8a8a;
	box-shadow: none;
	cursor: default;
	pointer-events: none;
}

/* ── "Show All Products" toggle ── */
.sm-products__more { text-align: center; margin-top: 1.1rem; }
.sm-products__toggle {
	background: none;
	border: none;
	padding: 0;
	color: #E35300;
	font-family: 'DM Sans', sans-serif;
	font-weight: 700;
	font-size: 0.7em;
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
}
.sm-products__toggle:hover { text-decoration: underline; }

/* Collapse is handled by products.js (animated max-height), which clips the grid
   to its first row when collapsed — no display:none, so all cards stay in one grid
   (no orphan gaps) and the reveal can animate. */

/* ── Responsive: 2 columns on mobile ── */
@media (max-width: 720px) {
	.sm-products__grid { grid-template-columns: repeat(2, 1fr); }
	.sm-card { min-height: 0; }              /* let cards size naturally when narrow */
}
