:root {
    --yellow: #6f4e37;
    --yellow2: #8a6449;
    --ink: #171717;
    --bg: #faf6f0;
    --surface: #fff;
    --soft: #f5e6d3;
    --muted: #707070;
    --line: #e6d9c8;
    --olive: #6b7a40;
    --olive-light: #9caf6e;
    --olive-soft: #eef2e2;
    --shadow: 0 18px 55px #1111;
    --radius: 24px
}

html[data-theme=dark] {
    --ink: #f5f5f1;
    --bg: #10110f;
    --surface: #1d1e1a;
    --soft: #3a2f22;
    --muted: #b6b6b0;
    --line: #3a3b34;
    --olive-soft: #29301c;
    --shadow: 0 18px 55px #0008
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%
}

body {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Vazirmatn, sans-serif
}

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

button,
input,
select {
    font: inherit
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: auto
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line)
}

.navbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px
}

#navWrap,
#menuToggle {
    margin-inline-start: auto
}

#openLogin {
    margin-inline-start: 18px
}

@media(max-width:950px) {
    #openLogin {
        margin-inline-start: 14px
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px
}

.brand-mark {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--yellow), var(--olive));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 10px 30px #6f4e3755
}

.brand strong,
.brand small {
    display: block
}

.brand small {
    font-size: 11px;
    color: var(--muted)
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 8px
}

.nav-wrap>a,
.dropdown-toggle {
    padding: 10px 13px;
    border-radius: 12px;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
    transition: .25s
}

.nav-wrap>a:hover,
.dropdown-toggle:hover {
    background: var(--soft);
    transform: translateY(-2px)
}

.dropdown {
    position: relative
}

.dropdown-menu {
    position: absolute;
    top: 48px;
    right: 0;
    min-width: 220px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px) scale(.97);
    pointer-events: none;
    transition: .25s
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    transform: none;
    pointer-events: auto
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    transition: .2s
}

.dropdown-menu a:hover {
    background: var(--soft);
    padding-right: 18px
}

.icon-btn,
.cart-btn,
.login-btn {
    border: 0;
    border-radius: 13px;
    padding: 10px 14px;
    cursor: pointer
}

.icon-btn {
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.icon-btn svg {
    width: 18px;
    height: 18px
}

.icon-btn:hover {
    background: var(--yellow);
    color: #fff;
    border-color: var(--yellow)
}

.lang-btn {
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .5px
}

.cart-btn,
.login-btn {
    background: var(--yellow);
    color: #fff;
    font-weight: 800
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    width: 42px
}

.menu-toggle span {
    display: block;
    height: 3px;
    background: var(--ink);
    margin: 5px;
    border-radius: 8px;
    transition: .25s
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg)
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg)
}

.top-ribbon {
    text-align: center;
    padding: 8px 12px 0;
    overflow: hidden;
    white-space: nowrap
}

.top-ribbon .typing-wrap {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    font-size: 13px
}

.hero {
    position: relative;
    padding: 16px 0 24px;
    overflow: hidden
}

.hero-copy-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 4px 0
}

.hero-copy-line h1 {
    font-size: 20px;
    font-weight: 900;
    white-space: nowrap
}

.hero-copy-line p {
    color: var(--muted);
    font-size: 13.5px;
    white-space: nowrap
}

.hero-copy-line .hero-actions {
    display: flex;
    gap: 8px
}

.hero-copy-line .primary-btn,
.hero-copy-line .ghost-btn {
    padding: 9px 16px;
    font-size: 13px
}

@media(max-width:800px) {
    .hero-copy-line h1,
    .hero-copy-line p {
        white-space: normal
    }
}

.hero h1 {
    font-size: clamp(46px, 7vw, 82px);
    line-height: 1.05;
    margin: 16px 0
}

.hero h1 em {
    font-style: normal;
    color: #d4a600
}

.hero p {
    font-size: 18px;
    color: var(--muted);
    max-width: 580px
}

.typing-wrap {
    font-weight: 800;
    color: #957500
}

.caret {
    animation: blink .8s infinite
}

@keyframes blink {
    50% {
        opacity: 0
    }
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 15px;
    padding: 13px 20px;
    font-weight: 900;
    cursor: pointer;
    transition: .25s
}

.primary-btn {
    background: linear-gradient(135deg, var(--yellow), #8a6449);
    color: #fff;
    box-shadow: 0 12px 28px #6f4e3740
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-3px) scale(1.02)
}

.ghost-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    transition: .2s
}

.ghost-btn:hover {
    border-color: var(--olive);
    color: var(--olive)
}

.full {
    width: 100%
}

.ad-slider {
    min-height: 430px;
    background: linear-gradient(145deg, #151515, #2b270e);
    border-radius: 34px;
    padding: 32px;
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    touch-action: pan-y
}

.ad-slider-full {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 26px;
    border-radius: 0;
    box-shadow: none;
    min-height: 340px;
    padding: 0
}

.ad-slider-full .slide-body {
    padding: 40px max(28px, calc((100vw - 1180px) / 2 + 28px))
}

.ad-slider-full .slider-controls {
    right: max(28px, calc((100vw - 1180px) / 2 + 28px))
}

.slide {
    display: none;
    animation: slideIn .55s ease;
    position: relative;
    color: white;
    border-radius: 22px;
    overflow: hidden;
    min-height: 366px
}

.slide.active {
    display: block
}

.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #000000cc, #00000033 55%, #00000022);
    z-index: 1
}

