/* ================================================
   WC Best Sellers Sidebar — Modern Clean UI
   Seranova Global
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700&family=DM+Sans:wght@400;500&display=swap');

.wcbs-widget {
    font-family: 'DM Sans', sans-serif;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

/* ---- Header ---- */
.wcbs-header {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcbs-header-icon {
    display: flex;
    align-items: center;
    color: #f5c518;
}

/* ---- List ---- */
.wcbs-list {
    padding: 8px 0;
}

/* ---- Item ---- */
.wcbs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.18s ease;
    position: relative;
}

.wcbs-item:last-child {
    border-bottom: none;
}

.wcbs-item:hover {
    background: #fafafa;
}

/* ---- Rank + Image ---- */
.wcbs-item-image-wrap {
    position: relative;
    flex-shrink: 0;
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    background: #f4f4f4;
}

.wcbs-rank {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    background: #1a1a2e;
    color: #f5c518;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-right-radius: 6px;
    line-height: 1;
}

.wcbs-item:nth-child(1) .wcbs-rank { background: #c9a227; color: #fff; }
.wcbs-item:nth-child(2) .wcbs-rank { background: #9e9e9e; color: #fff; }
.wcbs-item:nth-child(3) .wcbs-rank { background: #b5651d; color: #fff; }

.wcbs-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.wcbs-item:hover .wcbs-item-image {
    transform: scale(1.06);
}

/* ---- Info ---- */
.wcbs-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcbs-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

.wcbs-item-title:hover {
    color: #0f3460;
}

.wcbs-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #e63946;
    line-height: 1;
}

.wcbs-item-price del {
    font-weight: 400;
    color: #aaa;
    font-size: 11px;
    margin-right: 3px;
}

.wcbs-item-price ins {
    text-decoration: none;
}

/* ---- Add to Cart Button ---- */
.wcbs-atc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 4px;
    padding: 5px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    color: #ffffff;
    background: #1a1a2e;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.wcbs-atc-btn:hover {
    background: #0f3460;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
    color: #fff;
    text-decoration: none;
}

.wcbs-atc-btn:active {
    transform: translateY(0);
}

.wcbs-atc-btn.wcbs-loading {
    pointer-events: none;
    opacity: 0.75;
}

.wcbs-atc-btn.wcbs-added {
    background: #2a9d5c;
}

/* Spinner animation */
@keyframes wcbs-spin {
    to { transform: rotate(360deg); }
}
.wcbs-btn-loading svg {
    animation: wcbs-spin 0.7s linear infinite;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .wcbs-item-image-wrap {
        width: 52px;
        height: 52px;
    }
    .wcbs-item-title {
        font-size: 12px;
    }
}
