/* Gutenberg alignment - make shortcode block full width */
.wp-block-shortcode:has(.carousel-3d-wrapper),
.wp-block-html:has(.carousel-3d-wrapper) {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Carousel Wrapper - Full screen */
.carousel-3d-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 60vh;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    background: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Three.js container */
.carousel-3d-wrapper .carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-3d-wrapper .carousel-container canvas {
    display: block;
    cursor: pointer;
}

/* Preloader */
.carousel-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.4s ease;
}

.carousel-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #888;
    border-radius: 50%;
    animation: carousel-spin 0.8s linear infinite;
}

@keyframes carousel-spin {
    to { transform: rotate(360deg); }
}

/* Arrow button styles */
.carousel-3d-wrapper .arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #ccc;
    color: #ccc;
    font-size: 64px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    line-height: 0;
    padding: 0;
    text-align: center;
    font-family: Arial, sans-serif;
}

.carousel-3d-wrapper .arrow-btn:hover {
    background: #f9f9f9;
    border-color: #aaa;
    color: #aaa;
    transform: translateY(-50%) scale(1.1);
}

.carousel-3d-wrapper .arrow-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-3d-wrapper .left-arrow {
    left: -20%;
}

.carousel-3d-wrapper .right-arrow {
    right: -20%;
}

/* Vertical orientation arrows */
.carousel-3d-wrapper.vertical .arrow-btn {
    top: auto;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-3d-wrapper.vertical .arrow-btn:hover {
    transform: translateX(-50%) scale(1.1);
}

.carousel-3d-wrapper.vertical .arrow-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.carousel-3d-wrapper.vertical .top-arrow {
    top: -20%;
}

.carousel-3d-wrapper.vertical .bottom-arrow {
    bottom: -20%;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .carousel-3d-wrapper {
        min-height: 300px;
        height: 40vh;
    }

    .carousel-3d-wrapper .arrow-btn {
        font-size: 48px;
        width: 60px;
        height: 60px;
    }

    .carousel-3d-wrapper .left-arrow {
        left: 10px;
    }

    .carousel-3d-wrapper .right-arrow {
        right: 10px;
    }

    .carousel-3d-wrapper.vertical .top-arrow {
        top: 10px;
    }

    .carousel-3d-wrapper.vertical .bottom-arrow {
        bottom: 10px;
    }
}
