﻿:root {
    --primary: #08794E;
    --primary-dark: #045A3A;
    --primary-deep: #023D2B;
    --primary-light: #EAF7F1;
    --orange: #FF6A00;
    --orange-dark: #E65300;
    --orange-light: #FFF1E7;
    --text: #17231E;
    --muted: #69756F;
    --bg: #F5F8F6;
    --card: #FFFFFF;
    --border: #E3EBE6;
    --success: #0A8F5B;
    --danger: #DC3545;
    --warning: #F2A900;
    --radius: 18px;
    --shadow: 0 8px 30px rgba(2, 61, 43, .07);
    --shadow-hover: 0 14px 40px rgba(2, 61, 43, .13);
    --container: 1240px;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.8;
}


body,
button,
input {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}


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


button {
    border: 0;
    cursor: pointer;
}


img {
    max-width: 100%;
    display: block;
}


.container {
    width: min( calc(100% - 32px), var(--container) );
    margin-inline: auto;
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}



/* ================= HEADER ================= */


.store-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 3px 18px rgba(0,0,0,.05);
}


.header-top {
    background: #fff;
}


.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 24px;
}


.brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}


    .brand img {
        width: 150px;
        height: 70px;
        object-fit: contain;
    }


.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 18px;
}


.header-search {
    flex: 1;
    max-width: 620px;
    height: 48px;
    display: flex;
    align-items: center;
    background: #F5F7F6;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}


    .header-search input {
        flex: 1;
        height: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        padding: 0 18px;
        color: var(--text);
        font-size: 13px;
    }


    .header-search button {
        width: 52px;
        height: 100%;
        background: var(--primary);
        color: #fff;
        font-size: 16px;
    }


.header-actions {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}


.header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}


    .header-action i {
        color: var(--primary);
        font-size: 19px;
    }


.cart-button {
    position: relative;
    min-width: 120px;
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}


.cart-count {
    position: absolute;
    top: -7px;
    left: -7px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    border: 2px solid #fff;
    font-size: 10px;
}


.main-nav {
    border-top: 1px solid #f0f3f1;
}


.nav-inner {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
}


    .nav-inner a {
        padding: 8px 14px;
        border-radius: 10px;
        color: #52605A;
        font-size: 12px;
        font-weight: 600;
        transition: .2s;
    }


        .nav-inner a:hover,
        .nav-inner a.active {
            background: var(--primary-light);
            color: var(--primary);
        }


        .nav-inner a i {
            margin-left: 5px;
        }



/* ================= HERO ================= */


.hero-section {
    padding: 18px 0 0;
}


.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--primary-deep);
    aspect-ratio: 16 / 5;
    min-height: 260px;
}


.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
}


    .hero-slide.active {
        opacity: 1;
        visibility: visible;
    }


    .hero-slide a {
        display: block;
        width: 100%;
        height: 100%;
    }


    .hero-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }


.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.9);
    color: var(--primary);
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 5px 20px rgba(0,0,0,.12);
}


.slider-prev {
    right: 18px;
}


.slider-next {
    left: 18px;
}


.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}


    .slider-dots button {
        width: 7px;
        height: 7px;
        padding: 0;
        border-radius: 10px;
        background: rgba(255,255,255,.65);
        transition: .25s;
    }


        .slider-dots button.active {
            width: 25px;
            background: var(--orange);
        }



/* ================= FEATURES ================= */


.features-section {
    padding: 20px 0;
}


.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}


.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 15px;
}


.feature-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 18px;
}


.feature-item strong {
    display: block;
    font-size: 12px;
}


.feature-item span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}



/* ================= SECTIONS ================= */


.section {
    padding: 25px 0;
}


.section-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}


.section-kicker {
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
}


.section-heading h1,
.section-heading h2 {
    margin: 2px 0 0;
    font-size: 23px;
    line-height: 1.5;
    font-weight: 800;
}


.view-all {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}



/* ================= CATEGORIES ================= */


.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}


.category-card {
    min-height: 150px;
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}


    .category-card:hover {
        transform: translateY(-4px);
        border-color: #B9DCCD;
        box-shadow: var(--shadow);
    }


.category-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 23px;
}


    .category-icon.fish {
        color: #08749B;
        background: #E8F7FB;
    }


    .category-icon.rice {
        color: #A77B00;
        background: #FFF7DA;
    }


    .category-icon.beans {
        color: #9A5C20;
        background: #FFF0E4;
    }


    .category-icon.oil {
        color: #C07900;
        background: #FFF5D9;
    }


.category-card strong {
    font-size: 13px;
}


.category-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}



/* ================= PRODUCTS ================= */


.products-section {
    background: #fff;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}


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


    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }


.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #F7F9F8;
    overflow: hidden;
}


    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s;
    }


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


.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}


    .product-badge.discount {
        background: var(--orange);
    }


.favorite {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #7D8983;
}


.product-content {
    padding: 14px;
}


