﻿
:root {
    --brand: #d9252a;
    --muted: #6c757d;
    --card-radius: 12px;
}

body {
    font-family: Vazir, sans-serif;
    direction: rtl;
}

/* HERO */
/* HERO */
.hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 21 / 9;
    max-height: 480px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

    .hero .carousel,
    .hero .carousel-inner,
    .hero .carousel-item {
        height: 100%;
    }

        .hero .carousel-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center center;
        }

/* Search Bar */
.search-bar {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    max-width: 760px;
    padding: 0 10px;
}

.search-input {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

    .search-input .form-control {
        border: none;
        background: transparent;
        font-size: 0.85rem;
        padding: 8px 14px;
        height: 38px;
    }

    .search-input button {
        border-radius: 0 30px 30px 0;
        padding: 8px 14px;
        font-size: 0.85rem;
        height: 38px;
        min-width: 42px;
    }




/* features */
.feature {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.03);
    transition: transform .2s;
}

    .feature:hover {
        transform: translateY(-6px);
    }

/* product strips */
.strip-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .strip-title h3 {
        margin: 0;
        font-size: 1.1rem;
    }

.view-all {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-card {
    flex: 0 0 auto;
    width: 230px;
    scroll-snap-align: start;
    position: relative;
}

.product-card {
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
    background: #fff;
}

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.09);
    }

    .product-card .card-img-top {
        height: 160px;
        object-fit: cover;
        width: 100%;
        display: block;
    }

    .product-card .card-body {
        padding: 12px;
        text-align: center;
    }

.product-title {
    font-size: 0.95rem;
    height: 46px;
    overflow: hidden;
}

.price-old {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 0.85rem;
}

.price-now {
    color: var(--brand);
    font-weight: 700;
    font-size: 1rem;
}

.badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brand);
    color: #fff;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
}

.stars {
    color: #f2b01e;
    font-size: 0.9rem;
}



/* ====================== موبایل ====================== */

@media (max-width: 992px) {

    .hero {
        aspect-ratio: 2 / 1;
        max-height: 320px;
    }

    .search-bar {
        bottom: 8px;
    }
}

@media (max-width: 768px) {

    .hero {
        aspect-ratio: 2 / 1;
        max-height: 280px;
    }

        .hero .carousel-item img {
            object-fit: contain;
            object-position: center center;
        }

    .search-bar {
        bottom: 0 !important;
        max-width: 320px;
        padding: 0 8px;
    }

    .search-input {
        border-radius: 28px;
    }

        .search-input .form-control {
            font-size: 0.82rem;
            padding: 6px 12px;
            height: 34px;
        }

        .search-input button {
            padding: 6px 12px;
            height: 34px;
            min-width: 40px;
            font-size: 0.82rem;
        }

/*                         اندازه اسکرول ها در صفحه کوچک موبایل*/
    .scroll-card {
        flex: 0 0 auto;
        width: 190px;
        scroll-snap-align: start;
        position: relative;
    }
    .product-card .card-img-top {
        height: 130px; /* قبلاً 160 */
    }

    .product-title {
        font-size: 0.85rem;
        height: 38px;
    }
    .price-now {
        font-size: 0.9rem;
    }

    .stars {
        font-size: 0.75rem;
    }

}

@media (max-width: 576px) {

    .hero {
        aspect-ratio: 2 / 1;
        max-height: 240px;
    }

    .search-bar {
        bottom: 2px !important;
        max-width: 300px;
        padding: 0 6px;
    }

    .search-input .form-control {
        font-size: 0.8rem;
        padding: 6px 10px;
        height: 32px;
    }

    .search-input button {
        padding: 6px 10px;
        height: 32px;
        min-width: 36px;
        font-size: 0.8rem;
    }
}

/* ====================== پایان موبایل ====================== */


.cart-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0;
}

    .cart-icon-btn i {
        font-size: 1.1rem;
    }

    .cart-icon-btn:hover {
        background: var(--brand);
        color: #fff;
    }


html,
body {
    overflow-x: hidden !important;
}

* {
    max-width: 100%;
}
