/* Основные стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/*
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
*/
/* Шапка
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 3px solid #eaeaea;
}
 */
h1 {
    color: #2c3e50;
    font-size: 32px;
    display: flex;
    align-items: center;
    gap: 15px;
}

h1 i {
    color: #3498db;
}

.count-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cf-btn {
    padding: 5px 7px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    /* */display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cf-btn:cf-active {
    transform: translateY(-1px);
}

.cf-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.cf-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2573a7 100%);
}

.cf-btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.cf-btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.cf-btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.cf-btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
}

.cf-btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.cf-btn-success:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* Переключатель вида */
.cf-view-toggle {
    display: flex;
    justify-content: center;
    margin: 30px 0 40px;
    gap: 15px;
}

.cf-view-btn {
    padding: 12px 30px;
    background: #ecf0f1;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf-view-btn:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

.cf-view-btn.cf-active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Загрузка */
.cf-loading {
    text-align: center;
    padding: 80px 20px;
}

.cf-loader {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

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

/* Пустое состояние */
.cf-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    margin: 20px 0;
}

.cf-empty-state h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.cf-empty-state p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 18px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Сетка товаров */
.cf-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.cf-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.4s ease;
    position: relative;
}

.cf-product-card:hover {
    border-color: #3498db;
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
    transform: translateY(-8px);
}

.cf-product-image-container {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.cf-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cf-product-card:hover .product-image {
    transform: scale(1.08);
}

.cf-product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
}

.cf-remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cf-remove-btn:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.cf-product-info {
    padding: 25px;
}

.cf-product-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.4;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cf-product-price {
    color: #e74c3c;
    font-size: 24px;
    font-weight: 800;
    margin: 20px 0;
}

.cf-product-price s {
    color: #95a5a6;
    font-size: 18px;
    margin-left: 10px;
    font-weight: 500;
}

.cf-product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.cf-category-tag {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
}

.cf-product-dimensions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.cf-dimension {
    text-align: center;
}

.cf-dimension-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.cf-dimension-value {
    display: block;
    font-weight: 800;
    color: #2c3e50;
    font-size: 16px;
}

.cf-product-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.cf-product-actions .cf-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* Таблица сравнения */
.cf-compare-table-container {
    overflow-x: auto;
    margin-top: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cf-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.cf-compare-table th,
.cf-compare-table td {
    border: 1px solid #e0e0e0;
    padding: 18px;
    vertical-align: top;
}

.cf-compare-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #2c3e50;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 10;
}

.cf-product-column {
    width: 280px;
    text-align: center;
    background: white;
}

.cf-product-column img {
    max-width: 200px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cf-compare-section {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 700;
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .ccf-ontainer {
        padding: 20px;
    }
    
    .cf-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .cf-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .cf-action-buttons {
        width: 100%;
        justify-content: stretch;
    }
    
    .cf-action-buttons .btn {
        flex: 1;
        min-width: 140px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .cf-products-grid {
        grid-template-columns: 1fr;
    }
    
    .cf-product-dimensions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cf-view-toggle {
        flex-direction: column;
    }
    
    .cf-view-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .cf-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    .cf-product-price {
        font-size: 20px;
    }
    
    .cf-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cf-product-card {
    animation: fadeIn 0.5s ease;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Уведомления */
.cf-notification {
    position: fixed;
    top: 25px;
    right: 25px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 10px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
}

.cf-notification i {
    font-size: 20px;
}

.cf-notification-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.cf-notification-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.cf-notification-warning {
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
}

.cf-notification-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}