/* Wrapper controls the actual size and responsiveness */
.w3dc-scene-wrapper {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 400px; /* Sensible default max-width */
    margin: 0 auto;
    aspect-ratio: 3/4; /* Maintains a card-like aspect ratio */
}

.w3dc-scene {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    position: relative;
    cursor: pointer;
}

.w3dc-tilt-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    border-radius: 0 !important;
}

.w3dc-flip-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    border-radius: 0 !important;
}

.w3dc-flip-box.is-flipped {
    transform: rotateY(180deg);
}

.w3dc-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 0 !important; /* Explicitly 0 */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.w3dc-card-front {
    background-color: #fff;
    z-index: 2;
}

.w3dc-card-back {
    background-color: #f8f8f8;
    transform: rotateY(180deg);
}

/* Enhancements */
.w3dc-scene:hover .w3dc-card-face {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Image styling */
.w3dc-card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
}

.w3dc-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #ccc;
    background: #eee;
    font-family: sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 0 !important;
}
