/* Стили для страницы магазина */
.shop-main {
    position: relative;
    min-height: 100vh;
    padding: 120px 0 60px; /* Отступ для шапки */
}

.shop-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.2; /* Полупрозрачный фон для лучшей читаемости */
}

/* Убираем фон на мобильных устройствах */
@media (max-width: 768px) {
    .shop-background {
        display: none;
    }
    
    .shop-main {
        background-color: var(--background-color);
        padding: 100px 0 40px;
    }
}

.shop-header {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.shop-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.shop-slogan {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.8;
}

/* Корзина */
.cart-section {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.cart-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.cart-items {
    min-height: 50px;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    font-size: 0.9rem;
    color: #666;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 1rem;
}

.cart-item-remove:hover {
    color: #cc0000;
}

.buy-button {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.buy-button:hover {
    background-color: #b8860b;
    transform: translateY(-2px);
}

.buy-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Разделы категорий */
.category-section {
    margin-bottom: 4rem;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

/* Сетка продуктов */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Карточка продукта */
.product-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.product-image {
    text-align: center;
    margin-bottom: 1rem;
}

.product-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.product-pricing {
    margin-bottom: 1rem;
}

.base-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.extra-price,
.bulk-price {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

/* Выбор количества */
.quantity-selector {
    margin-bottom: 1rem;
}

.quantity-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.quantity-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.calculated-price {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.price-amount {
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* Кнопка добавления в корзину */
.add-to-cart {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 1rem;
}

.add-to-cart:hover {
    background-color: #236b47;
}

/* Описание продукта */
.product-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: auto;
}

/* Адаптивность для магазина */
@media (max-width: 768px) {
    .shop-main {
        padding: 100px 0 40px;
    }
    
    .shop-header h1 {
        font-size: 2.5rem;
    }
    
    .shop-slogan {
        font-size: 1.2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-image img {
        width: 250px;
        height: 250px;
    }
    
    .cart-section {
        padding: 1.5rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .shop-header h1 {
        font-size: 2rem;
    }
    
    .shop-slogan {
        font-size: 1rem;
    }
    
    .product-card {
        padding: 1rem;
    }
    
    .product-image img {
        width: 200px;
        height: 200px;
    }
    
    .cart-section {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
    
    .cart-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}