.slide-body {
    position: relative;
    z-index: 2;
    padding: 28px
}

.slide span {
    background: var(--yellow);
    color: #fff;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 800
}

.slide h2 {
    font-size: 34px;
    max-width: 460px;
    margin: 28px 0 12px
}

.slide p {
    color: #ddd
}

.slide-art {
    font-size: 100px;
    position: absolute;
    left: 38px;
    bottom: 50px;
    filter: drop-shadow(0 15px 30px #0008);
    animation: float 3s ease-in-out infinite;
    z-index: 2
}

@keyframes float {
    50% {
        transform: translateY(-12px) rotate(-3deg)
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.slider-controls {
    position: absolute;
    top: 24px;
    right: 28px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px
}

.slider-controls button,
.carousel-buttons button {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    border: 1px solid #ffffff22;
    background: #ffffff18;
    color: white;
    cursor: pointer
}

.dots {
    display: flex;
    gap: 5px
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff55
}

.dot.active {
    width: 24px;
    border-radius: 20px;
    background: var(--yellow)
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(15px);
    opacity: .28
}

.orb-one {
    width: 260px;
    height: 260px;
    background: var(--yellow);
    top: -80px;
    right: -60px
}

.orb-two {
    width: 180px;
    height: 180px;
    background: #ff8c00;
    left: 5%;
    bottom: -80px
}

.section {
    padding: 75px 0
}

.soft {
    background: var(--soft)
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 26px
}

.eyebrow {
    color: #9b7a00;
    font-weight: 900
}

.section h2,
.catalog-head h1,
.about-hero h1 {
    font-size: clamp(30px, 4vw, 52px);
    margin: 6px 0
}

.carousel-buttons {
    display: flex;
    gap: 8px
}

.carousel-buttons button {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line)
}

.horizontal-cards {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 10px 3px 22px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none
}

.horizontal-cards.dragging {
    cursor: grabbing;
    scroll-behavior: auto
}

.promo-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px 0 4px;
    font-size: 14px
}

.promo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    white-space: nowrap
}

.promo-item:not(:last-child)::after {
    content: '•';
    margin-inline-start: 12px;
    color: var(--line);
    font-weight: 400
}

.promo-item .promo-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--soft);
    color: #6f4e37;
    flex: none
}

.promo-item:nth-child(2) .promo-icon {
    color: var(--olive)
}

.promo-item .promo-icon svg {
    width: 19px;
    height: 19px
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px
}

.service-card {
    min-width: 0;
    max-width: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    display: block;
    color: var(--ink);
    box-shadow: 0 10px 30px #00000008;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
    will-change: transform
}

.service-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow)
}

.service-card-img {
    height: 120px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    position: relative
}

.service-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #00000066, transparent 60%)
}

.service-icon {
    font-size: 30px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px #0006)
}

.service-card-body {
    padding: 16px 18px 20px
}

.service-card p {
    color: var(--muted);
    min-height: 44px;
    font-size: 13.5px;
    margin: 4px 0 10px
}

.service-card .link-chip {
    display: inline-flex;
    color: #6f4e37;
    font-weight: 900
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}

.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 10px 26px #00000010
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease
}

.gallery-item:hover img {
    transform: scale(1.08)
}

.products-grid,
.model-grid,
.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px
}

.product-card,
.model-card,
.info-card,
.story-card,
.calc-card,
.category-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 20px;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
    will-change: transform
}

.product-card:hover,
.model-card:hover {
    transform: translateY(-10px) scale(1.035);
    box-shadow: 0 26px 60px #0002
}

.product-card:hover .product-visual,
.model-card:hover .model-visual {
    transform: scale(1.08) rotate(-2deg)
}

.product-visual,
.model-visual {
    height: 140px;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--soft), color-mix(in srgb, var(--yellow) 35%, var(--surface)));
    display: grid;
    place-items: center;
    font-size: 58px;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden
}

.product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    align-self: stretch;
    justify-self: stretch
}

.detail-visual .product-photo {
    min-height: 320px;
    align-self: stretch;
    justify-self: stretch
}

.product-card small,
.model-card small {
    color: var(--muted)
}

.price {
    font-weight: 900;
    color: #6f4e37
}

.stock-pill {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--olive-soft);
    color: var(--olive);
    font-weight: 700;
    font-size: 12px
}

.cta {
    padding: 35px 0 80px
}

.cta-box {
    background: #171717;
    color: white;
    border-radius: 28px;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.inner-page,
.product-page,
.admin-page,
.checkout-page {
    padding: 55px 0 85px
}

.about-hero,
.catalog-head {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 35px
}

.about-hero p,
.catalog-head p,
.story-card p {
    color: var(--muted);
    font-size: 17px
}

.info-card b {
    font-size: 36px
}

.story-card {
    margin-top: 20px;
    padding: 32px
}

.breadcrumbs {
    display: flex;
    gap: 9px;
    color: var(--muted);
    margin-bottom: 24px
}

.filter-bar,
.subtabs {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 22px 0
}

.filter-bar button,
.subtabs button,
.admin-tabs button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer
}

