* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    background-color: white;
    margin: 0;
    padding: 40px;
    min-height: 100vh;
}

.step-title {
    color: #4a90e2;
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 20px;
}

.step-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 900px;
}

.cards-container {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 40px 30px;
    width: 220px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background-color: white;
}

.card:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.card.selected {
    border-color: #4a90e2;
    background-color: #f8fbff;
}

.card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 56px;
    height: 56px;
    fill: #4a90e2;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.hidden { display: none; }

/* Стили для страницы результатов */
.search-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.search-summary h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.param-label {
    font-weight: 600;
    color: #495057;
}

.param-value {
    color: #2c3e50;
    font-weight: 500;
}

.param-item.recommended-diameter {
    background-color: #e8f5e8;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #28a745;
    margin-top: 10px;
}

.param-item.recommended-diameter .param-label {
    color: #155724;
    font-weight: 700;
}

.param-item.recommended-diameter .param-value {
    color: #155724;
    font-weight: 600;
}

.results-section {
    margin-bottom: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.results-header h2 {
    margin: 0;
    color: #2c3e50;
}

.results-count {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.results-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.result-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.result-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.result-item.selected {
    border: 2px solid #28a745;
    background-color: #f8fff9;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.result-item.selected:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.equipment-image {
    text-align: center;
    margin-bottom: 15px;
}

.equipment-image img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 6px;
    background-color: #f8f9fa;
    padding: 10px;
}

.equipment-name {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.compatibility-score {
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.equipment-details {
    margin-bottom: 15px;
}

.equipment-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.detail-label {
    font-weight: 600;
    color: #6c757d;
    flex: 0 0 40%;
}

.detail-value {
    color: #2c3e50;
    text-align: right;
    flex: 1;
}

.equipment-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.equipment-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-results p {
    margin-bottom: 10px;
    font-size: 16px;
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .breadcrumb {
        font-size: 12px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .equipment-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .equipment-actions .btn {
        width: 100%;
    }
    
    .actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .actions .btn {
        width: 100%;
    }
}

/* Стили для детального просмотра оборудования */
.equipment-details-expanded {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 15px 0;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.details-header h3 {
    color: #4a90e2;
    font-size: 18px;
    margin: 0;
}

.close-details {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-details:hover {
    background-color: #e9ecef;
    color: #495057;
}

.details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details-section h4 {
    color: #495057;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-weight: 500;
    color: #495057;
    flex: 1;
}

.detail-value {
    color: #212529;
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-value {
        text-align: left;
        margin-left: 0;
    }
}