/* KB Sponsored Products - Front Office Styles */

.kbsp-sponsored-products-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.kbsp-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.kbsp-title-left {
    text-align: left;
}

.kbsp-title-center {
    text-align: center;
}

.kbsp-title-right {
    text-align: right;
}

/* Grid View - Slider */
.kbsp-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.kbsp-slider {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}

.kbsp-product-item {
    flex: 0 0 calc(25% - 15px);
    min-width: 200px;
}

.kbsp-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.kbsp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.kbsp-product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
}

.kbsp-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kbsp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff9800;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.kbsp-product-info {
    padding: 15px;
}

.kbsp-product-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
}

.kbsp-product-name a {
    color: #333;
    text-decoration: none;
}

.kbsp-product-name a:hover {
    color: #2fb5d2;
}

.kbsp-seller-name {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.kbsp-product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2fb5d2;
    margin: 0;
}

/* Slider Navigation */
.kbsp-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.kbsp-slider-nav:hover {
    background: #2fb5d2;
    border-color: #2fb5d2;
    color: #fff;
}

.kbsp-slider-prev {
    left: 0;
}

.kbsp-slider-next {
    right: 0;
}

/* List View */
.kbsp-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kbsp-list .kbsp-product-item {
    flex: 1 1 100%;
}

.kbsp-product-row {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kbsp-list .kbsp-product-image {
    flex: 0 0 150px;
    padding-top: 0;
    height: 150px;
}

.kbsp-list .kbsp-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kbsp-product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kbsp-product-price-col {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-left: 1px solid #eee;
}

.kbsp-product-price-col .kbsp-product-price {
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 991px) {
    .kbsp-product-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 767px) {
    .kbsp-slider-wrapper {
        padding: 0 35px;
    }

    .kbsp-product-item {
        flex: 0 0 calc(50% - 10px);
    }

    .kbsp-product-row {
        flex-wrap: wrap;
    }

    .kbsp-list .kbsp-product-image {
        flex: 0 0 100px;
        height: 100px;
    }

    .kbsp-product-price-col {
        flex: 1 1 100%;
        flex-direction: row;
        justify-content: space-between;
        border-left: none;
        border-top: 1px solid #eee;
    }

    .kbsp-product-price-col .kbsp-product-price {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .kbsp-product-item {
        flex: 0 0 100%;
    }

    .kbsp-slider-wrapper {
        padding: 0;
    }

    .kbsp-slider-nav {
        display: none;
    }

    .kbsp-slider {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .kbsp-slider .kbsp-product-item {
        scroll-snap-align: start;
        flex: 0 0 80%;
    }
}
