/* Sunscope Stripe Shop — styled for Sunscope Cinema Pro, with fallbacks */
.sss-grid,
.sss-modal,
.sss-buy,
.sss-thanks {
	--sss-red: var(--c-red, #c8102e);
	--sss-red-hover: var(--c-red-hover, #e01836);
	--sss-surface: var(--c-surface-2, #171717);
	--sss-border: var(--c-border, rgba(255,255,255,.1));
	--sss-text: var(--c-text, #f0efec);
	--sss-muted: rgba(240,239,236,.68);
	--sss-display: var(--font-display, inherit);
	--sss-radius: var(--card-radius, 6px);
}

/* Grid */
.sss-grid {
	display: grid;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	margin: 2rem 0;
	grid-template-columns: 1fr;
}
@media (min-width: 640px) {
	.sss-grid--2, .sss-grid--3, .sss-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
	.sss-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sss-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sss-grid--1 { max-width: 460px; }

/* Card */
.sss-card {
	display: flex;
	flex-direction: column;
	background: var(--sss-surface);
	border: 1px solid var(--sss-border);
	border-radius: var(--sss-radius);
	overflow: hidden;
	color: var(--sss-text);
	transition: border-color .2s ease, transform .2s ease;
}
.sss-card:hover { border-color: rgba(255,255,255,.22); transform: translateY(-2px); }
.sss-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: #0d0d0d; }
.sss-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0 !important; }
.sss-card__body { padding: 1.4rem 1.4rem .5rem; flex: 1; }
.sss-card__title {
	font-family: var(--sss-display);
	font-size: clamp(1.25rem, 2vw, 1.55rem);
	line-height: 1.15;
	margin: 0 0 .35rem;
	color: var(--sss-text);
}
.sss-card__price { color: var(--sss-red); font-weight: 600; font-size: .95rem; margin: 0 0 .9rem; }
.sss-card__text { color: var(--sss-muted); font-size: .92rem; line-height: 1.65; margin: 0 0 .75rem; }
.sss-card__more { font-size: .88rem; color: var(--sss-muted); margin-bottom: .5rem; }
.sss-card__more summary { cursor: pointer; color: var(--sss-text); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; font-size: .72rem; }
.sss-card__more div { padding-top: .6rem; line-height: 1.6; }
.sss-card__more ul { padding-left: 1.1rem; margin: .4rem 0; }
.sss-card__foot { padding: 1rem 1.4rem 1.4rem; }

/* Buttons */
.sss-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4em;
	padding: .8rem 1.4rem;
	border: 0;
	border-radius: 4px;
	background: var(--sss-red, #c8102e);
	color: #fff !important;
	font: inherit;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}
.sss-btn:hover { background: var(--sss-red-hover, #e01836); }
.sss-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sss-btn[disabled] { opacity: .65; cursor: progress; }
.sss-btn--block { width: 100%; }
.sss-btn--disabled { background: transparent; border: 1px solid var(--sss-border, rgba(255,255,255,.2)); color: var(--sss-muted, #aaa) !important; cursor: default; }
.sss-card__foot .sss-btn { width: 100%; }

/* Inline buy */
.sss-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.sss-buy__price { font-weight: 600; color: var(--sss-text); }

/* Modal */
html.sss-lock { overflow: hidden; }
.sss-modal[hidden] { display: none; }
.sss-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 1rem; }
.sss-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.sss-modal__panel {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	background: var(--sss-surface);
	border: 1px solid var(--sss-border);
	border-radius: var(--sss-radius);
	padding: 2rem 1.75rem 1.5rem;
	color: var(--sss-text);
	box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.sss-modal__x { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; color: var(--sss-muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .25rem; }
.sss-modal__x:hover { color: #fff; }
.sss-modal__eyebrow { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sss-red); margin: 0 0 .4rem; }
.sss-modal__title { font-family: var(--sss-display); font-size: 1.5rem; line-height: 1.15; margin: 0 0 .25rem; color: var(--sss-text); }
.sss-modal__price { color: var(--sss-muted); margin: 0 0 1.25rem; font-size: .92rem; }

.sss-form label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--sss-text); margin-bottom: .9rem; }
.sss-form label span { text-transform: none; font-weight: 400; color: var(--sss-muted); letter-spacing: 0; }
.sss-form input,
.sss-form textarea {
	display: block;
	width: 100%;
	margin-top: .35rem;
	padding: .7rem .8rem;
	background: #0d0d0d;
	border: 1px solid var(--sss-border);
	border-radius: 4px;
	color: var(--sss-text);
	font: inherit;
	font-size: 1rem; /* 16px stops iOS zoom on focus */
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}
.sss-form input:focus,
.sss-form textarea:focus { outline: none; border-color: var(--sss-red); }
.sss-form textarea { resize: vertical; min-height: 90px; }
.sss-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sss-form__error { background: rgba(200,16,46,.12); border: 1px solid rgba(200,16,46,.4); color: #ffb3bf; padding: .6rem .8rem; border-radius: 4px; font-size: .88rem; margin: 0 0 .9rem; }
.sss-form__note { font-size: .78rem; color: var(--sss-muted); text-align: center; margin: .8rem 0 0; }

/* Thank you */
.sss-thanks { max-width: 640px; margin: 3rem auto; padding: 0 1rem; color: var(--sss-text); }
.sss-thanks__eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sss-red); margin: 0 0 .5rem; }
.sss-thanks h2 { font-family: var(--sss-display); font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 1.25rem; }
.sss-thanks__summary { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; padding: 1.25rem; border: 1px solid var(--sss-border); border-radius: var(--sss-radius); background: var(--sss-surface); margin: 0 0 1.25rem; }
.sss-thanks__summary dt { color: var(--sss-muted); font-size: .85rem; }
.sss-thanks__summary dd { margin: 0; font-weight: 600; }
.sss-thanks p { color: var(--sss-muted); line-height: 1.7; }

.sss-empty { padding: 1rem; border: 1px dashed rgba(255,255,255,.2); color: #aaa; }

/* Ghost button */
.sss-btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.3); }
.sss-btn--ghost:hover { background: rgba(255,255,255,.08); }

/* Rent button */
.sss-rent { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1.25rem 0; }
.sss-rent__note { font-size: .78rem; color: rgba(240,239,236,.6); }

/* Rental player */
.sss-player { margin: 1.5rem 0 2rem; scroll-margin-top: 110px; }
.sss-player[hidden] { display: none; }
.sss-player__frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; }
.sss-player__frame iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; margin: 0 !important; }
.sss-player__note { font-size: .8rem; color: rgba(240,239,236,.65); margin: .6rem 0 0; }

/* My Rentals */
.sss-library { max-width: 860px; margin: 2rem 0; color: var(--c-text, #f0efec); }
.sss-library__list { list-style: none; margin: 0; padding: 0; }
.sss-library__item { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.sss-library__item img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; margin: 0 !important; flex-shrink: 0; }
.sss-library__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.sss-library__text span { font-size: .85rem; color: rgba(240,239,236,.65); }
.sss-library__empty, .sss-library__login { color: rgba(240,239,236,.7); }
.sss-library__login a { color: var(--c-red, #c8102e); }
@media (max-width: 560px) {
	.sss-library__item { flex-wrap: wrap; }
	.sss-library__item .sss-btn { width: 100%; }
}
.sss-form__notes[hidden] { display: none; }