.filter-bar button.active,
.subtabs button.active,
.admin-tabs button.active {
    background: var(--yellow);
    color: #fff;
    border-color: var(--yellow)
}

.model-card button {
    margin-top: 10px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
}

.form-grid label,
.field {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.form-grid input,
.form-grid select,
.field input,
.field select,
.admin-table input,
.gate-card input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    padding: 12px;
    border-radius: 13px
}

.calc-card {
    max-width: 820px;
    margin: auto;
    padding: 28px
}

.calc-result {
    margin: 20px 0;
    padding: 18px;
    border-radius: 16px;
    background: var(--soft);
    display: flex;
    justify-content: space-between
}

.sub-product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}

.sub-product {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface)
}

.modal {
    position: fixed;
    inset: 0;
    background: #0009;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: .25s
}

.modal.open {
    opacity: 1;
    pointer-events: auto
}

.modal-card {
    width: min(560px, 100%);
    max-height: 85vh;
    overflow: auto;
    background: var(--surface);
    border-radius: 25px;
    padding: 25px;
    transform: scale(.92) translateY(20px);
    transition: .25s
}

.modal.open .modal-card {
    transform: none
}

.close-modal {
    float: left;
    border: 0;
    background: var(--soft);
    width: 38px;
    height: 38px;
    border-radius: 12px
}

.cart-item,
.checkout-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line)
}

.cart-item small {
    display: block;
    color: var(--muted)
}

.cart-item button {
    border: 0;
    background: none;
    color: #c44
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 19px
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translate(-50%, 30px);
    background: #171717;
    color: #fff;
    padding: 12px 18px;
    border-radius: 13px;
    opacity: 0;
    z-index: 150;
    transition: .25s
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0)
}

.hidden {
    display: none !important
}

.admin-login {
    min-height: 65vh;
    display: grid;
    place-items: center
}

.gate-card {
    width: min(430px, 100%);
    background: var(--surface);
    padding: 30px;
    border-radius: 26px;
    box-shadow: var(--shadow)
}

.gate-card input {
    margin: 7px 0
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 25px 0
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden
}

.admin-table th,
.admin-table td {
    padding: 11px;
    border-bottom: 1px solid var(--line);
    text-align: right
}

.admin-table input {
    min-width: 100px
}

.admin-actions {
    display: flex;
    gap: 6px
}

.small-btn {
    border: 0;
    padding: 7px 10px;
    border-radius: 9px;
    cursor: pointer
}

.save-btn {
    background: var(--yellow)
}

.delete-btn {
    background: #fee;
    color: #a22
}

.add-form {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background: var(--surface);
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 18px
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 22px
}

.payment-card,
.messenger-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 25px;
    padding: 28px
}

.bank-card {
    background: linear-gradient(135deg, #1a1a1a, #3b3212);
    color: white;
    padding: 25px;
    border-radius: 22px;
    margin: 22px 0
}

.bank-card strong,
.bank-card b,
.bank-card small {
    display: block;
    margin: 5px 0
}

.messenger {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    padding: 13px;
    border-radius: 15px;
    margin: 10px 0
}

.messenger-logo {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--yellow);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900
}

.messenger small {
    display: block;
    color: var(--muted)
}

.reveal {
    animation: reveal .7s ease both
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(18px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media(max-width:950px) {
    .hero-grid {
        grid-template-columns: 1fr
    }

    .products-grid,
    .model-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .sub-product-list {
        grid-template-columns: repeat(2, 1fr)
    }

    .checkout-grid {
        grid-template-columns: 1fr
    }

    .add-form {
        grid-template-columns: repeat(2, 1fr)
    }

    .menu-toggle {
        display: block
    }

    .nav-wrap {
        position: fixed;
        top: 78px;
        right: 16px;
        left: 16px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 22px;
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        opacity: 0;
        transform: translateY(-15px) scale(.98);
        pointer-events: none;
        transition: .28s;
        box-shadow: var(--shadow)
    }

    .nav-wrap.open {
        opacity: 1;
        transform: none;
        pointer-events: auto
    }

    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        margin-top: 6px
    }

    .dropdown.open .dropdown-menu {
        display: block
    }

    .nav-wrap>a,
    .dropdown-toggle {
        text-align: right;
        width: 100%
    }
}

@media(max-width:600px) {
    .container {
        width: min(100% - 20px, 1180px)
    }

    .hero {
        padding-top: 40px
    }

    .ad-slider {
        min-height: 390px;
        padding: 24px
    }

    .slide h2 {
        font-size: 30px
    }

    .slide-art {
        font-size: 75px
    }

    .products-grid,
    .model-grid,
    .about-grid,
    .sub-product-list {
        grid-template-columns: 1fr
    }

    .service-grid {
        grid-template-columns: 1fr 1fr
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .section {
        padding: 52px 0
    }

    .cta-box,
    .admin-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px
    }

    .admin-table {
        display: block;
        overflow-x: auto
    }

    .add-form {
        grid-template-columns: 1fr
    }
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 30px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
    position: relative;
    overflow: hidden
}

.category-card:before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow), #8a6449);
    opacity: .14;
    left: -40px;
    bottom: -55px;
    transition: transform .4s
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow)
}

