/* Основные стили для сайта */

/* Reset CSS */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Скрытие элементов только визуально (для скринридеров) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 18px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Предотвращаем горизонтальную прокрутку */
}

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: #333;
    font-weight: bold;
}

h2 {
    font-size: 1.86rem;
    margin-bottom: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

/* Сброс стилей для хедера */
header {
    background-color: #2E7D32 !important;
    color: white;
    padding: 0.9rem 0 0.7rem 0;
    width: 100%;
    margin: 0 !important;
    margin-top: 0 !important;
    line-height: 1.2;
    min-height: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Настройка кнопки меню */
.hamburger-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 100;
    margin-left: 1rem;
}

/* Настройка навигации */
.nav-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    border: none;
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
}

.nav-links li {
    margin: 0 1.5rem;
    display: inline-block;
    padding: 0;
    border: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    text-transform: uppercase;
    font-size: 0.96rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.5rem;
    display: inline-block;
    line-height: 1.2;
}

.nav-links a:hover, .nav-links a.active {
    color: #FFC107;
}

/* Мега-меню */
.mega-menu-item {
    position: relative;
}

.mega-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.mega-menu-trigger .arrow-down {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: 0.3rem;
    opacity: 1;
    color: white !important;
    font-weight: normal;
    display: inline-block;
}

.mega-menu-item:hover .mega-menu-trigger {
    color: #FFC107;
}

.mega-menu-item:hover .mega-menu-trigger .arrow-down {
    transform: rotate(180deg);
    opacity: 1;
    color: #FFC107 !important;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-width: 800px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.mega-menu-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 2rem;
}

.mega-menu-column {
    padding: 1rem;
    border-right: 1px solid #f0f0f0;
}

.mega-menu-column:last-child {
    border-right: none;
}

