﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

:root {
    --primary: #c8102e;
    --primary-dark: #a90822;
    --text: #171717;
    --muted: #666;
    --bg: #f7f9fb;
    --white: #ffffff;
    --border: #eeeeee;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

.container {
    width: min(1400px, 94%);
    margin: auto;
}

/* =========================
           HEADER
        ========================= */

header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}


.header-logo {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-left: auto;
}

.logo-text h1 {
    font-size: 20px;
    color: var(--primary);
    font-weight: 800;
}

.logo-text span {
    font-size: 11px;
    color: #777;
}

.search-box {
    flex: 1;
    max-width: 650px;
    position: relative;
    top: 40%;
    transform: translateY(10px);
}

    .search-box input {
        width: 100%;
        height: 48px;
        border: 1px solid #ddd;
        border-radius: 30px;
        padding: 0 52px 0 20px;
        font-family: inherit;
        outline: none;
        background: #fafafa;
        transition: .3s;
    }

        .search-box input:focus {
            border-color: var(--primary);
            background: white;
        }

    .search-box span {
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary);
        font-size: 20px;
    }

.araz-detail-page {
    width: 100%;
    display: flex;
    justify-content: center;
    direction: rtl;
    padding: 40px 20px;
    box-sizing: border-box;
}

.araz-detail-card {
    width: 100%;
    max-width: 850px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-sizing: border-box;
}

.araz-detail-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .araz-detail-image img {
        width: 350px;
        max-width: 100%;
        height: 350px;
        object-fit: contain;
        border-radius: 15px;
    }

.araz-detail-info {
    width: 100%;
    text-align: center;
    direction: rtl;
}

.araz-detail-title {
    margin: 20px 0 10px;
    font-family: "Vazirmatn", sans-serif;
    font-size: 26px;
    font-weight: 700;
}

.araz-detail-description {
    margin: 0 auto 20px;
    max-width: 650px;
    font-family: "Vazirmatn", sans-serif;
    font-size: 15px;
    line-height: 2;
    color: #666;
}

.araz-detail-prices {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    direction: rtl;
    font-family: "Vazirmatn", sans-serif;
}

.araz-detail-old-price {
    color: #999;
    font-size: 15px;
    text-decoration: line-through;
}

.araz-detail-price {
    color: var(--primary);
    font-size: 22px;
    font-weight: 700;
}

.araz-detail-back {
    display: inline-block;
    margin-top: 25px;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-family: "Vazirmatn", sans-serif;
    color: #fff;
    background: var(--primary);
    transition: .3s;
}

    .araz-detail-back:hover {
        opacity: .9;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
           CATEGORY NAV
        ========================= */

.category-nav {
    background: #fff;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
}

.category {
    position: relative;
    flex: 0 0 auto;
}

    .category > a {
        display: block;
        padding: 10px 17px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        transition: .3s;
    }

        .category > a:hover {
            background: #fff1f3;
            color: var(--primary);
        }

.subcategory {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 15px 35px rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 10px;
    display: none;
    z-index: 50;
}

.category:hover .subcategory {
    display: block;
}

.subcategory a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
}

    .subcategory a:hover {
        background: #fff2f4;
        color: var(--primary);
    }

/* =========================
           HERO SLIDER
        ========================= */

.hero {
    margin: 25px 0;
}

.slider {
    /* به‌جای ارتفاع ثابت، از aspect-ratio یا clamp استفاده کن تا با زوم/عرض صفحه هماهنگ بمونه */
    width: 100%;
    aspect-ratio: 16 / 6; /* نسبت دلخواه بنر خودتو بذار، مثلا 21/7 یا هرچی با طرح‌تون جور دربیاد */
    height: auto;
    min-height: 260px; /* جلوگیری از خیلی کوچیک شدن در صفحات خیلی باریک */
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(120deg, #fff0f2, #fff);
    box-shadow: 0 10px 35px rgba(0,0,0,.05);
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    font-size: 18px;
    z-index: 20;
    transition: .3s;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    user-select: none;
}

    .slider-arrow:hover {
        background: var(--primary);
        color: #fff;
        transform: translateY(-50%) scale(1.08);
    }

    .slider-arrow.prev {
        left: 20px;
    }

    .slider-arrow.next {
        right: 20px;
    }       

/* محتوای اصلی بالای دایره */

.slide-content {
    position: relative;
    z-index: 5;
}


.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 5% 5%; /* پدینگ درصدی به‌جای px ثابت */
    opacity: 0;
    transform: scale(1.02);
    transition: all .6s ease;
    z-index: 2;
    box-sizing: border-box;
}

    .slide.active {
        opacity: 1;
        transform: scale(1);
    }


