.polagro-3d-card,
.polagro-3d-card * {
    box-sizing: border-box;
}

.polagro-3d-card {
    --polagro-red: #e11922;
    --polagro-dark: #132033;
    --polagro-muted: #5c6878;
    --polagro-border: #e2e7ec;
    --polagro-surface: #f4f6f8;
    margin: 18px 0;
    padding: 24px;
    overflow: hidden;
    color: var(--polagro-dark);
    background: #fff;
    border: 1px solid var(--polagro-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(19, 32, 51, 0.06);
}

.polagro-3d-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.polagro-3d-card__heading h2 {
    margin: 3px 0 6px;
    color: var(--polagro-dark);
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.16;
}

.polagro-3d-card__heading p {
    margin: 0;
    color: var(--polagro-muted);
    font-size: 16px;
    line-height: 1.55;
}

.polagro-3d-card__eyebrow {
    color: var(--polagro-red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.polagro-3d-card__badge {
    display: grid;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    place-items: center;
    color: #fff;
    background: var(--polagro-red);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(225, 25, 34, 0.24);
    font-size: 17px;
    font-weight: 900;
}

.polagro-3d-stage {
    position: relative;
    display: grid;
    width: 100%;
    min-height: min(var(--polagro-3d-height, 620px), 74vh);
    overflow: hidden;
    place-items: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.98) 0, rgba(244, 247, 249, 0.96) 46%, rgba(230, 235, 239, 0.98) 100%);
    border: 1px solid #dde3e8;
    border-radius: 14px;
}

.polagro-3d-stage::after {
    position: absolute;
    z-index: 0;
    right: 12%;
    bottom: 8%;
    left: 12%;
    height: 11%;
    content: '';
    pointer-events: none;
    background: rgba(24, 35, 49, 0.16);
    border-radius: 50%;
    filter: blur(25px);
}

.polagro-3d-stage__poster {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: clamp(34px, 6vw, 78px);
    object-fit: contain;
    transition: opacity 0.25s ease;
}

.polagro-3d-stage__poster.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.polagro-3d-stage__overlay {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
    padding: 26px;
    text-align: center;
}

.polagro-3d-stage__overlay[hidden] {
    display: none;
}

.polagro-3d-stage__cube {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 14px;
    place-items: center;
    color: var(--polagro-red);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(225, 25, 34, 0.18);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(19, 32, 51, 0.12);
    backdrop-filter: blur(7px);
}

.polagro-3d-stage__cube svg {
    width: 34px;
    fill: currentColor;
}

.polagro-3d-load {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    background: var(--polagro-red);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 9px 22px rgba(225, 25, 34, 0.24);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.polagro-3d-load:hover,
.polagro-3d-load:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(225, 25, 34, 0.3);
}

.polagro-3d-stage__note {
    margin-top: 10px;
    color: #647181;
    font-size: 13px;
}

.polagro-3d-model {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    --poster-color: transparent;
    --progress-bar-color: var(--polagro-red);
}

.polagro-3d-progress {
    position: absolute;
    z-index: 5;
    right: 18px;
    bottom: 18px;
    left: 18px;
    height: 5px;
    overflow: hidden;
    background: rgba(19, 32, 51, 0.12);
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.polagro-3d-card.is-loading .polagro-3d-progress {
    opacity: 1;
}

.polagro-3d-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--polagro-red);
    border-radius: inherit;
    transition: width 0.12s linear;
}

.polagro-3d-error {
    position: relative;
    z-index: 7;
    max-width: 520px;
    padding: 18px 22px;
    color: #9e1319;
    background: #fff2f2;
    border: 1px solid #f4c6c8;
    border-radius: 10px;
    text-align: center;
}

.polagro-3d-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
}

.polagro-3d-toolbar[hidden] {
    display: none;
}

.polagro-3d-toolbar__help {
    color: var(--polagro-muted);
    font-size: 13px;
}

.polagro-3d-toolbar__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.polagro-3d-control {
    min-height: 38px;
    padding: 0 12px;
    color: var(--polagro-dark);
    background: #fff;
    border: 1px solid #d6dde3;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.polagro-3d-control:hover,
.polagro-3d-control:focus-visible,
.polagro-3d-control[aria-pressed="true"] {
    color: var(--polagro-red);
    background: #fff6f6;
    border-color: rgba(225, 25, 34, 0.38);
}

.polagro-3d-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
}

@media (max-width: 720px) {
    .polagro-3d-card {
        padding: 18px;
        border-radius: 14px;
    }

    .polagro-3d-card__badge {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        font-size: 15px;
    }

    .polagro-3d-stage {
        min-height: min(500px, 65vh);
    }

    .polagro-3d-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .polagro-3d-toolbar__buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .polagro-3d-control {
        width: 100%;
    }
}

.polagro-3d-error strong,
.polagro-3d-error span,
.polagro-3d-error a {
    display: block;
}

.polagro-3d-error__detail {
    margin-top: 5px;
}

.polagro-3d-error a {
    margin-top: 10px;
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
}
