/* Основные стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка */
.header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo img {
    max-height: 50px;
}

.search {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search form {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-btn:hover {
    background: #45a049;
}

.cart-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.cart-icon {
    font-size: 24px;
    margin-right: 5px;
}

.cart-count {
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Навигация */
.main-nav {
    background: #333;
    margin: 0 -15px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
}

.main-nav a:hover {
    background: #4CAF50;
}

/* Основной контент */
.main-content {
    min-height: 400px;
    background: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Подвал */
.footer {
    background: #333;
    color: white;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumbs a {
    color: #4CAF50;
    text-decoration: none;
}

.breadcrumbs .separator {
    margin: 0 10px;
    color: #999;
}

.breadcrumbs .current {
    color: #666;
}

/* Товар */
.goods-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.goods-gallery {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.goods-main-image {
    text-align: center;
}

.goods-main-image img {
    max-width: 100%;
    max-height: 400px;
    cursor: pointer;
}

.goods-info {
    padding: 20px;
}

.goods-prices {
    margin-bottom: 20px;
    position: relative;
}

.current-price {
    font-size: 32px;
    font-weight: bold;
    color: #4CAF50;
}

.current-price.discount {
    color: #f44336;
}

.old-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.discount-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #f44336;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.goods-availability {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.goods-availability.in-stock {
    background: #d4edda;
    color: #155724;
}

.goods-availability.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.goods-article,
.goods-brand,
.goods-size,
.goods-weight,
.goods-inpack,
.goods-country {
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.label {
    font-weight: bold;
    color: #666;
    display: inline-block;
    width: 120px;
}

/* Действия с товаром */
.goods-actions {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.quantity-selector button:hover {
    background: #e0e0e0;
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.btn-outline:hover {
    background: #4CAF50;
    color: white;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Сетка товаров */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.goods-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.goods-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.goods-card .goods-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 15px;
}

.goods-card .goods-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.goods-card .goods-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.goods-card .goods-title {
    font-size: 14px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.goods-card .goods-price {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
}

.goods-card .btn {
    width: 100%;
    border-radius: 0;
}

/* Описание товара */
.goods-description {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.goods-description h2 {
    margin-bottom: 20px;
}

.description-content {
    line-height: 1.8;
}

.description-content p {
    margin-bottom: 15px;
}

/* Характеристики */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.specs-table td {
    padding: 10px;
}

.specs-table td:first-child {
    font-weight: bold;
    width: 200px;
    background: #f9f9f9;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .search {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .goods-content {
        grid-template-columns: 1fr;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav li {
        flex: 1 1 auto;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}