@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root{
    --green:#16a34a;
    --green-dark:#15803d;
    --dark:#111827;
    --gray:#f5f6f8;
    --border:#e5e7eb;
}

*{
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    direction:rtl;
    font-family:Vazirmatn,Tahoma,sans-serif;
    background:#f6f7f9;
    color:#1f2937;
}

a{
    color:inherit;
    text-decoration:none;
}

button,
input,
select,
textarea{
    font-family:inherit;
}

button{
    cursor:pointer;
}

.container{
    width:100%;
    max-width:1200px;
    margin:auto;
    padding:0 14px;
}

/* HEADER */

.site-header{
    background:#fff;
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:100;
}

.header-row{
    height:64px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.header-side{
    display:flex;
    align-items:center;
    gap:8px;
}

.logo{
    font-size:22px;
    font-weight:800;
    color:var(--dark);
}

.logo span{
    color:var(--green);
}

.icon-button{
    width:43px;
    height:43px;
    border:1px solid var(--border);
    background:#fff;
    border-radius:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    position:relative;
}

.cart-count{
    position:absolute;
    top:-5px;
    left:-5px;
    width:19px;
    height:19px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--green);
    color:#fff;
    border-radius:50%;
    font-size:10px;
}

.search-row{
    padding:8px 0 13px;
}

.search-form{
    display:flex;
    gap:8px;
}

.search-input{
    width:100%;
    height:45px;
    border:1px solid var(--border);
    border-radius:13px;
    padding:0 15px;
    outline:none;
    background:#fafafa;
}

.search-input:focus{
    border-color:var(--green);
}

.search-button{
    width:50px;
    border:0;
    background:var(--dark);
    color:#fff;
    border-radius:13px;
    font-size:21px;
}

/* MENU */

.menu-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:999;
    opacity:0;
    visibility:hidden;
    transition:.25s;
}

.menu-overlay.active{
    opacity:1;
    visibility:visible;
}

.mobile-menu{
    position:fixed;
    top:0;
    right:-340px;
    width:315px;
    max-width:88%;
    height:100vh;
    background:#fff;
    z-index:1000;
    padding:20px;
    transition:.3s;
    overflow-y:auto;
    box-shadow:-10px 0 30px rgba(0,0,0,.12);
}

.mobile-menu.active{
    right:0;
}

.menu-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid var(--border);
    padding-bottom:16px;
}

.close-menu{
    border:0;
    background:#f3f4f6;
    width:38px;
    height:38px;
    border-radius:10px;
}

.menu-item{
    border-bottom:1px solid #f0f0f0;
}

.menu-link,
.menu-toggle{
    width:100%;
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:none;
    border:0;
    font-size:15px;
    padding:0 5px;
}

.submenu{
    display:none;
    padding:0 16px 10px;
}

.submenu.active{
    display:block;
}

.submenu a{
    display:block;
    padding:9px 0;
    color:#6b7280;
    font-size:14px;
}

/* HERO */

.hero-section{
    margin-top:18px;
}

.hero{
    position:relative;
    border-radius:22px;
    overflow:hidden;
    background:#e5e7eb;
    min-height:220px;
}

.hero-slide{
    display:none;
    position:relative;
}

.hero-slide.active{
    display:block;
}

.hero-image{
    width:100%;
    height:360px;
    object-fit:cover;
    display:block;
}

.hero-empty{
    height:280px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#6b7280;
    font-size:15px;
}

.hero-caption{
    position:absolute;
    right:0;
    left:0;
    bottom:0;
    padding:35px 25px 22px;
    color:#fff;
    background:linear-gradient(transparent,rgba(0,0,0,.78));
}

.hero-caption h2{
    margin:0 0 6px;
    font-size:25px;
}

.hero-caption p{
    margin:0;
    font-size:14px;
}

.hero-dots{
    position:absolute;
    left:18px;
    bottom:14px;
    display:flex;
    gap:7px;
    direction:ltr;
}

.hero-dot{
    width:9px;
    height:9px;
    border:0;
    padding:0;
    border-radius:50%;
    background:#ddd;
}

.hero-dot.active{
    background:var(--green);
    transform:scale(1.2);
}

/* CATEGORIES */

