/**
 * Module: Dynamic Product Sections - Final Stable Version
 * Responsive Layout: 4 Columns (Desktop) | 2 Columns (Mobile)
 */

/* 1. Main Layout */
.vb-dynamic-wrapper.vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 40px; 
    max-width: 1300px;
    margin: 0 auto;
    padding: 29px 13px;
    box-sizing: border-box;
}

.vb-dynamic-container {
	margin-bottom:-27px;
}

/* 2. Section Header & Premium Minimalist Actions */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    padding: 0 5px;
}
.widget-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
}


.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Clear All: Minimalist Wow Look */
.clear-all {
    color: #a0a0a0;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-all:hover { color: #ff4757; background: #252525; }

.clear-all:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.08);
    border-color: rgba(255, 71, 87, 0.3);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.1);
    transform: translateY(-1px);
}

/* Arrow Navigation: Premium Glassy Style */
.arrow {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* রাউন্ডেড শেপ দিলে বেশি প্রিমিয়াম লাগে */
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.arrow:hover {
    background: #ffffff;
    color: #1a1d2e; /* হোভার করলে ব্যাকগ্রাউন্ড সাদা আর আইকন ডার্ক হবে */
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.arrow:active {
    transform: scale(0.95); /* ক্লিক করলে হালকা দেবে যাবে (Tactile Feel) */
}

/* Arrow Symbols Adjustment */
.arrow.prev { padding-right: 2px; }
.arrow.next { padding-left: 2px; }

/* 3. Product Grid (Horizontal Scroll Logic) */
.vb-dynamic-wrapper .product-grid-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 5px;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none;    /* Firefox */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.vb-dynamic-wrapper .product-grid-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* 4. Horizontal Card Design - Desktop (5 Items) */
.vb-dynamic-wrapper .product-card-item {
    /**
     * Updated flex-basis to 20% for 5 items per row.
     * Reduced padding and min-width for a more compact appearance.
     */
    flex: 0 0 calc(20% - 12px) !important; 
    min-width: 180px; 
    background: #2B304C; 
    border-radius: 12px;
    padding: 3px; /* Made more compact from 12px */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    border: 1px solid transparent; 
    position: relative;
    box-sizing: border-box;
}

.product-card-item:hover {
    background: #343a5e; 
    transform: translateY(-4px); 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); 
    border-color: rgba(255, 255, 255, 0.1); 
}

.card-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.card-image {
    /**
     * Keeping image size compact for 5-column layout.
     */
    flex: 0 0 50px; 
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1d2e;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card-item:hover .card-image img { transform: scale(1.15); }

.product-title {
    color: #fff;
    font-size: 13px; /* Slightly adjusted for better fit */
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 5. Mobile & Tablet Responsive */

/* Tablet (3 Items) */
@media (max-width: 1024px) {
    .vb-dynamic-wrapper .product-card-item {
        flex: 0 0 calc(33.33% - 10px) !important;
    }
}

/* Mobile (3 Items per view) */
@media (max-width: 767px) {
    .vb-dynamic-wrapper .product-card-item {
        /**
         * Updated to 3 items on mobile (33.33%).
         * Adjusted padding and min-width for mobile screens.
         */
        flex: 0 0 calc(33.33% - 8px) !important; 
        min-width: 110px;
        padding: 2px;
    }
    
    .widget-title { font-size: 1.1rem; }
    
    /* Compact image for 3-item mobile layout */
    .card-image { flex: 0 0 40px; height: 40px; }
    
    .product-title { 
        font-size: 11px; 
        line-height: 1.2;
    }
    
    .vb-dynamic-wrapper.vertical-stack {
        gap: 30px;
        padding: 20px 3px;
    }
}