main { margin: 40px auto; max-width: 1200px; padding: 0 15px; }
    
.product-main { 
    display: grid; 
    grid-template-columns: auto 1fr;
    gap: 30px; 
    margin-bottom: 30px; 
    align-items: center;
}

.cake-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.cake-title2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.product-image img { 
    height: 450px;
    width: 700px;
    object-fit: cover;
    border: 1px solid #ddd; 
    border-radius: 8px; 
}

.product-info { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    text-align: center; 
    height: 100%;
}

.short-desc, .price { margin: 10px 0; }

.discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-left: 10px;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-right: 5px;
}

.price-new {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 24px;
}

.price { margin: 10px 0; font-size: 20px; }

.buy-panel { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    margin: 15px 0; 
}

.btn, .counter button { 
    background: #f8c8dc; 
    border: 1px solid #e5a8c2; 
    padding: 10px 20px; 
    border-radius: 20px; 
    cursor: pointer; 
}

.btn:hover, .counter button:hover { background: #e5a8c2; }

.counter { 
    display: flex; 
    border: 1px solid #ccc; 
    border-radius: 20px; 
    overflow: hidden; 
}

.counter input { 
    width: 40px; 
    text-align: center; 
    border: none; 
}

.long-desc, .ingredients { 
    text-align: left; 
    margin-top: 20px; 
    grid-column: 1 / -1; 
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.reviews { margin-top: 40px; }
.review { 
    border: 1px solid #ddd; 
    background-color: white;
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 15px; 
}

.reviews-header {
    display: flex;
    margin-bottom: 20px;
}

.toggle-reviews-btn {
    margin-left: 20px;
    background: #f8c8dc;
    border: 1px solid #e5a8c2;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-reviews-btn:hover {
    background: #e5a8c2;
    transform: scale(1.05);
}

.reviews-content {
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.reviews-content.hidden {
    opacity: 0;
    max-height: 0;
    display: none;
}

/* Плавная анимация для скрытия/показа */
.reviews-content {
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.reviews-content.hidden {
    opacity: 0;
    max-height: 0;
}  

.avatar { width: 30px; height: 35px; border-radius: 50%; }
.rating { margin-left: auto; color: #d48aac; font-weight: bold; }


#cart-notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.cart-msg {
    background: #fff3f8;
    border: 1px solid #e5a8c2;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    animation: slide-up 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: opacity 0.3s, transform 0.3s;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .modal.hidden {
        display: none;
    }

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

    .modal-content .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 24px;
        cursor: pointer;
    }

@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
