.model-modal, .model-modal2 {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(4px);
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 999999;
}
.model-modal.open, .model-modal2.open {
    opacity: 1;
    pointer-events: auto;
}
.model-modal .model-content, .model-modal2 .model-content {
    position: relative;
    width: 100%;
    height: 100%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.model-modal .model-close, .model-modal2 .model-close {
    position:absolute;
    top:20px;
    right:20px;
    font-size:40px;
    background:none;
    border:none;
    color:white;
    cursor:pointer;
    z-index:1000;
}
.model-backdrop {
    position:absolute;
    inset:0;
}

.model-preview-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 500px;
    /* z-index: 600; */
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    background-image: url('https://cloud.odaiabunicii.ro/blur4.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border-radius: 12px;
    margin-bottom: 15px;
}

@media (max-width: 999px) {
    .model-preview-wrapper {
        height: 300px;
        max-width: 100vw;
    }
}

.MagicToolboxContainer * {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.MagicZoom img {border-radius: 12px;}

@media (min-width: 1000px){
    .MagicZoom > img, figure > img {
        /* width: 500px !important; */
        height: 600px !important;
    }
}

.model-preview-wrapper.active {
    display: flex !important;
}

.model-preview-model {
    width: 75%;
    height: 100%;
    position: relative;
}

.model-preview-text {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: #33cccc;
    z-index: 10;
    pointer-events: none;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    animation: fadeIn 0.5s infinite alternate; 
}

.model-preview-text2 {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: #33cccc;
    z-index: 10;
    pointer-events: none;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
}

.model-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 700;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 28px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.model-preview-wrapper.active .model-close-btn {
    display: flex;
}

.model-close-btn:hover {
    background: rgba(0,0,0,0.9);
}

.model-thumbnails-label {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    display: none;
}

.model-preview-wrapper.active .model-thumbnails-label {
    display: block;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@media (max-width: 999px) {
    .model-close-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .model-thumbnails-label {
        font-size: 11px;
        padding: 6px 12px;
    }
}

.model-click-img {
  width: 65px; 
  height: 65px;
  position: absolute;
  top: 15px; right: 15px;
  transform: rotate(240deg);
  z-index: 10;
  pointer-events: none;
}

.model-play-button {
    cursor: pointer;
    user-select: none;

    padding: 15px 15px; box-sizing: border-box;

    background: #fd953c; color: white;

    border-radius: 20px; font-size: 15px;
    border: none;
    z-index: 1001;
}

.model-play-button:hover {
    background: #fcac66ff;
}

.model-switch-btn {
    background: #fd953c;
    color: #fff;
    border: none !important;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 24px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(51,204,204,0.08);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

model-switch-btn:focus {
    border: none;
}

.model-switch-btn:hover {
    background: #fcac66ff;
    color: #fff;
}
.model-switch-btn.inactive {
    background: #ccc;
    color: #666;
}
.model-switch-btn.inactive:hover {
    background: #ddd;
    color: #666;
}

.model-play-parent {
    position: absolute; left: 50%;
    transform: translateX(-50%);
    bottom: 25px; z-index: 1001;

    display: flex; gap: 5px;
}

.model-play-button:focus {
  outline: none;
  box-shadow: none;
}

@media(max-width: 999px){
    .model-play-parent {
        flex-direction: column;
    }
}