/* =========================================
   Filter Engine & Archive Design
   Location: engine/features/filter/filter.css
   ========================================= */

/* 1. CONTROL BAR (Top Filter Area) */
.alpha-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

/* Left Side: Price Slider Area */
.control-left {
    flex: 1;
    min-width: 300px; /* স্লাইডারের জন্য পর্যাপ্ত জায়গা */
    padding-right: 20px;
}

.price-filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-values {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}

/* noUiSlider Customization (Modern Blue Theme) */
.noUi-target {
    border: none;
    background: #e5e7eb;
    box-shadow: none;
    height: 6px;
    border-radius: 3px;
}

.noUi-connect {
    background: #2563eb; /* Primary Blue */
}

.noUi-handle {
    border-radius: 50%;
    background: #fff;
    border: 2px solid #2563eb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: grab;
    width: 20px !important;
    height: 20px !important;
    right: -10px !important; /* Center handle */
    top: -8px !important;    /* Center vertically */
}

.noUi-handle:active {
    cursor: grabbing;
    background: #2563eb;
    border-color: #fff;
}

/* Tooltip on Handle */
.noUi-tooltip {
    display: none; /* বাই ডিফল্ট অফ, শুধু টানলে অন */
    background: #1f2937;
    color: #fff;
    border-radius: 4px;
    border: none;
    padding: 2px 6px;
    font-size: 11px;
}
.noUi-handle:active .noUi-tooltip {
    display: block;
}

/* Right Side: Sort Dropdown */
.control-right select {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #374151;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.2s;
}

.control-right select:hover {
    border-color: #9ca3af;
}

.control-right select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* 2. PRODUCT GRID (Archive Layout) */
.alpha-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.alpha-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Hover Effect: Lift Up */
.alpha-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Image Area */
.card-thumb {
    position: relative;
    width: 100%;
    height: 220px;
    background: #f9fafb; /* Light Gray Background */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.alpha-product-card:hover .card-thumb img {
    transform: scale(1.08);
}

/* Compare Button Positioning */
.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

/* কার্ডের ওপর মাউস নিলে বাটন ভেসে উঠবে */
.alpha-product-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Card Details */
.card-details {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 1px solid #f3f4f6;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

.product-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #2563eb;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626; /* Deep Red Price */
}


/* 3. PAGINATION & EXTRAS */
.alpha-pagination {
    margin: 40px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.alpha-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: 0.2s;
}

.alpha-pagination .page-numbers.current,
.alpha-pagination .page-numbers:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Mobile Responsive Tweaks */
@media (max-width: 768px) {
    .alpha-control-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .control-right select {
        width: 100%;
    }

    .alpha-product-grid {
        grid-template-columns: repeat(2, 1fr); /* মোবাইলে ২ কলাম */
        gap: 10px;
    }

    .card-thumb {
        height: 160px;
        padding: 10px;
    }

    .product-title {
        font-size: 13px;
    }
    
    /* মোবাইলে বাটন সবসময় দেখা যাবে */
    .card-actions {
        opacity: 1;
        transform: translateX(0);
    }
}