﻿/* =========================
   پایه
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    direction: rtl;
    font-family: Tahoma,sans-serif;
    background: #f5f7fa;
    color: #222;
    font-size: 14px;
    line-height: 1.8;
}

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

ul {
    list-style: none;
}

/* =========================
   Layout
========================= */

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

/* =========================
   Header
========================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 0;
}

    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #1f3b73;
}

.phone {
    color: #666;
    font-size: 13px;
}

/* =========================
   Menu
========================= */

.main-menu {
    background: #1f3b73;
}

    .main-menu ul {
        display: flex;
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .main-menu li {
        position: relative;
        margin-left: 20px;
    }

    .main-menu a {
        display: block;
        color: #fff;
        padding: 14px 16px;
        text-decoration: none;
        white-space: nowrap;
        transition: all .25s ease;
    }

    .main-menu > ul > li > a:hover {
        background: #1f3b73;
    }

    /* ---------- زیر منو ---------- */

    .main-menu .submenu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        min-width: 230px;
        background: #1f3b73;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,.15);
        z-index: 9999;
        padding: 8px 0;
    }

        .main-menu .submenu li {
            margin: 0;
            width: 100%;
        }

        .main-menu .submenu a {
            display: block;
            color: #444;
            padding: 12px 16px;
            transition: all .25s;
        }

            .main-menu .submenu a:hover {
                background: #1f3b73;
                color: #1f3b73;
                padding-right: 22px;
            }

/* ---------- فلش ---------- */

.has-submenu {
    position: relative;
}

.menu-arrow {
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    transition: .3s;
    user-select: none;
}

    .menu-arrow:hover {
        background: rgba(255,255,255,.12);
    }

.has-submenu.active > .submenu {
    display: block;
}



/* =========================
   DROPDOWN (DESKTOP)
========================= */

.has-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1f3b73;
    min-width: 230px;
    display: none;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
    border-radius: 8px;
    z-index: 9999;
}

    .has-dropdown .dropdown-menu li {
        margin: 0;
        width: 100%;
    }

    .has-dropdown .dropdown-menu a {
        display: block;
        color: #fff;
        padding: 12px 16px;
        transition: all .25s;
    }

        .has-dropdown .dropdown-menu a:hover {
            background: #1f3b73;
            color: #fff;
            padding-right: 22px;
        }

/* باز شدن */

.has-dropdown.active .dropdown-menu {
    display: block;
}

/* hover برای دسکتاپ */

@media (min-width:769px) {

    .has-dropdown:hover > .dropdown-menu {
        display: block;
    }
}

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

@media (max-width:768px) {

    .main-menu ul {
        flex-direction: column;
    }

    .main-menu li {
        margin-left: 0;
        border-bottom: 1px solid rgba(255,255,255,.15);
    }

    .has-dropdown .dropdown-menu {
        position: static;
        display: none;
        background: rgba(255,255,255,.10);
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    .has-dropdown .dropdown-menu a {
        color: #fff;
        padding: 12px 30px;
    }

        .has-dropdown .dropdown-menu a:hover {
            background: rgba(255,255,255,.15);
        }
}

/* =========================
   Main
========================= */

.main-content {
    min-height: 500px;
    padding: 25px 0;
}

/* =========================
   Footer
========================= */

.site-footer {
    margin-top: 30px;
    padding: 18px 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* =========================
   Hero
========================= */

.hero-box,
.about-box,
.category-header,
.category-description,
.product-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.hero-box {
    padding: 25px 20px;
    margin-bottom: 20px;
}

    .hero-box h1 {
        color: #1f3b73;
        font-size: 24px;
        margin-bottom: 10px;
    }

.home-products {
    margin-bottom: 20px;
}

    .home-products h2,
    .about-box h2 {
        color: #1f3b73;
        margin-bottom: 15px;
    }

/* =========================
   Product Grid
========================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    transition: .25s;
}

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

/* تصویر محصول */
.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
    line-height: 0;
}

    .product-card-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

/* بدنه کارت */
.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

/* عنوان */
.product-card h3 {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 1.7;
}

    .product-card h3 a {
        color: #222;
        transition: .2s;
    }

        .product-card h3 a:hover {
            color: #1f3b73;
        }

/* توضیح */
.product-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* قیمت */
.product-price {
    margin-top: auto;
    margin-bottom: 16px;
    color: #16a34a;
    font-size: 18px;
    font-weight: bold;
}

/* دکمه */
.product-link {
    display: block;
    width: 100%;
    text-align: center;
    background: #1f3b73;
    color: #fff;
    padding: 11px;
    border-radius: 8px;
    transition: .2s;
}

    .product-link:hover {
        background: #16305d;
    }



/* =========================
   Category
========================= */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 15px 0 20px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    font-size: 13px;
}

    .breadcrumb a {
        color: #1f3b73;
        text-decoration: none;
        transition: .2s;
    }

        .breadcrumb a:hover {
            color: #0d6efd;
        }

    .breadcrumb span {
        color: #777;
    }

        .breadcrumb span:last-child {
            color: #222;
            font-weight: 600;
        }

