* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F8F9FA;
    color: #2C3E50;
    line-height: 1.6;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2C3E50;
    border-bottom: 2px solid #ECF0F1;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.2rem;
    margin: 25px 0 15px;
    color: #2C3E50;
    border-bottom: 2px solid #ECF0F1;
    padding-bottom: 8px;
}

a {
    text-decoration: none;
    color: #E67E22;
}

a:hover {
    text-decoration: underline;
}

.header {
    background: #2C3E50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    padding: 12px 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.logo a {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: white;
    letter-spacing: -0.5px;
}

.logo p {
    font-size: 11px;
    opacity: 0.7;
    margin: 0;
}

.catalog-menu {
    position: relative;
}

.catalog-button {
    background: #1A252F;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.catalog-button:hover {
    background: #E67E22;
}

.catalog-menu .catalog-button svg:first-child {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.catalog-menu .catalog-button svg:last-child {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.catalog-menu.open .catalog-button svg:first-child {
    transform: rotate(90deg);
}

.catalog-menu.open .catalog-button svg:last-child {
    transform: rotate(180deg);
}

.catalog-icon {
    font-size: 18px;
}

.catalog-arrow {
    font-size: 10px;
    margin-left: 5px;
}

.catalog-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.catalog-menu.open .catalog-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.catalog-columns {
    padding: 15px 0;
    max-height: 500px;
    overflow-y: auto;
}

.catalog-item {
    display: block;
    padding: 10px 20px;
    color: #2C3E50;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.catalog-item:hover {
    background: #F8F9FA;
    color: #E67E22;
    border-left-color: #E67E22;
    text-decoration: none;
}

.search-container {
    flex: 1;
    min-width: 250px;
}

.search-form {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-form button {
    background: #E67E22;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 18px;
    color: white;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #D35400;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.action-icon:hover {
    opacity: 0.8;
    text-decoration: none;
}

.action-label {
    font-size: 11px;
}

.logout-icon {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0;
    font-size: 11px;
}

.logout-icon:hover {
    opacity: 0.8;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #E67E22;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.breadcrumbs {
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 0;
}

.breadcrumbs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 8px;
}

.breadcrumb-separator {
    color: #7F8C8D;
    font-size: 16px;
    font-weight: 300;
    margin: 0 4px;
}

.breadcrumb-link {
    color: #7F8C8D;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.breadcrumb-link:hover {
    color: #E67E22;
    background: rgba(230, 126, 34, 0.1);
    text-decoration: none;
}

.breadcrumb-current {
    color: #2C3E50;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    background: #ECF0F1;
    border-radius: 4px;
}

.breadcrumb-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7F8C8D;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}

.breadcrumb-home:hover {
    color: #E67E22;
    background: rgba(230, 126, 34, 0.1);
    text-decoration: none;
}

button.action-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: white;
    font-family: inherit;
}

button.action-icon:hover {
    opacity: 0.8;
}

/* Модальное окно уведомлений */
.notifications-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.notifications-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.notifications-modal-container {
    position: relative;
    width: 380px;
    max-width: 90%;
    background: white;
    border-radius: 12px;
    margin: 60px 20px 0 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.2s ease;
    z-index: 10002;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ECF0F1;
}

.notifications-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2C3E50;
}

.notifications-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7F8C8D;
    padding: 0;
    line-height: 1;
}

.notifications-modal-close:hover {
    color: #E74C3C;
}

.notifications-modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.notification-item-modal {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item-modal:hover {
    background: #F8F9FA;
}

.notification-item-modal.unread {
    background: #fef5e8;
    border-left: 3px solid #E67E22;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #2C3E50;
}

.notification-message {
    font-size: 13px;
    color: #7F8C8D;
    margin-bottom: 5px;
}

.notification-date {
    font-size: 11px;
    color: #7F8C8D;
}

.empty-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #7F8C8D;
}

.empty-notifications svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.notification-item-modal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.notification-content {
    flex: 1;
    padding-right: 10px;
}

.notification-delete {
    background: none !important;
    border: none !important;
    padding: 0 5px !important;
    margin: 0 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    color: #7F8C8D !important;
    transition: color 0.2s !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

.notification-delete:hover {
    background: none !important;
    color: #E74C3C !important;
    transform: none !important;
}

.unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E74C3C;
    color: white;
    border-radius: 10px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 16px;
    min-width: 16px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Бейдж счётчика сравнения */
.compare-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E74C3C;
    color: white;
    border-radius: 10px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 16px;
    min-width: 16px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.compare-bell {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.compare-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Переключатель (toggle switch) */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ECF0F1;
    border-radius: 24px;
    transition: 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #E67E22;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 14px;
    color: #2C3E50;
    user-select: none;
}

/* Подсветка различающихся характеристик */
.compare-table tr.diff-row {
    background-color: rgba(230, 126, 34, 0.15);
}

.compare-table tr.diff-row:hover {
    background-color: rgba(230, 126, 34, 0.3);
}

.compare-table tr {
    transition: all 0.2s ease;
}

.catalog-divider {
    height: 1px;
    background: #ECF0F1;
    margin: 8px 0;
}

.catalog-all {
    font-weight: 600;
    color: #E67E22;
}

.catalog-all:hover {
    background: #fef5e8;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1024px) {
    .header-container {
        gap: 15px;
    }
    
    .action-label {
        display: none;
    }
    
    .user-actions {
        gap: 12px;
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .logo p {
        font-size: 10px;
    }
    
    .catalog-button span {
        display: none;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .user-actions {
        gap: 8px;
    }
    
    .action-label {
        display: none;
    }
    
    .action-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .catalog-menu {
        width: 100%;
    }
    
    .catalog-button {
        width: 100%;
        justify-content: center;
    }
    
    .search-container {
        width: 100%;
    }
    
    .user-actions {
        justify-content: center;
        width: 100%;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 15px;
    }
}