/**
 * BP3D Modal Styles
 */
 
 .product-modal-wrap{
     width: 100%;
 }

/* 360° Button Styling */
.bp3d-model-button-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.bp3d-model-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bp3d-model-button:hover {
    background-color: #e6e6e6;
    border-color: #ccc;
}

.bp3d-model-button-icon {
    margin-right: 8px;
    font-size: 1.2em;
    animation: rotate360 4s infinite linear;
    display: inline-block;
}

@keyframes rotate360 {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Modal Styling */
.bp3d-model-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bp3d-model-modal.open {
    display: block;
    opacity: 1;
}

.bp3d-model-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.bp3d-model-modal.open .bp3d-model-modal-content {
    transform: translateY(0);
}

.bp3d-model-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
}

.bp3d-model-modal-close:hover,
.bp3d-model-modal-close:focus {
    color: #333;
    text-decoration: none;
}

.bp3d-model-modal-body {
    min-height: 400px;
    position: relative;
}

/* Loading and Error States */
.bp3d-model-loading,
.bp3d-model-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

.bp3d-model-loading:before {
    content: "";
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bp3d-model-error {
    color: #d63638;
}

/* Make sure the modelViewerBlock inside modal has correct height */
.bp3d-model-modal .modelViewerBlock {
    height: 500px !important;
    width: 100% !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .bp3d-model-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .bp3d-model-modal .modelViewerBlock {
        height: 350px !important;
    }
}