@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --teal-deep: #0B4F4A;
    --teal: #0E6E67;
    --turquoise: #1FA79A;
    --turquoise-light: #5FC9BC;
    --green-turquoise: #3C8F6F;
    --sand: #E9DEC0;
    --sand-light: #F6F0DE;
    --sand-dark: #D8C89E;
    --gold: #C7973F;
    --ink: #22281F;
    --ink-soft: #4A5245;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(11, 79, 74, 0.12);
    --radius: 14px;
    --font-display: 'Vazirmatn', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-display);
    background: var(--sand-light);
    color: var(--ink);
    direction: rtl;
    line-height: 1.85;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Girih pattern signature (تزیین گره‌چینی/کاشی) ===== */
.girih-divider {
    height: 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26' viewBox='0 0 52 26'%3E%3Cg fill='none' stroke='%231FA79A' stroke-width='1.4' opacity='0.55'%3E%3Cpath d='M0 13 L13 0 L26 13 L13 26 Z'/%3E%3Cpath d='M26 13 L39 0 L52 13 L39 26 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    opacity: 0.9;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--teal-deep);
    color: var(--sand-light);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--sand); }
.brand span.sub { display: block; font-size: 0.7rem; font-weight: 400; color: var(--turquoise-light); }
.nav-links { display: flex; gap: 28px; font-weight: 500; }
.nav-links a { position: relative; padding: 6px 2px; transition: color .2s; }
.nav-links a:hover { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-search { display: flex; align-items: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); border-radius: 30px; padding: 6px 14px; }
.nav-search input { background: transparent; border: none; color: var(--sand-light); outline: none; width: 140px; font-family: inherit; }
.nav-search input::placeholder { color: rgba(246,240,222,0.6); }
.btn-nav { background: var(--gold); color: var(--teal-deep); padding: 8px 18px; border-radius: 30px; font-weight: 700; font-size: .9rem; }
.nav-toggle { display: none; background: none; color: var(--sand); font-size: 1.6rem; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--gold); color: var(--teal-deep); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(199,151,63,.35); }
.btn-outline { border: 2px solid var(--turquoise-light); color: var(--white); }
.btn-outline:hover { background: var(--turquoise-light); color: var(--teal-deep); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== Hero Slider ===== */
.hero-slider {
    position: relative;
    height: 78vh;
    min-height: 480px;
    overflow: hidden;
    background: var(--teal-deep);
}
.slide-track { display: flex; height: 100%; transition: transform .8s cubic-bezier(.65,0,.35,1); }
.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}
.slide::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,79,74,.55) 0%, rgba(11, 79, 75, 0.466) 100%);
}
.slide-content { position: relative; z-index: 2; color: var(--sand-light); max-width: 680px; margin: 0 auto; text-align: center; padding: 0 20px; }
.slide-content h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; margin-bottom: 14px; }
.slide-content p { font-size: 1.05rem; color: var(--sand); margin-bottom: 6px; }
.slide-content p.desc-2 { color: var(--turquoise-light); font-size: .95rem; margin-bottom: 20px; }

.slide-dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.slide-dots button { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.4); transition: all .3s; }
.slide-dots button.active { background: var(--gold); width: 28px; border-radius: 8px; }

/* ===== Stats / icon counters ===== */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin: -50px auto 60px;
    position: relative;
    z-index: 5;
    max-width: 900px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 34px;
    text-align: center;
    min-width: 160px;
    border-bottom: 4px solid var(--turquoise);
}
.stat-card .icon { font-size: 2rem; margin-bottom: 8px; }
.stat-card .count { font-size: 2rem; font-weight: 800; color: var(--teal-deep); }
.stat-card .label { color: var(--ink-soft); font-size: .9rem; margin-top: 4px; }

/* ===== Section headings ===== */
.section { padding: 60px 0; }
.section-title {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--teal-deep);
    margin-bottom: 8px;
}
.section-subtitle { text-align: center; color: var(--ink-soft); margin-bottom: 40px; font-size: .95rem; }
.section-title::after {
    content: '';
    display: block;
    width: 70px; height: 4px;
    background: var(--gold);
    margin: 14px auto 0;
    border-radius: 4px;
}

/* ===== History section ===== */
.history-section {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: var(--sand-light);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 auto;
    max-width: 1180px;
}
.history-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(34,40,31,.82), rgba(11,79,74,.72));
}
.history-content { position: relative; z-index: 2; padding: 60px; max-width: 760px; }
.history-content h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 18px; color: var(--sand); }
.history-content p { color: rgba(246,240,222,.92); font-size: 1rem; }

/* ===== Places grid ===== */
.places-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 34px;
}
.place-card { text-align: center; opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s ease; }
.place-card.in-view { opacity: 1; transform: translateY(0); }
.place-card img {
    width: 100%; height: 230px; object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    transition: transform .4s;
}
.place-card:hover img { transform: scale(1.03); }
.place-card h4 { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--teal-deep); margin-bottom: 6px; }
.place-card p { color: var(--ink-soft); font-size: .92rem; }

