
#product {
    position: relative;
    isolation: isolate;
}

/* لایه شفاف برای مدل سه‌بعدی */
#snitch-3d-stage {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
    border-radius: 14px;
}

#snitch-3d-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ناحیه زیر قیمت */
.snitch-magic-section {
    position: relative;
    text-align: center;
    direction: rtl;
    padding: 0 8px 8px;
    z-index: 2;
}

/* محل فرود */
#snitch-landing {
    position: relative;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snitch-landing-glow {
    position: absolute;
    width: 85px;
    height: 24px;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(
        ellipse,
        rgba(250, 195, 62, .50),
        rgba(255, 213, 95, .16) 48%,
        transparent 75%
    );
    filter: blur(8px);
    transition: opacity .7s ease;
}

#product.snitch-landed
.snitch-landing-glow {
    opacity: 1;
    animation: snitch-glow 2.5s ease-in-out infinite;
}

@keyframes snitch-glow {
    0%, 100% {
        opacity: .45;
        transform: translateX(-50%) scale(.9);
    }
    50% {
        opacity: .95;
        transform: translateX(-50%) scale(1.15);
    }
}

/* باکس شانس */
.snitch-luck-box {
    position: relative;
    max-height: 0;
    padding: 0 16px;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-12px) scale(.96);

    background: linear-gradient(
        145deg,
        #fffdf7,
        #fff7e4 60%,
        #fffaf0
    );

    border: 0 solid transparent;
    border-radius: 16px;

    box-shadow: 0 8px 28px rgba(130, 95, 20, .08);

    transition:
        max-height .65s ease,
        padding .5s ease,
        margin .5s ease,
        opacity .5s ease,
        transform .6s cubic-bezier(.2, 1.4, .4, 1);
}

#product.snitch-landed
.snitch-luck-box {
    max-height: 300px;
    padding: 18px 16px;
    margin: 0 0 14px;
    border: 1px solid #f2d99d;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.snitch-luck-decoration {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #bb8c32;
    margin-bottom: 8px;
    direction: ltr;
}

.snitch-luck-title {
    font-size: 16px;
    font-weight: 800;
    color: #503a16;
    line-height: 1.8;
}

.snitch-luck-description {
    font-size: 12px;
    color: #8b795d;
    margin: 5px 0 14px;
    line-height: 1.9;
}

.snitch-luck-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 43px;
    padding: 10px 15px;

    background: linear-gradient(
        110deg,
        #b58122,
        #e8be5a,
        #a66f17
    );

    color: #fff;
    font-weight: 800;
    font-size: 13px;

    border: none;
    border-radius: 10px;

    cursor: pointer;

    box-shadow: 0 5px 14px rgba(180, 125, 31, .23);
    transition: transform .2s, box-shadow .2s;
}

.snitch-luck-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(180, 125, 31, .35);
}

.snitch-luck-button:active {
    transform: scale(.98);
}

@media (max-width: 576px) {
    #snitch-landing {
        height: 62px;
    }

    .snitch-luck-title {
        font-size: 14px;
    }

    .snitch-luck-description {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .snitch-luck-box,
    .snitch-landing-glow {
        animation: none;
        transition: none;
    }
}

/* ===== GOLDEN SNITCH FIX ===== */

/* باکس قیمت */
#product {
    position: relative !important;
    isolation: isolate;
}

/* لایه پرواز اسنیچ */
#product .snitch-stage {
    position: absolute !important;

    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    display: block !important;
    overflow: hidden !important;
    pointer-events: none !important;

    z-index: 5;
    border-radius: 12px;
}

/* Canvas سه‌بعدی */
#product .snitch-stage canvas {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    position: absolute !important;
    inset: 0 !important;
}

/* محل فرود */
#product .snitch-offer {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
    text-align: center;
}

#product .snitch-perch {
    height: 65px;
    position: relative;
}

/* باکس شانس */
#product .snitch-reward {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 12px;
    margin: 0;
    visibility: hidden;
}

/* باز شدن باکس شانس */
#product.snitch-landed .snitch-reward {
    max-height: 250px;
    opacity: 1;
    visibility: visible;
    padding: 14px 12px;
    margin-bottom: 12px;

    background: linear-gradient(145deg, #fffdf7, #fff4dc);
    border: 1px solid #e8cf90;
    border-radius: 12px;
}
