/* Контейнер для кнопок товара */
.product-buttons-container {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Стили для текстовых кнопок избранного */
.add-to-favorites-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid #ff4757;
    color: #ff4757;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 150px;
    height: 46px;
    text-align: center;
    flex: 1;
    max-width: 160px;
    box-sizing: border-box;
}

.add-to-favorites-text:hover {
    background: #ff4757;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.add-to-favorites-text.active {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* Делаем кнопки корзины такого же размера */
.product-buttons-container .add_to_cart_button,
.product-buttons-container .single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff4757;
    border: 2px solid #ff4757;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 150px;
    height: 46px;
    text-align: center;
    flex: 1;
    max-width: 160px;
    box-sizing: border-box;
}

.product-buttons-container .add_to_cart_button:hover,
.product-buttons-container .single_add_to_cart_button:hover {
    background: #ff3838;
    border-color: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

/* Стили для фиксированного меню внизу */
.favorite-menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.favorite-trigger {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.favorite-trigger:hover {
    background: rgba(255, 71, 87, 0.1);
}

.favorites-counter {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    min-width: 20px;
    height: 20px;
    text-align: center;
    margin-left: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Модальное окно избранного */
.favorites-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.favorites-modal-content {
    background: white;
    border-radius: 16px;
    width: 95%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close-favorites {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-favorites:hover {
    background: #f5f5f5;
    color: #000;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.favorite-product {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.favorite-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #ff4757;
}

.favorite-product-image {
    font-size: 48px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.remove-favorite {
    background: #ff4757;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.remove-favorite:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

.clear-all-favorites,
.continue-shopping {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.clear-all-favorites:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

.continue-shopping {
    background: #2ed573;
}

.continue-shopping:hover {
    background: #25c465;
    transform: translateY(-1px);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .product-buttons-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .add-to-favorites-text,
    .product-buttons-container .add_to_cart_button,
    .product-buttons-container .single_add_to_cart_button {
        min-width: 100%;
        max-width: 100%;
        height: 48px;
    }
    
    .favorites-modal-content {
        width: 95%;
        padding: 20px;
        margin: 20px;
    }
    
    .favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .favorite-product {
        padding: 15px;
    }
}

/* Уведомления */
.favorite-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #2ed573;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: Arial, sans-serif;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}