/* ===== Categories grid (9 دسته اصلی) ===== */
.categories-section { background: var(--sand); }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.category-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform .3s;
    display: flex;
    flex-direction: column;
}
.category-card:hover { transform: translateY(-6px); }
.category-card .cat-icon-wrap {
    height: 170px;
    background: linear-gradient(150deg, var(--teal), var(--turquoise));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.category-card .cat-icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.category-card h4 { padding: 18px 10px 4px; font-weight: 800; color: var(--teal-deep); font-size: 1.1rem; }
.category-card p { padding: 0 16px; color: var(--ink-soft); font-size: .85rem; flex-grow: 1; }
.category-card .btn { margin: 16px auto 20px; }

/* ===== Comments / contact section ===== */
.contact-comments { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.contact-picture { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 360px; }
.contact-picture img { width: 100%; height: 100%; object-fit: cover; }
.comments-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.comments-box h3 { color: var(--teal-deep); font-weight: 800; margin-bottom: 18px; }
.comment-item { border-bottom: 1px solid var(--sand-dark); padding: 12px 0; }
.comment-item strong { color: var(--teal); }
.comment-form input, .comment-form textarea, .comment-form select {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--sand-dark);
    border-radius: 10px; font-family: inherit; margin-bottom: 12px; background: var(--sand-light);
}
.comment-form input:focus, .comment-form textarea:focus, .comment-form select:focus { outline: none; border-color: var(--turquoise); }
.comment-form textarea { min-height: 90px; resize: vertical; }

/* ===== News / Announcements ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .3s;
}
.news-card:hover { transform: translateY(-6px); }
.news-card img { width: 100%; height: 160px; object-fit: cover; }
.news-body { padding: 16px; }
.news-date {
    display: inline-block;
    background: var(--sand);
    color: var(--teal-deep);
    font-size: .78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.news-body h4 { color: var(--teal-deep); font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.news-body p { color: var(--ink-soft); font-size: .87rem; }

/* ===== Map section ===== */
.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    line-height: 0;
}

/* ===== Footer ===== */
footer {
    background: var(--teal-deep);
    color: var(--sand-light);
    padding: 50px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-grid h4 { color: var(--sand); margin-bottom: 14px; font-size: 1.05rem; }
.footer-grid p, .footer-grid a { color: rgba(246,240,222,.75); font-size: .9rem; line-height: 2; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { text-align: center; padding: 18px 0; font-size: .85rem; color: rgba(246,240,222,.6); }

/* ===== Generic page header (نخودی) for category/product pages ===== */
.page-hero { background: var(--sand); padding: 40px 0; text-align: center; border-bottom: 3px solid var(--turquoise); }
.page-hero h1 { color: var(--teal-deep); font-weight: 800; font-size: 1.8rem; }
.page-hero p { color: var(--ink-soft); margin-top: 8px; }

.products-page { background: var(--sand-light); }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s; }
.product-card:hover { transform: translateY(-5px); }
.product-card img { width: 100%; height: 190px; object-fit: cover; }
.product-card .pc-body { padding: 16px; }
.product-card h4 { color: var(--teal-deep); font-weight: 800; margin-bottom: 6px; }
.product-card .price { color: var(--green-turquoise); font-weight: 700; margin: 8px 0; }
.product-card .seller-link { font-size: .85rem; color: var(--ink-soft); }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.product-detail img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.product-detail h1 { color: var(--teal-deep); font-weight: 800; margin-bottom: 12px; }
.product-detail .price { font-size: 1.4rem; color: var(--green-turquoise); font-weight: 800; margin: 14px 0; }
.seller-card { display: flex; align-items: center; gap: 14px; background: var(--sand); border-radius: var(--radius); padding: 16px; margin-top: 20px; }
.seller-card img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.seller-card .name { font-weight: 700; color: var(--teal-deep); }

/* Seller profile page */
.seller-header { display: flex; align-items: center; gap: 24px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; margin-bottom: 40px; }
.seller-header img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--turquoise-light); }
.seller-header h1 { color: var(--teal-deep); font-weight: 800; }
.seller-header .role-badge { display: inline-block; background: var(--gold); color: var(--teal-deep); font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 20px; margin-top: 6px; }

/* Auth forms */
.auth-wrap { max-width: 440px; margin: 60px auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.auth-wrap h2 { text-align: center; color: var(--teal-deep); font-weight: 800; margin-bottom: 24px; }
.auth-wrap .switch-link { text-align: center; margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
.role-toggle { display: flex; gap: 10px; margin-bottom: 16px; }
.role-toggle label { flex: 1; text-align: center; border: 1.5px solid var(--sand-dark); border-radius: 10px; padding: 10px; cursor: pointer; font-size: .9rem; }
.role-toggle input { display: none; }
.role-toggle input:checked + span { color: var(--teal-deep); font-weight: 700; }
.role-toggle label:has(input:checked) { border-color: var(--turquoise); background: var(--sand-light); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .9rem; }
.alert-error { background: #FBE4E1; color: #A23B2E; }
.alert-success { background: #E1F3E9; color: #1E7145; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .nav-links, .nav-search { display: none; }
    .nav-toggle { display: block; }
    .places-grid, .categories-grid, .products-grid { grid-template-columns: 1fr 1fr; }
    .contact-comments, .product-detail { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .places-grid, .categories-grid, .products-grid { grid-template-columns: 1fr; }
    .stats-row { gap: 18px; margin-top: -30px; }
    .stat-card { padding: 16px 22px; min-width: 120px; }
    .footer-grid { grid-template-columns: 1fr; }
    .seller-header { flex-direction: column; text-align: center; }
    .news-grid { grid-template-columns: 1fr; }
}