.category-card:hover:before {
    transform: scale(1.4) rotate(15deg)
}

.category-card:hover .category-icon {
    transform: scale(1.12) rotate(-6deg)
}

.category-icon {
    font-size: 34px;
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--yellow) 40%, var(--surface)));
    margin-bottom: 16px;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 10px 24px #00000010
}

.category-card h2 {
    position: relative;
    z-index: 1;
    font-size: 20px;
    margin: 0 0 8px
}

.category-card p {
    color: var(--muted);
    position: relative;
    z-index: 1
}

.category-card span {
    font-weight: 900;
    color: #6f4e37;
    position: relative;
    z-index: 1;
    margin-top: 10px;
    display: inline-block
}

.detail-card {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 30px
}

.detail-visual {
    min-height: 430px;
    border-radius: 24px;
    background: linear-gradient(145deg, var(--soft), color-mix(in srgb, var(--yellow) 35%, var(--surface)));
    display: grid;
    place-items: center;
    font-size: 120px;
    overflow: hidden
}

.detail-card textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    padding: 12px;
    border-radius: 13px;
    font: inherit;
    resize: vertical
}

.detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0
}

.detail-meta span,
.check-row {
    background: var(--soft);
    padding: 10px 13px;
    border-radius: 14px
}

.check-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 14px 0
}

.payment-notice {
    position: fixed;
    inset: 0;
    background: #000a;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: .3s
}

.payment-notice.open {
    opacity: 1;
    pointer-events: auto
}

.notice-card {
    width: min(520px, 100%);
    background: linear-gradient(145deg, var(--surface), var(--soft));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: noticePop .5s ease
}

.notice-card .notice-icon {
    font-size: 58px
}

.notice-card button:disabled {
    opacity: .45;
    cursor: not-allowed
}

@keyframes noticePop {
    from {
        transform: scale(.8) translateY(30px);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0
}

.checkout-form input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    padding: 12px;
    border-radius: 13px
}

.orders-list {
    display: grid;
    gap: 14px
}

.order-card {
    border: 2px solid;
    border-radius: 22px;
    padding: 18px;
    background: var(--surface);
    transition: .25s
}

.order-card.paid {
    border-color: #2fbf71;
    background: color-mix(in srgb, #2fbf71 8%, var(--surface))
}

.order-card.unpaid {
    border-color: #e34d59;
    background: color-mix(in srgb, #e34d59 7%, var(--surface))
}

.order-head,
.order-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.order-head span {
    color: var(--muted)
}

.order-items-preview {
    margin: 14px 0;
    padding: 12px;
    background: var(--bg);
    border-radius: 14px
}

.toggle-items {
    border: 0;
    background: none;
    color: #6f4e37;
    font-weight: 900;
    cursor: pointer;
    padding: 8px 0
}

.payment-select {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    padding: 9px;
    border-radius: 10px
}

.settings-card,
.admin-note,
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px
}

.admin-note {
    margin-bottom: 14px;
    color: var(--muted)
}

@media(max-width:800px) {

    .category-card-grid,
    .detail-card {
        grid-template-columns: 1fr
    }

    .detail-visual {
        min-height: 260px
    }

    .checkout-form {
        grid-template-columns: 1fr
    }

    .order-head,
    .order-foot {
        align-items: flex-start;
        flex-direction: column
    }
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 22px
}

.auth-tabs button {
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    padding: 11px;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-weight: 800
}

.auth-tabs button.active {
    background: var(--yellow);
    color: #fff;
    border-color: var(--yellow)
}

.auth-card h2 {
    margin-top: 8px
}

.auth-card .field {
    margin: 12px 0
}

.auth-card select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    padding: 12px;
    border-radius: 13px;
    font: inherit
}

.form-error {
    min-height: 24px;
    color: #d33;
    font-weight: 700
}

.wedding-sample {
    position: relative;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #4b351d;
    text-shadow: 0 1px #fff8
}

.wedding-sample:before,
.wedding-sample:after {
    content: "";
    position: absolute;
    border: 2px solid currentColor;
    opacity: .25;
    border-radius: 50%;
    width: 100px;
    height: 100px
}

.wedding-sample:before {
    right: -35px;
    top: -38px
}

.wedding-sample:after {
    left: -40px;
    bottom: -45px
}

.wedding-sample span {
    font-size: 30px;
    font-weight: 900;
    z-index: 1
}

.wedding-sample b {
    font-size: 15px;
    z-index: 1
}

.wedding-sample small {
    z-index: 1;
    color: inherit !important
}