.product-category {
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
}


.product-content h3 {
    margin: 4px 0 13px;
    font-size: 13px;
    line-height: 1.8;
}


.product-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
}


    .product-price strong {
        color: var(--primary-deep);
        font-size: 16px;
        font-weight: 900;
    }


    .product-price span {
        color: var(--muted);
        font-size: 10px;
    }


.add-cart {
    width: 100%;
    height: 40px;
    margin-top: 13px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    transition: .2s;
}


    .add-cart:hover {
        background: var(--primary);
        color: #fff;
    }



/* ================= PROMO ================= */


.promo-section {
    padding: 30px 0;
}


.promo-card {
    position: relative;
    min-height: 210px;
    padding: 35px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient( 120deg, var(--primary-deep), var(--primary) );
    color: #fff;
}


    .promo-card::after {
        content: "";
        position: absolute;
        width: 350px;
        height: 350px;
        border-radius: 50%;
        left: -100px;
        bottom: -200px;
        border: 55px solid rgba(255,255,255,.05);
    }


.promo-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}


    .promo-content > span {
        color: #B9E7D3;
        font-size: 12px;
        font-weight: 700;
    }


    .promo-content h2 {
        margin: 4px 0 8px;
        font-size: 25px;
    }


    .promo-content p {
        margin: 0 0 18px;
        color: #D8EEE5;
        font-size: 12px;
    }


.promo-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 17px;
    border-radius: 10px;
    background: var(--orange);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}


.promo-icon {
    margin-right: auto;
    width: 130px;
    height: 130px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: rgba(255,255,255,.9);
    font-size: 50px;
}



/* ================= FOOTER ================= */


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


.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 45px;
    padding-bottom: 35px;
}


.footer-about img {
    width: 145px;
    height: 68px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}


.footer-about p {
    max-width: 340px;
    margin-top: 15px;
    color: #B9CFC5;
    font-size: 12px;
}


.site-footer h3 {
    margin: 0 0 13px;
    font-size: 14px;
}


.site-footer a {
    display: block;
    margin-bottom: 7px;
    color: #B9CFC5;
    font-size: 11px;
}


    .site-footer a:hover {
        color: #fff;
    }


.site-footer p {
    color: #B9CFC5;
    font-size: 11px;
}


.footer-phone {
    color: #fff !important;
    font-weight: 700;
}


.footer-bottom {
    min-height: 58px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8FA99E;
    font-size: 10px;
}



/* ================= MOBILE NAV ================= */


.mobile-bottom-nav {
    display: none;
}



/* ================= TABLET ================= */


@media (max-width: 1000px) {

    .header-search {
        max-width: none;
    }


    .header-action span {
        display: none;
    }


    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }


    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }


    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* ================= MOBILE ================= */


@media (max-width: 700px) {

    body {
        padding-bottom: 72px;
    }


    .container {
        width: calc(100% - 22px);
    }


    .store-header {
        position: sticky;
    }


    .header-inner {
        min-height: 68px;
        gap: 9px;
    }


    .mobile-menu-btn {
        display: grid;
        place-items: center;
        flex: 0 0 40px;
    }


    .brand {
        flex: 0 0 auto;
    }


        .brand img {
            width: 100px;
            height: 52px;
        }


    .header-search {
        height: 42px;
        border-radius: 12px;
    }


        .header-search input {
            padding: 0 10px;
            font-size: 11px;
        }


        .header-search button {
            width: 42px;
        }


    .header-actions {
        margin-right: 0;
    }


    .header-action {
        display: none;
    }


    .cart-button {
        min-width: 42px;
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 12px;
    }


    .cart-text {
        display: none;
    }


    .main-nav {
        display: none;
    }



    /* Hero */

    .hero-section {
        padding-top: 10px;
    }


    .hero-slider {
        /*
          همان نسبت در دسکتاپ و موبایل
        */
        aspect-ratio: 16 / 5;
        min-height: 0;
        border-radius: 16px;
    }


    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }


    .slider-prev {
        right: 9px;
    }


    .slider-next {
        left: 9px;
    }


    .slider-dots {
        bottom: 8px;
    }


        .slider-dots button {
            width: 5px;
            height: 5px;
        }


            .slider-dots button.active {
                width: 17px;
            }



    /* Features */

    .features-section {
        padding: 10px 0;
    }


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


    .feature-item {
        padding: 10px;
        border-radius: 12px;
        gap: 8px;
    }


    .feature-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 14px;
        border-radius: 9px;
    }


    .feature-item strong {
        font-size: 10px;
    }


    .feature-item span {
        font-size: 8px;
    }



    /* Sections */

    .section {
        padding: 20px 0;
    }


    .section-heading {
        margin-bottom: 13px;
    }


        .section-heading h1,
        .section-heading h2 {
            font-size: 18px;
        }


    .section-kicker {
        font-size: 9px;
    }


    .view-all {
        font-size: 9px;
    }



    /* Categories */

    .categories-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 5px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }


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


    .category-card {
        min-width: 125px;
        min-height: 135px;
        scroll-snap-align: start;
        border-radius: 15px;
    }


    .category-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 19px;
    }



    /* Products */

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


    .product-card {
        border-radius: 14px;
    }


    .product-content {
        padding: 10px;
    }


        .product-content h3 {
            font-size: 11px;
            margin-bottom: 9px;
        }


    .product-price strong {
        font-size: 13px;
    }


    .add-cart {
        height: 36px;
        margin-top: 10px;
        font-size: 9px;
    }


    .favorite {
        width: 30px;
        height: 30px;
    }



    /* Promo */

    .promo-section {
        padding: 18px 0;
    }


    .promo-card {
        min-height: 185px;
        padding: 23px;
        border-radius: 18px;
    }


    .promo-content h2 {
        font-size: 18px;
    }


    .promo-content p {
        font-size: 10px;
    }


    .promo-icon {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }



    /* Footer */

    .site-footer {
        padding-bottom: 10px;
    }


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


    .footer-about {
        grid-column: 1 / -1;
    }


    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 12px 0;
    }



    /* Bottom Navigation */

    .mobile-bottom-nav {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        left: 0;
        right: 0;
        bottom: 0;
        height: 68px;
        z-index: 2000;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(15px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -5px 25px rgba(0,0,0,.07);
        padding-bottom: env(safe-area-inset-bottom);
    }


        .mobile-bottom-nav a {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            color: #7B8781;
            font-size: 9px;
        }


            .mobile-bottom-nav a i {
                font-size: 16px;
            }


            .mobile-bottom-nav a.active {
                color: var(--primary);
            }


        .mobile-bottom-nav .mobile-cart b {
            position: absolute;
            top: 8px;
            right: 50%;
            margin-right: -2px;
            min-width: 17px;
            height: 17px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: var(--orange);
            color: #fff;
            font-size: 8px;
        }
}



