/* Контейнер для иконки сердечка */
.bagon-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    z-index: 999; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  background: rgb(31 31 31 / 8%);
    border-radius: 50%;
    aspect-ratio: 1 / 1;

    


    
    /* Скрыто по умолчанию */
    opacity: 0; 
    
    transition: all 0.3s ease;
    pointer-events: auto; 
}

/* 1. Показываем при наведении на карточку */
.bccgc-selector-item:hover .bagon-fav-btn {
    opacity: 1;
}

/* 2. (!!) НОВОЕ: Если товар в избранном (активен) — показываем всегда */
.bagon-fav-btn.active {
    opacity: 1 !important;
}

/* 3. На мобильных показываем всегда */
@media (max-width: 991px) {
    .bagon-fav-btn {
        opacity: 1;
    }
}

.bagon-fav-btn:hover {
    background: rgba(31, 31, 31, 0.9);
    transform: scale(1.1);
}

.bagon-fav-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #e0e0e0; 
    stroke-width: 2;
    transition: all 0.3s ease;
    pointer-events: none; 
}

/* Активное состояние */
.bagon-fav-btn.active svg {
    fill: #f687b3;
    stroke: #99999900;
}

.bagon-fav-btn.active {
    animation: bagonHeartBeat 0.3s;
}

@keyframes bagonHeartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Кнопка очистки списка */
.bagon-clear-fav-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end; 
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #2d2d2d;
}

.bagon-clear-fav-btn {
    background: transparent;
    border: 1px solid #d94452; 
    color: #d94452;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.bagon-clear-fav-btn:hover {
    background: #d94452;
    color: #fff;
}

/* --- НОВЫЕ СТИЛИ ДЛЯ ВИДЖЕТА И СЧЁТЧИКА --- */
.bagon-header-favorites {
    position: relative;
}
.bagon-fav-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #d7b579;
    color: #4d4d4d;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    z-index: 3;
}
.bagon-header-fav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -10px;
    width: 380px;
    max-height: 500px;
    overflow-y: auto;
    background: #1f1f1f;
    border: 0px solid rgba(251, 211, 141, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    padding: 10px;
}
.bagon-header-fav-dropdown.active {
    display: block;
}
.bagon-favorites-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bagon-favorites-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #2d2d2d;
}
.bagon-favorites-widget-item:last-child {
    border-bottom: none;
}
.bagon-favorites-widget-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.bagon-favorites-widget-info {
    flex: 1;
}
.bagon-favorites-widget-name {
    display: block;
    font-size: 13px;
    color: #e0e0e0;
    text-decoration: none;
}
.bagon-favorites-widget-price {
    font-size: 12px;
    color: #fbd38d;
}
.bagon-remove-fav-item {
    background: none;
    border: none;
    color: #d94452;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.bagon-favorites-widget-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.bagon-favorites-link {
    color: #fbd38d;
    text-decoration: none;
    font-size: 13px;
}
.bagon-clear-fav-btn {
    background: transparent;
    border: 1px solid #d94452;
    color: #d94452;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px;
}
.bagon-clear-fav-btn:hover {
    background: #d94452;
    color: #fff;
}
.bagon-favorites-empty, .bagon-favorites-loading, .bagon-favorites-error {
    text-align: center;
    padding: 20px;
    color: #e0e0e0;
}

.bagon-favorites-widget-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.bagon-favorites-widget-item {
    transition: background 0.2s ease;
    border-radius: 6px;
    padding-left: 6px;
    padding-right: 6px;
}

.bagon-favorites-widget-item:hover {
    background: rgba(255, 255, 255, 0.05);
}









.bagon-share-btn {
    position: absolute;
    top: 10px;
    right: 48px;
    width: 30px;
    height: 30px;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(31 31 31 / 8%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
}
.bccgc-selector-item:hover .bagon-share-btn {
    opacity: 1;
}
@media (max-width: 991px) {
    .bagon-share-btn {
        opacity: 1;
    }
}
.bagon-share-btn:hover {
    background: rgba(31, 31, 31, 0.9);
    transform: scale(1.1);
}
.bagon-share-btn svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
    stroke: #4a90d9;
}


#bagon-share-toast {
    position: absolute;
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 99999;
    pointer-events: none;
    white-space: nowrap;
}