/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #555353;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Минимальная высота на весь экран */
}

a {
    text-decoration: none;
    color: #656466;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff3130;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Стиль для контейнера содержимого страницы */
.page-content {
    flex: 1 0 auto;
    width: 100%;
    min-height: 70vh; /* Минимальная высота контента */
    display: flex;
    flex-direction: column;
}

/* Header styles */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    left: 0;
    right: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.logo {
    flex: 0 0 auto;
    min-width: 140px;
}

.logo a {
    display: block;
}

.logo img {
    height: 50px;
    width: auto;
    padding: 5px 0;
    display: block;
}

.main-nav {
    flex: 1 1 auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    font-weight: 500;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fd890a;
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    color: #fd890a;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
    border-radius: 2px;
}

/* Hero section */
.hero {
    background-color: #000000;
    color: #dadada;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.hero .slogan {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Categories section */
.categories {
    margin-bottom: 40px;
}

.categories h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #888585;
}

.catalog-page .categories {
    margin-top: 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.category-image {
    height: 0;
    padding-bottom: 133.33%; /* Это соответствует пропорции 3:4 (900:1200) */
    position: relative;
    overflow: hidden;
}

.category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f0f0f0;
    color: #6d7174;
}

.category-card h3 {
    padding: 15px;
    text-align: center;
    color: #333;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: #fd890a;
}

.product-image {
    height: 0;
    padding-bottom: 133.33%; /* Это соответствует пропорции 3:4 (900:1200) */
    position: relative;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px;
    text-align: center;
    color: #333;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 20px 0;
    color: #6d7174;
}

.breadcrumbs a {
    color: #6d7174;
}

.breadcrumbs a:hover {
    color: #ff3130;
}

/* Category header */
.category-header {
    margin-bottom: 30px;
}

.category-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.category-description {
    color: #6d7174;
}

.no-products {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    text-align: center;
    color: #6d7174;
    font-style: italic;
    margin: 20px 0;
}

/* Product detail */
.product-detail {
    margin-bottom: 50px;
}

.product-detail h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.product-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.product-gallery {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: calc(50% - 15px);
    flex: 0 0 auto;
    align-self: flex-start;
    position: sticky;
    top: 90px;
}

.product-main-image {
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    height: 0;
    padding-bottom: 133.33%; /* Соответствует пропорции 3:4 (900:1200) */
    overflow: hidden;
}

.product-main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: calc(50% - 15px);
    flex: 0 0 auto;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    padding: 10px;
}

.product-description p {
    margin-bottom: 15px;
}

.product-description ul, 
.product-description ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.product-description h2, 
.product-description h3, 
.product-description h4 {
    color: #fd890a;
    margin-top: 20px;
    margin-bottom: 15px;
}

.product-description h2 {
    font-size: 1.5rem;
}

.product-description h3 {
    font-size: 1.3rem;
}

.product-description h4 {
    font-size: 1.1rem;
}

.product-infographic {
    margin-top: 30px;
    text-align: center;
}

.product-infographic img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* About page */
.about-page {
    margin-bottom: 50px;
}