@media (max-width:768px) {

    .breadcrumb {
        font-size: 12px;
        gap: 6px;
        padding: 10px 14px;
    }
}

.category-header {
    padding: 25px;
    margin-bottom: 20px;
}

    .category-header h1 {
        color: #1f3b73;
        font-size: 28px;
    }

.category-products {
    margin-bottom: 30px;
}

.category-description {
    padding: 25px;
}

    .category-description h2 {
        color: #1f3b73;
        margin-bottom: 15px;
    }

    .category-description ul {
        list-style: disc;
        margin: 15px 25px;
    }

/* =========================
   Product Detail
========================= */

.product-detail {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-top {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-main-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
}

.product-thumbs {
    display: flex;
    gap: 10px;
}

    .product-thumbs img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
    }

.thumb-image {
    transition: .25s;
}

    .thumb-image:hover {
        transform: scale(1.05);
    }

.active-thumb {
    border: 2px solid #1f3b73 !important;
}
@media (max-width:768px) {
    .product-top {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .product-main-image img {
        height: 300px;
        object-fit: contain;
    }

    .product-thumbs {
        justify-content: center;
        flex-wrap: wrap;
    }

        .product-thumbs img {
            width: 65px;
            height: 65px;
        }
}

/* =========================
   Tabs
========================= */

.product-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.tab-btn {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #555;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all .25s ease;
}

    .tab-btn:hover {
        background: #f7f9fc;
        border-color: #1f3b73;
        color: #1f3b73;
    }

    .tab-btn.active {
        background: #1f3b73;
        border-color: #1f3b73;
        color: #fff;
        box-shadow: 0 3px 8px rgba(31,59,115,.15);
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

@media (max-width:768px) {

    .product-tabs {
        gap: 8px;
    }

    .tab-btn {
        flex: 1 1 calc(50% - 4px);
        padding: 12px;
        font-size: 13px;
    }
}

/* =========================
   Responsive
========================= */

@media (max-width:992px) {
    .product-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width:768px) {

    .site-header .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .main-menu ul {
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 12px;
    }

    .product-card-image {
        height: 170px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card h3 {
        font-size: 16px;
    }

    .product-card p {
        min-height: auto;
        font-size: 13px;
    }

    .product-top {
        grid-template-columns: 1fr;
    }

    .product-main-image img {
        height: 260px;
    }

    .category-header,
    .category-description {
        padding: 18px;
    }

        .category-header h1 {
            font-size: 22px;
        }
}

.order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 48px;
    padding: 0 24px;
    margin-top: 20px;
    background: #16a34a;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(31, 59, 115, .25);
}

    .order-btn:hover {
        background: #284b92;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(31, 59, 115, .35);
    }

    .order-btn:active {
        transform: translateY(0);
        box-shadow: 0 3px 10px rgba(31, 59, 115, .25);
    }

    .order-btn:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(31, 59, 115, .15);
    }
/*=========================
      Order Modal
=========================*/

.order-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

    .order-modal.show {
        display: flex;
    }

.order-modal-box {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    animation: modalShow .25s ease;
}

.order-close {
    position: absolute;
    left: 15px;
    top: 15px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f2f2f2;
    cursor: pointer;
    font-size: 18px;
}

    .order-close:hover {
        background: #ddd;
    }

@keyframes modalShow {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    margin-bottom: 25px;
}

    .page-box h1 {
        color: #1f3b73;
        font-size: 30px;
        margin-bottom: 20px;
    }

    .page-box h2 {
        color: #1f3b73;
        font-size: 22px;
        margin: 30px 0 15px;
    }

    .page-box h3 {
        color: #333;
        font-size: 18px;
        margin: 20px 0 10px;
    }

    .page-box p {
        color: #555;
        line-height: 2;
        margin-bottom: 15px;
    }

    .page-box ul {
        list-style: disc;
        padding-right: 22px;
        margin: 15px 0;
    }

    .page-box li {
        margin-bottom: 8px;
    }

    .page-box img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }

    .page-box table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
    }

    .page-box th,
    .page-box td {
        border: 1px solid #eee;
        padding: 12px;
    }

    .page-box th {
        background: #fafafa;
    }

    .page-box blockquote {
        border-right: 4px solid #1f3b73;
        background: #f7f9fc;
        padding: 15px;
        margin: 20px 0;
    }

