/* CC Raffles — dark-first, tuned to the Schaefer Defense navy/red/blue palette.
   Overridable via custom properties. */
:root {
	--ccr-accent: #d24034;
	--ccr-accent-hover: #e85a4c;
	--ccr-accent-2: #ff7a45;
	--ccr-blue: #38aee8;
	--ccr-bg: transparent;
	--ccr-card-bg: #101a2c;
	--ccr-card-border: #1e2c44;
	--ccr-text: #f2f5fa;
	--ccr-text-dim: #9aa7bd;
	--ccr-progress-track: #1a2438;
	--ccr-badge-active: #2e7d32;
	--ccr-badge-soon: #ef6c00;
	--ccr-badge-drawn: #1565c0;
	--ccr-badge-ended: #555;
	--ccr-glow: 0 0 24px rgba(210, 64, 52, .35);
}

@keyframes ccr-shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(400%); }
}
@keyframes ccr-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, .55); }
	60% { box-shadow: 0 0 0 8px rgba(46, 125, 50, 0); }
}
@keyframes ccr-glowpulse {
	0%, 100% { text-shadow: 0 0 12px rgba(56, 174, 232, .55); }
	50% { text-shadow: 0 0 26px rgba(56, 174, 232, .95); }
}

/* ---------- Page wrapper / hero / how-it-works ---------- */
.ccr-page { color: var(--ccr-text); }
.ccr-hero { text-align: center; padding: 3.5rem 1rem 2.5rem; position: relative; }
.ccr-hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(210, 64, 52, .16), transparent 70%);
}
.ccr-hero__kicker {
	text-transform: uppercase; letter-spacing: .35em; font-size: .8rem;
	color: var(--ccr-blue); margin: 0 0 .75rem; font-weight: 700;
}
.ccr-hero__title {
	font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 1rem;
	font-weight: 900; letter-spacing: .02em; text-transform: uppercase;
}
.ccr-hero__title span {
	color: var(--ccr-accent);
	text-shadow: 0 0 30px rgba(210, 64, 52, .55);
}
.ccr-hero__sub { max-width: 640px; margin: 0 auto; color: var(--ccr-text-dim); font-size: 1.05rem; }

.ccr-how { margin: 3.5rem 0; text-align: center; }
.ccr-how h2, .ccr-pastwinners h2 { font-size: 1.8rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 1.5rem; }
.ccr-how__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; text-align: left; }
@media (max-width: 800px) { .ccr-how__steps { grid-template-columns: 1fr; } }
.ccr-how__step {
	background: var(--ccr-card-bg); border: 1px solid var(--ccr-card-border);
	border-radius: 12px; padding: 1.5rem; position: relative;
}
.ccr-how__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.4em; height: 2.4em; border-radius: 50%;
	background: linear-gradient(135deg, var(--ccr-accent), var(--ccr-accent-2));
	color: #fff; font-weight: 900; font-size: 1.05rem; margin-bottom: .75rem;
	box-shadow: var(--ccr-glow);
}
.ccr-how__step h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.ccr-how__step p { margin: 0; color: var(--ccr-text-dim); font-size: .95rem; }
.ccr-how__fine { margin: 1.75rem auto 0; max-width: 720px; color: var(--ccr-text-dim); font-size: .8rem; }
.ccr-pastwinners { margin: 3.5rem 0 2rem; }
.ccr-pastwinners h2 { text-align: center; }
.ccr-pastwinners .ccr-empty { text-align: center; }

/* ---------- Grid ---------- */
/* Capped track widths + justify-content:center keep partial rows centered
   (one active raffle shouldn't hug the left edge under a centered heading). */
/* Flexbox, not CSS grid: fixed grid tracks fill the row whether cards
   exist or not, so a lone raffle card parks left. Flex centers partial
   rows under the centered headings while capping cards per row. */
