/* ===== СТРАНИЦА КАТАЛОГА ===== */

.page-header {
    padding: 120px 5% 20px;
    background: linear-gradient(135deg, var(--light) 0%, #fff 100%);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.page-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* ===== КАРТОЧКА ТОВАРА (Ozon/Wildberries стиль) ===== */
.product-card-section {
    padding: 20px 5% 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
    border: 1px solid var(--light-gray);
}

/* Галерея */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 500px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--light-gray);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    background: var(--light);
}

.gallery-thumb:hover {
    border-color: var(--main-light);
}

.gallery-thumb.active {
    border-color: var(--main);
    box-shadow: 0 0 0 3px rgba(168, 69, 59, 0.2);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Инфо товара */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-info h1 {
    font-size: 2rem;
    color: var(--dark);
    line-height: 1.2;
    margin: 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stars {
    color: var(--analog1);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.reviews {
    color: var(--gray);
    font-size: 0.9rem;
}

.product-price-block {
    background: linear-gradient(135deg, var(--light) 0%, #fff 100%);
    padding: 24px;
    border-radius: 16px;
    border: 2px solid var(--light-gray);
}

.price-current {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--main);
    line-height: 1;
}

.price-per {
    color: var(--gray);
    font-size: 1rem;
    margin-top: 4px;
}

.product-color {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.color-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--light-gray);
}

.color-value span {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

.product-specs-short {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
}

.spec-short {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.spec-short span {
    color: var(--gray);
}

.spec-short strong {
    color: var(--dark);
    font-weight: 600;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-actions .btn-large {
    width: 100%;
    justify-content: center;
    padding: 18px;
    font-size: 1.1rem;
}

.product-delivery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 8px;
}

.delivery-item {
    background: var(--light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark);
    font-weight: 500;
}

/* ===== 3D РЕДАКТОР ===== */
.editor-section-catalog {
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.editor-section-header {
    text-align: center;
    margin-bottom: 24px;
}

.editor-section-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.editor-section-header p {
    color: var(--gray);
    font-size: 1rem;
}

.editor-section-catalog .editor-container {
    position: relative;
    height: 550px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--dark);
}

/* Кнопки текстур */
.editor-section-catalog .editor-ui {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: 60px;
    display: flex;
    gap: 12px;
    z-index: 200;
    border: 1px solid rgba(255,255,255,0.25);
}

.editor-section-catalog .texture-btn {
    width: 64px;
    height: 76px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid rgba(255,255,255,0.3);
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    overflow: hidden;
}

.editor-section-catalog .texture-btn img {
    width: 100%;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.editor-section-catalog .texture-btn .texture-label {
    color: white;
    font-size: 0.6rem;
    text-align: center;
    margin-top: 4px;
    line-height: 1.2;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.editor-section-catalog .texture-btn:hover {
    transform: scale(1.08);
    border-color: white;
}

.editor-section-catalog .texture-btn.active {
    border: 3px solid var(--main);
    box-shadow: 0 0 0 3px rgba(168, 69, 59, 0.4);
}

/* ===== СПИСОК ПОХОЖИХ ===== */
.catalog-list-section {
    padding: 60px 5% 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 30px;
}

.catalog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.catalog-item {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.catalog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--main);
}

.item-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.catalog-item:hover .item-image img {
    transform: scale(1.08);
}

.item-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--main);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-info {
    padding: 16px;
}

.item-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.item-desc {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--light-gray);
}

.item-color {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray);
}

.item-color .color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--light-gray);
}

.item-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main);
}

/* Адаптив */
@media (max-width: 1024px) {
    .product-card {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery-main {
        max-height: 400px;
    }
    
    .editor-section-catalog .editor-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .product-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .price-current {
        font-size: 2rem;
    }
    
    .catalog-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .item-image {
        height: 140px;
    }
    
    .item-desc {
        display: none;
    }
}

.hidden {
    display: none !important;
}

/* Плавное появление */
.product-card-section,
.editor-section-catalog {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}