/* ==========================================================================
   Loyalty Cards — shared visual language across My Cards, Thank-you,
   Checkout widget, and the All Cards collection page.
   Minimal font sizes, no oversized padding, fully responsive grid.
   ========================================================================== */

.lc-wrap, .lc-ty-wrap, .lc-collection-wrap {
	max-width: 960px;
	margin: 0 auto;
	box-sizing: border-box;
}
.lc-checkout-widget {
	width: 100%;
	max-width: 100%;
	margin: 0 0 22px;
	box-sizing: border-box;
}
.lc-wrap *, .lc-ty-wrap *, .lc-checkout-widget *, .lc-collection-wrap * {
	box-sizing: border-box;
}

/* ---------------- Progress bar ---------------- */
.lc-progress2 { margin-bottom: 16px; }
.lc-progress2-bar {
	background: #ececec;
	border-radius: 20px;
	height: 10px;
	overflow: hidden;
}
.lc-progress2-fill {
	background: linear-gradient(90deg, #ff7a18, #e0245e);
	height: 100%;
	transition: width .4s ease;
}
.lc-progress2-label {
	text-align: center;
	font-size: 12.5px;
	font-weight: 600;
	color: #444;
	margin: 6px 0 0;
}

/* ---------------- Redeem button ---------------- */
.lc-redeem-btn {
	display: block;
	margin: 0 auto 16px;
	padding: 10px 22px;
	font-size: 13.5px;
	border-radius: 30px;
	border: none;
	background: linear-gradient(90deg, #ff7a18, #e0245e);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(224,36,94,.25);
}
.lc-redeem-btn:disabled { opacity: .6; cursor: default; }
.lc-redeem-result { text-align: center; margin-bottom: 14px; font-size: 13px; }
.lc-success { color: #1b7a3d; font-weight: 600; }
.lc-error { color: #c62828; font-weight: 600; }
.lc-coupon-box {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #f4fff6;
	border: 1px dashed #35b56a;
	border-radius: 8px;
	padding: 6px 10px;
	margin-top: 6px;
	font-size: 13px;
}
.lc-coupon-box code { font-weight: 700; letter-spacing: .5px; }
.lc-copy-btn {
	border: none;
	background: #35b56a;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 5px;
	cursor: pointer;
}

/* ---------------- Card grid ---------------- */
.lc-grid2 {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 12px;
}
.lc-grid2--sm {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	gap: 10px;
	padding: 2px 2px 10px;
	cursor: grab;
	scrollbar-width: thin;
}
.lc-grid2--sm.lc-dragging { cursor: grabbing; scroll-snap-type: none; }
.lc-grid2--sm .lc-card2 {
	flex: 0 0 auto;
	width: 92px;
	scroll-snap-align: start;
	user-select: none;
}
.lc-grid2--sm::-webkit-scrollbar { height: 5px; }
.lc-grid2--sm::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
.lc-grid2--collection {
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 14px;
}
.lc-empty { grid-column: 1/-1; text-align: center; color: #999; font-size: 13px; padding: 20px 0; }

/* ---------------- Single card component ---------------- */
.lc-card2 { text-align: center; }
.lc-card2-media {
	position: relative;
	width: 100%;
	padding-top: 125%; /* fallback only, shown briefly until JS measures the real image */
	border-radius: 12px;
	overflow: hidden;
	background: #eee;
	box-shadow: 0 2px 8px rgba(0,0,0,.14);
	perspective: 900px;
}
.lc-card2-flip {
	position: absolute;
	inset: 0;
	transition: transform .55s cubic-bezier(.4,.2,.2,1);
	transform-style: preserve-3d;
}
.lc-card2--unlocked.flipped .lc-card2-flip { transform: rotateY(180deg); }
.lc-card2--unlocked .lc-card2-media { cursor: pointer; }
.lc-card2--unlocked .lc-card2-media:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }

.lc-card2-face { 
	position: absolute !important;
	inset: 0;
	backface-visibility: hidden;
	border-radius: 12px;
	overflow: hidden;
}
.lc-card2-face img,
.lc-card2-back img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center;
	display: block !important;
	margin: 0 !important;
	border-radius: 0 !important;
}
.lc-card2-placeholder {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	font-size: 26px; color: #bbb; background: #f2f2f2;
}
.lc-card2-back {
	transform: rotateY(180deg);
	background: linear-gradient(135deg,#232634,#3a3f55);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	text-align: center;
	padding: 8px;
}
.lc-card2-back p { font-size: 11.5px; font-weight: 600; margin: 0; }

.lc-card2--pending .lc-card2-face img,
.lc-card2--locked .lc-card2-face img {
	filter: grayscale(1) brightness(.55);
}
.lc-card2--pending .lc-card2-face,
.lc-card2--locked .lc-card2-face { position: relative; }

.lc-card2-ribbon {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	background: rgba(20,20,20,.72);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
	padding: 4px 0;
	text-align: center;
}
.lc-card2-lock {
	position: absolute;
	inset: 0;
	display: flex; align-items: center; justify-content: center;
	font-size: 22px;
}
.lc-card2-count {
	position: absolute;
	top: 5px; right: 5px;
	background: #e0245e;
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	padding: 1px 6px;
	border-radius: 20px;
	box-shadow: 0 1px 4px rgba(0,0,0,.35);
	z-index: 2;
}
.lc-card2-name {
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.25;
	margin: 6px 0 0;
	color: #222;
}
.lc-card2-hint {
	font-size: 10px;
	color: #888;
	line-height: 1.25;
	margin: 2px 0 0;
}
.lc-card2--sm .lc-card2-name { font-size: 10px; }
.lc-card2--sm .lc-card2-hint { font-size: 9px; }

/* ---------------- Dashboard badge ---------------- */
.lc-dashboard-badge {
	background: #fff6ec;
	border: 1px solid #ffd9ad;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 18px;
	font-size: 13px;
	font-weight: 600;
	color: #7a4a12;
}

/* ---------------- Thank-you page ---------------- */
.lc-ty-wrap {
	margin: 24px auto;
	padding: 16px;
	background: #fffaf3;
	border: 1px solid #ffe1b8;
	border-radius: 14px;
}
.lc-ty-heading {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
	text-align: center;
	color: #7a4a12;
}

/* ---------------- Checkout widget ---------------- */
.lc-checkout-widget {
	margin: 0 0 22px;
	padding: 14px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.lc-checkout-widget-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin-bottom: 10px;
}
.lc-checkout-widget-title { font-size: 13px; font-weight: 700; color: #222; }
.lc-checkout-widget-msg { font-size: 12px; color: #666; }
.lc-checkout-widget-msg--ready { color: #1b7a3d; font-weight: 700; }
.lc-checkout-widget .lc-redeem-btn { margin-top: 12px; margin-bottom: 0; }

/* ---------------- Collection / All Cards page — modern redesign ---------------- */
.lc-collection-wrap {
	padding: 0;
	--lc-accent-1: #ff7a18;
	--lc-accent-2: #e0245e;
	--lc-ink: #1c1c1c;
	--lc-muted: #8a8a8a;
}
.lc-collection-head { text-align: center; margin-bottom: 14px; }
.lc-collection-title {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 3px;
	color: var(--lc-ink);
}
.lc-collection-sub { font-size: 12.5px; color: var(--lc-muted); margin: 0; }

.lc-collection-wrap .lc-grid2--collection {
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	padding: 0;
}
@media (min-width: 560px) {
	.lc-collection-wrap .lc-grid2--collection { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (min-width: 840px) {
	.lc-collection-wrap .lc-grid2--collection { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}
@media (min-width: 1100px) {
	.lc-collection-wrap .lc-grid2--collection { grid-template-columns: repeat(5, 1fr); gap: 16px; }
}

/* Card shell */
.lc-collection-wrap .lc-card2-media {
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.06);
	background: #f4f4f4;
	transition: box-shadow .25s ease, transform .25s ease;
}
.lc-collection-wrap .lc-card2-media:hover {
	box-shadow: 0 2px 6px rgba(0,0,0,.1), 0 14px 28px rgba(0,0,0,.12);
	transform: translateY(-3px);
}

/* Game-like flip: longer, eased, with a subtle scale pulse mid-flip */
.lc-collection-wrap .lc-card2-flip {
	transition: transform .7s cubic-bezier(.34,1.56,.64,1);
}
.lc-collection-wrap .lc-card2.flipped .lc-card2-flip { transform: rotateY(180deg); }

/* Locked state: subtle desaturation instead of harsh grayscale+dark filter */
.lc-collection-wrap .lc-card2--locked .lc-card2-face img {
	filter: grayscale(.85) brightness(.8) saturate(.7);
	transition: filter .3s ease;
}
.lc-collection-wrap .lc-card2--locked .lc-card2-media:hover .lc-card2-face img {
	filter: grayscale(.6) brightness(.9) saturate(.85);
}

.lc-collection-wrap .lc-card2-lock {
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(2px);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	top: 50% !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto; !important;
	transform: translate(-50%, -50%);
	inset: auto;
}

.lc-collection-wrap .lc-card2-back {
	background: linear-gradient(150deg, #1c1c24, #33333f);
}
.lc-collection-wrap .lc-card2--locked .lc-card2-back,
.lc-collection-wrap .lc-card2--pending .lc-card2-back {
	background: linear-gradient(150deg, #3a3a42, #23232a);
}
.lc-collection-wrap .lc-card2-back p {
	font-size: 12px;
	line-height: 1.4;
	padding: 0 4px;
}

.lc-collection-wrap .lc-card2-name {
	font-size: 12px;
	margin-top: 8px;
	color: var(--lc-ink);
}
.lc-collection-wrap .lc-card2-hint { display: none; } /* redundant with back-face text now */

/* Owned-count pill, shown under the card for unlocked ones instead of a corner badge */
.lc-collection-wrap .lc-card2-count {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(90deg, var(--lc-accent-1), var(--lc-accent-2));
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 20px;
	margin-top: 4px;
	box-shadow: none;
}
.lc-collection-wrap .lc-card2--unlocked .lc-card2-name { margin-bottom: 2px; }

@media (max-width: 480px) {
	.lc-collection-title { font-size: 17px; }
	.lc-collection-wrap .lc-card2-name { font-size: 11px; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 480px) {
	.lc-grid2 { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
	.lc-grid2--sm { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
	.lc-collection-title { font-size: 16px; }
	.lc-checkout-widget-head { flex-direction: column; align-items: flex-start; }
}