.ccr-grid { display: flex; flex-wrap: wrap; gap: 1.4rem; background: var(--ccr-bg); justify-content: center; }
.ccr-grid--cols-2 > .ccr-card { flex: 0 1 calc((100% - 1.4rem) / 2); max-width: 480px; }
.ccr-grid--cols-3 > .ccr-card { flex: 0 1 calc((100% - 2.8rem) / 3); max-width: 420px; }
.ccr-grid--cols-4 > .ccr-card { flex: 0 1 calc((100% - 4.2rem) / 4); max-width: 340px; }
@media (max-width: 900px) {
	.ccr-grid--cols-3 > .ccr-card, .ccr-grid--cols-4 > .ccr-card { flex-basis: calc((100% - 1.4rem) / 2); max-width: 420px; }
}
@media (max-width: 600px) {
	.ccr-grid--cols-2 > .ccr-card, .ccr-grid--cols-3 > .ccr-card, .ccr-grid--cols-4 > .ccr-card { flex-basis: 100%; max-width: 420px; }
}

.ccr-card {
	background: var(--ccr-card-bg);
	border: 1px solid var(--ccr-card-border);
	border-radius: 14px;
	overflow: hidden;
	color: var(--ccr-text);
	display: flex; flex-direction: column;
	position: relative;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ccr-card::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
	background: linear-gradient(90deg, var(--ccr-accent), var(--ccr-accent-2), var(--ccr-blue));
}
.ccr-card:hover { transform: translateY(-4px); box-shadow: var(--ccr-glow); border-color: var(--ccr-accent); }
.ccr-card__media { display: block; aspect-ratio: 16 / 10; background: #fff; }
.ccr-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ccr-card__body { padding: 1.1rem 1.2rem 1.35rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.ccr-card__title { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.ccr-card__title a { color: var(--ccr-text); text-decoration: none; }
.ccr-card__title a:hover { color: var(--ccr-accent-hover); }
.ccr-card__price { font-size: 1.35rem; font-weight: 800; color: var(--ccr-blue); }
.ccr-card__price span { font-size: .8rem; font-weight: 400; color: var(--ccr-text-dim); }
.ccr-card .ccr-btn { margin-top: auto; }

/* ---------- Badges ---------- */
.ccr-badge {
	display: inline-block; align-self: flex-start;
	font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
	color: #fff; border-radius: 999px; padding: .3em 1em;
}
.ccr-badge--active { background: var(--ccr-badge-active); animation: ccr-pulse 2.2s ease-out infinite; }
.ccr-badge--soon { background: var(--ccr-badge-soon); }
.ccr-badge--drawn { background: var(--ccr-badge-drawn); }
.ccr-badge--ended { background: var(--ccr-badge-ended); }

/* ---------- Progress ---------- */
.ccr-progress__track { height: 12px; border-radius: 999px; background: var(--ccr-progress-track); overflow: hidden; position: relative; }
.ccr-progress__min {
	position: absolute; top: 0; bottom: 0; width: 3px; z-index: 2;
	background: var(--ccr-blue); border-radius: 2px;
	box-shadow: 0 0 6px rgba(56, 174, 232, 0.8);
}
.ccr-progress__minlabel { color: var(--ccr-blue); }
.ccr-draw-terms__date { margin: 0 0 .3rem; font-size: 1.05rem; }
.ccr-draw-terms__rules { margin: 0; padding-left: 1.2em; color: var(--ccr-text-dim); font-size: .9rem; }
.ccr-draw-terms__rules li { margin: 0 0 .25rem; }
.ccr-progress__fill {
	height: 100%; border-radius: 999px; position: relative; overflow: hidden;
	background: linear-gradient(90deg, var(--ccr-accent), var(--ccr-accent-2));
	transition: width .4s ease;
}
.ccr-progress__fill::after {
	content: ""; position: absolute; top: 0; bottom: 0; width: 30%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
	animation: ccr-shimmer 2.4s ease-in-out infinite;
}
.ccr-progress__label { font-size: .85rem; color: var(--ccr-text-dim); margin-top: .4rem; font-weight: 600; }

/* ---------- Countdown ---------- */
.ccr-countdown {
	font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.25rem;
	color: var(--ccr-blue); letter-spacing: .04em;
	animation: ccr-glowpulse 2.5s ease-in-out infinite;
}
.ccr-countdown:empty { display: none; }

/* ---------- Buttons ---------- */
.ccr-btn {
	display: inline-block; text-align: center; cursor: pointer;
	background: linear-gradient(135deg, var(--ccr-accent), var(--ccr-accent-2));
	color: #fff !important;
	border: 0; border-radius: 8px; padding: .8em 1.6em;
	font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
	text-decoration: none !important;
	transition: transform .15s ease, box-shadow .15s ease;
}
.ccr-btn:hover, .ccr-btn:focus, .ccr-btn:active, .ccr-btn:visited {
	text-decoration: none !important;
}
.ccr-btn:hover { transform: translateY(-1px); box-shadow: var(--ccr-glow); }

/* ---------- Detail block ---------- */
.ccr-detail { color: var(--ccr-text); display: flex; flex-direction: column; gap: .85rem; }
.ccr-draw-terms { color: var(--ccr-text-dim); margin: 0; }
.ccr-eligibility { color: #ef9a9a; font-size: .9rem; margin: 0; }
.ccr-final-note, .ccr-cap-note { color: var(--ccr-text-dim); font-size: .85rem; margin: 0; }
.ccr-buy { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.ccr-buy__qty { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--ccr-text-dim); }
.ccr-buy__qty input {
	width: 5.5em; background: #0a1322; color: var(--ccr-text);
	border: 1px solid var(--ccr-card-border); border-radius: 8px; padding: .6em .65em; font-size: 1rem;
}
.ccr-rules summary { cursor: pointer; font-weight: 700; }
.ccr-rules div { color: var(--ccr-text-dim); font-size: .9rem; }

/* ---------- Winner banner ---------- */
.ccr-winner-banner {
	background: linear-gradient(135deg, rgba(21, 101, 192, .18), rgba(56, 174, 232, .08));
	border: 1px solid var(--ccr-badge-drawn);
	border-radius: 10px; padding: .85rem 1.1rem; line-height: 1.55;
}

/* ---------- Winners page ---------- */
.ccr-winners { display: flex; flex-direction: column; gap: 1.3rem; color: var(--ccr-text); }
.ccr-winners__row {
	display: flex; gap: 1.3rem; align-items: flex-start;
	background: var(--ccr-card-bg); border: 1px solid var(--ccr-card-border);
	border-radius: 14px; padding: 1.2rem;
	border-left: 4px solid var(--ccr-blue);
}
.ccr-winners__media img { border-radius: 8px; display: block; }
.ccr-winners__info { flex: 1; display: flex; flex-direction: column; gap: .55rem; }
.ccr-winners__info h4 { margin: 0; font-size: 1.1rem; }
.ccr-winners__method { color: var(--ccr-text-dim); font-size: .78rem; margin: 0; }
.ccr-drawlog summary { cursor: pointer; font-size: .85rem; color: var(--ccr-text-dim); }
@media (max-width: 600px) { .ccr-winners__row { flex-direction: column; } }

/* ---------- My Tickets ---------- */
.ccr-mytickets { display: flex; flex-direction: column; gap: 1.3rem; }
.ccr-mytickets__raffle {
	background: var(--ccr-card-bg); border: 1px solid var(--ccr-card-border);
	border-radius: 14px; padding: 1.3rem; color: var(--ccr-text);
	position: relative; overflow: hidden;
}
.ccr-mytickets__raffle::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
	background: linear-gradient(90deg, var(--ccr-accent), var(--ccr-accent-2), var(--ccr-blue));
}
.ccr-mytickets__raffle--won { border-color: var(--ccr-blue); box-shadow: 0 0 28px rgba(56, 174, 232, .25); }
.ccr-mytickets__raffle h3 { margin: 0 0 .6rem; font-size: 1.12rem; }
.ccr-mytickets__raffle h3 a { color: var(--ccr-text); text-decoration: none; }
.ccr-mytickets__raffle h3 a:hover { color: var(--ccr-accent-hover); }
.ccr-mytickets__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.ccr-chip {
	display: inline-block; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem;
	background: #0a1322; border: 1px solid var(--ccr-card-border);
	border-radius: 999px; padding: .25em .8em;
}
.ccr-chip--win { border-color: var(--ccr-blue); color: var(--ccr-blue); box-shadow: 0 0 10px rgba(56, 174, 232, .4); }
.ccr-chip--void, .ccr-chip--forfeited { color: var(--ccr-text-dim); text-decoration: line-through; }
.ccr-mytickets__odds { color: var(--ccr-text-dim); font-size: .85rem; margin: 0 0 .6rem; }
.ccr-mytickets__result { color: var(--ccr-text-dim); margin: .35rem 0 0; }
.ccr-mytickets .ccr-btn { margin-top: .6rem; }

.ccr-empty { color: var(--ccr-text-dim); }

/* ---------- Single raffle product page ---------- */
.ccr-product { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.ccr-product__crumb { margin: 0 0 1.25rem; }
.ccr-product__crumb a { color: var(--ccr-text-dim); text-decoration: none; font-size: .9rem; }
.ccr-product__crumb a:hover { color: var(--ccr-accent-hover); }
.ccr-product__layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .ccr-product__layout { grid-template-columns: 1fr; } }
.ccr-product__media {
	background: #fff; border: 1px solid var(--ccr-card-border);
	border-radius: 16px; overflow: hidden; position: relative;
}
.ccr-product__media::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 1;
	background: linear-gradient(90deg, var(--ccr-accent), var(--ccr-accent-2), var(--ccr-blue));
}
.ccr-product__img, .ccr-product__noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.ccr-product__panel {
	background: var(--ccr-card-bg); border: 1px solid var(--ccr-card-border);
	border-radius: 16px; padding: 1.75rem; color: var(--ccr-text);
	box-shadow: 0 0 40px rgba(210, 64, 52, .08);
}
.ccr-product__title { margin: 0 0 .5rem; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; font-weight: 900; }
.ccr-product__price { font-size: 1.7rem; font-weight: 800; color: var(--ccr-blue); margin: 0 0 1rem; }
.ccr-product__price span { font-size: .85rem; font-weight: 400; color: var(--ccr-text-dim); }

.ccr-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2.5rem 0; }
@media (max-width: 800px) { .ccr-trust { grid-template-columns: 1fr; } }
.ccr-trust__item {
	background: var(--ccr-card-bg); border: 1px solid var(--ccr-card-border);
	border-left: 3px solid var(--ccr-blue); border-radius: 10px; padding: 1rem 1.2rem;
	display: flex; flex-direction: column; gap: .3rem; color: var(--ccr-text);
}
.ccr-trust__item strong { font-size: .95rem; }
.ccr-trust__item span { color: var(--ccr-text-dim); font-size: .85rem; }
.ccr-trust__item a { color: var(--ccr-blue); }

.ccr-product__desc { color: var(--ccr-text); margin: 2.5rem 0; }
.ccr-product__desc h2, .ccr-product__more h2 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .05em; }
/* Copied product descriptions often carry inline colors from distributor
   feeds — neutralize them so the dark theme stays uniform. */
.ccr-product__desc p,
.ccr-product__desc li,
.ccr-product__desc span,
.ccr-product__desc td,
.ccr-product__desc div,
.ccr-product__desc font {
	color: var(--ccr-text-dim) !important;
	background: transparent !important;
}
.ccr-product__desc h2,
.ccr-product__desc h3,
.ccr-product__desc h4,
.ccr-product__desc strong,
.ccr-product__desc b {
	color: var(--ccr-text) !important;
	background: transparent !important;
}
.ccr-product__more { margin: 2.5rem 0 0; }
.ccr-product__more .ccr-empty { text-align: left; }
