/* --- Специфичные стили для детальной страницы --- */

body {
    min-height: 100vh;
}

nav {
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
}

.product-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- Блок Галереи --- */
.gallery-viewport {
    flex: 1.2;
    position: sticky;
    top: 0;
    background: #E0DCD5;
    overflow: hidden;
    height: 100vh;
}

#mainImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

/* Контейнер для скролла миниатюр */
.thumbnails-container {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    padding: 0 30px;
    z-index: 10;
}

.thumbnails-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Скрываем скроллбар в Chrome/Safari */
.thumbnails-scroll::-webkit-scrollbar {
    display: none;
}

.thumb {
    min-width: 60px;
    width: 60px;
    height: 80px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: 0.3s;
    opacity: 0.6;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb.active {
    opacity: 1;
    border: 1px solid #fff;
    transform: translateY(-5px);
}

/* --- Блок Инфо --- */
.info-panel {
    flex: 0.8;
    padding: 120px 6% 60px;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.badge {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 15px;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 15px;
}

.price {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 40px;
}

.description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 40px;
    max-width: 400px;
}

.specs {
    margin-bottom: 50px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #E0DCD5;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-action {
    display: block;
    width: 100%;
    padding: 24px;
    background: var(--dark);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: auto;
}

.btn-open-popup {
    padding: 25px;
    background: var(--dark);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    transition: 0.4s;
    border: none;
}

.btn-open-popup:hover {
    background: #000;
    letter-spacing: 5px;
}

/* --- ПОПАП (Окно заказа) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-content {
    background: var(--bg);
    width: 100%;
    max-width: 550px;
    padding: 60px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 20px;
    cursor: pointer;
    font-weight: 200;
}

.craft-info {
    border-bottom: 1px solid var(--border, #E0DCD5);
    padding-bottom: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.craft-info p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 500px) {
    .form-row, .form-row.three-cols {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 5px;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border, #E0DCD5);
    padding: 10px 0;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-bottom-color: var(--dark);
}

/* --- Успех --- */
#success-state {
    display: none;
    text-align: center;
    padding: 40px 0;
}

#success-state h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 400;
}

#success-state p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #555;
}

/* --- Адаптивность для мобилки --- */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
    }

    .product-page {
        flex-direction: column;
        height: auto;
    }

    .gallery-viewport {
        height: 70vh;
        width: 100%;
        flex: none;
    }

    .info-panel {
        padding: 40px 20px;
        flex: none;
        overflow: visible;
    }

    .thumbnails-container {
        padding: 0 15px;
        bottom: 20px;
    }

    .modal-content {
        padding: 40px 20px;
        width: 95%;
    }

    .spec-item {
        padding: 12px 0;
        font-size: 9px;
    }
}