.sample-1 {
    background: linear-gradient(135deg, #f8e9d6, #d8b78c)
}

.sample-2 {
    background: linear-gradient(135deg, #edf4e4, #aacb9b)
}

.sample-3 {
    background: linear-gradient(135deg, #f4e4ec, #cf9eb6)
}

.sample-4 {
    background: linear-gradient(135deg, #e4edf6, #9eb6cf)
}

.sample-5 {
    background: linear-gradient(135deg, #fff1d0, #e5b85b)
}

.sample-6 {
    background: linear-gradient(135deg, #ece7f8, #b6a4db)
}

.sample-7 {
    background: linear-gradient(135deg, #f8eeee, #dca2a2)
}

.sample-8 {
    background: linear-gradient(135deg, #eef3f0, #8fb5a2)
}

input[readonly] {
    opacity: .8;
    cursor: not-allowed
}

.link-chip,
.primary-btn,
.ghost-btn,
.product-card,
.model-card,
.category-card {
    text-decoration: none !important
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center
}

.password-wrap input {
    padding-left: 48px !important
}

.password-toggle {
    position: absolute;
    left: 7px;
    border: 0;
    background: var(--soft);
    color: var(--ink);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 17px
}

.admin-password {
    margin: 7px 0
}

.admin-password input {
    margin: 0 !important
}

.admin-top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.logout-btn {
    border: 0;
    background: #d93445;
    color: #fff;
    padding: 11px 17px;
    border-radius: 13px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: .25s
}

.logout-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05)
}

/* پشتیبانی شناور و چت هوشمند */
.support-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(135deg, var(--yellow), #8a6449);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 14px 34px #6f4e3755;
    opacity: 0;
    transform: translateY(16px) scale(.9);
    pointer-events: none;
    transition: opacity .4s, transform .4s
}

.support-fab.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: fabPulse 2.6s ease-in-out infinite
}

.support-fab svg {
    width: 22px;
    height: 22px
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 14px 34px #6f4e3755
    }

    50% {
        box-shadow: 0 14px 34px #6f4e3799
    }
}

.support-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    width: min(360px, calc(100vw - 36px));
    height: min(520px, calc(100vh - 100px));
    background: var(--surface);
    border-radius: 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(.96);
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    border: 1px solid var(--line)
}

.support-chat.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto
}

.support-chat-head {
    background: linear-gradient(135deg, var(--yellow), #8a6449);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 900
}

.support-chat-head button {
    background: #ffffff55;
    border: 0;
    border-radius: 10px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 15px
}

.support-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg)
}

.chat-msg {
    max-width: 84%;
    padding: 10px 13px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.7
}

.chat-msg.bot {
    background: var(--surface);
    border: 1px solid var(--line);
    align-self: flex-start;
    border-bottom-left-radius: 4px
}

.chat-msg.user {
    background: var(--yellow);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px
}

.chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 10px
}

.chat-quick button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit
}

.support-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: var(--surface)
}

.support-chat-input input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--bg);
    color: var(--ink)
}

.support-chat-input button {
    border: 0;
    background: var(--yellow);
    color: #fff;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 900;
    cursor: pointer
}

@media(max-width:640px) {
    .support-chat {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 12px
    }

    .support-fab {
        right: 12px;
        bottom: 12px
    }
}

.form-hint {
    font-size: 13px;
    color: var(--muted);
    background: var(--soft);
    border-radius: 12px;
    padding: 10px 12px;
    margin: -6px 0 14px
}

.pw-mask {
    cursor: pointer;
    font-family: monospace;
    letter-spacing: 1px
}

.danger-btn {
    background: #d93445 !important;
    color: #fff !important;
    border-color: #d93445 !important
}

/* پنل مدیریت - نظم و ظاهر بهتر */
.admin-dashboard {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 10px 34px #00000008;
    margin-top: 10px
}

.admin-top {
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px
}

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0;
    padding: 10px;
    background: var(--soft);
    border-radius: 18px
}

.admin-tabs button {
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px
}

#adminContent {
    padding-top: 6px
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px
}

.person-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s
}

.person-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px #0001
}

.person-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow), #8a6449);
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    display: grid;
    place-items: center
}

.person-avatar.partner {
    background: linear-gradient(135deg, #2b2b2b, #555)
}

.person-info h3 {
    font-size: 15px;
    margin: 0 0 3px
}

.person-info span {
    color: var(--muted);
    font-size: 13px
}

.person-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center
}

.ghost-btn-sm {
    background: var(--soft) !important;
    color: var(--ink) !important
}

.person-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--soft);
    border-radius: 12px;
    font-size: 14px
}

.detail-row span {
    color: var(--muted)
}

.slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    background: var(--yellow);
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: 999px;
    transition: transform .2s, filter .2s
}

.slide:hover .slide-cta {
    transform: translateY(-2px);
    filter: brightness(1.05)
}

/* حالت فشرده برای همه دکمه‌های سایت */
.primary-btn,
.ghost-btn,
.small-btn,
.logout-btn,
.slider-controls button,
.carousel-buttons button,
.icon-btn,
.cart-btn,
.login-btn,
.link-chip,
.slide-cta,
.support-fab,
.chat-quick button,
.support-chat-input button {
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease
}

.primary-btn:active,
.ghost-btn:active,
.small-btn:active,
.logout-btn:active,
.slider-controls button:active,
.carousel-buttons button:active,
.icon-btn:active,
.cart-btn:active,
.login-btn:active,
.link-chip:active,
.slide-cta:active,
.support-fab:active,
.chat-quick button:active,
.support-chat-input button:active,
.dropdown-toggle:active,
.menu-toggle:active {
    transform: scale(.93)
}