@media(max-width:768px) {

    .page-box {
        padding: 20px;
    }

        .page-box h1 {
            font-size: 24px;
        }

        .page-box h2 {
            font-size: 20px;
        }
}
/* =========================
   HAMBURGER BUTTON
========================= */

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

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

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        padding: 10px 0;
    }

    .main-menu .menu {
        display: none; /* پیش‌فرض بسته */
        flex-direction: column;
        width: 100%;
    }

        .main-menu .menu.active {
            display: flex;
        }
}

.comment-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    background: #fff;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.comment-rate {
    color: #f5b301;
    margin-bottom: 10px;
}

.comment-item p {
    margin: 0;
    line-height: 2;
}
/* فرم ثبت نظر */
.comment-form {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

    .comment-form h2 {
        margin-bottom: 25px;
        color: #1f3b73;
    }

/* هر فیلد */
.comment-group {
    margin-bottom: 18px;
}

    /* عنوان فیلد */
    .comment-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #444;
    }

/* Input و Select و Textarea */
.comment-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: .25s;
    box-sizing: border-box;
}

    .comment-input:focus {
        border-color: #1f3b73;
        outline: none;
        box-shadow: 0 0 0 3px rgba(31,59,115,.12);
    }

/* فقط Textarea */
textarea.comment-input {
    resize: vertical;
    min-height: 130px;
}

