
:root {
    --bg: #FFFFFF;
    --bg-soft: #F5F4F0;
    --panel: #FFFFFF;
    --line: #E3E1DA;
    --text: #201F1D;
    --muted: #716D67;
    --accent: #D9930F;
    --accent-dim: #B87908;
    --accent-soft: #FBEBCB;
    --steel: #2F5D78;
    --danger: #B14B33;
    --radius: 2px;
    --maxw: 1240px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.55;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    pointer-events: none;
}

.corner-marks {
    position: relative;
}

.corner-marks::before, .corner-marks::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--accent-dim);
    opacity: 0.8;
}

.corner-marks::before {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.corner-marks::after {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

header.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.logo .mark {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--accent-dim);
    font-size: 0.95rem;
}

nav.main-nav {
    display: flex;
    gap: 34px;
}

nav.main-nav a {
    font-size: 0.94rem;
    color: var(--muted);
    font-weight: 500;
    transition: color .15s ease;
}

nav.main-nav a.active, nav.main-nav a:hover {
    color: var(--text);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.phone-tag {
    font-size: 0.88rem;
    color: var(--muted);
    direction: ltr;
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: all .15s ease;
    white-space: nowrap;
}

.btn-solid {
    background: var(--accent);
    color: #201F1D;
}

.btn-solid:hover {
    background: var(--accent-dim);
    color: #fff;
}

.btn-outline {
    border-color: var(--line);
    color: var(--text);
    background: #fff;
}

.btn-outline:hover {
    border-color: var(--text);
}

.page-header {
    position: relative;
    padding: 40px 0 28px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.breadcrumb {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 16px;
}


.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;      /* هر نسبتی که با طرح‌تون هماهنگه؛ مثلاً 16/9 یا 1/1 */
    overflow: hidden;
    border-radius: 8px;      /* اگه گوشه‌های گرد دارید */
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* کل کادر رو پوشش می‌ده، بدون کش اومدن عکس */
    object-position: center;
    display: block;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
}

.gallery-thumbs .thumb {
    width: 80px;             /* هر عرضی که می‌خواید */
    aspect-ratio: 1 / 1;     /* تامنیل‌ها معمولاً مربعی بهتره */
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}


.breadcrumb a {
    color: var(--steel);
}

.breadcrumb span.sep {
    margin: 0 6px;
    color: var(--line);
}

.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

h1.page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 12px;
    max-width: 720px;
}

.title-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cat-badge {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent-dim);
    background: var(--accent-soft);
    padding: 5px 12px;
    border-radius: var(--radius);
}

.rating-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--muted);
}

.stars {
    color: var(--line);
    font-size: 1rem;
    letter-spacing: 1px;
    direction: ltr;
    display: inline-block;
}

.stars .filled {
    color: var(--accent);
}

.project-code {
    font-size: 0.78rem;
    color: var(--muted);
    direction: ltr;
}

section {
    padding: 48px 0;
}

section.tight {
    padding-top: 0;
}

/* ---------- gallery + sidebar ---------- */
.single-layout {
    display: grid;
    grid-template-columns:1.35fr 0.9fr;
    gap: 40px;
    align-items: start;
}

.gallery-main {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background: repeating-linear-gradient(45deg, #ECEAE3 0 2px, transparent 2px 14px), #F7F6F3;
}

.gallery-main .crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--steel);
    border-radius: 50%;
    opacity: 0.55;
}

.gallery-main .crosshair::before, .gallery-main .crosshair::after {
    content: '';
    position: absolute;
    background: var(--steel);
}

.gallery-main .crosshair::before {
    width: 1px;
    height: 48px;
    top: -7px;
    left: 50%;
}

.gallery-main .crosshair::after {
    height: 1px;
    width: 48px;
    left: -7px;
    top: 50%;
}

.gallery-main .frame-label {
    position: absolute;
    bottom: 14px;
    right: 16px;
    font-size: 0.76rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.85);
    padding: 4px 10px;
    border: 1px solid var(--line);
    direction: ltr;
}

.gallery-main .frame-code {
    position: absolute;
    top: 14px;
    left: 16px;
    font-size: 0.72rem;
    color: var(--accent-dim);
    background: rgba(255, 255, 255, 0.85);
    padding: 4px 10px;
    border: 1px solid var(--line);
    direction: ltr;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.thumb {
    aspect-ratio: 1/1;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: repeating-linear-gradient(45deg, #ECEAE3 0 2px, transparent 2px 10px), #F7F6F3;
    transition: border-color .15s ease;
}

.thumb .crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--steel);
    border-radius: 50%;
    opacity: 0.5;
}

.thumb.active {
    border-color: var(--accent);
    border-width: 2px;
}

.thumb:hover {
    border-color: var(--accent-dim);
}

/* sidebar */
.sidebar-box {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    padding: 24px;
}

.sidebar-box h3 {
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-bottom: 18px;
}

.meta-row {
    background: #fff;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.meta-row .l {
    font-size: 0.82rem;
    color: var(--muted);
}

.meta-row .v {
    font-size: 0.86rem;
    font-weight: 700;
    direction: ltr;
    text-align: left;
}

.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tag-pill {
    font-size: 0.76rem;
    color: var(--steel);
    border: 1px solid var(--line);
    padding: 5px 11px;
    border-radius: var(--radius);
}

.sidebar-box .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

/* ---------- tabs ---------- */
.tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
}

