.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5e6d3 0%, #d4b896 50%, #c19a6b 100%);
    z-index: 2000;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(250, 245, 235, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    height: auto;
    min-height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    position: relative;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 30px 30px 0 0;
    margin-top: 20px;
    box-shadow: 0 -10px 40px rgba(101, 67, 33, 0.25);
    animation: slideUpModal 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close, .roulette-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2100;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(101, 67, 33, 0.3);
    border: 2px solid rgba(184, 134, 11, 0.3);
}

.modal-close:active, .roulette-close:active {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(101, 67, 33, 0.4);
}

.modal-close i {
    font-size: 20px;
    color: white;
}

.modal-content .tns-outer {
    height: 60vh;
    position: relative;
}

.modal-content .tns-ovh {
    height: 100%;
}

.modal-content .tns-inner {
    height: 100%;
}

.modal-content .product-slider {
    height: 100%;
}

.modal-content .tns-item {
    height: 100%;
}

.modal-content .tns-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-content .tns-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.modal-content .tns-nav button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 4px;
    padding: 0;
}

.modal-content .tns-nav button.tns-nav-active {
    background: white;
}

.product-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    margin-top: 0;
}

.product-title {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    color: #1a1a1a;
}

.product-description {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.product-price {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-id {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.product-brand {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Стили для обёртки изображения с кнопкой зума */
.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Кнопка зума (лупа) */
.zoom-button {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b6f47 0%, #654321 100%);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(101, 67, 33, 0.4);
    z-index: 50;
    -webkit-tap-highlight-color: transparent;
}

.zoom-button:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(101, 67, 33, 0.5);
}

.zoom-button:active {
    transform: scale(0.95);
}

.zoom-button i {
    font-size: 20px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .zoom-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
        top: 15px;
        left: 15px;
    }
    
    .zoom-button i {
        font-size: 18px;
    }
}