.about-page h1 {
    color: #333;
    margin-bottom: 30px;
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.about-text h2 {
    color: #fd890a;
    margin: 20px 0 15px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.advantages {
    margin-left: 20px;
    margin-bottom: 20px;
}

.advantages li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.advantages li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: #ff3130;
    border-radius: 50%;
}

.about-image {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-logo {
    max-width: 80%!important;
    max-height: 300px;
    object-fit: contain;
    padding: 20px;
    box-shadow: none!important;
}

/* Contacts page */
.contacts-page {
    margin-bottom: 50px;
}

.contacts-page h1 {
    color: #333;
    margin-bottom: 30px;
}

.contacts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-info {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info h2 {
    color: #fd890a;
    margin-bottom: 20px;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    margin-bottom: 15px;
}

.contact-form {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    color: #fd890a;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #6d7174;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #fd890a;
}

.form-submit {
    text-align: right;
    margin-top: 20px;
}

.g-recaptcha {
    margin: 20px 0;
}

.captcha-container {
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #fd890a;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #ff3130;
}

.success-message {
    padding: 15px;
    background-color: #e6ffe6;
    color: #006600;
    border-radius: 5px;
    margin-bottom: 20px;
}

.error-message {
    padding: 15px;
    background-color: #ffe6e6;
    color: #cc0000;
    border-radius: 5px;
    margin-bottom: 20px;
}

.map-container {
    margin-top: 40px;
}

.map-container h2 {
    color: #fd890a;
    margin-bottom: 20px;
}

.map {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 10px;
}

.map iframe {
    border-radius: 6px;
    width: 100%;
    display: block;
}

/* Footer styles */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0 15px;
    flex-shrink: 0; /* Предотвращает сжатие футера */
}

.footer-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 30px;
}

.footer-contacts {
    font-size: 1rem;
    text-align: center;
    padding: 0 20px;
    line-height: 1.5;
}

.contact-info-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    color: #ccc;
    margin-top: 10px;
    margin-bottom: 10px;
}

.separator {
    color: #fd890a;
    font-weight: bold;
}

.contact-label {
    font-weight: 600;
    color: #fd890a;
    margin-right: 4px;
}

.footer-contacts p {
    margin: 0;
    color: #ccc;
}

.copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 0.9rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px 30px 0;
}

.copyright p {
    margin: 0;
}

/* Admin styles */
.admin-login {
    max-width: 400px;
    margin: 100px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-login h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ff3130;
}

.admin-panel {
    padding: 30px 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-nav {
    background-color: #333;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.admin-nav ul {
    display: flex;
    list-style: none;
}

.admin-nav li {
    margin-right: 20px;
}

.admin-nav a {
    color: #fff;
}

.admin-nav a:hover {
    color: #fd890a;
}

.admin-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dashboard styles */
.dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.stat-card h3 {
    color: #6d7174;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff3130;
    margin-bottom: 15px;
}

.quick-actions {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.quick-actions h3 {
    color: #6d7174;
    margin-bottom: 15px;
    text-align: center;
}

.quick-actions .action-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
}

.quick-actions .btn {
    min-width: 200px;
    text-align: center;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* фиксированная ширина столбцов */
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle; /* вертикальное выравнивание по центру */
    word-wrap: break-word; /* перенос по словам */
}

.admin-table th {
    background-color: #f0f0f0;
    font-weight: 500;
}

/* Кнопки действий в таблицах */
.admin-table .action-buttons {
    display: flex;
    flex-direction: column; /* расположение кнопок в столбец */
    gap: 8px;
}

.btn-edit, .btn-delete {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-edit {
    color: #fff;
    background-color: #007bff;
}

.btn-delete {
    color: #fff;
    background-color: #dc3545;
}

/* Filter styles */
.filter-container {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-form label {
    font-weight: bold;
    margin-right: 8px;
}

.filter-form select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    min-width: 200px;
}

.filter-form button {
    padding: 8px 15px;
    background-color: #ff3130;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-form button:hover {
    background-color: #e62a29;
}

.filter-form a.btn {
    padding: 8px 15px;
    background-color: #6d7174;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
}

.filter-form a.btn:hover {
    background-color: #5a5e61;
}

/* Responsive styles */
@media (max-width: 992px) {
    .product-content {
        flex-direction: column;
    }
    
    .product-gallery,
    .product-info {
        width: 100%;
    }
    
    .product-gallery {
        position: relative;
        top: 0;
    }
    
    .about-content,
    .contacts-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 15px 15px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex: 0 0 auto;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .main-nav a {
        display: block;
        padding: 15px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-form select {
        width: 100%;
    }
    
    /* Адаптивные стили для админ-панели */
    .dashboard-stats {
        flex-direction: column;
    }
    
    .quick-actions .action-buttons {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        width: 100%;
    }
    
    /* Адаптивные стили для футера */
    .contact-info-inline {
        flex-direction: column;
        gap: 5px;
    }
    
    .separator {
        display: none;
    }
}