/* ================= SMALL MOBILE ================= */


@media (max-width: 380px) {

    .brand img {
        width: 88px;
    }


    .header-inner {
        gap: 5px;
    }


    .category-card {
        min-width: 115px;
    }


    .product-content h3 {
        font-size: 10px;
    }
}
/* =========================================================
   MOBILE SIDE MENU
   ========================================================= */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease,visibility .25s ease
}

.mobile-side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw,360px);
    height: 100dvh;
    background: #fff;
    z-index: 9999;
    transform: translateX(110%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: -10px 0 40px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain
}

    .mobile-side-menu.is-open {
        transform: translateX(0)
    }

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible
}

.mobile-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eef1ef;
    flex-shrink: 0
}

.mobile-side-brand img {
    width: 110px;
    height: auto;
    display: block
}

.mobile-side-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f6f4;
    color: #17201b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
    transition: background .2s ease,transform .2s ease
}

    .mobile-side-close:hover {
        background: #e9f7f0;
        color: #08794e
    }

    .mobile-side-close:active {
        transform: scale(.94)
    }

.mobile-side-user {
    margin: 16px;
    padding: 15px;
    border-radius: 18px;
    background: linear-gradient(135deg,#08794e,#075e3d);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(8,121,78,.18)
}

.mobile-side-user-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,.16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 19px
}

.mobile-side-user-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px
}

    .mobile-side-user-info strong {
        font-size: 14px;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .mobile-side-user-info span {
        font-size: 11px;
        opacity: .8
    }

.mobile-side-nav {
    padding: 4px 12px 20px
}

    .mobile-side-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 52px;
        padding: 0 13px;
        margin-bottom: 4px;
        border-radius: 14px;
        color: #26312c;
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
        transition: background .2s ease,color .2s ease,transform .2s ease
    }

        .mobile-side-nav a > i:first-child {
            width: 24px;
            text-align: center;
            color: #08794e;
            font-size: 16px
        }

        .mobile-side-nav a span {
            flex: 1
        }

        .mobile-side-nav a .menu-arrow {
            width: auto;
            color: #a4ada8;
            font-size: 11px
        }

        .mobile-side-nav a:hover {
            background: #e9f7f0;
            color: #08794e
        }

        .mobile-side-nav a:active {
            transform: scale(.98)
        }

.mobile-menu-divider {
    height: 1px;
    background: #edf0ee;
    margin: 10px 8px
}

.mobile-side-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eef1ef;
    color: #7b8580;
    display: flex;
    flex-direction: column;
    gap: 5px
}

    .mobile-side-footer span {
        color: #08794e;
        font-weight: 800;
        font-size: 14px
    }

    .mobile-side-footer small {
        font-size: 10px
    }

body.mobile-menu-open {
    overflow: hidden
}

@media (min-width:901px) {
    .mobile-side-menu, .mobile-menu-overlay {
        display: none !important
    }
}

@media (max-width:900px) {
    .mobile-side-menu {
        display: flex
    }
}