/* جستجوی نوبار */
.nav-search {
    position: relative;
    display: inline-flex;
    align-items: center
}

.nav-search-panel {
    position: absolute;
    top: 48px;
    left: 0;
    width: 280px;
    max-width: 80vw;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px) scale(.97);
    pointer-events: none;
    transition: .25s;
    z-index: 40
}

.nav-search.open .nav-search-panel {
    opacity: 1;
    transform: none;
    pointer-events: auto
}

.nav-search-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--bg);
    color: var(--ink);
    font: inherit
}

.nav-search-results {
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.nav-search-results a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    transition: .2s
}

.nav-search-results a:hover {
    background: var(--soft)
}

.nav-search-results a span {
    color: var(--muted);
    font-size: 12px;
    flex: none
}

.nav-search-results .no-result {
    padding: 10px;
    color: var(--muted);
    font-size: 13px;
    text-align: center
}

@media(max-width:950px) {
    .nav-search-panel {
        left: auto;
        right: 0
    }
}

/* پاورقی سایت */
.site-footer {
    margin-top: 60px;
    background: #17140a;
    color: #eee;
    padding: 50px 0 0
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 34px
}

.footer-col h3 {
    font-size: 16px;
    margin: 0 0 16px;
    color: var(--yellow)
}

.footer-phones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px
}

.footer-phones a {
    color: #eee;
    font-weight: 800;
    font-size: 15px;
    direction: ltr;
    text-align: right;
    transition: .2s
}

.footer-phones a:hover {
    color: var(--yellow)
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.footer-social a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff0d;
    border: 1px solid #ffffff1a;
    border-radius: 12px;
    padding: 10px 13px;
    color: #eee;
    transition: .2s
}

.footer-social a:hover {
    background: #ffffff1a;
    transform: translateX(-3px)
}

.footer-social a span {
    color: #bbb;
    font-size: 13px
}

.footer-social a b {
    color: var(--yellow)
}

.footer-map {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #ffffff1a;
    height: 220px;
    background: #0000002a
}

.map-fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #bbb;
    line-height: 1.9
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(.2) contrast(1.05)
}

.footer-address {
    margin-top: 10px;
    color: #bbb;
    font-size: 13.5px
}

.footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #ffffff14;
    padding: 16px 0;
    font-size: 12px;
    color: #999
}

.footer-copy {
    text-align: center
}

.footer-credit {
    text-align: left;
    justify-self: end;
    padding-inline-start: 62px
}

@media(max-width:800px) {
    .footer-credit {
        padding-inline-start: 0
    }
}

@media(max-width:800px) {
    .footer-grid {
        grid-template-columns: 1fr
    }

    .footer-bottom {
        grid-template-columns: 1fr;
        text-align: center
    }

    .footer-credit {
        justify-self: center;
        text-align: center
    }
}

/* دکمه بازگشت به بالا */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 88px;
    z-index: 79;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .3s, transform .3s
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto
}

@media(max-width:640px) {
    .back-to-top {
        right: 12px;
        bottom: 78px
    }
}

/* دکمه‌های افزایش/کاهش تعداد */
.qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg)
}

.qty-btn {
    border: 0;
    background: var(--soft);
    color: var(--ink);
    width: 42px;
    height: 42px;
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
    flex: none;
    transition: .2s
}

.qty-btn:hover {
    background: var(--yellow);
    color: #fff
}

.qty-stepper input {
    border: 0 !important;
    text-align: center;
    background: transparent !important;
    font-weight: 800;
    width: 100%;
    -moz-appearance: textfield
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

/* صفحه درباره ما */
.section-heading-plain {
    margin: 46px 0 18px;
    text-align: center
}

.section-heading-plain h2 {
    font-size: 24px
}

.about-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 50px
}

.mini-service-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s
}

.mini-service-card:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: var(--shadow)
}

.mini-service-icon {
    font-size: 30px
}

.mini-service-card b {
    font-size: 13.5px
}

.team-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px
}

.team-card {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 28px;
    box-shadow: 0 14px 40px #00000008
}

.team-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow), #8a6449);
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    display: grid;
    place-items: center;
    flex: none
}

.team-card h3 {
    margin: 4px 0 8px;
    font-size: 19px
}

.team-card p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 6px
}

.team-card-small {
    max-width: 520px;
    padding: 20px 24px
}

.team-avatar.small {
    width: 60px;
    height: 60px;
    font-size: 22px;
    background: linear-gradient(135deg, #2b2b2b, #555);
    color: #fff
}

.team-card-small h3 {
    font-size: 16px
}

@media(max-width:640px) {
    .team-card {
        flex-direction: column;
        text-align: center
    }
}

/* دکمه بازگشت (فقط عقب، بدون دکمه جلو) — پایین‌چپ، جایی که عنصر دیگری نیست */
.history-nav {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 74;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 22px #00000012;
    transition: .2s
}

.history-nav:hover {
    background: var(--yellow);
    color: #fff;
    border-color: var(--yellow)
}

.history-nav svg {
    width: 18px;
    height: 18px
}

@media(max-width:640px) {
    .history-nav {
        left: 12px;
        bottom: 12px
    }
}

/* لودر کلی صفحه هنگام دریافت اطلاعات از دیتابیس */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px
}

