/* Coupon Cards — card */
.cpc-grid {
	--cpc-accent: #0b7a70;
	--cpc-accent-light: #14a699;
	--cpc-deal: #16a085;
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 8px 0 32px;
	font-family: inherit;
	container-type: inline-size;
	container-name: cpc;
}
.cpc-grid *, .cpc-grid *::before, .cpc-grid *::after { box-sizing: border-box; }
.cpc {
	position: relative;
	overflow: hidden;
	border: 1px solid #e6e9ee;
	border-radius: 18px;
	background: #fff;
	color: #15171c;
	box-shadow: 0 10px 30px rgba(20, 30, 40, 0.07);
	line-height: 1.4;
	transition: transform 0.3s, box-shadow 0.3s;
}
.cpc:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(20, 30, 40, 0.12); }
.cpc-body {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 290px;
	gap: 26px;
	align-items: center;
	padding: 22px 24px;
}
.cpc-logo {
	width: 150px;
	height: 150px;
	border: 1px solid #e8edf2;
	border-radius: 16px;
	background: #f6f8fb;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 14px;
}
.cpc-logo img { width: 100% !important; height: 100% !important; max-width: none; object-fit: contain; margin: 0 !important; border: 0; border-radius: 0; box-shadow: none; }
.cpc-logo-text { font-size: 15px; font-weight: 800; letter-spacing: 2px; color: #15171c; text-align: center; word-break: break-word; }
.cpc-mid { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.cpc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.cpc-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; }
.cpc-tag-pop { background: #fff1ec; color: #e5512b; text-transform: uppercase; letter-spacing: 0.5px; }
.cpc-tag-ver { background: #e8f7f2; color: #11845b; }
.cpc-title { font-size: 23px; line-height: 1.25; font-weight: 700; color: #15171c; }
.cpc-desc { font-size: 15px; line-height: 1.55; color: #5b6070; }
.cpc-right { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.cpc-btn {
	position: relative;
	display: block;
	width: 100%;
	height: 54px;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none !important;
	box-shadow: none !important;
}
.cpc-peel {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 18px;
	border: 2px dashed var(--cpc-accent);
	border-radius: 14px;
	background: #eefaf8;
	color: var(--cpc-accent);
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 2px;
}
.cpc-face {
	position: absolute;
	top: 0; bottom: 0; left: 0; right: 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px 0 0 14px;
	background: linear-gradient(135deg, var(--cpc-accent-light), var(--cpc-accent));
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.6px;
	clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
	transition: right 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cpc-btn.is-code:hover .cpc-face { right: 88px; }
.cpc-btn.is-deal .cpc-face { right: 0; border-radius: 14px; clip-path: none; background: var(--cpc-deal); transition: filter 0.25s; }
.cpc-btn.is-deal:hover .cpc-face { filter: brightness(0.92); }
.cpc-exp { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; color: #6b7080; }
.cpc-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 12px 24px;
	border-top: 1px solid #eef0f3;
	font-size: 13px;
	color: #7a7f8c;
}
.cpc-share, .cpc-votes { display: flex; align-items: center; gap: 8px; }
.cpc-foot-label { margin-right: 2px; }
.cpc-sh {
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 9px;
	background: #f1f3f6;
	color: #2b2e36 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background 0.2s, transform 0.2s;
}
.cpc-sh:hover { background: #e4e7ec; transform: translateY(-1px); }
.cpc-sh-fb { color: #3b5998 !important; }
.cpc-sh.is-done { background: #dcfce7; color: #16a34a !important; }
.cpc-vote {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 0;
	padding: 5px 12px;
	border: 1px solid #e3e6eb;
	border-radius: 999px;
	background: #fff !important;
	color: #2b2e36 !important;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	transition: border-color 0.2s, background 0.2s;
}
.cpc-vote:hover { border-color: #c9ced6; background: #f7f8fa !important; }
.cpc-vote:disabled { cursor: default; opacity: 0.5; }
.cpc-vote.is-chosen { opacity: 1; border-color: var(--cpc-accent); background: #eefaf8 !important; }
.cpc-score { display: inline-flex; align-items: center; gap: 8px; }
.cpc-meter { width: 80px; height: 6px; border-radius: 9px; background: #eceef2; overflow: hidden; margin-left: 4px; }
.cpc-meter i { display: block; height: 100%; background: #16a34a; border-radius: 9px; transition: width 0.4s; }
.cpc-pct { font-weight: 600; color: #4b5060; min-width: 34px; }

/* Sizes follow the width of the content column, not the screen, so cards fit any theme. */
@container cpc (max-width: 860px) {
	.cpc-body { grid-template-columns: 120px minmax(0, 1fr); gap: 20px; }
	.cpc-logo { width: 120px; height: 120px; }
	.cpc-right { grid-column: 1 / -1; }
}
@container cpc (max-width: 520px) {
	.cpc { border-radius: 16px; }
	.cpc-body { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; padding: 22px 18px 16px; }
	.cpc-logo { width: 110px; height: 110px; }
	.cpc-mid { align-items: center; }
	.cpc-tags { justify-content: center; }
	.cpc-title { font-size: 19px; }
	.cpc-desc { font-size: 14px; }
	.cpc-right { width: 100%; }
	.cpc-foot { justify-content: center; padding: 12px 14px; }
	.cpc-share, .cpc-votes { flex-wrap: wrap; justify-content: center; }
	.cpc-meter { width: 60px; }
}
@media (max-width: 640px) {
	.cpc-grid { gap: 14px; }
}

/* Pop-up */
.cpc-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(17, 18, 22, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	font-family: inherit;
}
.cpc-pop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
	max-width: 520px;
	padding: 30px 26px 24px;
	border-radius: 16px;
	background: #fff;
	color: #1a1a1a;
	text-align: center;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	animation: cpcIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cpc-pop *, .cpc-pop *::before, .cpc-pop *::after { box-sizing: border-box; }
.cpc-pop-close { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f3f3f7; color: #1a1a1a; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.cpc-pop-store { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #6b7080; }
.cpc-pop-title { font-size: 22px; font-weight: 800; line-height: 1.25; }
.cpc-pop-hint { font-size: 14px; line-height: 1.5; color: #6b7080; }
.cpc-pop-code {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 8px 8px 18px;
	border: 2px dashed var(--cpc-accent, #0b7a70);
	border-radius: 16px;
	background: #eefaf8;
}
.cpc-pop-codetext { flex: 1; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; font-weight: 800; letter-spacing: 2px; color: var(--cpc-accent, #0b7a70); word-break: break-all; }
.cpc-pop-copy { flex: none; height: 46px; padding: 0 20px; border: 0; border-radius: 11px; background: var(--cpc-accent, #0b7a70); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; transition: background 0.2s; }
.cpc-pop-copy.is-copied { background: #16a34a; }
.cpc-pop-check { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: #16a34a; animation: cpcCheck 0.5s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.cpc-pop-deal { font-size: 16px; color: #16a34a; }
.cpc-pop-go { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; margin-top: 6px; border-radius: 14px; background: #111216; color: #fff !important; font-size: 15px; font-weight: 800; text-decoration: none !important; }
.cpc-pop-go:hover { background: #2a2c33; }
.cpc-pop-note { font-size: 12px; color: #8a8f9c; }
@keyframes cpcIn { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
@keyframes cpcCheck { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
	.cpc, .cpc-face, .cpc-pop, .cpc-pop-check { animation: none; transition: none; }
}