.categories{
    display:flex;
    gap:13px;
    overflow-x:auto;
    padding:22px 2px;
    scrollbar-width:none;
}

.categories::-webkit-scrollbar{
    display:none;
}

.category{
    min-width:72px;
    text-align:center;
}

.category-circle{
    width:62px;
    height:62px;
    margin:auto;
    border-radius:50%;
    background:#fff;
    border:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:25px;
    transition:.2s;
}

.category:hover .category-circle{
    border-color:var(--green);
    transform:translateY(-2px);
}

.category-name{
    display:block;
    margin-top:7px;
    font-size:11px;
    white-space:nowrap;
}

/* SECTION */

.section-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin:8px 0 16px;
}

.section-title{
    margin:0;
    font-size:20px;
    font-weight:800;
}

.section-link{
    font-size:12px;
    color:var(--green);
}

/* PRODUCTS */

.products-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(185px,1fr));
    gap:15px;
}

.product-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    overflow:hidden;
    transition:.2s;
}

.product-card:hover{
    transform:translateY(-3px);
    box-shadow:0 10px 25px rgba(0,0,0,.06);
}

.product-image-box{
    position:relative;
    background:#fafafa;
}

.product-image{
    width:100%;
    height:185px;
    object-fit:contain;
    display:block;
}

.product-no-image{
    height:185px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:40px;
    color:#bbb;
}

.product-info{
    padding:12px;
}

.product-category{
    color:#888;
    font-size:10px;
    margin-bottom:5px;
}

.product-name{
    font-size:14px;
    line-height:1.8;
    min-height:50px;
    font-weight:600;
}

.old-price{
    color:#9ca3af;
    text-decoration:line-through;
    font-size:11px;
    margin-top:8px;
}

.product-price{
    color:var(--green);
    font-weight:800;
    font-size:14px;
    margin-top:5px;
}

.add-cart-btn{
    width:100%;
    border:0;
    background:var(--green);
    color:#fff;
    height:40px;
    border-radius:11px;
    margin-top:11px;
    font-size:12px;
}

.add-cart-btn:hover{
    background:var(--green-dark);
}

.empty-products{
    background:#fff;
    border-radius:16px;
    padding:35px;
    text-align:center;
    color:#888;
}

/* FOOTER */

.site-footer{
    margin-top:45px;
    background:var(--dark);
    color:#fff;
    padding:32px 0;
}

.footer-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.footer-title{
    margin:0 0 10px;
    font-size:18px;
}

.footer-text{
    color:#d1d5db;
    font-size:13px;
    line-height:2;
}

.footer-bottom{
    border-top:1px solid #374151;
    margin-top:20px;
    padding-top:15px;
    color:#9ca3af;
    font-size:11px;
    text-align:center;
}

/* PRODUCT PAGE */

.product-page{
    background:#fff;
    margin-top:22px;
    padding:22px;
    border-radius:20px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
}

.product-main-image{
    width:100%;
    max-height:450px;
    object-fit:contain;
}

.product-detail-title{
    font-size:24px;
    margin-top:0;
}

.big-price{
    color:var(--green);
    font-size:24px;
    font-weight:800;
    margin:12px 0;
}

.product-actions{
    display:grid;
    gap:10px;
}

.green-button{
    border:0;
    background:var(--green);
    color:#fff;
    padding:14px;
    border-radius:12px;
    font-size:14px;
    text-align:center;
}

.specs{
    margin-top:20px;
    background:#f8fafc;
    border-radius:14px;
    padding:8px 15px;
}

.spec-row{
    padding:11px 0;
    border-bottom:1px solid #e5e7eb;
    font-size:13px;
}

.spec-row:last-child{
    border-bottom:0;
}

/* MOBILE */

@media(max-width:650px){

    .hero-image{
        height:230px;
    }

    .hero-caption h2{
        font-size:18px;
    }

    .hero-caption p{
        font-size:11px;
    }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
    }

    .product-image{
        height:150px;
    }

    .product-name{
        font-size:12px;
    }

    .product-info{
        padding:9px;
    }

    .footer-grid{
        grid-template-columns:1fr;
    }

    .product-page{
        grid-template-columns:1fr;
        padding:15px;
    }

    .product-detail-title{
        font-size:20px;
    }
}
