@font-face {
    font-family: NotoNastaliq;
    src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Shabnam;
    src: url("../fonts/Shabnam.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Samim;
    src: url("../fonts/Samim.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Sahel;
    src: url("../fonts/Sahel.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Tanha;
    src: url("../fonts/Tanha.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Parastoo;
    src: url("../fonts/Parastoo.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Gandom;
    src: url("../fonts/Gandom.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Nahid;
    src: url("../fonts/Nahid.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Amiri;
    src: url("../fonts/Amiri.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: NotoNaskhArabic;
    src: url("../fonts/NotoNaskhArabic.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: MarkaziText;
    src: url("../fonts/MarkaziText.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Lalezar;
    src: url("../fonts/Lalezar.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

        :root {
            --bg: #6b6b6b;
            --bg-2: #575757;
            --welcome-color: #d4af37;
            --logo-color: #ffff00;
            --panel: rgba(55, 55, 55, 0.92);
            --gold: #d4af37;
            --gold-2: #f3e5ab;
            --gold-3: #8a6914;
            --cream: #f4f4f4;
            --muted: #e4e4e4;
            --line: rgba(212, 175, 55, 0.38);
            --err: #ff4d4d;
            --ok: #cde8c6;
            --service: #c6ef39;
            --shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
            --site-font: Vazirmatn, Tahoma, sans-serif;
        }

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
}

body {
    font-family: var(--site-font);
    background: var(--bg);
    color: var(--cream);
    line-height: 1.8;
}

body.site-font-nastaliq,
body.site-font-amiri,
body.site-font-naskh,
body.site-font-gandom,
body.site-font-parastoo {
    line-height: 2.2;
}

.admin-body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    line-height: 1.8;
}

.bg-glow {
    display: none;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 36px 20px 64px;
}

.hero {
    text-align: center;
    padding: 12px 0 8px;
}

.logo-filter {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.logo-wrap {
    position: relative;
    width: min(320px, 86%);
    margin: 0 auto 18px;
    padding: 8px 12px;
    border-radius: 16px;
    background: var(--bg);
    border: 0;
    box-shadow: none;
}

.logo-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.welcome-title {
    margin: 8px 0 0;
    font-weight: 800;
    color: #d4af37;
}

body.site-font-nastaliq .welcome-title,
body.site-font-amiri .welcome-title,
body.site-font-naskh .welcome-title,
body.site-font-gandom .welcome-title,
body.site-font-parastoo .welcome-title,
body.site-font-lalezar .welcome-title,
body.site-font-nastaliq .notice h2,
body.site-font-nastaliq .notice p {
    font-weight: 400;
}

.welcome-sub {
    margin: 6px 0 10px;
}

.shop-title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #fff6d8 0%, var(--gold) 48%, #a07820 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.ornament {
    height: 14px;
    margin: 18px auto;
    max-width: 280px;
    background:
        linear-gradient(90deg, transparent, var(--gold-3), var(--gold), var(--gold-2), var(--gold), var(--gold-3), transparent);
    clip-path: polygon(0 50%, 8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%);
    opacity: 0.85;
}

.ornament-top {
    margin-top: 0;
}

.updated {
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
    margin: 8px 0 22px;
}

.updated strong {
    color: var(--gold-2);
    font-weight: 500;
}

.board {
    scroll-margin-top: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 230, 160, 0.04);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-weight: 700;
    color: #1a1408;
    background: linear-gradient(90deg, #8a6914, var(--gold) 35%, var(--gold-2) 50%, var(--gold) 65%, #8a6914);
    letter-spacing: 0.04em;
}

.unit-note {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.85;
}

.table-scroll {
    overflow-x: auto;
}

.price-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    table-layout: fixed;
}

.price-table th,
.price-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
    vertical-align: middle;
}

.price-table th {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.price-table .col-name,
.price-table td.name {
    width: 40%;
    text-align: center;
    font-weight: 400;
}

.price-table .col-buy,
.price-table .col-sell {
    width: 30%;
    text-align: center;
}

.price-table td.num {
    text-align: center;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    font-size: var(--price-num-size, 16px);
    font-weight: var(--price-num-weight, 700);
    white-space: nowrap;
    overflow: hidden;
}

.price-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.06);
}

.price-table .buy {
    color: var(--buy-color, #ef4444);
}

.price-table .sell {
    color: var(--sell-color, #22c55e);
}

.price-table .empty {
    text-align: center;
    color: var(--muted);
    padding: 32px;
}

.notice {
    margin: 28px auto 0;
    max-width: 740px;
    text-align: center;
    color: #e10600;
}

.notice h2,
.notice p {
    margin: 0 auto;
    text-align: center;
    color: #e10600;
    font-weight: 800;
}

.notice h2 {
    margin-bottom: 10px;
    font-size: 1.35rem;
}

.notice p {
    line-height: 2;
}

.services {
    margin-top: 36px;
    text-align: center;
    color: var(--service);
}

.services h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--service);
}

.services-rule {
    width: min(220px, 70%);
    height: 2px;
    margin: 10px auto 28px;
    background: var(--service);
    position: relative;
}

.services-rule::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid var(--service);
    border-radius: 50%;
    background: var(--bg);
    transform: translate(-50%, -50%);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 24px;
}

.service-item {
    color: var(--service);
    perspective: 900px;
    flex: 0 0 28%;
    max-width: 180px;
    min-height: 108px;
    cursor: pointer;
}

.service-flip {
    position: relative;
    width: 100%;
    min-height: 108px;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
}

.service-item:hover .service-flip,
.service-item.is-flipped .service-flip,
.service-item:focus-within .service-flip {
    transform: rotateY(180deg);
}

.service-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.service-front {
    min-height: 108px;
}

.service-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    padding: 8px 8px;
    background: rgba(40, 40, 40, 0.78);
    border: 1px solid rgba(198, 239, 57, 0.35);
    border-radius: 14px;
}

.service-back p {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.7;
}

.service-back a {
    color: #fff;
    word-break: break-all;
}

.service-icon {
    width: 28px;
    height: 28px;
    display: flex;
}

.service-icon img,
.service-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-title {
    font-weight: 700;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .service-item {
        flex: 0 0 44%;
    }
}

.contact {
    margin-top: 36px;
}

.contact h2,
.admin-title {
    text-align: center;
    font-size: 1.35rem;
    margin: 0 0 18px;
    color: var(--gold-2);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 16px 18px;
    text-decoration: none;
    color: inherit;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 120px;
}

.contact-card .icon {
    color: var(--gold);
    font-size: 1.1rem;
}

.contact-card .label {
    color: var(--muted);
    font-size: 0.8rem;
}

.contact-block {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px 22px 22px;
    text-align: right;
}

.contact-block p {
    margin: 0 0 10px;
}

.contact-label {
    color: inherit;
    font-weight: 700;
}

.phone-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.phone-list li {
    margin: 4px 0;
}

.phone-list a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.phone-list a:hover {
    color: var(--gold-2);
}

.site-foot {
    margin-top: 40px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.9;
}

.site-foot p {
    margin: 0 0 8px;
}

.page-install {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.install-wrap {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100% - 32px));
    margin: 32px auto;
}

.panel-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
}

.panel-card.compact {
    margin-top: 22px;
}

.brand-mark {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
}

.panel-card h1,
.panel-card h2 {
    text-align: center;
    margin: 0 0 8px;
    color: var(--gold-2);
}

.panel-card h2 {
    font-size: 1.05rem;
    margin-top: 12px;
    text-align: right;
}

.muted {
    color: var(--muted);
    text-align: center;
}

.stack {
    display: grid;
    gap: 12px;
}

.stack label,
.add-grid label {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--gold-2);
}

input,
textarea,
button,
select {
    font-family: inherit;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #0c0a07;
    color: var(--cream);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: 2px solid rgba(212, 175, 55, 0.35);
    border-color: var(--gold);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 11px 22px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

.btn-gold {
    color: #1a1408;
    background: linear-gradient(180deg, #f3e5ab, var(--gold) 55%, #a07820);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25);
}

.btn-ghost {
    color: var(--gold-2);
    background: transparent;
    border: 1px solid var(--line);
}

.flash {
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
}

.flash.err {
    background: rgba(180, 60, 60, 0.18);
    color: var(--err);
}

.flash.ok {
    background: rgba(70, 130, 70, 0.18);
    color: var(--ok);
}

.install-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .board-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-table {
        min-width: 0;
    }

    .price-table th,
    .price-table td {
        padding: 12px 6px;
    }

    .price-table th {
        font-size: clamp(10px, 3.1vw, 13px) !important;
    }

    .price-table td.name {
        width: 30%;
        font-size: clamp(11px, 3.3vw, 14px) !important;
        padding-left: 8px;
        padding-right: 8px;
    }

    .price-table .col-buy,
    .price-table .col-sell,
    .price-table td.num {
        width: 35%;
    }

    .price-table td.num {
        font-size: min(var(--price-num-size, 16px), 3.6vw, 14px);
        padding-left: 8px;
        padding-right: 8px;
    }

    .price-table td.sell {
        box-shadow: inset 1px 0 0 rgba(212, 175, 55, 0.28);
    }
}
