﻿* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f5f5f5; color: #333; }

/* Шапка */
.header { background: white; padding: 15px 30px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; flex-wrap: wrap; }
.header img { height: 50px; }
.header h1 { font-size: 24px; color: #2c3e50; white-space: nowrap; }
.header h1 a { color: #2c3e50; text-decoration: none; }

/* Контакты */
.contacts-btn { position: relative; display: inline-block; }
.contacts-btn button { padding: 8px 12px; background: #ecf0f1; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; color: #2c3e50; display: flex; align-items: center; gap: 5px; }
.contacts-btn button:hover { background: #bdc3c7; }
.contacts-menu { display: none; position: absolute; top: 100%; left: 0; background: white; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 100; padding: 10px; width: 250px; }
.contacts-menu.active { display: block; }
.contacts-menu a, .contacts-menu div { display: flex; align-items: center; padding: 8px; color: #333; text-decoration: none; border-radius: 3px; font-size: 14px; }
.contacts-menu a:hover { background: #f0f0f0; }

/* Поиск */
.search-box { flex: 1; min-width: 900px; max-width: 1200px; margin-left: 10px; display: flex; gap: 5px; }
.search-box input { flex: 1; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.search-box input:focus { outline: none; border-color: #3498db; }
.search-box button { padding: 10px 15px; background: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.search-box button:hover { background: #2980b9; }

/* Кнопки справа */
.header-actions { display: flex; gap: 10px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.header-btn { padding: 8px 12px; background: #ecf0f1; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; text-decoration: none; color: #2c3e50; display: flex; align-items: center; gap: 5px; position: relative; }
.header-btn:hover { background: #bdc3c7; }
.header-btn .badge { background: #e74c3c; color: white; padding: 2px 6px; border-radius: 10px; font-size: 12px; }

/* Меню Поделиться */
.share-menu { display: none; position: absolute; top: 100%; left: 0; background: white; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 100; padding: 10px; width: 200px; }
.share-menu.active { display: block; }
.share-menu a { display: flex; align-items: center; padding: 8px; color: #333; text-decoration: none; border-radius: 3px; font-size: 14px; }
.share-menu a:hover { background: #f0f0f0; }

/* Личный кабинет */
.cabinet-btn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #ecf0f1; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; color: #2c3e50; text-decoration: none; }
.cabinet-btn:hover { background: #bdc3c7; }
.cabinet-icon { width: 30px; height: 30px; background: #3498db; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; }
.cabinet-icon.empty { background: #95a5a6; }
/* Сетка товаров */
.container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.2s; position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.card-img { height: 250px; width: 100%; background: #eee; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; opacity: 0; transition: opacity 0.3s; }
.card-img img.active { opacity: 1; }
.card-body { padding: 15px; }
.card-title { font-size: 16px; margin-bottom: 10px; min-height: 40px; }
.card-title a { color: #2c3e50; text-decoration: none; }
.card-title a:hover { color: #3498db; }
.card-price { font-size: 20px; font-weight: bold; color: #27ae60; margin-bottom: 10px; }
.card-actions { display: flex; gap: 10px; margin-top: 15px; }
.btn-buy { flex: 1; padding: 10px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: bold; }
.btn-buy:hover { background: #219a52; }
.btn-fav { padding: 10px; background: #ecf0f1; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
.btn-fav:hover { background: #bdc3c7; }
.btn-fav.active { background: #e74c3c; color: white; }
.empty { text-align: center; padding: 50px; color: #999; }

