/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #125ca6;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    min-height: 70px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 48px;
    width: auto;
}

/* Контакты в шапке */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    font-size: 1.2rem;
    font-weight: 600;
    color: #125ca6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-phone:hover {
    color: #0d4a8a;
    text-decoration: underline;
}

.header-callback-btn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.header-callback-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Корзина в шапке */
.header-cart {
    position: relative;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 2px solid #125ca6;
    border-radius: 8px;
    text-decoration: none;
    color: #125ca6;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cart-link:hover {
    background: #125ca6;
    color: white;
    transform: translateY(-2px);
}

.cart-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M7 4V2C7 1.45 7.45 1 8 1H16C16.55 1 17 1.45 17 2V4H20C20.55 4 21 4.45 21 5S20.55 6 20 6H19V19C19 20.1 18.1 21 17 21H7C5.9 21 5 20.1 5 19V6H4C3.45 6 3 5.55 3 5S3.45 4 4 4H7ZM9 3V4H15V3H9ZM7 6V19H17V6H7Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.cart-count {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: -5px;
    right: -5px;
}

.main-nav {
    background: #125ca6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-list a:hover,
.nav-list a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.nav-list a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #28a745;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-list a:hover::before,
.nav-list a.active::before {
    width: 80%;
}

/* Подменю (если нужно) */
.nav-list .dropdown {
    position: relative;
}

.nav-list .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-list .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    color: #333;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #125ca6;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.category-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #3967ac;
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Фильтры по размерам */
.size-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.size-btn {
    padding: 12px 24px;
    border: 2px solid #125ca6;
    background: white;
    color: #125ca6;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
}

.size-btn:hover,
.size-btn.active {
    background: #125ca6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 92, 166, 0.3);
}

/* Основной контент */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr 350px;
    gap: 30px;
    align-items: start;
}

/* Левая колонка - фильтры */
.filters-sidebar {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

.filters-sidebar h3 {
    color: #125ca6;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.thickness-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sort-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.filter-checkbox:hover {
    background: #f0f4fa;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    position: relative;
    padding-left: 30px;
    font-weight: 500;
    color: #333;
}

.checkmark:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #125ca6;
    border-radius: 4px;
    background: white;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark:before {
    background: #125ca6;
}

/* Центральная колонка - товары */
.products-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.product-card {
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #125ca6;
}

.product-image {
    text-align: center;
    margin-bottom: 15px;
}

.product-image img {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #125ca6;
    margin-bottom: 10px;
    text-align: center;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-specs {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: #125ca6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 16px;
}

.add-to-cart-btn:hover {
    background: #0d4a8a;
    transform: translateY(-2px);
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 15px 40px;
    background: #125ca6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #0d4a8a;
    transform: translateY(-2px);
}

/* Правая колонка - корзина */
.cart-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #125ca6;
    font-size: 1.3rem;
    font-weight: 600;
}

.cart-count {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 400px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cart-item-specs {
    font-size: 0.8rem;
    color: #666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #125ca6;
    background: white;
    color: #125ca6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #125ca6;
    color: white;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-total {
    padding: 20px;
    border-top: 1px solid #e0e6ed;
    background: #f8f9fa;
}

.total-info {
    margin-bottom: 15px;
}

.total-info p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 500;
}

.order-btn {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.order-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #125ca6;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input,
.modal-content textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.modal-content button {
    padding: 15px;
    background: #125ca6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}
.callback-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.callback-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 200px 1fr 300px;
        gap: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
	
	.header-flex {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-contacts {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .nav-list::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-list::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.1);
    }
    
    .nav-list::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 2px;
    }
    
    .nav-list li {
        flex-shrink: 0;
    }
    
    .nav-list a {
        padding: 12px 20px;
        white-space: nowrap;
    }
	
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters-sidebar,
    .cart-sidebar {
        position: static;
    }
    
    .cart-sidebar {
        order: -1;
        max-height: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 768px) {
	
	.container {
        padding: 0 15px;
    }
    
    .header-flex {
        padding: 10px 15px;
        min-height: 60px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .header-phone {
        font-size: 1rem;
    }
    
    .header-callback-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .cart-link {
        padding: 8px 12px;
    }
    
    .nav-list a {
        padding: 10px 15px;
        font-size: 14px;
    }
	
    .category-container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .size-filters {
        padding: 15px;
        gap: 10px;
    }
    
    .size-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .thickness-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
	
	.header-flex {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .header-contacts {
        order: 2;
        flex-direction: column;
        gap: 10px;
        margin-top: 0;
    }
    
    .header-cart {
        order: 1;
        align-self: flex-end;
        position: absolute;
        top: 10px;
        right: 15px;
    }
    
    .main-nav {
        position: sticky;
        top: 0;
        z-index: 99;
    }
    
    .nav-list {
        padding: 0 5px;
    }
    
    .nav-list a {
        padding: 10px 12px;
        font-size: 13px;
    }
	
    .size-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .size-btn {
        text-align: center;
    }
    
    .thickness-filters {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-item-controls {
        align-self: flex-end;
    }
}

/* Анимации загрузки */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #125ca6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.callback-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.callback-close:hover {
    color: #000;
}

.callback-modal h3 {
    color: #125ca6;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.callback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.callback-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.callback-form input:focus {
    outline: none;
    border-color: #125ca6;
    box-shadow: 0 0 0 2px rgba(18, 92, 166, 0.1);
}

.callback-form button {
    padding: 12px;
    background: #125ca6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.3s ease;
}

.callback-form button:hover {
    background: #0d4a8a;
}