/* Certificado do banho (pet shops; estética pet de luxo).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): gravata, rótulo e botões; salão
 * menta, vapor branco e ouro em hex direto. Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - Vapor e jato são JS (atributos no SVG), pelo relógio; aqui a gravata que
 *    flutua (prêmio) ou a mensagem da loja (sem prêmio), já com o visor limpo.
 */

.sd__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: var(--jg-eef6f1, #EEF6F1);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .35);
    user-select: none;
    font-family: Arial, sans-serif;
}
.sd__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------------- gravata-borboleta (só no prêmio) ---------------- */

.sd__gravata {
    position: absolute;
    left: 50%; top: 46%;
    width: 62%;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    transform: translate(-50%, -30%) scale(.6);
    opacity: 0;
    z-index: 6;
}
.sd__borboleta { position: relative; width: 62%; aspect-ratio: 2; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .3)); }
.sd__borboleta svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sd__borboleta img {
    position: absolute; left: 50%; top: 50%;
    width: 30%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #D4AF37;
    background: #fff;
    box-shadow: 0 0 0 2px #FFF3C4, 0 0 14px 3px rgba(244, 215, 122, .8);
}
.sd__faixa {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .95);
    border: 1.5px solid #D4AF37;
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .35);
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}
.sd__faixa b { font: italic 700 clamp(13px, 3.6vw, 18px)/1.1 Georgia, serif; color: #8A5A10; }
.sd__faixa small { font: 700 clamp(7px, 1.9vw, 9px)/1 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #9A6A40; margin-top: 2px; }
.sd__faixa span { font: 700 clamp(12px, 3.4vw, 16px)/1.1 Arial, sans-serif; color: #3A2A10; overflow-wrap: anywhere; }
.sd--premiou .sd__gravata { animation: sd-gravata .8s .1s cubic-bezier(.3, 1.2, .5, 1) forwards, sd-flutua 2.4s .9s ease-in-out infinite alternate; }
@keyframes sd-gravata { to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes sd-flutua { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(-50%, -54%) scale(1) rotate(-1.5deg); opacity: 1; } }

.sd__faiscas { position: absolute; left: 50%; top: 40%; width: 0; height: 0; z-index: 7; pointer-events: none; }
.sd__faiscas i {
    position: absolute; left: 0; top: 0;
    width: 10px; height: 10px; margin: -5px 0 0 -5px;
    background: #FFF1B8;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, .95));
    opacity: 0;
}
.sd__faiscas i:nth-child(1) { --dx: -170px; --dy: -50px; }
.sd__faiscas i:nth-child(2) { --dx: 170px;  --dy: -56px; animation-delay: .05s; }
.sd__faiscas i:nth-child(3) { --dx: -180px; --dy: 40px;  animation-delay: .1s; }
.sd__faiscas i:nth-child(4) { --dx: 180px;  --dy: 46px;  animation-delay: .07s; }
.sd__faiscas i:nth-child(5) { --dx: -60px;  --dy: -100px; animation-delay: .12s; }
.sd__faiscas i:nth-child(6) { --dx: 70px;   --dy: -96px; animation-delay: .03s; }
.sd--premiou .sd__faiscas i { animation: sd-faisca 1s .6s ease-out forwards; }
@keyframes sd-faisca {
    0%   { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); opacity: .9; }
}

/* ---------------- mensagem da loja (só sem prêmio) ---------------- */

.sd__limpo {
    position: absolute;
    left: 50%; top: 44%;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 12px 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--jg-a8d2bd, #A8D2BD);
    box-shadow: 0 10px 20px -10px rgba(var(--jg-rgb-28503c, 40,80,60), .45);
    text-align: center;
    white-space: nowrap;
    transform: translate(-50%, -40%);
    opacity: 0;
    z-index: 6;
}
.sd__limpo img { width: 26px; height: 26px; }
.sd__limpo b { font: 700 clamp(14px, 3.8vw, 19px)/1.1 Georgia, serif; color: var(--jg-2f6b4f, #2F6B4F); }
.sd__limpo span { font: clamp(10px, 2.7vw, 13px)/1.2 Arial, sans-serif; color: #5C6B60; }
.sd--consolo .sd__limpo { animation: sd-limpo .6s .1s ease-out forwards; }
@keyframes sd-limpo { to { transform: translate(-50%, -50%); opacity: 1; } }

.sd__rotulo {
    position: absolute;
    left: 2%; bottom: 2%;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--jg-14532d, #14532d);
    border: 1px solid #C9A227;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFF3C4;
    white-space: nowrap;
    z-index: 8;
}
.sd__rotulo img { width: 12px; height: 12px; }

/* ---------------- botão e mensagem ---------------- */

.sd__botao {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    color: #fff;
    font: 700 15px/1.2 Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 6px 14px -6px rgba(var(--jg-rgb-0a7a00, 10,122,0), .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.sd__botao:hover:not(:disabled) { filter: brightness(1.06); }
.sd__botao:disabled { opacity: .55; cursor: default; }

.sd__msg {
    max-width: 480px;
    min-height: 56px;
    margin: 10px auto 0;
    padding: 8px 12px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    text-align: center;
    font: 700 clamp(11px, 3vw, 14px)/1.35 Arial, sans-serif;
    color: #46564c;
    background: var(--jg-eef4ef, #EEF4EF);
    border: 1px solid var(--jg-dce6de, #DCE6DE);
}
.sd__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.sd__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.sd__msg b { color: var(--jg-0a7a00, #0A7A00); }
.sd__msg--consolo b { color: #5C6B60; }

/* ---------------- vitrine ---------------- */

.sd__premios {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin: 14px auto 0; max-width: 640px;
}
.sd__titulo-vitrine {
    width: 100%; text-align: center;
    font: 700 13px/1.3 Arial, sans-serif; color: var(--jg-14532d, #14532d); margin-bottom: 2px;
}
.sd__premio { width: 74px; text-align: center; font: 600 10px/1.2 Arial, sans-serif; color: #46564c; }
.sd__premio img { width: 100%; border-radius: 6px; display: block; margin-bottom: 3px; }

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .sd--premiou .sd__gravata { animation: none; transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .sd--premiou .sd__faiscas i { animation: none; opacity: .9; transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); }
    .sd--consolo .sd__limpo { animation: none; transform: translate(-50%, -50%); opacity: 1; }
}