.print-loader {
    position: relative;
    width: 90px;
    height: 90px
}

.print-loader-sheet {
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 46px;
    height: 58px;
    margin-right: -23px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 6px 14px #00000014;
    animation: sheetFeed 1.8s cubic-bezier(.5, 0, .3, 1) infinite;
    z-index: 1
}

.print-loader-sheet:before {
    content: "";
    position: absolute;
    inset: 8px 8px auto 8px;
    height: 3px;
    background: var(--line);
    box-shadow: 0 8px 0 var(--line), 0 16px 0 var(--line), 0 24px 0 var(--line)
}

.print-loader-sheet.s2 {
    animation-delay: .6s
}

.print-loader-sheet.s3 {
    animation-delay: 1.2s
}

.print-loader-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--yellow), var(--olive-light));
    box-shadow: 0 14px 30px #6f4e3744;
    z-index: 2
}

.print-loader-slot {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 6px;
    border-radius: 3px;
    background: #00000030
}

@keyframes sheetFeed {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0
    }

    15% {
        opacity: 1
    }

    70% {
        transform: translateX(-50%) translateY(-46px);
        opacity: 1
    }

    90% {
        opacity: 0
    }
}

.print-loader-text {
    font-weight: 900;
    font-size: 16px;
    color: var(--ink);
    letter-spacing: .3px;
    margin: 0
}

.print-loader-sub {
    font-size: 12px;
    color: var(--muted);
    animation: fadePulse 1.6s ease-in-out infinite
}

@keyframes fadePulse {

    0%,
    100% {
        opacity: .5
    }

    50% {
        opacity: 1
    }
}

/* ============================================================================
   پنل مدیریت — چیدمان جدید (نوار کناری راست + نوار بالا + محتوای اصلی)
   ============================================================================ */
.admin-body {
    background: var(--bg)
}

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.back-to-site {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px
}

.admin-shell {
    display: flex;
    min-height: 100vh
}

.admin-sidebar {
    width: 250px;
    flex: none;
    background: var(--surface);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 20px;
    color: var(--ink)
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1
}

.admin-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: right;
    padding: 12px 14px;
    border-radius: 14px;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: .2s
}

.admin-nav button svg {
    width: 19px;
    height: 19px;
    flex: none;
    opacity: .8
}

.admin-nav button:hover {
    background: var(--olive-soft)
}

.admin-nav button.active {
    background: var(--yellow);
    color: #fff
}

.admin-nav button.active svg {
    opacity: 1
}

.admin-fail-box {
    margin-top: 14px;
    background: #3a1414;
    background: linear-gradient(135deg, #2c1414, #1c0e0e);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff
}

.admin-fail-box .fail-icon {
    font-size: 22px
}

.admin-fail-box b {
    font-size: 18px;
    display: block
}

.admin-fail-box small {
    color: #e6b8b8;
    font-size: 12px
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30
}

.admin-topbar-cluster {
    display: flex;
    align-items: center;
    gap: 8px
}

.admin-topbar-search {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 16px;
    color: var(--muted)
}

.admin-topbar-search svg {
    width: 17px;
    height: 17px;
    flex: none
}

.admin-topbar-search input {
    border: 0;
    background: transparent;
    flex: 1;
    font: inherit;
    color: var(--ink)
}

.admin-topbar-search span {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    border-right: 1px solid var(--line);
    padding-right: 10px;
    white-space: nowrap
}

.admin-topbar-right {
    margin-inline-start: auto
}

.badge-dot {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d93445;
    border: 2px solid var(--surface)
}

#adminBellBtn {
    position: relative
}

.admin-search-results {
    margin: 0 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    max-height: 320px;
    overflow-y: auto
}

.admin-search-results a,
.admin-search-results .sr-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--ink)
}

.admin-search-results a:hover {
    background: var(--soft)
}

.admin-content {
    padding: 22px;
    max-width: 1400px;
    width: 100%
}

@media(max-width:1000px) {
    .admin-shell {
        flex-direction: column
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        align-items: center;
        overflow-x: auto
    }

    .admin-brand {
        padding: 4px 10px;
        flex: none
    }

    .admin-nav {
        flex-direction: row;
        flex: none
    }

    .admin-nav button {
        white-space: nowrap
    }

    .admin-fail-box {
        margin: 0 0 0 10px;
        flex: none
    }

    .admin-topbar {
        flex-wrap: wrap
    }

    .admin-topbar-search {
        order: 3;
        max-width: none;
        width: 100%
    }
}

/* نمای کلی پنل مدیریت: کارت‌های آماری، چارت‌ها، جدول‌ها */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px 20px
}

.stat-card b {
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px
}

.stat-card strong {
    display: block;
    font-size: 23px;
    margin-bottom: 8px
}

.stat-trend {
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px
}

.stat-trend.up {
    color: var(--olive)
}

.stat-trend.down {
    color: #d93445
}

.admin-grid-3 {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch
}

.admin-grid-3b {
    grid-template-columns: 1fr 1.6fr 1fr
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: start
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px 20px
}

.chart-card h3 {
    font-size: 15px;
    margin: 0 0 12px
}

.chart-card canvas {
    max-height: 220px
}

