/* Spin & Win (inc/spin.php, assets/js/spin.js) */
.wss-lock { overflow: hidden; }
.wss { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; }
.wss[hidden] { display: none; }
.wss__bg { position: absolute; inset: 0; background: rgba(43, 36, 32, .55); opacity: 0; transition: opacity .25s ease; }
@supports (backdrop-filter: blur(4px)) { .wss__bg { backdrop-filter: blur(4px); } }
.wss__card { position: relative; width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 34px; padding: 38px 40px; border-radius: 24px; background: radial-gradient(120% 90% at 0% 0%, #fff 0%, var(--ivory) 45%, var(--cream) 100%); border: 1px solid var(--gold-l); box-shadow: 0 40px 90px -30px rgba(43, 36, 32, .6); opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.wss.is-in .wss__bg { opacity: 1; }
.wss.is-in .wss__card { opacity: 1; transform: none; }
.wss__x { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(140, 104, 52, .1); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; }
.wss__x:hover { background: rgba(140, 104, 52, .2); }

/* Wheel */
.wss__wheel { display: grid; place-items: center; }
.wsw { position: relative; width: min(340px, 72vw); aspect-ratio: 1; filter: drop-shadow(0 22px 30px rgba(111, 81, 39, .35)); }
.wsw__svg { width: 100%; height: 100%; display: block; }
.wsw__rot { transform-box: view-box; transform-origin: 160px 160px; transition: transform 5.6s cubic-bezier(.12, .7, .08, 1); }
.wsw__big { font: 700 19px/1 var(--sans); letter-spacing: .01em; }
.wsw__small { font: 600 9px/1 var(--sans); letter-spacing: .16em; }
.wsw__dot { fill: #fff7e0; }
.wsw__dot.is-alt { fill: var(--gold); }
.wss.is-spinning .wsw__dot { animation: wsw-blink .35s steps(1) infinite; }
.wss.is-spinning .wsw__dot.is-alt { animation-delay: .17s; }
@keyframes wsw-blink { 50% { fill: #fff; opacity: .35; } }
.wsw__pin { position: absolute; left: 50%; top: -10px; width: 34px; height: 44px; transform: translateX(-50%); z-index: 2; background: linear-gradient(180deg, #e9cf98, var(--gold-d)); clip-path: polygon(0 0, 100% 0, 100% 45%, 50% 100%, 0 45%); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
.wsw__pin::after { content: ""; position: absolute; left: 50%; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #fffaf2; transform: translateX(-50%); }
.wsw__hub { position: absolute; left: 50%; top: 50%; width: 21%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; color: var(--gold-d); background: radial-gradient(circle at 35% 30%, #fff, var(--cream)); border: 3px solid var(--gold); box-shadow: 0 6px 14px rgba(111, 81, 39, .35); }

/* Text side */
.wss__eyebrow { margin: 0 0 8px; color: var(--gold-d); font: 600 12px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.wss__title { margin: 0 0 12px; font: 400 clamp(28px, 3.4vw, 38px)/1.1 var(--serif); color: var(--ink); }
.wss__title em { font-family: var(--accent, var(--serif)); font-style: italic; color: var(--gold-d); }
.wss__text { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.wss__form { display: grid; gap: 10px; }
.wss__form input[type=email] { height: 52px; padding: 0 18px; border: 1px solid rgba(140, 104, 52, .35); border-radius: 14px; background: #fff; font: 400 16px var(--sans); color: var(--ink); }
.wss__form input[type=email]:focus { outline: 0; border-color: var(--gold-d); box-shadow: 0 0 0 3px rgba(201, 164, 106, .25); }
.wss__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.wss__go { height: 52px; width: 100%; justify-content: center; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.wss__go[disabled] { opacity: .75; cursor: wait; }
.wss__err { margin: 0; min-height: 1em; color: #a33a3a; font-size: 13.5px; }
.wss__err:empty { display: none; }
.wss__fine { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* Win */
.wss__win { text-align: center; }
.wss__ribbon { position: relative; margin: 0 auto 18px; width: max-content; max-width: 100%; }
.wss__ribbon span { position: relative; z-index: 1; display: block; padding: 12px 34px; color: #fff7ef; background: linear-gradient(180deg, #a14a55, #7b3442); font: 600 15px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; box-shadow: 0 10px 20px -10px rgba(123, 52, 66, .8); animation: wss-pop .6s var(--ease) both; }
.wss__ribbon::before, .wss__ribbon::after { content: ""; position: absolute; top: 9px; width: 34px; height: 100%; background: #5e2532; z-index: 0; animation: wss-pop .6s var(--ease) both; }
.wss__ribbon::before { left: -22px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%); }
.wss__ribbon::after { right: -22px; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%); }
@keyframes wss-pop { from { opacity: 0; transform: scale(.6) rotate(-4deg); } 70% { transform: scale(1.05); } to { opacity: 1; transform: none; } }
.wss__won { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
.wss__prize { margin: 2px 0 14px; font: 400 clamp(38px, 5vw, 54px)/1.05 var(--serif); color: var(--gold-d); }
.wss__code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 18px; border: 1.5px dashed var(--gold-d); border-radius: 14px; background: #fff; }
.wss__code b { font: 700 19px/1 var(--sans); letter-spacing: .12em; color: var(--ink); }
.wss__copy { border: 0; border-radius: 10px; padding: 10px 16px; background: var(--cream); color: var(--gold-dd); font: 600 13px var(--sans); cursor: pointer; }
.wss__shop { margin-top: 16px; width: 100%; justify-content: center; height: 50px; }
.wss__confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

/* Floating button */
.wss-fab { position: fixed; left: 20px; bottom: 22px; z-index: 80; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 14px; border: 0; border-radius: 30px; cursor: pointer; color: #fffaf2; font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(135deg, #d6b47a, var(--gold-d)); box-shadow: 0 14px 28px -10px rgba(111, 81, 39, .7); transition: transform .3s var(--ease); }
.wss-fab:hover { transform: translateY(-2px); }
.wss-fab svg { animation: wss-wiggle 3.5s ease-in-out infinite; }
@keyframes wss-wiggle { 0%, 84%, 100% { transform: none; } 88% { transform: rotate(-14deg); } 92% { transform: rotate(12deg); } 96% { transform: rotate(-6deg); } }
.woocommerce-checkout .wss-fab, .woocommerce-cart .wss-fab { display: none; }

@media (max-width: 860px) {
	.wss__card { grid-template-columns: 1fr; gap: 14px; padding: 30px 20px 22px; text-align: center; }
	.wsw { width: min(270px, 70vw); }
	.wss__title { font-size: 28px; }
	.wss__text { font-size: 14px; margin-bottom: 14px; }
	.wss__ribbon span { padding: 11px 24px; font-size: 13px; }
	.wss__prize { font-size: 38px; }
	/* Phones: a round gift icon only, so it never covers the product cards' bag buttons. */
	.wss-fab { left: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); width: 50px; height: 50px; padding: 0; justify-content: center; }
	.wss-fab span { display: none; }
	.single-product .wss-fab { bottom: calc(146px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.wss-fab svg, .wss.is-spinning .wsw__dot { animation: none; }
	.wsw__rot { transition-duration: 1.2s; }
}

.wss__ribbon--soft span { background: linear-gradient(180deg, #b8894a, var(--gold-d)); }
.wss__ribbon--soft::before, .wss__ribbon--soft::after { background: var(--gold-dd); }

.wss__again { display: block; margin: 12px auto 0; padding: 6px 10px; border: 0; background: none; color: var(--gold-d); font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; cursor: pointer; }
.wsw--few .wsw__big { font-size: 26px; }
.wsw--few .wsw__small { font-size: 11px; letter-spacing: .2em; }
