/**
 * Keravada Blog Product Slider - Styles
 * Mobile-first product carousel for blog posts
 */

/* Hide on desktop */
@media screen and (min-width: 769px) {
    .kbps-carousel {
        display: none !important;
    }
}

/* ==========================================
   PRODUCT CAROUSEL
   ========================================== */

.kbps-carousel {
    margin: 30px -20px;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02), rgba(0,0,0,0.05), rgba(0,0,0,0.02));
}

.kbps-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    padding: 0 20px 12px;
}

.kbps-track-wrapper {
    overflow: hidden;
    padding: 0 20px;
}

.kbps-track {
    display: flex;
    gap: 12px;
    transition: transform 0.3s ease-out;
    touch-action: pan-x;
}

.kbps-card {
    flex: 0 0 calc(45% - 6px);
    min-width: calc(45% - 6px);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.kbps-card:active {
    transform: scale(0.98);
}

.kbps-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.kbps-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sale badge */
.kbps-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}

.kbps-card-content {
    padding: 10px 12px 12px;
}

.kbps-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.kbps-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.kbps-card-price del {
    color: #999;
    font-weight: 400;
    font-size: 12px;
    margin-right: 4px;
}

.kbps-card-price ins {
    text-decoration: none;
    color: #e53935;
}

/* Loading state */
.kbps-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.kbps-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    animation: kbps-spin 0.8s linear infinite;
}

@keyframes kbps-spin {
    to { transform: rotate(360deg); }
}
