/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.4s ease;
}

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

.modal-content {
    position: relative;
    background: #ebebeb;
    padding: 25px 25px 16px;
    border-radius: 20px;
    max-width: 90%;
    width: auto;
    max-height: 90vh;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal img {
    max-width: 100%;
    max-height: calc(60vh - 40px);
    height: auto;
    width: auto;
    border-radius: 12px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

/* Парящая карточка с описанием */
.details-card {
    background: white;
    border-radius: 16px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 8px;
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
    color: #4a3a30;
    font-family: 'Bad Script', cursive;
    font-size: 1.3rem;
    line-height: 1.6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.details-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Контейнер для изображения и стрелок */
.modal-image-container {
    position: relative;
    width: 100%;
    max-width: 612px;
    height: 408px;
    margin: 0 auto 16px;
    border-radius: 12px;
}

#modalImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Фон модального окна */
.modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(8px) brightness(0.6);
    z-index: 1;
}
/* Карточка цены — полупрозрачная, слева внизу */
.price-badge {
    position: absolute;
    left: 10px;
    bottom: 37%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.1),
        inset 0 1px 3px rgba(255,255,255,0.6),
        inset 0 -1px 2px rgba(0,0,0,0.1);
    font-family: 'Bad Script', cursive;
    font-size: 16px;
    color: #800080;
    z-index: 5;
    white-space: nowrap; /* не переносить текст */
}

.price-badge span {
    font-weight: 600;
}