/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка */
.header {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.logo i {
    font-size: 2rem;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Навигация */
.nav {
    background: #2c3e50;
    padding: 10px 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: #34495e;
}

/* Основной контент */
.main {
    padding: 30px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Карточка товара */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 1;
}

.product-image {
    height: 300px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.rating {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.rating span {
    color: #666;
    margin-left: 10px;
}

.description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Размеры */
.size {
    margin-bottom: 20px;
}

.size h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #2c3e50;
}

.sizes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn {
    width: 50px;
    height: 40px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.size-btn:hover {
    border-color: #3498db;
}

.size-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Цена */
.price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #2ecc71;
}

.old-price {
    font-size: 1.2rem;
    color: #95a5a6;
    text-decoration: line-through;
}

/* Кнопки */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.add-to-cart {
    flex: 1;
    background: #3498db;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.add-to-cart:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.add-to-cart.added {
    background: #2ecc71;
}

.favorite {
    width: 50px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #e74c3c;
    transition: all 0.3s;
}

.favorite:hover {
    background: #ffeaea;
    border-color: #e74c3c;
}

.favorite i.animated {
    animation: pulse 0.3s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Детали */
.details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.details p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details i {
    color: #2ecc71;
}

/* Футер */
.footer {
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    margin: 5px 0;
    color: #bbb;
}

/* Адаптивность */
@media (min-width: 768px) {
    .product-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .product-image {
        height: auto;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 10px;
    }
    
    .product-card {
        margin: 0 10px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .favorite {
        width: 100%;
        height: 50px;
    }
    
    .nav {
        text-align: center;
    }
    
    .nav-link {
        display: inline-block;
        margin: 5px;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }
    
    .product-title {
        font-size: 1.3rem;
    }
    
    .current-price {
        font-size: 1.7rem;
    }
    
    .size-btn {
        width: 45px;
        height: 35px;
    }
}