:root {
    --product-primary: #27ae60;
    --product-dark: #229954;
    --product-light: #e9f7ef;
    --product-gradient: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* Общие стили */
.products-page {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигационные крошки */
.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #7f8c8d;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--product-primary);
}

.breadcrumbs span {
    margin: 0 0.5rem;
}

/* Шапка страницы */
.page-header {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInUp 0.8s ease;
}

.page-title {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--product-primary);
    border-radius: 2px;
}

.page-description {
    font-size: 1.125rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 2rem auto 0;
    line-height: 1.6;
}

/* Сетка категорий */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Карточка категории */
.category-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: cardAppear 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(39, 174, 96, 0.15);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Изображение категории */
.category-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.category-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(39, 174, 96, 0.2) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
}

.category-card:hover .category-image::before {
    opacity: 1;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

/* Контент категории */
.category-content {
    padding: 1.5rem;
}

.category-name {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.category-card:hover .category-name {
    color: var(--product-primary);
}

.category-description {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.category-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--product-primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.category-card:hover .category-action {
    gap: 0.75rem;
}

/* Сетка товаров */
.products-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Карточка товара */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(39, 174, 96, 0.15);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Изображение товара */
.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

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

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Контент товара */
.product-content {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-card:hover .product-name {
    color: var(--product-primary);
}

.product-description {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Цена товара */
.product-price {
    font-size: 1.5rem;
    color: var(--product-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--product-primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.product-card:hover .product-action {
    gap: 0.75rem;
}

/* Кнопка "Назад" */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--product-primary);
    color: var(--product-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 2rem;
}

.back-button:hover {
    background: var(--product-primary);
    color: white;
    gap: 0.75rem;
}

/* Страница товара */
.product-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    animation: slideUp 0.8s ease;
}

.product-detail-header {
    padding: 2rem 2rem 1rem;
}

.product-detail-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.product-category {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--product-light);
    color: var(--product-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.product-main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 2rem;
}

.product-detail-content {
    padding: 2rem;
}

/* Блоки информации о товаре */
.product-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-price-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.product-price-value {
    font-size: 2.5rem;
    color: var(--product-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-availability {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--product-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Спецификации */
.product-specifications {
    margin-bottom: 2rem;
}

.specifications-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--product-light);
}

.specifications-list {
    list-style: none;
    padding: 0;
}

.specifications-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.specifications-list li:last-child {
    border-bottom: none;
}

.spec-label {
    color: #666;
    font-weight: 500;
}

.spec-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Полное описание */
.product-full-description {
    margin-bottom: 3rem;
}

.full-description-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Похожие товары */
.related-products {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.related-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Кнопка запроса */
.request-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--product-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.request-button:hover {
    background: var(--product-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
    gap: 1rem;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Адаптивность */
@media (max-width: 992px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-detail-title {
        font-size: 2rem;
    }
    
    .product-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .products-page {
        padding: 100px 0 40px;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-header,
    .product-detail-content {
        padding: 1.5rem;
    }
    
    .product-main-image {
        height: 300px;
        padding: 1rem;
    }
}
@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .product-detail-title {
        font-size: 1.5rem;
    }
    
    .product-price-value {
        font-size: 2rem;
    }
}










/* Базовые стили модального окна */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); /* Эффект размытия фона */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover { color: #2c3e50; }

.modal-header h3 {
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 1.5rem;
}

#modalProductName {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Стили формы */
.modal-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.modal-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.modal-form label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #34495e;
}

.modal-form input, 
.modal-form textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.modal-form input:focus, 
.modal-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-kp-btn {
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.submit-kp-btn:hover { background-color: #2980b9; }

.form-note {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 10px;
    text-align: center;
}

/* Адаптивность для мобилок */
@media (max-width: 600px) {
    .modal-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}