/* ===============================================
   HOME PAGE RESPONSIVE STYLES + ANIMATIONS
   =============================================== */

/* Scroll Animation Base Styles */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Types */
.fadeInUp {
    opacity: 0;
    transform: translateY(50px);
}

.fadeInUp.animate {
    opacity: 1;
    transform: translateY(0);
}

.fadeInLeft {
    opacity: 0;
    transform: translateX(-50px);
}

.fadeInLeft.animate {
    opacity: 1;
    transform: translateX(0);
}

.fadeInRight {
    opacity: 0;
    transform: translateX(50px);
}

.fadeInRight.animate {
    opacity: 1;
    transform: translateX(0);
}

.fadeIn {
    opacity: 0;
}

.fadeIn.animate {
    opacity: 1;
}

.scaleIn {
    opacity: 0;
    transform: scale(0.8);
}

.scaleIn.animate {
    opacity: 1;
    transform: scale(1);
}

/* Hero Section Animations */
.hero .intro-excerpt {
    animation-delay: 0.2s;
}

.hero .hero-img-wrap {
    animation-delay: 0.4s;
}

/* Stagger Animation for Product Grid */
.product-item {
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Feature Cards Hover Effect */
.feature {
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 10px;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

/* Section Animations */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    transition: width 0.8s ease;
}

.section-title.animate::after {
    width: 60px;
}

/* Testimonial Cards */
.testimonial-block {
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.testimonial-block.animate {
    transform: scale(1);
}

/* Blog Post Cards */
.post-entry {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.post-entry:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.post-entry img {
    transition: all 0.3s ease;
}

.post-entry:hover img {
    transform: scale(1.1);
}

/* Smooth Parallax Effect for Hero */
.hero-img-wrap {
    will-change: transform;
}

/* Grid Items Animation */
.imgs-grid .grid {
    transition: all 0.3s ease;
}

.imgs-grid:hover .grid:not(:hover) {
    opacity: 0.7;
    transform: scale(0.98);
}

.imgs-grid .grid:hover {
    transform: scale(1.05);
    z-index: 2;
}

/* Progressive Loading Animation */
@keyframes progressiveLoad {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Icon Float Animation */
.icon {
    transition: all 0.3s ease;
}

.feature:hover .icon {
    transform: translateY(-5px) rotate(5deg);
}

/* Price Animation */
.product-price {
    transition: all 0.3s ease;
}

.product-item:hover .product-price {
    transform: scale(1.1);
    color: #3b82f6;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(20px);
        transition-duration: 0.6s;
    }
    
    .fadeInLeft,
    .fadeInRight {
        transform: translateY(30px);
    }
    
    .fadeInLeft.animate,
    .fadeInRight.animate {
        transform: translateY(0);
    }
    
    .product-item:hover {
        transform: translateY(-5px);
    }
    
    .post-entry:hover {
        transform: translateY(-5px);
    }
}

/* Performance Optimizations */
.animate-on-scroll,
.product-item,
.feature,
.post-entry {
    will-change: transform, opacity;
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .product-item,
    .feature,
    .post-entry,
    .btn {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Image Loading States */
img {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

img[loading="lazy"] {
    opacity: 1; /* Default to visible */
}

/* Ensure images don't disappear */
.img-fluid {
    opacity: 1 !important;
    transform: scale(1) !important;
    border-radius: 10px;
}

/* Hero Section Responsive */
@media (max-width: 1199.98px) {
    .hero .hero-img-wrap {
        perspective: 1000px;
        transform-style: preserve-3d;
    }

    .hero .hero-img-wrap img {
        max-width: 100%;
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        animation: float 6s ease-in-out infinite;
        transform-origin: center center;
        will-change: transform;
        backface-visibility: hidden;
        filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hero .hero-img-wrap:hover {
        transform: translateY(-5px) scale(1.02);
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    }

    .hero .hero-img-wrap:after {
        display: none;
    }

    @keyframes float {
        0%, 100% {
            transform: translateY(0) rotateY(0deg);
        }
        50% {
            transform: translateY(-15px) rotateY(2deg);
        }
    }
}

@media (max-width: 991.98px) {
    .hero {
        padding: 3rem 0 2rem 0;
        text-align: center;
    }

    .hero .intro-excerpt {
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero .btn {
        margin: 0.5rem;
        padding: 12px 25px;
    }
}

@media (max-width: 767.98px) {
    .hero {
        padding: 2rem 0 1.5rem 0;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        padding: 15px 25px;
    }
}

@media (max-width: 575.98px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.9rem;
    }
}

/* Product Section Responsive */
@media (max-width: 991.98px) {
    .product-section {
        padding: 4rem 0;
    }
}

@media (max-width: 767.98px) {
    .product-section {
        padding: 0;
    }

    .product-section .col-12.col-md-4.col-lg-3 {
        margin-bottom: 2rem;
    }

    .product-section .product-item {
        padding-bottom: 30px;
    }

    .product-section .product-item .product-thumbnail {
        margin-bottom: 20px;
    }

    .product-section .product-item h3 {
        font-size: 1.1rem;
    }

    .product-section .product-item strong {
        font-size: 1.2rem;
    }
}

@media (max-width: 575.98px) {
    .product-section .product-item h3 {
        font-size: 1rem;
    }

    .product-section .product-item strong {
        font-size: 1.1rem;
    }
}

/* Why Choose Us Section Responsive */
@media (max-width: 991.98px) {
    .why-choose-section {
        padding: 4rem 0;
    }

    .why-choose-section .col-lg-6:first-child {
        margin-bottom: 3rem;
    }

    .why-choose-section .img-wrap:before {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .why-choose-section {
        padding-top: 2rem;
    }

    .why-choose-section .row.my-5 {
        margin: 2rem 0;
    }

    .why-choose-section .col-6.col-md-6 {
        margin-bottom: 2rem;
    }

    .feature {
        text-align: center;
        margin-bottom: 2rem;
    }

    .feature .icon {
        margin-bottom: 15px;
    }

    .feature h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .feature p {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .why-choose-section .col-6.col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .feature h3 {
        font-size: 1rem;
    }

    .feature p {
        font-size: 0.85rem;
    }

    .footer-section {
        padding-top: 0;
    }

    .footer-section .subscription-form {
        margin-top: 0.5rem;
    }

    .footer-section .sofa-img {
        display: none;
    }
}

/* We Help Section Responsive */
@media (max-width: 991.98px) {
    .we-help-section {
        padding: 4rem 0;
    }

    .we-help-section .col-lg-7 {
        margin-bottom: 3rem;
    }

    .we-help-section .imgs-grid {
        display: block;
    }

    .we-help-section .imgs-grid .grid {
        margin-bottom: 1rem;
    }

    .we-help-section .imgs-grid:before {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .we-help-section {
        padding: 3rem 0;
    }

    .we-help-section .imgs-grid .grid {
        margin-bottom: 1.5rem;
    }

    .we-help-section .imgs-grid .grid img {
        width: 100%;
        height: auto;
    }

    .custom-list li {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 575.98px) {
    .we-help-section p {
        font-size: 0.9rem;
    }
}

/* Popular Product Section Responsive */
@media (max-width: 991.98px) {
    .popular-product {
        padding: 0 0 4rem 0;
    }

    .popular-product .col-12.col-md-6.col-lg-4 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .popular-product {
        padding: 0 0 3rem 0;
    }

    .popular-product .product-item-sm {
        flex-direction: column;
        text-align: center;
    }

    .popular-product .product-item-sm .thumbnail {
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .popular-product .product-item-sm .thumbnail img {
        max-width: 200px;
        margin: 0 auto;
    }

    .popular-product .product-item-sm h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .popular-product .product-item-sm p {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .popular-product .product-item-sm .thumbnail img {
        max-width: 150px;
    }

    .popular-product .product-item-sm h3 {
        font-size: 1rem;
    }

    .popular-product .product-item-sm p {
        font-size: 0.85rem;
    }
}

/* Testimonial Section Responsive */
@media (max-width: 991.98px) {
    .testimonial-section {
        padding: 4rem 0;
    }
}

@media (max-width: 767.98px) {
    .testimonial-section {
        padding: 3rem 0;
    }

    .testimonial-block blockquote p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .testimonial-block .author-info h3 {
        font-size: 1.1rem;
    }

    .testimonial-block .author-info .position {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .testimonial-block blockquote p {
        font-size: 0.9rem;
    }

    .testimonial-block .author-info h3 {
        font-size: 1rem;
    }

    .testimonial-block .author-info .position {
        font-size: 0.85rem;
    }
}

/* Blog Section Responsive */
@media (max-width: 991.98px) {
    .blog-section {
        padding: 4rem 0;
    }

    .blog-section .col-md-6.text-start.text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .blog-section {
        padding: 3rem 0;
    }

    .blog-section .col-12.col-sm-6.col-md-4 {
        margin-bottom: 2rem;
    }

    .post-entry .post-thumbnail img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .post-content-entry h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .post-content-entry .meta {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .blog-section .col-12.col-sm-6.col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .post-entry .post-thumbnail img {
        height: 180px;
    }

    .post-content-entry h3 {
        font-size: 1rem;
    }

    .post-content-entry .meta {
        font-size: 0.85rem;
    }
}

/* General Responsive Improvements */
@media (max-width: 767.98px) {
    .section-title {
        font-size: 24px;
        text-align: center;
    }

    .section-subtitle {
        font-size: 14px !important;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px !important;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    h1, h2, h3 {
        line-height: 1.3;
    }

    p {
        line-height: 1.5;
    }
}

/* Image Optimization */
@media (max-width: 767.98px) {
    .img-fluid {
        max-width: 100%;
        height: auto;
    }

    .hero .hero-img-wrap img {
        max-width: 100%;
        height: auto;
    }
}

/* Touch-friendly improvements */
@media (max-width: 767.98px) {
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        padding: 15px 20px;
    }
}

/* Loading and Performance */
@media (max-width: 767.98px) {
    .hero .hero-img-wrap img,
    .product-section .product-thumbnail,
    .why-choose-section .img-wrap img,
    .we-help-section .imgs-grid .grid img,
    .post-entry .post-thumbnail img {
        loading: lazy;
    }
}

/* Accessibility improvements */
@media (max-width: 767.98px) {
    .btn:focus,
    .nav-link:focus,
    .product-item:focus {
        outline: 2px solid #3b5d50;
        outline-offset: 2px;
    }

    .section-title {
        color: #2f2f2f;
        font-weight: 700;
    }
}

/* Print styles */
@media print {
    .hero,
    .testimonial-section,
    .blog-section {
        display: none;
    }

    .product-section,
    .why-choose-section,
    .we-help-section,
    .popular-product {
        padding: 1rem 0;
    }
}

/* ===============================================
   BANNER SLIDER STYLES
   =============================================== */

#bannerCarousel {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

#bannerCarousel .hero {
    width: 100%;
    margin: 0;
    padding: 0;
}

#bannerCarousel .carousel-inner {
    width: 100%;
    height: 100%;
}

#bannerCarousel .carousel-item {
    width: 100%;
    height: 100%;
    position: relative;
}

#bannerCarousel .banner-slide {
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

/* Alternative background sizing options */
#bannerCarousel .banner-slide.fit-contain {
    background-size: contain;
}

#bannerCarousel .banner-slide.fit-fill {
    background-size: 100% 100%;
}

#bannerCarousel .banner-slide.fit-auto {
    background-size: auto;
}

/* Responsive aspect ratio fitting */
#bannerCarousel .banner-slide.fit-responsive {
    background-size: cover;
    background-position: center;
    object-fit: cover;
}

/* Ensure banner maintains aspect ratio */
#bannerCarousel .banner-slide {
    aspect-ratio: 16/9; /* You can adjust this ratio */
}

/* Override for smaller screens */
@media (max-width: 768px) {
    #bannerCarousel .banner-slide {
        aspect-ratio: 4/3;
    }
}

/* For better image quality on different screen sizes */
@media (min-width: 1400px) {
    #bannerCarousel .banner-slide {
        background-size: cover;
        background-position: center;
    }
}

@media (max-width: 1399px) and (min-width: 992px) {
    #bannerCarousel .banner-slide {
        background-size: cover;
        background-position: center;
    }
}

.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    animation: fadeInLeft 1s ease-out;
}

.banner-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

.banner-content p.lead {
    font-size: 1.25rem;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
}

.banner-content .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.min-vh-60 {
    min-height: 60vh;
}

/* Carousel Controls Styling */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.carousel-indicators {
    margin-bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.carousel-indicators .active {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Banner Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Banner Styles */
@media (max-width: 768px) {
    .banner-slide {
        height: 60vh;
        min-height: 400px;
    }
    
    .banner-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .banner-content p.lead {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .banner-content .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (max-width: 576px) {
    .banner-slide {
        height: 50vh;
        min-height: 350px;
    }
    
    .banner-content {
        text-align: center;
    }
    
    .banner-content h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .banner-content p.lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .banner-content .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Additional Banner Fit Improvements */
#bannerCarousel .banner-slide {
    /* Ensure proper aspect ratio */
    aspect-ratio: 16/9;
    min-height: 400px;
    max-height: 80vh;
}

/* Better image fitting */
#bannerCarousel .banner-slide.fit-responsive {
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* Responsive aspect ratio adjustments */
@media (max-width: 768px) {
    #bannerCarousel .banner-slide {
        aspect-ratio: 4/3;
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    #bannerCarousel .banner-slide {
        aspect-ratio: 3/2;
        min-height: 250px;
    }
}

/* ===============================================
   CATEGORY SECTION STYLES
   =============================================== */

.category-section {
    position: relative;
    padding: 2rem 0;
}

.section-title {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.title-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
    margin-top: 1rem;
}

/* Search Section Styles */
.search-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    margin-bottom: 1.5rem;
}

.search-input-group {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: #2c3e50;
}

.search-input::placeholder {
    color: #7f8c8d;
}

.search-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: scale(1.05);
}

.search-btn i {
    font-size: 1.1rem;
}

.search-suggestions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-right: 0.5rem;
}

.suggestion-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.suggestion-tag:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    border: 1px solid #e9ecef;
}

.search-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.search-loading i {
    margin-right: 0.5rem;
    color: #3498db;
}

.results-content {
    padding: 1rem 0;
}

.result-section {
    margin-bottom: 1.5rem;
}

.result-section:last-child {
    margin-bottom: 0;
}

.result-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    margin-bottom: 0.75rem;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #2c3e50;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.result-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
}

.result-item:last-child {
    border-bottom: none;
}

.result-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.result-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.result-placeholder i {
    color: white;
    font-size: 1.2rem;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-price {
    font-weight: 600;
    color: #e74c3c;
}

.result-category {
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.view-all-results {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-top: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.view-all-results:hover {
    background: #e9ecef;
    color: #2980b9;
    text-decoration: none;
}

/* Search Container Position */
.search-container {
    position: relative;
}

/* Mobile Search Results */
@media (max-width: 768px) {
    .search-results {
        left: -1rem;
        right: -1rem;
        border-radius: 8px;
        max-height: 300px;
    }
    
    .result-item {
        padding: 1rem;
    }
    
    .result-image,
    .result-placeholder {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }
    
    .result-name {
        font-size: 0.85rem;
    }
    
    .result-meta {
        font-size: 0.75rem;
    }
}

/* Category Showcase Card Styles */
.category-showcase-card {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    min-height: 400px;
}

.category-showcase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.category-showcase-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: #f8f9fa;
}

.showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-showcase-card:hover .showcase-img {
    transform: scale(1.05);
}

.showcase-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.showcase-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.category-showcase-content {
    padding: 2rem 1.5rem;
    text-align: left;
    background: white;
    height: calc(100% - 300px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.showcase-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
    line-height: 1.3;
}

.showcase-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-showcase {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #2c3e50;
    text-align: center;
    text-transform: uppercase;
}

.btn-showcase:hover {
    background: transparent;
    color: #2c3e50;
    text-decoration: none;
    transform: translateY(-2px);
}

.category-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-content {
    width: 100%;
    color: white;
    text-align: center;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.category-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.category-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.product-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3498db;
}

.count-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.category-footer {
    padding: 1.25rem;
}

.btn-category {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-category:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-category i {
    transition: transform 0.3s ease;
}

.btn-category:hover i {
    transform: translateX(3px);
}

/* Responsive Category Styles */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .category-image-wrapper {
        height: 180px;
    }
    
    .category-overlay {
        padding: 1rem;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 24px;
    }

    .search-results-section .section-title {
        font-size: 20px;
        margin-bottom: 10px !important;
    }

    .search-results-section .text-muted {
        text-align: center;
    }
    
    .category-image-wrapper {
        height: 160px;
    }
    
    .category-overlay {
        padding: 0.75rem;
    }
    
    .category-footer {
        padding: 1rem;
    }
    
    .search-input {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 0.8rem 1.2rem;
    }
    
    .search-suggestions {
        align-items: center;
    }
    
    .suggestion-label {
        margin-bottom: 0.5rem;
    }
}

/* Category Grid Responsive Adjustments */
@media (max-width: 992px) {
    .category-section {
        padding: 2rem 0;
    }
}

@media (max-width: 768px) {
    .category-section {
        padding: 0;
    }
/* 
    .category-section .col-6 {
        padding: 0;
    } */
}

/* Enhanced hover effects for touch devices */
@media (hover: hover) {
    .category-card:hover {
        transform: translateY(-8px);
    }
}

@media (hover: none) {
    .category-card:active {
        transform: translateY(-4px);
    }
    
    .category-overlay {
        opacity: 1;
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.6) 100%
        );
    }
}

/* ===============================================
   SHOWCASE CATEGORY STYLES (NEW)
   =============================================== */

.category-showcase-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: #f8f9fa;
}

.showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-showcase-card:hover .showcase-img {
    transform: scale(1.05);
}

.showcase-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.showcase-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.category-showcase-content {
    padding: 2rem 1.5rem;
    text-align: left;
    background: white;
    height: calc(100% - 300px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.showcase-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
    line-height: 1.3;
}

.showcase-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-showcase {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #2c3e50;
    text-align: center;
    text-transform: uppercase;
    width: fit-content;
}

.btn-showcase:hover {
    background: transparent;
    color: #2c3e50;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Responsive Showcase Styles */
@media (max-width: 768px) {
    .category-showcase-image {
        height: 250px;
    }
    
    .category-showcase-content {
        padding: 1.5rem 1rem;
        min-height: 120px;
    }
    
    .showcase-title {
        font-size: 1.1rem;
    }
    
    .showcase-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .btn-showcase {
        padding: 0.7rem 1.5rem;
        font-size: 0.8rem;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .category-showcase-image {
        height: 220px;
    }
    
    .category-showcase-content {
        padding: 1.25rem 0.75rem;
        min-height: 100px;
    }
    
    .showcase-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .showcase-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .btn-showcase {
        padding: 0.6rem 1.25rem;
        font-size: 0.75rem;
    }
}

/* ===============================================
   AJAX SEARCH RESULTS STYLES
   =============================================== */

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    border: 1px solid #e9ecef;
}

.search-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.search-loading i {
    margin-right: 0.5rem;
    color: #3498db;
}

.results-content {
    padding: 1rem 0;
}

.result-section {
    margin-bottom: 1.5rem;
}

.result-section:last-child {
    margin-bottom: 0;
}

.result-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    margin-bottom: 0.75rem;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #2c3e50;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.result-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
}

.result-item:last-child {
    border-bottom: none;
}

.result-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.result-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.result-placeholder i {
    color: white;
    font-size: 1.2rem;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-price {
    font-weight: 600;
    color: #e74c3c;
}

.result-category {
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.view-all-results {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-top: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.view-all-results:hover {
    background: #e9ecef;
    color: #2980b9;
    text-decoration: none;
}

/* Search Container Position */
.search-container {
    position: relative;
}

/* Mobile Search Results */
@media (max-width: 768px) {
    .search-results {
        left: -1rem;
        right: -1rem;
        border-radius: 8px;
        max-height: 300px;
    }
    
    .result-item {
        padding: 1rem;
    }
    
    .result-image,
    .result-placeholder {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }
    
    .result-name {
        font-size: 0.85rem;
    }
    
    .result-meta {
        font-size: 0.75rem;
    }
}
