/* Banner and Ads Section */
.home-user-banner-container {
    display: flex;
    gap: 20px;
    width: 100%;
    margin: 20px auto;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.home-user-banner-wrapper {
    flex: 2;
    overflow: hidden;
    position: relative;
    height: 250px;
    margin: 0 auto;
}

.home-user-banner {
    display: flex;
    width: fit-content;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.home-user-banner-image {
    flex-shrink: 0;
    width: 100%;
    height: 280px;
    object-fit: cover;
    user-select: none;
    border-radius: 16px;
}

.home-user-banner-prev,
.home-user-banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.home-user-banner-prev:hover,
.home-user-banner-next:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.home-user-banner-prev {
    left: 20px;
}

.home-user-banner-next {
    right: 20px;
}

.home-user-banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.home-user-banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-user-banner-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.home-user-banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    border-radius: 16px;
    pointer-events: none;
}

.home-user-ads {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto;
    width: 100%;
    padding: 8px;
}

.home-user-ad {
    background: #ffffff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
}

.home-user-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.home-user-ad:active {
    transform: scale(0.98);
}

.home-user-ad img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center;
    user-select: none;
    transition: transform 0.3s ease;
}

.home-user-ad:hover img {
    transform: scale(1.02);
}

.home-user-ad::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Categories Section */
.home-user-shop-by-categories {
    margin-top: 40px;
    margin-bottom: 60px;
    text-align: center;
}

.home-user-shop-by-categories h2 {
    font-size: 24px;
    margin-bottom: 20px;
    margin-top: 20px;
    text-align: left;
}

.home-user-categories-container {
    display: flex;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 0;
}

.home-user-category {
    text-align: center;
    flex: 1 1 calc(20% - 16px);
    max-width: calc(20% - 16px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-user-category img {
    width: 210px;
    height: 250px;
    object-fit: fill;
    border-radius: 8px;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.home-user-category:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Newest Products Section */
.home-product-newest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.home-user-shop-by-products-newest h2 {
    font-size: 24px;
    margin-bottom: 20px;
    margin-top: 20px;
    text-align: left;
}

.home-product-newest-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 20px;
    margin-top: 15px;
    padding: 10px 0;
}

.home-product-newest-card {
    height: 100%;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    width: 18%;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    background: white;
}

.home-product-newest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #99bc85;
}

.home-product-newest-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
    border-bottom: 1px solid #f0f0f0;
}

.home-product-newest-card:hover .home-product-newest-img-top {
    transform: scale(1.05);
}

.home-product-newest-body {
    padding: 15px;
    text-align: center;
    background: white;
    z-index: 2;
}

.home-product-newest-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

.home-product-newest-price {
    font-size: 15px;
    font-weight: bold;
    color: #4a7c5b;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.home-product-newest-price::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #99bc85, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-product-newest-card:hover .home-product-newest-price::after {
    opacity: 1;
}

.home-product-newest-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 15px;
    font-size: 13px;
    color: #666;
}

.home-product-newest-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #ffb300;
}

.home-product-newest-sales {
    color: #666;
}

.home-product-newest-ribbon {
    position: absolute;
    top: 10px;
    left: -5px;
    background: #ff6b6b;
    color: white;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 9;
}

.home-product-newest-ribbon::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    border-left: 5px solid transparent;
    border-right: 5px solid #c0392b;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Brands Section */
.home-user-shop-by-brands {
    margin-top: 40px;
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.home-user-shop-by-brands h2 {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    background-color: #4a7c5b;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.home-user-brands-container {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.home-user-brands-inner {
    display: flex;
    gap: 30px;
    width: max-content;
    will-change: transform;
    transition: transform 0.3s ease;
}

.home-user-brand {
    flex: 0 0 auto;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.home-user-brand:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.home-user-brand img {
    width: 150px;
    height: 100px;
    object-fit: contain;
    user-select: none;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.home-user-brand:hover img {
    filter: grayscale(0%);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .home-product-newest-card {
        width: 23%;
    }
}

@media (max-width: 992px) {
    .home-product-newest-card {
        width: 31%;
    }
}

@media (max-width: 768px) {
    .home-user-banner-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .home-user-banner-wrapper {
        height: 180px;
    }

    .home-user-banner-image {
        height: auto;
    }

    .home-user-ads {
        flex-direction: row;
        justify-content: center;
        gap: 5px;
    }

    .home-user-ad img {
        height: 80px;
    }

    .home-product-newest-card {
        width: 48%;
    }

    .home-user-brands-container {
        padding: 20px 15px;
    }

    .home-user-brand {
        padding: 10px;
    }

    .home-user-brand img {
        width: 120px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .home-product-newest-card {
        width: 100%;
    }

    .home-product-newest-wishlist-icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .home-product-newest-wishlist-icon::after {
        font-size: 10px;
        padding: 3px 6px;
        top: -35px;
    }

    .home-product-newest-wishlist-icon:hover::after {
        top: -38px;
    }

    .home-user-shop-by-brands h2 {
        font-size: 20px;
        padding: 8px 15px;
    }

    .home-user-brands-container {
        padding: 15px 10px;
    }

    .home-user-brand img {
        width: 100px;
        height: 60px;
    }
}
