/* Экран выбора катера */
.boat-screen {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 20px;
}

.boat-screen .screen-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding: 16px;
    margin: 0;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

/* Список катеров */
.boats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

/* Карточка катера */
.boat-card {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.boat-image-container {
    flex: 0 0 120px;
    height: 120px;
    overflow: hidden;
}

.boat-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.boat-info {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.boat-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.boat-price {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.boat-capacity {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.boat-description {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;  /* добавить эту строку */
    overflow: hidden;
}

.boat-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.boat-details-button {
    flex: 1;
    padding: 8px;
    background: white;
    border: 1px solid #667eea;
    border-radius: 6px;
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.boat-select-button {
    flex: 1;
    padding: 8px;
    background: #667eea;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.boat-details-button:hover {
    background: #f0f4ff;
}

.boat-select-button:hover {
    background: #5a67d8;
}

/* Детальный просмотр катера */
.boat-detail-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

.detail-header {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.detail-back-button {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* Галерея */
.boat-gallery {
    background: #f5f5f5;
    padding: 16px;
}

.gallery-main {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
}

.thumbnail {
    flex: 0 0 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid #667eea;
}

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

.gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
}

.gallery-nav {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.photo-count {
    font-size: 14px;
    color: #666;
}

/* Информация о катере */
.boat-detail-info {
    padding: 20px 16px;
}

.boat-detail-name {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.boat-detail-specs {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: #666;
    font-size: 15px;
}

.spec-value {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.boat-detail-description {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.boat-detail-description h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.boat-detail-description p {
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

.boat-select-detail-button {
    width: 100%;
    padding: 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.boat-select-detail-button:hover {
    background: #5a67d8;
}

/* Фуллскрин галерея */
.fullscreen-gallery {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.fullscreen-prev,
.fullscreen-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.fullscreen-prev {
    left: 20px;
}

.fullscreen-next {
    right: 20px;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.fullscreen-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Анимации для изображений */
.boat-image {
    transition: opacity 0.3s ease, filter 0.3s ease;
    will-change: opacity, filter;
}

.boat-image.placeholder {
    opacity: 0.7;
    filter: blur(5px);
    transform: scale(1.02);
}

.boat-image.fade-out {
    opacity: 0;
    filter: blur(10px);
}

.boat-image.fade-in {
    animation: polaroid-develop 0.5s ease-out forwards;
}

@keyframes polaroid-develop {
    0% {
        opacity: 0;
        filter: blur(15px) brightness(0.8);
        transform: scale(1.1);
    }
    20% {
        opacity: 0.3;
        filter: blur(8px) brightness(0.9);
        transform: scale(1.05);
    }
    40% {
        opacity: 0.6;
        filter: blur(4px) brightness(1);
        transform: scale(1.02);
    }
    60% {
        opacity: 0.8;
        filter: blur(2px) brightness(1.1);
        transform: scale(1.01);
    }
    80% {
        opacity: 0.95;
        filter: blur(1px) brightness(1.05);
        transform: scale(1);
    }
    100% {
        opacity: 1;
        filter: blur(0) brightness(1);
        transform: scale(1);
    }
}

.boat-image.loaded {
    animation: gentle-appear 0.3s ease;
}

@keyframes gentle-appear {
    from {
        opacity: 0.8;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Скелетон загрузки для карточки */
.boat-card.loading {
    position: relative;
    overflow: hidden;
}

.boat-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Индикатор загрузки */
.image-loading-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
