/* Featured Products Section - Ultra Compact Design */

/* ========== MAIN SECTION ========== */
.featured-products-vgtech {
    padding: 2.5rem 0;
    /* Reduced from 3.5rem */
    background: white;
    /* Clean white background - unified with services/posts sections */
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay */
.featured-products-vgtech::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.container-fluid {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    /* Add max-width for better desktop control */
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== CATEGORY BOX - ULTRA COMPACT ========== */
.category-box {
    background: white;
    border-radius: 20px;
    /* Slightly reduced */
    padding: 1.25rem;
    /* Reduced from 2rem */
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
    border: 1px solid rgba(8, 145, 178, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.category-box:hover {
    transform: translateY(-3px);
    /* Reduced lift */
    box-shadow: 0 12px 32px rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.15);
}

.category-box:last-child {
    margin-bottom: 0;
}

/* ========== CATEGORY TITLE ========== */
.category-title-top {
    font-size: 1.5rem;
    /* Reduced from 1.75rem */
    font-weight: 800;
    color: #0f172a;
    /* Unified with section titles */
    margin: 0 0 1rem 0;
    /* Reduced from 1.5rem */
    font-family: 'Noto Sans', sans-serif;
    /* Changed for Vietnamese diacritics support */
    text-transform: uppercase;
    /* Fallback for browser consistency */
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== SLIDER CONTAINER ========== */
.products-slider-wrapper {
    position: relative;
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
    overflow: hidden;
}

.products-slider {
    display: flex;
    gap: 0.75rem;
    /* Reduced from 1rem */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.25rem 0;
    /* Reduced padding */
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.products-slider::-webkit-scrollbar {
    display: none;
}

/* ========== PRODUCT CARDS ========== */
.product-slide {
    flex: 0 0 calc(25% - 0.56rem);
    /* 4 per row on desktop */
    min-width: 200px;
    /* Reduced from 220px */
    max-width: 280px;
    /* Reduced from 300px */
}

.product-card-link-new {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    background: white;
    border: 1px solid rgba(8, 145, 178, 0.08);
    /* Unified border */
    border-radius: 12px;
    /* Reduced from 16px */
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
}

.product-card-link-new:hover {
    transform: translateY(-6px);
    /* Reduced from -8px */
    /* Unified hover lift */
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.12);
    /* Unified hover shadow */
    border-color: rgba(8, 145, 178, 0.2);
}

/* Product Image */
.product-image-box {
    background: #f8fafc;
    /* Subtle background */
    padding: 1.25rem;
    /* Reduced from 2rem */
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    transition: all 0.3s ease;
}

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-link-new:hover .product-image-box img {
    transform: scale(1.08);
    /* Unified scale */
}

/* Product Name - FIXED TO SHOW FULL TEXT */
.product-name-box {
    background: white;
    padding: 0.75rem;
    /* Reduced from 1rem */
    min-height: 3.5rem;
    /* Ensure space for 2 lines of text */
    text-align: center;
    border-top: 1px solid rgba(8, 145, 178, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-name-box h4 {
    font-size: 0.8125rem;
    /* Slightly smaller */
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.5;
    /* Better readability */
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Allow 2 lines */
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: visible;
    /* Changed to visible to prevent cutting */
    word-wrap: break-word;
    font-family: 'Inter', 'Poppins', sans-serif;
}

.product-card-link-new:hover .product-name-box h4 {
    color: #0891b2;
    /* Unified hover color */
}

/* ========== SLIDER NAVIGATION BUTTONS ========== */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid rgba(8, 145, 178, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #0891b2;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.slider-btn:hover {
    background: #0891b2;
    border-color: #0891b2;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.25);
}

.prev-btn {
    left: 10px;
    /* Moved inside for visibility */
}

.next-btn {
    right: 10px;
    /* Moved inside for visibility */
}

/* ========== NO PRODUCTS PLACEHOLDER ========== */
.no-products-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    /* Reduced from 200px */
    background: #f8fafc;
    border-radius: 12px;
    /* Reduced from 16px */
    border: 2px dashed rgba(8, 145, 178, 0.2);
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
}

.no-products-placeholder p {
    color: #64748b;
    font-size: 0.875rem;
    /* Slightly smaller */
    margin: 0;
    font-style: italic;
}

/* ========== VIEW MORE BUTTON ========== */
.btn-center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-explore-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    /* Reduced padding */
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    /* Unified pill shape */
    font-size: 0.9375rem;
    /* Slightly smaller */
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.2);
    /* Lighter shadow */
    font-family: 'Inter', sans-serif;
}

.btn-explore-center:hover {
    background: linear-gradient(135deg, #0e7490 0%, #155e75 100%);
    transform: translateY(-2px);
    /* Reduced lift */
    box-shadow: 0 10px 28px rgba(8, 145, 178, 0.3);
}

/* ========== RESPONSIVE DESIGN ========== */

/* Large Desktop */
@media (max-width: 1400px) {
    .category-box {
        padding: 1.25rem;
    }

    .product-slide {
        flex: 0 0 calc(33.333% - 0.5rem);
        /* 3 per row */
    }
}

/* Desktop/Laptop */
@media (max-width: 1200px) {
    .category-box {
        padding: 1.125rem;
    }

    .category-title-top {
        font-size: 1.375rem;
    }

    .product-slide {
        flex: 0 0 calc(33.333% - 0.5rem);
        min-width: 180px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .featured-products-vgtech {
        padding: 2rem 0;
    }

    .category-box {
        padding: 1rem;
        margin-bottom: 0.875rem;
    }

    .category-title-top {
        font-size: 1.25rem;
        margin-bottom: 0.875rem;
    }

    .product-slide {
        flex: 0 0 calc(50% - 0.375rem);
        /* 2 per row */
        min-width: 160px;
    }

    .prev-btn {
        left: -20px;
    }

    .next-btn {
        right: -20px;
    }
}

/* Mobile - CRITICAL FIX */
@media (max-width: 768px) {
    .featured-products-vgtech {
        padding: 1.5rem 0;
    }

    .category-box {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border-radius: 12px;
    }

    .category-title-top {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .products-slider {
        gap: 0.5rem;
        padding: 0.25rem 0;
    }

    .product-slide {
        flex: 0 0 100%;
        /* 1 COLUMN - FULL WIDTH */
        min-width: 100%;
        max-width: 100%;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        display: none;
        /* Hide arrows on mobile, use swipe */
    }

    .product-image-box {
        padding: 1.25rem;
    }

    .product-name-box {
        padding: 0.75rem;
        min-height: 3rem;
        /* Ensure space for text */
    }

    .product-name-box h4 {
        font-size: 0.9375rem;
        /* Readable text */
        line-height: 1.4;
    }

    .btn-explore-center {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .category-box {
        padding: 0.875rem;
        margin-bottom: 0.625rem;
    }

    .category-title-top {
        font-size: 1rem;
        margin-bottom: 0.625rem;
    }

    .no-products-placeholder {
        min-height: 120px;
    }

    .product-image-box {
        padding: 1rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .featured-products-vgtech {
        padding: 1.25rem 0;
    }

    .category-box {
        padding: 0.75rem;
    }

    .category-title-top {
        font-size: 0.9375rem;
    }

    .product-image-box {
        padding: 0.875rem;
    }

    .btn-explore-center {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}