/* ==========================================================================
   8. product price section
   ========================================================================== */



/* Featured Products Section Styles */
.featured-products {
    padding: 8rem 0;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.featured-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--main-gradient);
    opacity: 0.7;
}

/* Brand Carousel */
.brand-carousel {
    margin-bottom: 4rem;
    position: relative;
}

.brands-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 1rem 0;
}

.brand-logo {
    width: 12rem;
    height: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.75;
    transition: opacity var(--transition-medium), transform var(--transition-medium);
    filter: grayscale(100%);
}

.brand-logo:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: grayscale(0%);
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Products Showcase */
.products-showcase {
    position: relative;
    padding: 0 5rem;
}

.product-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4.5rem;
    height: 4.5rem;
    background-color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-medium);
    color: var(--color-primary);
}

.product-nav:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-product {
    left: 0;
}

.next-product {
    right: 0;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    position: relative;
}

/* Product Card */
.product-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--main-gradient);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-card:hover::before {
    opacity: 1;
}

.product-image {
    height: 18rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--transition-medium);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-title {
    font-size: 1.8rem;
    font-weight: var(--weight-bold);
    margin-bottom: 0.4rem;
    color: var(--color-primary-dark);
    line-height: 1.3;
    min-height: 4.8rem;
}

.product-subtitle {
    font-size: 1.4rem;
    color: var(--color-text-light);
    margin-bottom: 1.2rem;
}

/* Star Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.2rem;
}

.star {
    width: 1.6rem;
    height: 1.6rem;
    position: relative;
}

.star::before {
    content: '★';
    color: #e0e0e0;
    font-size: 1.6rem;
    position: absolute;
}

.star.filled::before {
    content: '★';
    color: #FFD700;
}

.star.half-filled::before {
    content: '★';
    background: linear-gradient(to right, #FFD700 50%, #e0e0e0 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rating-count {
    font-size: 1.3rem;
    color: var(--color-text-light);
}

/* Pricing */
.product-pricing {
    margin-bottom: 1.8rem;
}

.price-current {
    font-size: 2.6rem;
    font-weight: var(--weight-bold);
    color: var(--color-primary-dark);
    margin-bottom: 0.4rem;
}

.price-savings {
    font-size: 1.4rem;
    font-weight: var(--weight-semibold);
    color: #e53935;
}

/* Buy Now Button */
.buy-now-btn {
    background-color: #00B761;
    color: white;
    font-weight: var(--weight-bold);
    padding: 1.2rem;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    transition: all var(--transition-medium);
    margin-top: auto;
    box-shadow: 0 4px 8px rgba(0, 183, 97, 0.3);
}

.buy-now-btn:hover {
    background-color: #009E53;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 183, 97, 0.4);
}

/* View All Button */
.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.view-all-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: white;
    color: var(--color-primary);
    font-weight: var(--weight-semibold);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-md);
    font-size: 1.6rem;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--main-gradient);
    transition: left var(--transition-medium);
    z-index: -1;
}

.view-all-btn:hover {
    color: white;
    border-color: transparent;
}

.view-all-btn:hover::before {
    left: 0;
}

#load-more-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: white;
    color: var(--color-primary);
    font-weight: var(--weight-semibold);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-md);
    font-size: 1.6rem;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-right: 1rem;
}

#load-more-btn:hover {
    color: white;
    border-color: transparent;
}

#load-more-btn:hover::before {
    left: 0;
}

#load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--main-gradient);
    transition: left var(--transition-medium);
    z-index: -1;
}

.hidden {
    display: none;
}


/* Responsive adjustments */
@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-nav {
        width: 4rem;
        height: 4rem;
    }
}

@media (max-width: 768px) {
    .brands-container {
        justify-content: center;
    }
    
    .product-card {
        padding: 2rem 1.5rem;
    }
    
    .product-image {
        height: 16rem;
    }
    
    .product-title {
        font-size: 1.6rem;
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .products-showcase {
        padding: 0 4.5rem;
        overflow: hidden;
    }
    
    .products-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 1.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .products-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }
    
    .product-card {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: calc(50% - 0.75rem);
        scroll-snap-align: start;
    }
    
    .product-nav {
        width: 3.5rem;
        height: 3.5rem;
        display: flex;
    }
    
    .prev-product {
        left: 0.5rem;
    }
    
    .next-product {
        right: 0.5rem;
    }
    
    .product-image {
        height: 14rem;
    }
}

/* Product Carousel JavaScript */
@keyframes productSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-card {
    animation: productSlideIn 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
