/* Общие стили и фон */
body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
}

/* Шапка (Header) - Улучшена навигация */
header {
    background-color: #0d0d0d;
    border-bottom: 3px solid #c0392b;
    padding: 10px 50px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-area a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.dota-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.dota-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

.nav-links a {
    margin-right: 20px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.nav-links a:hover {
    background-color: #222;
    border-color: #444;
}


.search-cart-area {
    display: flex;
    align-items: center;
}

/* Поиск */
.search-box {
    position: relative;
    margin-right: 25px;
}

.search-input {
    padding: 8px 30px 8px 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #222;
    color: #fff;
    width: 150px;
    transition: width 0.3s ease;
}

.search-input:focus {
    width: 200px;
    outline: none;
    border-color: #ffd700;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

/* Корзина */
.cart {
    position: relative;
    cursor: pointer;
    padding: 5px;
}

.cart-icon {
    font-size: 24px;
    color: #ffd700;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #c0392b; /* Красный акцент */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

/* ОКНО КОРЗИНЫ */
.cart-window {
    position: absolute;
    top: 60px; /* Ниже шапки */
    right: 50px;
    width: 300px;
    background-color: #111;
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    z-index: 100;
    display: none; /* Скрыто по умолчанию, управляется JS */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.cart-window h2 {
    color: #ffd700;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#cartItems {
    list-style: none;
    padding: 0;
    margin: 0;
}

#cartItems li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted #333;
    font-size: 14px;
}

.count-box {
    display: flex;
    align-items: center;
}

.count-box button {
    background: #333;
    color: white;
    border: none;
    padding: 3px 8px;
    cursor: pointer;
    margin: 0 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.count-box button:hover {
    background: #c0392b;
}

.cart-total {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #444;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.checkout-button {
    background-color: #c0392b;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.checkout-button:hover {
    background-color: #e74c3c;
}

/* Заголовок страницы */
.page-title {
    text-align: center;
    font-size: 36px;
    margin: 40px 0;
    color: #f0f0f0;
    letter-spacing: 2px;
}

.page-title i {
    color: #c0392b;
    margin: 0 10px;
}

/* Основной контейнер */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto 50px;
    padding: 0 50px;
}

/* Боковая панель (Sidebar) */
.sidebar {
    width: 250px;
    padding-right: 30px;
    border-right: 1px solid #333;
}

.sidebar h2 {
    color: #ffd700;
    font-size: 18px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar label {
    display: block;
    cursor: pointer;
}

.sidebar input[type="radio"] {
    margin-right: 10px;
    accent-color: #c0392b;
}

.filters input[type="number"] {
    width: 50px;
    padding: 5px;
    margin: 0 5px;
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 3px;
}

.apply-button {
    background-color: #ffd700;
    color: #1a1a1a;
    border: none;
    padding: 8px 15px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.apply-button:hover {
    background-color: #ffc107;
}

/* Сетка товаров */
.products-grid {
    flex-grow: 1;
    padding-left: 30px;
}

.sort-bar {
    margin-bottom: 20px;
    color: #888;
}

.sort-bar a {
    color: #f0f0f0;
    border-bottom: 1px dashed #f0f0f0;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 колонок */
    gap: 20px;
}

/* Карточка товара */
.product-card {
    background-color: #222;
    border: 2px solid #333;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.product-image-container {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.product-card img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    transition: transform 0.2s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-name {
    font-size: 16px;
    color: #ffd700;
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 12px;
    color: #888;
    margin: 0 0 10px 0;
}

.product-price {
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    margin: 5px 0;
}

.buy-button {
    background-color: #c0392b;
    color: white;
    border: none;
    padding: 8px 15px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 3px;
    transition: background-color 0.2s;
    width: 100%;
}

.buy-button:hover {
    background-color: #e74c3c;
}

/* Подвал (Footer) */
footer {
    background-color: #0d0d0d; 
    border-top: 3px solid #c0392b;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.social-title {
    color: #ffd700;
    font-size: 16px;
    margin-bottom: 5px;
}