/* Стили для системы поделиться товарами */

/* Кнопка "Поделиться" в заголовке */
.share-button {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.share-button:hover {
    background: #f3f4f6;
    color: #374151;
    transform: scale(1.1);
}

.share-button:active {
    transform: scale(0.95);
}

.share-button .material-icons {
    font-size: 18px;
}

/* Подсветка карточки при переходе по ссылке */
.product-card.highlighted {
    animation: highlightCard 3s ease-out;
    box-shadow: 0 0 0 3px #3b82f6, 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

@keyframes highlightCard {
    0% {
        box-shadow: 0 0 0 0 #3b82f6, 0 10px 25px -5px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 0 3px #3b82f6, 0 10px 25px -5px rgba(59, 130, 246, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 #3b82f6, 0 10px 25px -5px rgba(59, 130, 246, 0.1);
    }
}

/* Уведомление о копировании */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 320px;
    min-width: 280px;
}

.copy-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.copy-notification.error {
    background: #ef4444;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3);
}

.copy-notification .material-icons {
    font-size: 20px;
    flex-shrink: 0;
}

.copy-notification .notification-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
    font-weight: 400;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .copy-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .share-button {
        width: 32px;
        height: 32px;
    }
    
    .share-button .material-icons {
        font-size: 20px;
    }
}

/* Улучшение видимости кнопки на светлых изображениях */
.product-card:hover .share-button {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Анимация появления кнопки */
.share-button {
    opacity: 0;
    transition: all 0.2s ease;
}

.product-card:hover .share-button {
    opacity: 1;
}

/* Для карточек с темными заголовками */
.product-header {
    position: relative;
}

/* Дополнительные стили для лучшей интеграции */
.product-card .product-header h3 {
    padding-right: 36px; /* Место для кнопки */
}

/* Стили для компактных карточек */
.product-card.compact .share-button {
    top: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
}

.product-card.compact .share-button .material-icons {
    font-size: 16px;
}

/* Пульсация при успешном копировании */
.share-button.copied {
    animation: copySuccess 0.6s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: #10b981; color: white; }
    100% { transform: scale(1); }
}