.mega-menu-column h3 {
    color: #1B5E20;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mega-menu-column p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.mega-menu-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 1rem;
    background-color: #2E7D32;
    border-radius: 4px;
    border: 2px solid #1B5E20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mega-menu-link:hover {
    color: #FFFFFF;
    text-decoration: none;
    background-color: #4CAF50;
    border-color: #2E7D32;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Центрирование заголовков на странице продукции */
.products-container h2,
.products-container h3,
.products-info h3,
.cta-section h3 {
    text-align: center;
}

/* Стили для навигации по категориям на странице продукции */
.categories-navigation {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.categories-navigation h2 {
    color: #1B5E20;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.categories-navigation p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.categories-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.category-nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.category-nav-link .category-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Разные цвета для иконок категорий */
.category-nav-link:nth-child(1) .category-icon {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.category-nav-link:nth-child(2) .category-icon {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.category-nav-link:nth-child(3) .category-icon {
    background: linear-gradient(135deg, #45B7D1, #96C93D);
}

.category-nav-link:nth-child(4) .category-icon {
    background: linear-gradient(135deg, #F093FB, #F5576C);
}

.category-nav-link .category-info {
    flex: 1;
}

.category-nav-link .category-info h3 {
    color: #1B5E20;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-nav-link .category-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    text-align: left;
}

/* Мобильные стили для навигации по категориям */
@media (max-width: 768px) {
    .categories-navigation {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .categories-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-nav-link {
        padding: 1rem;
    }
    
    .category-nav-link .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .category-nav-link .category-info h3 {
        font-size: 1.1rem;
    }
    
    .category-nav-link .category-info p {
        font-size: 0.85rem;
    }
}


/* Стили для страницы категорий */
.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.categories-intro {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.categories-intro p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Разные цвета границ при наведении для каждой категории */
.category-card:nth-child(1):hover {
    border-color: #FF6B6B;
}

.category-card:nth-child(2):hover {
    border-color: #4ECDC4;
}

.category-card:nth-child(3):hover {
    border-color: #45B7D1;
}

.category-card:nth-child(4):hover {
    border-color: #F093FB;
}

.category-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Разные цвета для каждой категории */
.category-card:nth-child(1) .category-icon {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.category-card:nth-child(2) .category-icon {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.category-card:nth-child(3) .category-icon {
    background: linear-gradient(135deg, #45B7D1, #96C93D);
}

.category-card:nth-child(4) .category-icon {
    background: linear-gradient(135deg, #F093FB, #F5576C);
}

.category-icon .icon {
    font-size: 2rem;
    color: white;
}

.category-content {
    flex: 1;
}

.category-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Разные цвета заголовков для каждой категории */
.category-card:nth-child(1) .category-content h2 {
    color: #D63031;
}

.category-card:nth-child(2) .category-content h2 {
    color: #2D5016;
}

.category-card:nth-child(3) .category-content h2 {
    color: #2D3436;
}

.category-card:nth-child(4) .category-content h2 {
    color: #E84393;
}

.category-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.category-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-features .feature {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

/* Разные цвета тегов для каждой категории */
.category-card:nth-child(1) .category-features .feature {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.category-card:nth-child(2) .category-features .feature {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.category-card:nth-child(3) .category-features .feature {
    background: linear-gradient(135deg, #45B7D1, #96C93D);
}

.category-card:nth-child(4) .category-features .feature {
    background: linear-gradient(135deg, #F093FB, #F5576C);
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: transparent !important;
}


.category-link .arrow {
    transition: transform 0.3s ease;
}

.category-link:hover .arrow {
    transform: translateX(3px);
}

.categories-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.categories-info h2 {
    text-align: center;
    color: #1B5E20;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Мобильные стили для страницы категорий */
@media (max-width: 768px) {
    .categories-container {
        padding: 1rem;
    }
    
    .category-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .category-icon {
        align-self: center;
        width: 60px;
        height: 60px;
    }
    
    .category-icon .icon {
        font-size: 1.5rem;
    }
    
    .category-content h2 {
        font-size: 1.3rem;
    }
    
    .category-features {
        justify-content: center;
    }
    
    .categories-info {
        padding: 1.5rem;
    }
    
    .categories-info h2 {
        font-size: 1.5rem;
    }
}

/* Стили для категорий продуктов на странице products.html */
.categories-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
}

.category-card {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #f0f0f0 !important;
    display: block !important;
    padding: 0 !important;
}

.category-link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    background: transparent !important;
}

.category-image {
    width: 100% !important;
    height: 220px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f8f9fa;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.category-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: transform 0.3s ease !important;
}

.category-card:hover .category-image img {
    transform: scale(1.05) !important;
}

.category-info {
    padding: 1.5rem !important;
}

.category-info h3 {
    margin: 0 0 0.5rem 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.category-info p {
    margin: 0 0 1rem 0 !important;
    color: #333 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

/* Белый текст для цветных карточек */
.categories-grid .category-card:nth-child(1) .category-info h3,
.categories-grid .category-card:nth-child(2) .category-info h3,
.categories-grid .category-card:nth-child(3) .category-info h3,
.categories-grid .category-card:nth-child(4) .category-info h3 {
    color: white !important;
}

.categories-grid .category-card:nth-child(1) .category-info p,
.categories-grid .category-card:nth-child(2) .category-info p,
.categories-grid .category-card:nth-child(3) .category-info p,
.categories-grid .category-card:nth-child(4) .category-info p {
    color: white !important;
}

.category-count {
    display: inline-block !important;
    background: #f8f9fa !important;
    color: #6c757d !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.category-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

/* Разные цвета фона для категорий */
.category-card:nth-child(1) .category-image {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
}

.category-card:nth-child(2) .category-image {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9) !important;
}

.category-card:nth-child(3) .category-image {
    background: linear-gradient(135deg, #fff3e0, #ffcc80) !important;
}

.category-card:nth-child(4) .category-image {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7) !important;
}

/* Разные цвета границ при наведении */
.category-card:nth-child(1):hover {
    border-color: #2196f3 !important;
}

.category-card:nth-child(2):hover {
    border-color: #4caf50 !important;
}

.category-card:nth-child(3):hover {
    border-color: #ff9800 !important;
}

.category-card:nth-child(4):hover {
    border-color: #9c27b0 !important;
}


/* Разные цвета фона для карточек */
.categories-grid .category-card:nth-child(1) {
    background: #ff6b6b !important;
}

.categories-grid .category-card:nth-child(2) {
    background: #4ecdc4 !important;
}

.categories-grid .category-card:nth-child(3) {
    background: #45b7d1 !important;
}

.categories-grid .category-card:nth-child(4) {
    background: #f093fb !important;
}

/* Стили для логотипа */
.header-logo {
    padding-left: 2.5rem;
    order: -1;
}

.header-logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
    border-radius: 4px;
}

/* Основной контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    flex: 1 0 auto; /* flex-grow: 1, flex-shrink: 0, flex-basis: auto */
    width: 100%;
}

main {
    flex: 1;
    min-width: 0;
    margin-right: 2rem;
    margin-top: 0; /* Убираем отрицательный отступ для sticky хедера */
    border-top: none;
}

aside {
    width: 300px;
}

aside section.sidebar-widget:first-of-type {
    margin-top: 130px;
}

#sidebar {
	margin-top: 90px;
}

/* Сайдбар */
.sidebar-widget {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h2 {
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sidebar-widget ul {
    list-style: none;
    padding-left: 0;
}

.sidebar-widget li {
    margin-bottom: 0.5rem;
}

/* Заголовок страницы */
.page-title {
    text-align: center;
    margin: 1.05rem 0;
    color: #333;
    font-size: 2.2rem;
    font-weight: bold;
}

/* Обертка для контента главной страницы */
.content-wrapper {
    margin-bottom: 2rem;
    position: relative;
    background-color: white;
}

.hero-image {
    margin-bottom: 0;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
}

/* Статья на главной странице */
.article {
    background-color: white;
    padding: 2rem;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0;
}

/* Ссылка для контакта */
.contact-link {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #2c3e50;
    color: white;
    border-radius: 0 0 5px 5px;
    text-align: center;
}

.contact-link a {
    color: #3498db;
    font-weight: bold;
}

.contact-link a:hover {
    color: #5dade2;
    text-decoration: none;
}

/* Страница контактов */
.contact-page {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Форма */
.contact-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2E7D32;
}

/* Уведомления */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Подвал */
footer {
    background-color: #1B5E20;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    font-size: 1.1rem;
    flex-shrink: 0; /* Запрещаем сжатие */
}

/* Стили для страницы "Продукция" */
.products-container {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.products-intro {
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 120px;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-name {
    padding: 1rem;
    text-align: center;
}

.product-name h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

/* Стили для кнопок "Sužinoti daugiau" на страницах категорий */
.products-container .product-link {
    display: inline-block;
    text-decoration: none;
    color: #fff !important;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.products-container .product-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #45a049, #4CAF50);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    text-decoration: none;
    color: #fff !important;
}

/* Стили для кнопок в секции "Panašūs produktai" - обычный вид */
.related-products .product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-weight: normal !important;
    font-size: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    margin-top: 0 !important;
}

.related-products .product-link:hover {
    transform: translateY(-5px);
    text-decoration: none;
    color: inherit !important;
}

/* Стили для страницы "О компании" */
.about-container {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-image {
    margin-bottom: 2rem;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-content {
    line-height: 1.7;
}

.about-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.about-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Стили для страницы блокировки формы */
.blocked-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.blocked-message p {
    margin-bottom: 1rem;
}

.blocked-message strong {
    color: #721c24;
    font-weight: bold;
}

.return-link {
    text-align: center;
    margin-top: 2rem;
}

.return-link a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.return-link a:hover {
    background-color: #2980b9;
    text-decoration: none;
}

/* Стили для skip-link (для пользователей клавиатуры) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2c3e50;
    color: white;
    padding: 8px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Улучшенный фокус для элементов навигации */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Стили для footer-links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links li {
    margin: 0 10px;
}

.footer-links a {
    color: #a4b0be;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

/* Улучшенная контрастность для текста */
.sidebar-widget h2 {
    color: #333;
    font-weight: bold;
}

.alert {
    font-weight: 500;
}

.container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

main {
    flex: 1;
    min-width: 0;
    margin-right: 0; /* Убираем правый отступ, теперь используем gap */
    margin-top: 0; /* Убираем отрицательный отступ */
}

aside {
    width: 300px;
    margin-top: 0; /* Убираем отступ сверху */
}

/* Медиа-запросы для адаптивности */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    main {
        margin-right: 0;
        margin-bottom: -30px !important;
    }

    aside {
        width: 100%;
    }

    aside section.sidebar-widget:first-of-type {
        margin-top: 0 !important;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0;
        position: sticky;
        top: 0;
        min-height: 3.2rem;
        margin-top: 0;
        border: none;
    }

    nav {
        margin-top: 0;
        padding-top: 0;
        border: none;
    }

    .hamburger-menu {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 1rem;
        font-size: 1.8rem;
        margin-left: 0;
        border: none;
    }

    .header-logo {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        padding-right: 0;
        border: none;
        z-index: 9999;
    }

    .header-logo img {
        height: 32px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin: 0;
        padding: 0;
        border: none;
    }

    .nav-links.active {
        display: flex;
        margin-top: 1rem;
        padding-top: 0;
        padding-bottom: 1rem;
    }

    .nav-links li {
        margin: 0;
        padding: 0.3rem 0;
        border: none;
    }

    .nav-links a {
        border: none;
    }

    /* Полностью скрываем мега-меню на мобильных устройствах */
    .mega-menu {
        display: none !important;
    }

    /* Убираем стрелку у триггера мега-меню на мобильных */
    .mega-menu-trigger .arrow-down {
        display: none !important;
    }

    .article, .contact-page {
        padding: 1.5rem;
    }

    .page-title {
        padding: 0 1rem;
        margin: 0.84rem 0;
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .product-image {
        height: auto;
        min-height: 160px;
    }

    .products-container,
    .about-container {
        padding: 1.5rem;
    }

    main {
        margin-bottom: -30px !important;
        border-top: none;
    }

    aside section.sidebar-widget:first-of-type {
        margin-top: 0 !important;
    }

    .container {
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0;
        position: sticky;
        top: 0;
    }

    .article, .contact-page {
        padding: 1rem;
    }

    .hero-image {
        margin-bottom: 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-image {
        height: auto;
        min-height: 120px;
    }

    .products-container,
    .about-container {
        padding: 1rem;
    }

    .container {
        padding-bottom: 2.5rem;
    }

    aside section.sidebar-widget:first-of-type {
        margin-top: 0;
    }

    main {
        margin-bottom: -30px !important;
    }

    .product-card {
        margin-bottom: 1.5rem;
    }

    .btn {
        padding: 0.85rem 1.5rem;
    }

    footer {
        margin-top: auto;
    }
}

/* МАКСИМАЛЬНАЯ СПЕЦИФИЧНОСТЬ ДЛЯ ЦВЕТОВ КАРТОЧЕК */
body .container main .products-container .categories-grid .category-card:nth-child(1) {
    background-color: #2c3e50 !important;
    background: #2c3e50 !important;
}

body .container main .products-container .categories-grid .category-card:nth-child(2) {
    background-color: #27ae60 !important;
    background: #27ae60 !important;
}

body .container main .products-container .categories-grid .category-card:nth-child(3) {
    background-color: #8e44ad !important;
    background: #8e44ad !important;
}

body .container main .products-container .categories-grid .category-card:nth-child(4) {
    background-color: #e74c3c !important;
    background: #e74c3c !important;
}

/* ЦВЕТА ТЕКСТА ДЛЯ КАРТОЧЕК */
/* Все карточки темные - белый текст */
body .container main .products-container .categories-grid .category-card:nth-child(1) .category-info h3,
body .container main .products-container .categories-grid .category-card:nth-child(2) .category-info h3,
body .container main .products-container .categories-grid .category-card:nth-child(3) .category-info h3,
body .container main .products-container .categories-grid .category-card:nth-child(4) .category-info h3 {
    color: white !important;
}

body .container main .products-container .categories-grid .category-card:nth-child(1) .category-info p,
body .container main .products-container .categories-grid .category-card:nth-child(2) .category-info p,
body .container main .products-container .categories-grid .category-card:nth-child(3) .category-info p,
body .container main .products-container .categories-grid .category-card:nth-child(4) .category-info p {
    color: white !important;
}

/* Top bar styles */
body .top-bar {
    background-color: #1B5E20 !important;
    color: white !important;
    padding: 0.25rem 0 !important;
    text-align: center !important;
    font-size: 0.65rem !important;
    font-weight: 400 !important;
    position: relative !important;
    z-index: 1001 !important;
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    border: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 1.5rem !important;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

body .top-bar .top-bar-text {
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    color: white !important;
    font-size: 0.65rem !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}