/* ==========================================================================
   Bliss Wishlist — стили
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Кнопка-сердечко (на карточке товара и странице товара)
   -------------------------------------------------------------------------- */

.bliss-wl-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.bliss-wl-heart:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.95);
}

.bliss-wl-heart svg {
    width: 22px;
    height: 22px;
    transition: fill 0.25s ease, stroke 0.25s ease;
}

/* Неактивное сердце — тёмный контур */
.bliss-wl-heart svg path {
    fill: transparent;
    stroke: #333;
    stroke-width: 2;
    transition: fill 0.25s ease, stroke 0.25s ease;
}

/* Активное сердце — красное */
.bliss-wl-heart.active svg path {
    fill: #e74c3c;
    stroke: #e74c3c;
}

/* Анимация при клике */
@keyframes bliss-wl-pulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.3); }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.bliss-wl-heart.pulse svg {
    animation: bliss-wl-pulse 0.4s ease;
}

/* Позиция в карточке товара (каталог) */
.bliss-wl-heart-wrapper {
    position: relative;
}

/* Для страницы товара (single product) — кнопка чуть больше */
.single-product .bliss-wl-heart {
    width: 48px;
    height: 48px;
}

.single-product .bliss-wl-heart svg {
    width: 26px;
    height: 26px;
}

/* --------------------------------------------------------------------------
   2. Страница вишлиста (/izbrannoe/)
   -------------------------------------------------------------------------- */

.bliss-wl-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bliss-wl-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.bliss-wl-page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.bliss-wl-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Кнопка «Поделиться» */
.bliss-wl-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.bliss-wl-share-btn:hover {
    background: #555;
}

.bliss-wl-share-btn svg {
    width: 18px;
    height: 18px;
}

/* Сетка товаров */
.bliss-wl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 992px) {
    .bliss-wl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .bliss-wl-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   3. Карточка товара на странице вишлиста
   -------------------------------------------------------------------------- */

.bliss-wl-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.bliss-wl-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

/* Главное фото */
.bliss-wl-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.bliss-wl-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Мини-галерея под фото */
.bliss-wl-card-gallery {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #fafafa;
}

.bliss-wl-card-gallery img {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
}

.bliss-wl-card-gallery img:hover,
.bliss-wl-card-gallery img.active {
    opacity: 1;
    border-color: #e74c3c;
}

/* Кнопка удаления (крестик) */
.bliss-wl-card-remove {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
    transition: color 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.bliss-wl-card-remove:hover {
    color: #e74c3c;
    background: #fff;
}

/* Информация о товаре */
.bliss-wl-card-info {
    padding: 14px;
}

.bliss-wl-card-name {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px;
    line-height: 1.4;
}

.bliss-wl-card-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bliss-wl-card-name a:hover {
    color: #e74c3c;
}

.bliss-wl-card-price {
    font-size: 16px;
    color: #555;
    margin: 0;
}

/* --------------------------------------------------------------------------
   4. Пустое состояние
   -------------------------------------------------------------------------- */

.bliss-wl-empty {
    text-align: center;
    padding: 60px 20px;
}

.bliss-wl-empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 15px;
}

.bliss-wl-empty h3 {
    font-size: 22px;
    margin: 0 0 10px;
    color: #333;
}

.bliss-wl-empty p {
    font-size: 15px;
    color: #777;
    margin: 0 0 25px;
}

.bliss-wl-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.bliss-wl-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* --------------------------------------------------------------------------
   5. Модалка «Поделиться»
   -------------------------------------------------------------------------- */

.bliss-wl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: bliss-wl-fade-in 0.2s ease;
}

.bliss-wl-modal-overlay.active {
    display: flex;
}

@keyframes bliss-wl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.bliss-wl-modal {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 440px;
    width: 90%;
    position: relative;
    animation: bliss-wl-slide-up 0.3s ease;
}

@keyframes bliss-wl-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.bliss-wl-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.bliss-wl-modal-close:hover {
    color: #333;
}

.bliss-wl-modal h3 {
    font-size: 20px;
    margin: 0 0 20px;
}

/* Email-форма внутри модалки */
.bliss-wl-email-form {
    margin-bottom: 20px;
}

.bliss-wl-email-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #555;
}

.bliss-wl-email-form input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.bliss-wl-email-form input[type="email"]:focus {
    outline: none;
    border-color: #e74c3c;
}

.bliss-wl-email-form .bliss-wl-send-btn {
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bliss-wl-email-form .bliss-wl-send-btn:hover {
    background: #c0392b;
}

.bliss-wl-email-form .bliss-wl-send-btn:disabled {
    background: #bbb;
    cursor: not-allowed;
}

.bliss-wl-email-status {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

.bliss-wl-email-status.success {
    color: #27ae60;
}

.bliss-wl-email-status.error {
    color: #e74c3c;
}

/* Разделитель */
.bliss-wl-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #aaa;
    font-size: 13px;
}

.bliss-wl-divider::before,
.bliss-wl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.bliss-wl-divider::before {
    margin-right: 10px;
}

.bliss-wl-divider::after {
    margin-left: 10px;
}

/* Кнопки соцсетей */
.bliss-wl-social-buttons {
    display: flex;
    gap: 12px;
}

.bliss-wl-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bliss-wl-social-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.bliss-wl-social-btn svg {
    width: 20px;
    height: 20px;
}

.bliss-wl-social-btn.telegram {
    background: #2AABEE;
}

.bliss-wl-social-btn.whatsapp {
    background: #25D366;
}

/* --------------------------------------------------------------------------
   6. Счётчик вишлиста (в шапке)
   -------------------------------------------------------------------------- */

.bliss-wishlist-count {
    font-size: 12px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    display: inline-block;
    padding: 0 5px;
    font-weight: 600;
    vertical-align: middle;
}

.bliss-wishlist-count:empty,
.bliss-wishlist-count[data-count="0"] {
    display: none;
}

/* --------------------------------------------------------------------------
   7. Интеграция с формой записи
   -------------------------------------------------------------------------- */

.bliss-wl-form-attachment {
    margin: 15px 0;
    padding: 15px;
    background: #fef9f9;
    border: 1px solid #f0dada;
    border-radius: 8px;
}

.bliss-wl-form-title {
    font-size: 15px;
    margin: 0 0 10px;
    color: #e74c3c;
}

.bliss-wl-form-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bliss-wl-form-list li {
    padding: 5px 0;
    font-size: 14px;
    border-bottom: 1px solid #f5e8e8;
}

.bliss-wl-form-list li:last-child {
    border-bottom: none;
}

.bliss-wl-form-list a {
    color: #333;
    text-decoration: none;
}

.bliss-wl-form-list a:hover {
    color: #e74c3c;
}

/* --------------------------------------------------------------------------
   8. Удаление карточки анимация
   -------------------------------------------------------------------------- */

@keyframes bliss-wl-fade-out {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.9); }
}

.bliss-wl-card.removing {
    animation: bliss-wl-fade-out 0.3s ease forwards;
}
