/* ================================================================
   Wishlist — heart on card (left) + fixed bottom panel
   Brand color: #111 (black)
   ================================================================ */

/* ---------------------------------------------------------------
   Heart Button on product card — TOP LEFT
--------------------------------------------------------------- */
.product-thumbnail {
    position: relative;
}

.csco-wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(4px);
}

.csco-wishlist-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    background: #fff;
}

.csco-wishlist-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #aaa;
    stroke-width: 2;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.csco-wishlist-btn.active svg {
    fill: #111;
    stroke: #111;
}

@keyframes csco-heart-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.csco-wishlist-btn.pulse svg {
    animation: csco-heart-pulse 0.38s ease;
}


/* ---------------------------------------------------------------
   Toggle Button — fixed, centered at bottom
--------------------------------------------------------------- */
#csco-wishlist-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    z-index: 9998;
    height: 44px;
    padding: 0 22px;
    border-radius: 10px 10px 0 0;
    background: #111;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 -3px 20px rgba(0,0,0,.2);
    transition: background 0.2s ease, transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s ease;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

#csco-wishlist-toggle.visible {
    display: flex;
    transform: translateX(-50%) translateY(0);
}

#csco-wishlist-toggle:hover {
    background: #333;
    box-shadow: 0 -4px 24px rgba(0,0,0,.28);
}

#csco-wishlist-toggle svg {
    fill: #fff;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.cwp-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 10px;
    font-weight: 800;
    padding: 0 5px;
}

#csco-wishlist-toggle:not(.has-items) .cwp-counter {
    display: none;
}


/* ---------------------------------------------------------------
   Wishlist Panel — fixed bottom drawer
--------------------------------------------------------------- */
#csco-wishlist-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -8px 40px rgba(0,0,0,.1);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 250px;
}

#csco-wishlist-panel.open {
    transform: translateY(0);
}

#csco-wishlist-panel:not(.has-items) {
    display: none;
}

/* ── Header ── */
.cwp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 46px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.cwp-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cwp-title svg {
    fill: #111;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
}

.cwp-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    color: #999;
    font-size: 13px;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    padding: 0;
}

.cwp-close:hover {
    border-color: #111;
    color: #111;
    background: #f5f5f5;
}

/* ── Body ── */
.cwp-body {
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    padding: 14px 28px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.cwp-body::-webkit-scrollbar { height: 3px; }
.cwp-body::-webkit-scrollbar-track { background: transparent; }
.cwp-body::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

/* ── List ── */
.cwp-list {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.cwp-empty {
    font-size: 13px;
    color: #bbb;
    padding: 14px 0;
    letter-spacing: 0.02em;
}

/* ── Item card ── */
.cwp-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    padding: 10px 28px 10px 10px; /* right padding for remove btn */
    min-width: 195px;
    max-width: 230px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cwp-item:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.cwp-img-link {
    display: block;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.cwp-item img,
.cwp-no-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}

.cwp-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cwp-name {
    font-size: 12px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    white-space: normal;
    transition: color 0.15s;
}

.cwp-name:hover { color: #555; }

.cwp-price {
    font-size: 12px;
    font-weight: 700;
    color: #111;
}

/* Remove button — top right of card */
.cwp-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 7px;
    right: 7px;
    width: 18px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    padding: 0;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
}

.cwp-remove:hover {
    color: #111;
    background: #f0f0f0;
}

.cwp-remove svg {
    fill: currentColor;
    display: block;
    width: 11px;
    height: 11px;
}


/* ---------------------------------------------------------------
   Single product page wishlist button
--------------------------------------------------------------- */
.csco-wishlist-btn--single {
    position: static;
    width: auto;
    height: auto;
    border-radius: 3px;
    background: transparent;
    border: 1px solid #d0d0d0;
    padding: 9px 16px;
    gap: 7px;
    display: inline-flex;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.02em;
    margin-top: 10px;
    backdrop-filter: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.csco-wishlist-btn--single:hover {
    transform: none;
    background: #111;
    border-color: #111;
    color: #fff;
    box-shadow: none;
}

.csco-wishlist-btn--single svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: fill 0.15s, stroke 0.15s;
}

.csco-wishlist-btn--single.active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.csco-wishlist-btn--single.active svg {
    fill: #fff;
    stroke: #fff;
}

.csco-wishlist-label { display: inline; }


/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 600px) {
    #csco-wishlist-toggle {
        height: 40px;
        padding: 0 16px;
        font-size: 10px;
    }

    .cwp-header { padding: 0 16px; height: 42px; }
    .cwp-body   { padding: 12px 16px; }

    /* Только круглая кнопка на карточке товара — не трогаем --single */
    .csco-wishlist-btn:not(.csco-wishlist-btn--single) {
        width: 30px;
        height: 30px;
    }

    .csco-wishlist-btn:not(.csco-wishlist-btn--single) svg {
        width: 14px;
        height: 14px;
    }

    .cwp-item { min-width: 170px; }
}

/* Single product: одинаковый вид на мобиле и десктопе */
@media (max-width: 767px) {
    .csco-wishlist-btn.csco-wishlist-btn--single {
        position: static;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        min-height: 44px;
        padding: 9px 16px;
        margin-top: 10px;
        border-radius: 3px;
        background: transparent;
        border: 1px solid #d0d0d0;
        box-shadow: none;
        gap: 7px;
        font-size: 13px;
        font-weight: 600;
        color: #555;
        letter-spacing: 0.02em;
        backdrop-filter: none;
    }

    .csco-wishlist-btn.csco-wishlist-btn--single svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
    }

    .csco-wishlist-btn.csco-wishlist-btn--single .csco-wishlist-label {
        display: inline;
    }

    .csco-wishlist-btn.csco-wishlist-btn--single.active {
        background: #111;
        border-color: #111;
        color: #fff;
    }

    .csco-wishlist-btn.csco-wishlist-btn--single.active svg {
        fill: #fff;
        stroke: #fff;
    }
}