/* پیام موفقیت */
.comment-success {
    background: #e8f7ec;
    color: #2f7a3d;
    border: 1px solid #b9e4c4;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* دکمه */
.comment-form .product-link {
    border: 0;
    cursor: pointer;
    margin-top: 5px;
}

.admin-reply {
    margin-top: 20px;
    padding: 15px;
    border-right: 4px solid #1f3b73;
    background: #f8f9fc;
    border-radius: 6px;
}

.admin-reply-title {
    font-weight: bold;
    color: #1f3b73;
    margin-bottom: 10px;
}

.admin-reply-text {
    line-height: 2;
    color: #333;
}

.admin-reply-date {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
}

.comment-summary {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 18px;
    margin: 20px 0;
    text-align: center;
}

.comment-summary-rate {
    font-size: 28px;
    font-weight: bold;
    color: #f5b301;
    margin-bottom: 8px;
}

    .comment-summary-rate span {
        font-size: 16px;
        color: #666;
        font-weight: normal;
    }

.comment-summary-count {
    color: #555;
    font-size: 15px;
}
/* =========================
   FAQ
========================= */

.faq-title {
    color: #1f3b73;
    margin-bottom: 20px;
    padding: 20px;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    
}

.faq-question {
    width: 100%;
    border: 0;
    background: #fff;
    text-align: right;
    padding: 18px 50px 18px 15px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    cursor: pointer;
    position: relative;
    transition: .2s;
}

    .faq-question:hover {
        background: #f8f9fc;
    }

    .faq-question::before {
        content: "+";
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        color: #1f3b73;
        font-weight: bold;
    }

.faq-item.active .faq-question::before {
    content: "-";
}

.faq-answer {
    display: none;
    padding: 15px 18px 18px;
    color: #555;
    line-height: 2;
    background: #fcfcfc;
    border-top: 1px solid #eee;
}

.faq-item.active .faq-answer {
    display: block;
    border-color: #1f3b73;
    box-shadow: 0 3px 10px rgba(31,59,115,.08);
}

@media (max-width:768px) {

    #faq {
        padding: 0 10px 10px;
    }

    .faq-item {
        margin-bottom: 10px;
    }

    .faq-question {
        font-size: 14px;
        padding: 15px 45px 15px 12px;
        line-height: 1.8;
    }

    .faq-answer {
        font-size: 13px;
        padding: 15px 12px;
    }
}
/* متن داخل باکس درباره */
/* =========================
   TinyMCE Content
========================= */

.content-body {
    margin-top: 20px;
    color: #555;
    line-height: 2.2;
    padding: 10px !important;
}


    .content-body > *:first-child {
        margin-top: 0;
    }

    .content-body > *:last-child {
        margin-bottom: 0;
    }

    .content-body p {
        margin: 0 0 18px;
    }

    .content-body h2 {
        font-size: 28px;
        color: #1f3b73;
        margin: 35px 0 18px;
        line-height: 1.7;
    }

    .content-body h3 {
        font-size: 22px;
        color: #1f3b73;
        margin: 30px 0 15px;
        line-height: 1.8;
    }

    .content-body h4 {
        font-size: 18px;
        color: #333;
        margin: 25px 0 12px;
    }

    .content-body ul,
    .content-body ol {
        padding-right: 24px;
        margin: 18px 0;
    }

    .content-body li {
        margin-bottom: 10px;
        line-height: 2.2;
    }

    .content-body a {
        color: #1f3b73;
        font-weight: 600;
    }

    .content-body img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 20px auto;
        border-radius: 10px;
    }

    .content-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 25px 0;
    }

    .content-body th,
    .content-body td {
        border: 1px solid #e5e5e5;
        padding: 12px;
    }

    .content-body th {
        background: #f8f9fc;
    }

    .content-body blockquote {
        margin: 25px 0;
        padding: 18px;
        border-right: 4px solid #1f3b73;
        background: #f8f9fc;
        border-radius: 8px;
    }

    .content-body hr {
        margin: 30px 0;
        border: none;
        border-top: 1px solid #eee;
    }
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 35px 0;
}

    .pagination a,
    .pagination span {
        min-width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        color: #555;
        text-decoration: none;
        transition: .2s;
    }

        .pagination a:hover {
            background: #1f3b73;
            border-color: #1f3b73;
            color: #fff;
        }

    .pagination .active {
        background: #1f3b73;
        border-color: #1f3b73;
        color: #fff;
        font-weight: bold;
    }
.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 15px;
    color: #555;
}

    .category-info strong {
        color: #1f3b73;
        font-size: 16px;
    }

@media (max-width:768px) {

    .category-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 14px;
    }

        .category-info strong {
            font-size: 15px;
        }
}