﻿/* Homepage */

.home-page {
    width: 100%;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}


/* Main Banner */

.home-banner {
    width: 100%;
    margin-bottom: 30px;
}

    .home-banner img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
    }


/* Featured Section */

.featured-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

    .section-heading h2 {
        margin: 0;
        font-size: 25px;
    }

.view-all-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}


/* Slider */

.featured-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-slider {
    overflow: hidden;
    width: 100%;
}

.featured-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
}


/* Product Card */

.featured-card {
    flex: 0 0 calc((100% - 48px) / 4);
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.featured-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f7f7;
}

    .featured-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #d32f2f;
    color: #fff;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}


/* Product Information */

.featured-info {
    padding: 12px;
}

    .featured-info h3 {
        margin: 0 0 8px;
        font-size: 15px;
        line-height: 1.35;
        height: 40px;
        overflow: hidden;
    }

.product-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.old-price {
    color: #888;
    text-decoration: line-through;
    font-size: 12px;
}

.sale-price {
    font-size: 16px;
}

.view-product-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    background: #222;
    color: #fff;
}


/* Slider Buttons */

.slider-button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
}

    .slider-button:hover {
        background: #f1f1f1;
    }

    .slider-button:disabled {
        opacity: 0.35;
        cursor: default;
    }


/* Empty State */

.no-featured-products {
    text-align: center;
    padding: 30px;
    border: 1px solid #ddd;
}


/* Tablet */

@media (max-width: 900px) {

    .featured-card {
        flex: 0 0 calc((100% - 32px) / 3);
    }
}


/* Mobile */

@media (max-width: 650px) {

    .featured-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    .section-heading h2 {
        font-size: 20px;
    }

    .view-all-link {
        font-size: 12px;
    }

    .featured-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .slider-button {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 15px;
    }
}


/* Small Mobile */

@media (max-width: 420px) {

    .featured-card {
        flex: 0 0 100%;
    }

    .featured-track {
        gap: 10px;
    }
}