.tab-btn {
    padding: 12px 6px;
    margin-left: 24px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    background: none;
    border-top: none;
    border-right: none;
    border-left: none;
    transition: all .15s ease;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.desc-text p {
    color: var(--text);
    margin-bottom: 14px;
    max-width: 760px;
}

.desc-text p:last-child {
    margin-bottom: 0;
}

.highlight-list {
    margin-top: 22px;
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px 24px;
    max-width: 760px;
}

.highlight-list li {
    font-size: 0.9rem;
    color: var(--muted);
    padding-right: 16px;
    position: relative;
}

.highlight-list li::before {
    content: '—';
    position: absolute;
    right: 0;
    color: var(--accent-dim);
}

table.spec-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 760px;
}

table.spec-table tr {
    border-bottom: 1px solid var(--line);
}

table.spec-table tr:first-child {
    border-top: 1px solid var(--line);
}

table.spec-table th, table.spec-table td {
    text-align: right;
    padding: 13px 6px;
    font-size: 0.9rem;
}

table.spec-table th {
    color: var(--muted);
    font-weight: 500;
    width: 38%;
}

table.spec-table td {
    font-weight: 700;
}

/* ---------- comments ---------- */
.comments-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.comments-summary .avg {
    font-size: 2.2rem;
    font-weight: 800;
}

.comments-summary .stars {
    font-size: 1.15rem;
}

.comments-summary .count {
    font-size: 0.84rem;
    color: var(--muted);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 36px;
    max-width: 760px;
}

.comment {
    display: flex;
    gap: 14px;
}

.avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--steel);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.comment-body {
    flex: 1;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.comment-name {
    font-weight: 700;
    font-size: 0.92rem;
}

.comment-date {
    font-size: 0.76rem;
    color: var(--muted);
    direction: ltr;
}

.comment-text {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    gap: 14px;
}

.comment-actions button {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    color: var(--steel);
    font-weight: 600;
}

.comment-actions button:hover {
    text-decoration: underline;
}

.reply-block {
    margin-top: 14px;
    padding-right: 20px;
    border-right: 2px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reply-block .comment {
    align-items: flex-start;
}

.reply-block .avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.76rem;
}

.staff-badge {
    font-size: 0.7rem;
    color: #fff;
    background: var(--accent-dim);
    padding: 2px 8px;
    border-radius: var(--radius);
    font-weight: 700;
}

.reply-form {
    display: none;
    margin-top: 12px;
}

.reply-form.active {
    display: flex;
    gap: 10px;
}

.reply-form textarea {
    flex: 1;
    border: 1px solid var(--line);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 0.86rem;
    border-radius: var(--radius);
    resize: vertical;
    min-height: 40px;
}

.reply-form button {
    align-self: flex-start;
}

.comment-form-box {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    padding: 22px 24px;
    max-width: 760px;
}

.comment-form-box h4 {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 7px;
}

.field input, .field select, .field textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 11px 13px;
    font-family: inherit;
    font-size: 0.92rem;
    border-radius: var(--radius);
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.field-row {
    display: flex;
    gap: 14px;
}

.field-row .field {
    flex: 1;
}

.rating-pick {
    display: flex;
    gap: 6px;
    font-size: 1.3rem;
    direction: ltr;
}

.rating-pick span {
    cursor: pointer;
    color: var(--line);
}

.rating-pick span.on {
    color: var(--accent);
}

/* related */
.related-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 18px;
}

.portfolio-card {
    border: 1px solid var(--line);
    background: #fff;
    display: block;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.portfolio-card:hover {
    border-color: var(--muted);
    box-shadow: 0 2px 10px rgba(32, 31, 29, 0.06);
}

.portfolio-thumb {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(45deg, #ECEAE3 0 2px, transparent 2px 14px), #F7F6F3;
}

.portfolio-thumb .crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--steel);
    border-radius: 50%;
    opacity: 0.55;
}

.portfolio-thumb .crosshair::before, .portfolio-thumb .crosshair::after {
    content: '';
    position: absolute;
    background: var(--steel);
}

.portfolio-thumb .crosshair::before {
    width: 1px;
    height: 34px;
    top: -5px;
    left: 50%;
}

.portfolio-thumb .crosshair::after {
    height: 1px;
    width: 34px;
    left: -5px;
    top: 50%;
}

.portfolio-info {
    padding: 16px 18px;
}

.portfolio-tag {
    font-size: 0.72rem;
    color: var(--accent-dim);
    margin-bottom: 6px;
}

.portfolio-name {
    font-size: 0.94rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.portfolio-meta {
    font-size: 0.78rem;
    color: var(--muted);
    direction: ltr;
    text-align: right;
}

h2.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.cta-banner {
    background: var(--text);
    color: #fff;
    padding: 56px 0;
    text-align: center;
}

.cta-banner h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.cta-banner p {
    color: #C9C6BF;
    margin-bottom: 28px;
}

.cta-banner .btn-solid {
    background: var(--accent);
}

footer {
    padding: 44px 0 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--line);
    font-size: 0.84rem;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

@media (max-width: 960px) {
    nav.main-nav {
        display: none;
    }

    .single-layout {
        grid-template-columns:1fr;
    }

    .related-grid {
        grid-template-columns:repeat(2, 1fr);
    }

    .gallery-thumbs {
        grid-template-columns:repeat(4, 1fr);
    }

    .highlight-list {
        grid-template-columns:1fr;
    }

    h1.page-title {
        font-size: 1.5rem;
    }

    .field-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