.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.top-products-list .tp-row {
    display: flex;
    align-items: center;
    gap: 10px
}

.top-products-list .tp-rank {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--soft);
    color: #6f4e37;
    font-weight: 900;
    font-size: 12px;
    display: grid;
    place-items: center;
    flex: none
}

.top-products-list .tp-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 700
}

.top-products-list .tp-qty {
    font-size: 12px;
    color: var(--muted);
    font-weight: 800
}

.low-stock-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px 20px
}

.low-stock-panel h3 {
    font-size: 15px;
    margin: 0 0 4px
}

.low-stock-panel p {
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 12px
}

.low-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 13.5px
}

.low-stock-row b {
    color: #d93445
}

.admin-search-input-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap
}

.admin-search-input-wrap input {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 13px;
    background: var(--bg);
    color: var(--ink);
    min-width: 220px
}

.order-status-badge {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    display: inline-block
}

.order-status-badge.paid {
    background: #e7f1de;
    color: #4b6023
}

.order-status-badge.pending {
    background: #faf1de;
    color: #8a6449
}

.order-status-badge.cancelled {
    background: #f7dede;
    color: #a13939
}

html[data-theme=dark] .order-status-badge.paid {
    background: #24331a;
    color: #b7d491
}

html[data-theme=dark] .order-status-badge.pending {
    background: #362c18;
    color: #e3c78e
}

html[data-theme=dark] .order-status-badge.cancelled {
    background: #3a1f1f;
    color: #e8a3a3
}

.show-more-wrap {
    text-align: center;
    margin-top: 14px
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto
}

.notif-item {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 13.5px
}

.notif-item small {
    display: block;
    color: var(--muted);
    margin-top: 4px
}

.cat-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0
}

.cat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13.5px;
    font-weight: 700
}

.cat-chip button {
    border: 0;
    background: transparent;
    color: #d93445;
    cursor: pointer;
    font-size: 15px;
    line-height: 1
}

.sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px
}

.sub-tabs button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    padding: 8px 15px;
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer
}

.sub-tabs button.active {
    background: var(--yellow);
    color: #fff;
    border-color: var(--yellow)
}

@media(max-width:1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .admin-grid-3,
    .admin-grid-2 {
        grid-template-columns: 1fr
    }
}

/* بخش نظرات محصول (پایین صفحه هر محصول) */
.review-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--line)
}

.review-section h2 {
    font-size: 20px;
    margin-bottom: 16px
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px
}

.review-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px
}

.review-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px
}

.review-item-head span {
    color: var(--yellow);
    letter-spacing: 1px
}

.review-item p {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0 0 6px
}

.review-item small {
    color: var(--muted);
    font-size: 11.5px
}

.review-form {
    background: var(--soft);
    border-radius: 20px;
    padding: 22px;
    max-width: 520px
}

.review-form h3 {
    margin: 0 0 14px;
    font-size: 16px
}

#loginRememberedBox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap
}

#loginRememberedBox button {
    flex: none;
    padding: 6px 12px;
    font-size: 12px
}

/* دفتر کار: کارت‌های سفارش داخلی */
.workorder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px
}

.wo-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.wo-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px
}

.wo-card-head h3 {
    font-size: 16px;
    margin: 0
}

.wo-project {
    font-weight: 700;
    color: var(--ink);
    margin: 0
}

.wo-employee {
    font-size: 12.5px;
    color: var(--muted)
}

.wo-more {
    align-self: flex-start;
    margin-top: 4px
}

.wo-extra {
    background: var(--bg);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px
}

.wo-extra-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px
}

.wo-extra-row span {
    color: var(--muted)
}

.wo-desc {
    font-size: 12.5px;
    color: var(--ink);
    margin: 4px 0 0;
    padding-top: 6px;
    border-top: 1px solid var(--line)
}

.wo-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px
}

/* پیغام شناور تایید درخواست همکاری */
.floating-success {
    position: fixed;
    bottom: 90px;
    right: 50%;
    transform: translateX(50%);
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--olive);
    border-radius: 20px;
    padding: 20px 22px;
    max-width: 360px;
    width: calc(100% - 32px);
    text-align: center;
    box-shadow: var(--shadow);
    animation: floatSuccessIn .4s ease
}

@keyframes floatSuccessIn {
    from {
        opacity: 0;
        transform: translateX(50%) translateY(20px)
    }

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

.floating-success-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--olive);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    display: grid;
    place-items: center;
    margin: 0 auto 12px
}

.floating-success p {
    font-size: 13.5px;
    color: var(--ink);
    line-height: 1.9;
    margin: 0 0 14px
}

.floating-success-close {
    border: 0;
    background: var(--olive);
    color: #fff;
    padding: 9px 22px;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: opacity .3s
}

html[data-theme=dark] .stock-pill {
    color: var(--olive-light)
}

/* سلول آپلود عکس محصول در پنل مدیریت */
.img-upload-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.img-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line)
}

.img-upload-btn {
    cursor: pointer;
    white-space: nowrap
}

.img-upload-status {
    font-size: 11px;
    color: var(--olive);
    white-space: nowrap
}

.qty-stock-hint {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--muted)
}

.primary-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    filter: grayscale(.3)
}