.slide-content {
    width: 45%;
    flex-shrink: 1;
    min-width: 0; /* اجازه بده متن هم جمع بشه بدون اینکه فرزندش سرریز کنه */
}
    .slide-content small {
        color: var(--primary);
        font-weight: 700;
    }

    .slide-content h2 {
        font-size: 37px;
        line-height: 1.4;
        margin: 12px 0;
    }

    .slide-content p {
        color: #666;
        margin-bottom: 24px;
    }

.primary-btn {
    border: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    padding: 12px 26px;
    cursor: pointer;
    font-size: 14px;
    transition: .3s;
}

    .primary-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
    }

.slide-image {
    width: 50%;
    max-width: 657px;
    aspect-ratio: 2 / 1;
    height: auto;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 1;
    min-width: 0;
}

    .slide-image img {
        width: 100%;
        aspect-ratio: 2 / 1;
        height: auto;
        display: block;
        object-fit: fill;
        border-radius: 24px;
    }

.slider-dots {
    z-index: 10;
}

.dot {
    width: 9px;
    height: 9px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
}

    .dot.active {
        background: var(--primary);
        width: 28px;
        border-radius: 10px;
    }

/* =========================
           SECTION
        ========================= */

.section {
    margin: 45px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-title {
    position: relative;
    font-size: 22px;
    font-weight: 800;
    padding-right: 16px;
}

    .section-title::before {
        content: "";
        position: absolute;
        right: 0;
        top: 8px;
        width: 5px;
        height: 22px;
        background: var(--primary);
        border-radius: 5px;
    }

.view-all {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

/* =========================
           PRODUCTS
        ========================= */

.products {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 12px;
    transition: .3s;
    overflow: hidden;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 14px 30px rgba(0,0,0,.08);
        border-color: #f5c5cb;
    }

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #f5f5f5;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: .4s;
    }

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0 8px;
    min-height: 45px;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.price {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
}

.old-price {
    display: block;
    font-size: 15px;
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
}



/* =========================
           CATEGORY BOXES
        ========================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.category-box {
    background: white;
    border-radius: 18px;
    border: 1px solid #eee;
    text-align: center;
    padding: 20px 15px;
    transition: .3s;
}

    .category-box:hover {
        transform: translateY(-4px);
        border-color: #f4b9c1;
    }

    .category-box .icon {
        width: 70px;
        height: 70px;
        margin: auto;
        display: grid;
        place-items: center;
        border-radius: 18px;
        background: #fff0f2;
        color: var(--primary);
        font-size: 30px;
    }


        .category-box .icon img {
            width: 70px;
            height: 70px;
            margin: auto;
            display: grid;
            place-items: center;
            border-radius: 18px;
            background: #fff0f2;
            color: var(--primary);
            font-size: 30px;
        }

    .category-box h3 {
        margin-top: 12px;
        font-size: 15px;
    }

    .category-box p {
        color: #777;
        font-size: 11px;
        margin-top: 5px;
    }

/* =========================
           BANNER GRID
        ========================= */

.banner-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

.banner {
    width: 100%;
    min-height: 190px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(120deg, #fff1f3, #fff);
}

    .banner img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

.banner-content {
    position: absolute;
    inset: 0;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .banner-content h3 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .banner-content p {
        color: #666;
        font-size: 13px;
        margin-bottom: 15px;
    }

/* =========================
           FOOTER
        ========================= */

footer {
    background: #171717;
    color: #fff;
    margin-top: 60px;
}

.footer-main {
    padding: 55px 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-column h3 {
    font-size: 17px;
    color: #fff;
    margin-bottom: 15px;
}

.footer-column p,
.footer-column a {
    color: #bbb;
    font-size: 13px;
}

.footer-column a {
    display: block;
    margin-bottom: 8px;
    transition: .3s;
}

    .footer-column a:hover {
        color: #fff;
        padding-right: 5px;
    }

.contact-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 18px 0;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.socials {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.social {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #272727;
    display: grid;
    place-items: center;
    color: white;
}

.search-box {
    position: relative;
    z-index: 50;
}


.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    opacity: 1;
}

.search-item {
    padding: 8px 12px;
    cursor: pointer;
    text-align: right;
}

    .search-item:hover {
        background: #f5f5f5;
    }

.search-item-empty {
    padding: 8px 12px;
    color: #999;
    text-align: right;
}

.item-image {
    width: min(300px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

    .item-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.product-image {
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.75em;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1;
}

.price-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    direction: ltr;
    gap: 2px;
    width: 100%;
}


    .price-stack .old-price,
    .price-stack .price {
        text-align: left;
        width: auto;
        display: inline-block;
    }

.invisible-price {
    visibility: hidden;
}

.contact-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.footer-Bale {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.footer-roobika {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.category-icon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}
/**/
/* =========================
   WHY ARAZ
========================= */

.why-araz {
    margin: 70px 0;
    padding: 55px 35px;
    background: linear-gradient(135deg, #fff, #fff6f7);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

    .why-araz::before {
        content: "";
        position: absolute;
        width: 300px;
        height: 300px;
        background: rgba(200, 16, 46, .05);
        border-radius: 50%;
        top: -120px;
        right: -100px;
    }

.why-araz-header {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

    .why-araz-header span {
        display: inline-block;
        color: var(--primary);
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .why-araz-header h2 {
        font-size: 30px;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .why-araz-header p {
        color: #777;
        font-size: 14px;
    }

.why-araz-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    position: relative;
    z-index: 2;
}

.why-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 25px;
    min-height: 190px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

    .why-item::before {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(200, 16, 46, .08);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transition: all .45s ease;
    }

    .why-item:hover::before,
    .why-item.active::before {
        width: 350px;
        height: 350px;
    }

    .why-item:hover,
    .why-item.active {
        transform: translateY(-8px);
        border-color: rgba(200, 16, 46, .25);
        box-shadow: 0 18px 35px rgba(200, 16, 46, .12);
    }

.why-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #fff1f3;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    transition: all .35s ease;
}

.why-item:hover .why-icon,
.why-item.active .why-icon {
    transform: scale(1.12) rotate(-5deg);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 25px rgba(200, 16, 46, .25);
}

.why-text {
    position: relative;
    z-index: 2;
}

    .why-text h3 {
        font-size: 17px;
        margin-bottom: 8px;
        color: #222;
    }

    .why-text p {
        color: #777;
        font-size: 12px;
        line-height: 2;
        margin: 0;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: opacity .35s ease, max-height .35s ease;
    }

.why-item:hover .why-text p,
.why-item.active .why-text p {
    opacity: 1;
    max-height: 80px;
}




/* =========================
           RESPONSIVE
        ========================= */

@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {

    .why-araz {
        padding: 40px 20px;
    }

    .why-araz-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-header {
        padding: 15px 0;
    }

    .header-logo {
        position: absolute;
        top: 40%;
        right: 10px;
        transform: translateY(-50%);
        width: 45px;
        height: 45px;
        object-fit: contain;
    }

    .search-box {
        position: absolute;
        left: 10px;
        right: 65px;
        top: 40%;
        transform: translateY(-50%);
        max-width: none;
        z-index: 2000;
    }

    .slider {
        height: 520px;
    }
    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .slide {
        flex-direction: column;
        justify-content: center;
        padding: 30px;
        text-align: center;
    }

    .slide-content,
    .slide-image {
        width: 90%;
    }

    .slide-image {
        height: 210px;
        margin-top: 20px;
    }

    .banner-grid {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .container {
        width: 92%;
    }

    .header-logo {
        position: absolute;
        top: 40%;
        right: 10px;
        transform: translateY(-50%);
        width: 45px;
        height: 45px;
        object-fit: contain;
    }

    .search-box {
        position: absolute;
        left: 10px;
        right: 65px;
        top: 40%;
        transform: translateY(-50%);
    }

    .slide-content h2 {
        font-size: 27px;
    }

    .products {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .why-araz {
        margin: 45px 0;
        padding: 35px 15px;
        border-radius: 22px;
    }

    .why-araz-header h2 {
        font-size: 23px;
    }

    .why-araz-header p {
        font-size: 12px;
    }

    .why-araz-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .why-item {
        min-height: 160px;
        padding: 20px;
    }

    .why-text p {
        opacity: 1;
        max-height: 80px;
    }
       .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }
}
