/* ===== ОСНОВНЫЕ СТИЛИ ДЛЯ ГЕНЕРАТОРА ЦВЕТОВ ===== */

/* Секция генератора цветов */
.color-generator-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.color-generator-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--text-primary);
}

/* Переключатель типов цветов */
.color-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.color-type-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.color-type-btn i {
    font-size: 20px;
}

.color-type-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.color-type-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.color-type-btn.active i {
    color: white;
}

/* Сетка цветов */
.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 15px;
}

/* Ячейка цвета */
.color-swatch {
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: var(--bg-card);
    text-align: center;
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.color-swatch:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.color-swatch.selected {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Код цвета */
.color-code {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 5px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 auto 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Отметка "Выбрано" */
.item__check {
    font-size: 10px;
    color: var(--primary-color);
    font-weight: 600;
    display: none;
    background: white;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 2px;
}

.color-swatch.selected .item__check {
    display: inline-block;
}

/* ===== КВАДРАТ С ИМИТАЦИЕЙ ФАКТУРЫ ===== */

.texture-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: #f5f5f5;
}

/* Слой цвета */
.texture-color {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: background-color 0.3s ease;
    z-index: 1;
}

/* Слой текстуры */
.texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

/* Матовая фактура (под штукатурку) */
.texture-matte {
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 2px,
        transparent 2px,
        transparent 5px
    );
}

/* Глянцевая фактура (с отблеском) */
.texture-glossy {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    animation: glossy-shine 4s infinite;
}

@keyframes glossy-shine {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Сатиновая фактура (легкое свечение) */
.texture-satin {
    background: radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: satin-shimmer 6s infinite;
}

@keyframes satin-shimmer {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

/* ===== БЕЙДЖ С ВЫБРАННЫМ ЦВЕТОМ ===== */

.selected-color-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.badge-code {
    margin-right: 8px;
    color: var(--primary-color);
    font-weight: 700;
}

.badge-name {
    opacity: 0.9;
    font-weight: 400;
}

/* ===== ИНФОРМАЦИЯ О ВЫБРАННОМ ЦВЕТЕ ===== */

.selected-color-info {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.selected-color-preview {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: #ffffff;
    box-shadow: inset 0 2px 5px var(--shadow-color);
}

.selected-color-details {
    flex: 1;
}

.selected-color-code {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.selected-color-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== ИНФОРМАЦИЯ О ЦЕНАХ ===== */

.color-price-info {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.price-row:last-child {
    border-bottom: none;
}

.price-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.price-row .price-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
}

/* ===== ОПИСАНИЕ ТОВАРА ===== */

.product-short-description {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-primary);
}

.product-full-description {
    margin-bottom: 25px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */

.product-actions-modern {
    margin-top: 25px;
}

.product-actions-modern .btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

/* ===== ИНФОРМАЦИОННОЕ ПРИМЕЧАНИЕ ===== */

.product-info-note {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    border-left: 4px solid var(--primary-color);
}

.product-info-note i {
    color: var(--primary-color);
    font-size: 18px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

/* ===== ОСНОВНАЯ СТРУКТУРА ===== */

.product-detail-modern {
    display: flex;
    gap: 40px;
    padding: 40px;
    border-radius: 30px;
    margin: 30px 0;
}

.product-gallery-modern.large {
    flex: 1.3;
}

.product-info-modern.compact {
    flex: 0.7;
}

.product-main-image-wrapper.large {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

/* Glass effect */
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
}

/* Категория товара */
.product-category-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    background: var(--bg-secondary);
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.product-category-modern i {
    color: var(--primary-color);
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 1024px) {
    .product-detail-modern {
        flex-direction: column;
        gap: 30px;
    }

    .product-gallery-modern.large,
    .product-info-modern.compact {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .product-detail-modern {
        padding: 20px;
    }

    .selected-color-badge {
        bottom: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .color-palette {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .color-type-selector {
        flex-direction: column;
    }

    .color-type-btn {
        width: 100%;
    }

    .selected-color-info {
        flex-direction: column;
        text-align: center;
    }

    .selected-color-preview {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .color-palette {
        grid-template-columns: repeat(2, 1fr);
    }

    .color-code {
        font-size: 10px;
    }
}
