/* Star Player Cards designer */
.spc-designer-active div.product { --spc-navy: #14314D; --spc-red: #CB0B35; }
.spc-preview-col { float: left; width: 48%; margin-bottom: 2em; }
.spc-designer-active div.product .summary { float: right; width: 48%; }
.spc-preview-sticky { position: sticky; top: 24px; }
.spc-preview { position: relative; background: radial-gradient(circle at 50% 35%, #1e3f5f 0%, #14314D 70%); border-radius: 16px; padding: 28px; min-height: 420px; display: flex; align-items: center; justify-content: center; }
.spc-preview .spc-svg { width: 100%; max-width: 420px; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); transition: opacity .2s; }
.spc-preview.is-loading .spc-svg { opacity: .6; }
.spc-loading { color: #fff; font-weight: 600; }
.spc-preview-note { font-size: 13px; color: #4A5D70; margin-top: 10px; text-align: center; }

.spc-designer { margin: 0 0 1.2em; }
.spc-step { border-top: 1px solid #E9EEF3; padding: 16px 0 6px; }
.spc-step-title { font-size: 18px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: #14314D; }
.spc-step-title span { background: #CB0B35; color: #fff; border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: 0 0 28px; }
.spc-step-title small { font-weight: 400; text-transform: none; font-size: 13px; color: #7A8A99; }
.spc-step-size { padding-bottom: 0; }

.spc-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.spc-design { background: #F5F7FA; border: 2px solid transparent; border-radius: 10px; padding: 6px 4px 8px; cursor: pointer; text-align: center; font-size: 11px; line-height: 1.2; font-weight: 700; color: #14314D; transition: border-color .15s, transform .15s; text-transform: none; }
.spc-design:hover { transform: translateY(-2px); background: #F5F7FA; color: #14314D; }
.spc-design.is-active { border-color: #CB0B35; background: #fff; box-shadow: 0 4px 12px rgba(20,49,77,.15); }
.spc-design img { width: 100%; height: auto; display: block; margin: 0 auto 6px; }
.spc-size-warning, .spc-error { background: #fdecef; color: #A30929; border-left: 4px solid #CB0B35; padding: 8px 12px; border-radius: 6px; font-size: 14px; margin: 10px 0; }

.spc-upload { display: block; border: 2px dashed #7A8A99; border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; background: #F5F7FA; color: #14314D; font-weight: 600; }
.spc-upload:hover, .spc-upload.has-file { border-color: #CB0B35; }
.spc-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.spc-upload-small { padding: 12px; margin-top: 10px; font-size: 14px; }
.spc-help { font-size: 13px; color: #4A5D70; margin: 8px 0; }
.spc-photo-adjust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: 13px; }
.spc-photo-adjust input { width: 100%; accent-color: #CB0B35; }

.spc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spc-span-2 { grid-column: span 2; }
.spc-field { display: block; font-size: 13px; font-weight: 700; color: #14314D; }
.spc-field input, .spc-field select, .spc-field textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
#spc-name { text-transform: uppercase; font-weight: 700; font-size: 18px; letter-spacing: 1px; }

.spc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.spc-stat { text-align: center; font-weight: 800; font-size: 13px; color: #14314D; }
.spc-stat input { width: 100%; text-align: center; margin-top: 4px; padding: 8px 2px; font-weight: 700; }
.spc-link-btn { background: none !important; border: 0; color: #CB0B35 !important; text-decoration: underline; padding: 6px 0 !important; font-size: 13px; cursor: pointer; text-transform: none !important; }

.spc-cart-thumb { border-radius: 6px; }

@media (max-width: 900px) {
	.spc-preview-col, .spc-designer-active div.product .summary { float: none; width: 100%; }
	.spc-preview-sticky { position: relative; top: 0; }
	.spc-preview { padding: 16px; min-height: 0; }
	.spc-preview .spc-svg { max-width: 300px; }
	.spc-stats { grid-template-columns: repeat(3, 1fr); }
}

.spc-bg-row { margin: 6px 0 10px; }
.spc-check { font-weight: 700; font-size: 14px; color: #14314D; display: flex; align-items: center; gap: 8px; }
.spc-check input { accent-color: #CB0B35; width: 18px; height: 18px; }

/* Magic wand while the photo background is removed */
.spc-wand { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .3s; display: flex; align-items: center; justify-content: center; }
.spc-wand.is-on { opacity: 1; }
.spc-wand-sweep { position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 48%, rgba(245,197,66,.35) 52%, transparent 65%); animation: spcSweep 1.8s ease-in-out infinite; }
.spc-wand::before { content: ""; position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255,236,170,.55), rgba(255,236,170,0) 70%); animation: spcPulse 1.4s ease-in-out infinite; }
.spc-wand-stick { position: relative; width: 150px; height: 150px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); animation: spcWave 1.2s ease-in-out infinite; transform-origin: 20% 80%; }
.spc-wand-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.spc-wand-sparks i { position: absolute; width: 16px; height: 16px; margin: -8px; background: #F5C542; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spcSpark 1.6s ease-out infinite; animation-delay: calc(var(--i) * .16s); --a: calc(var(--i) * 36deg); }
.spc-wand-sparks i:nth-child(even) { background: #fff; width: 11px; height: 11px; }
.spc-wand-text { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(20,49,77,.88); color: #fff; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
@keyframes spcPulse { 0%,100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes spcSweep { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
@keyframes spcWave { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }
@keyframes spcSpark { 0% { transform: rotate(var(--a)) translateX(10px) scale(.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: rotate(var(--a)) translateX(110px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .spc-wand::before, .spc-wand-sweep, .spc-wand-stick, .spc-wand-sparks i { animation: none; } }

/* Photo cleanup controls and touch-friendly retouch dialog. */
.spc-designer [hidden], .spc-retouch [hidden] { display: none !important; }
.spc-cleanup-controls { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 12px; margin-top: 8px; background: #F5F7FA; border-radius: 10px; }
.spc-cleanup-controls p { flex-basis: 100%; margin: 0; }
.spc-retouch { box-sizing: border-box; width: min(920px, 96vw); max-height: 94dvh; overflow: auto; border: 0; border-radius: 16px; padding: 20px; color: #14314D; background: #fff; }
.spc-retouch::backdrop { background: rgba(20,49,77,.75); }
.spc-retouch h3 { margin: 0 0 8px; color: #14314D; }
.spc-retouch p { font-size: 14px; margin: 8px 0; }
.spc-retouch-tools, .spc-retouch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.spc-retouch label { font-size: 13px; font-weight: 700; }
.spc-retouch input { display: block; accent-color: #CB0B35; }
.spc-retouch button { border: 1px solid #14314D; border-radius: 6px; padding: 9px 14px; background: #fff; color: #14314D; cursor: pointer; font-size: 14px; }
.spc-retouch button[aria-pressed=true], .spc-retouch button[data-action=save] { background: #14314D; color: #fff; }
.spc-retouch button:disabled { opacity: .45; cursor: default; }
.spc-retouch button:focus-visible { outline: 3px solid #CB0B35; outline-offset: 2px; }
.spc-retouch-stage { display: flex; justify-content: center; background: #e9eef3; padding: 8px; }
.spc-retouch canvas { display: block; max-width: 100%; max-height: 55dvh; width: auto; height: auto; object-fit: contain; touch-action: none; cursor: crosshair; background-color: white; background-image: conic-gradient(#ccd4dc 25%, transparent 0 50%, #ccd4dc 0 75%, transparent 0); background-size: 20px 20px; }
.spc-retouch-actions { justify-content: flex-end; margin-bottom: 0; }

/* 5-step designer */
.spc-designer.is-wizard .spc-step { border-top: 0; padding: 4px 0 0; }
.spc-designer .spc-step[hidden] { display: none !important; }
.spc-progress { margin: 0 0 18px; }
.spc-progress-bar { height: 6px; background: #E9EEF3; border-radius: 3px; overflow: hidden; margin: 0 14px -20px; position: relative; top: 15px; }
.spc-progress-bar i { display: block; height: 100%; width: 0; background: #CB0B35; transition: width .35s ease; }
.spc-progress ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
.spc-progress li { flex: 1 1 0; text-align: center; margin: 0; }
.spc-progress li:first-child { text-align: left; } .spc-progress li:last-child { text-align: right; }
.spc-progress button { background: none !important; border: 0; padding: 0 !important; margin: 0; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: #7A8A99 !important; font-size: 12px; font-weight: 700; text-transform: none !important; letter-spacing: 0; box-shadow: none !important; }
.spc-progress button:disabled { cursor: default; }
.spc-progress b { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid #CDD6E0; display: inline-flex; align-items: center; justify-content: center; color: #7A8A99; font-size: 14px; transition: all .2s; }
.spc-progress li.is-done b { background: #14314D; border-color: #14314D; color: #fff; }
.spc-progress li.is-current b { background: #CB0B35; border-color: #CB0B35; color: #fff; box-shadow: 0 0 0 4px rgba(203,11,53,.15); }
.spc-progress li.is-current button, .spc-progress li.is-done button { color: #14314D !important; }
.spc-step-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 20px 0 6px; padding-top: 14px; border-top: 1px solid #E9EEF3; }
.spc-step-nav .spc-next { margin-left: auto; background: #CB0B35 !important; color: #fff !important; border: 0; border-radius: 8px; padding: 12px 20px !important; font-weight: 700; font-size: 15px; cursor: pointer; }
.spc-step-nav .spc-next:hover { background: #A30929 !important; }
.spc-step-nav .spc-back { background: none !important; border: 0; color: #14314D !important; font-weight: 700; padding: 10px 0 !important; cursor: pointer; text-transform: none !important; }
.spc-step-error { flex-basis: 100%; margin: 0; background: #fdecef; color: #A30929; border-left: 4px solid #CB0B35; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.spc-error:empty { display: none; }
.spc-step-title:focus { outline: none; }
.spc-size-slot table.variations { margin: 14px 0 0; width: 100%; border: 0; }
.spc-size-slot table.variations th, .spc-size-slot table.variations td { display: block; padding: 0; border: 0; background: none; text-align: left; }
.spc-size-slot table.variations th.label { font-size: 13px; font-weight: 700; color: #14314D; padding-bottom: 4px; }
.spc-size-slot table.variations select { width: 100%; }
.spc-notes { margin-top: 16px; }
.spc-summary { margin: 18px 0 6px; background: #F5F7FA; border-radius: 10px; padding: 14px 16px; }
.spc-summary h4 { margin: 0 0 8px; font-size: 15px; color: #14314D; }
.spc-summary dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 14px; }
.spc-summary dl div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #D7DFE7; padding-bottom: 4px; }
.spc-summary dt { color: #4A5D70; font-weight: 400; margin: 0; }
.spc-summary dd { margin: 0; font-weight: 700; color: #14314D; text-align: right; }
.spc-buy-slot { margin-top: 12px; }
@media (max-width: 600px) {
	.spc-progress span { font-size: 10px; }
	.spc-progress b { width: 26px; height: 26px; font-size: 13px; }
	.spc-summary dl { grid-template-columns: 1fr; }
	.spc-step-nav .spc-next { flex: 1 1 auto; text-align: center; }
}
