/* Parana Bestsellers Widget CSS */

.parana-bs-wrapper {
    display: flex;
    flex-direction: row;
    direction: rtl;
    gap: 30px;
    font-family: inherit;
}

/* --- Right Side: Featured Product --- */
.parana-bs-featured {
    flex: 1;
    min-width: 40%;
}

.parana-bs-featured-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
        flex-direction: column;
    justify-content: flex-end;  
}

.parana-bs-featured-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.parana-bs-featured-badges {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 2;
}

.bs-badge-rank {
    background: #fff;
    color: #333;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.bs-badge-sale {
    background: #ff2a60;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(255, 42, 96, 0.3);
}

.parana-bs-featured-content-glass {
    position: relative;
    z-index: 2;
    margin: 20px;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 25px;
    color: #fff;
    text-align: right;
    pointer-events: none; /* Allow clicks to pass through to the overlay link behind */
}

.bs-featured-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.bs-featured-rating .parana-stars {
    color: #FFB800;
    letter-spacing: 2px;
}

.bs-featured-rating .bs-rating-value {
    font-weight: bold;
}

.bs-featured-rating .bs-rating-count {
    opacity: 0.8;
}

.bs-featured-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #fff;
    line-height: 1.3;
}

.bs-featured-excerpt {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.bs-featured-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bs-buy-btn {
    background: #7c72cf;
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.bs-buy-btn:hover {
    background: #655EAB;
}

.bs-featured-price {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bs-featured-price del {
    display: none !important;
}

/* --- Left Side: List and Stats --- */
.parana-bs-list-col {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.parana-bs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.parana-bs-list-item {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: 0.3s;
}

.parana-bs-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(101, 94, 171, 0.08);
}

.bs-item-image-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    background: #f9f9f9;
    border-radius: 15px;
    flex-shrink: 0;
}

.bs-item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.bs-item-rank {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #7c72cf;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Different colors for ranks */
.parana-bs-list-item:nth-child(2) .bs-item-rank { background: #E67E22; }
.parana-bs-list-item:nth-child(3) .bs-item-rank { background: #8E44AD; }

.bs-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
    pointer-events: none; /* Allow clicks through to the overlay link */
}

.bs-item-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.bs-item-title a {
    color: #111;
    text-decoration: none;
}

.bs-item-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.bs-item-rating .parana-stars {
    color: #FFB800;
    font-size: 11px;
}

.bs-item-popularity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.bs-pop-icon {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    background: #fff0eb;
    padding: 3px 6px;
    border-radius: 10px;
}

.bs-pop-bar {
    flex-grow: 1;
    max-width: 100px;
    height: 6px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.bs-pop-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c72cf, #655EAB);
    border-radius: 5px;
}
.parana-bs-list-item:nth-child(2) .bs-pop-bar-fill { background: linear-gradient(90deg, #E67E22, #D35400); }

.bs-item-action {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 15px;
    flex-direction: column;
}

.bs-item-price {
    font-size: 18px;
    font-weight: 800;
    color: #655EAB;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-direction: row;
}

.bs-item-price del { display: none !important; }

.bs-item-price .woocommerce-Price-currencySymbol {
    font-size: 10px;
    color: #6966B0;
}

.bs-item-add-cart {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #655EAB;
    transition: 0.3s;
}

.bs-item-add-cart:hover {
    background: #655EAB;
    color: #fff;
    border-color: #655EAB;
}


/* --- Stats Box --- */
.parana-bs-stats {
    background: #fdfdfd;
    border-radius: 20px;
    padding: 25px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border: 1px solid #f0f0f0;
}

.bs-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bs-stat-num {
    font-size: 28px;
    font-weight: 800;
    direction: ltr; /* keep numbers readable */
}

.bs-stat-text {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .parana-bs-wrapper {
        flex-direction: column;
    }
    .parana-bs-featured {
         display: contents;
    }
    .bs-badge-rank{
        background: #fff;
        color: #333;
        padding: 3px 7px;
        border-radius: 20px;
        font-weight: 800;
        font-size: 9px; 
    }

}
@media (max-width: 767px) {
    .bs-featured-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .bs-item-action {
        border-right: none;
        padding-right: 0;
        align-items: flex-end;
    }
    .parana-bs-stats {
        flex-direction: column;
        gap: 20px;
    }
}

/* --- Overlay Link to make entire card clickable --- */
.bs-card-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-indent: -9999px; /* Hide text if any */
}

/* Ensure interactive elements are above the overlay */
.bs-featured-bottom, 
.bs-item-action, 
.bs-featured-badges, 
.bs-item-image-wrapper,
.bs-item-info a {
    position: relative;
    z-index: 2;
}
