/* Базові стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Стилі для header */
.main-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 8px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-box button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 15px;
}

.user-actions a {
    color: white;
    font-size: 18px;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 10px 0;
    background-color: #34495e;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Стилі для sidebar */
.sidebar {
    width: 250px;
    background-color: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 10;
}

.sidebar-toggle {
    display: none;
    position: absolute;
    right: -30px;
    top: 20px;
    background-color: white;
    width: 30px;
    height: 50px;
    border-radius: 0 5px 5px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.module-item {
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #eee;
}

.module-item:hover {
    background-color: #f8f8f8;
}

.module-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.module-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.module-name {
    font-weight: 500;
}

/* Стилі для основного контенту */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: white;
    margin: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hit-badge, .new-badge, .sale-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.hit-badge {
    background-color: #e74c3c;
}

.new-badge {
    background-color: #2ecc71;
}

.sale-badge {
    background-color: #f39c12;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.product-prices {
    margin-bottom: 15px;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.add-to-cart {
    width: 100%;
    padding: 8px 0;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* Стилі для каталогу */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
}

.search-form input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 250px;
}

.search-form button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.catalog-filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 5px;
}

.category-filter, .sort-filter {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-grid {
    grid-template-columns: repeat(5, 1fr);
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}

/* Стилі для footer */
.main-footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #3498db;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #34495e;
    border-radius: 50%;
    color: white;
    transition: background-color 0.2s;
}

.social-links a:hover {
    background-color: #3498db;
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher a {
    padding: 5px 10px;
    border-radius: 3px;
}

.language-switcher a.active {
    background-color: #3498db;
}

.footer-bottom {
    background-color: #1a252f;
    padding: 15px 20px;
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.full-version-link {
    color: #3498db;
    text-decoration: none;
}

/* Модальне вікно для мобільної версії */
.module-catalog-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 90%;
    max-width: 400px;
    height: 100%;
    background-color: white;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.module-catalog-modal.active {
    right: 0;
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-content {
    padding: 15px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.modal-overlay.active {
    display: block;
}