﻿/* =========================
   FONT
========================= */
@font-face {
    font-family: "niam";
    src: url("/fonts/niam.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* =========================
   TOKENS
========================= */
:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e6edf6;
    --primary: #2b7fff;
    --primary2: #2563eb;
    --good: #16a34a;
    --danger: #ef4444;
    --warn: #f59e0b;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow2: 0 10px 24px rgba(15,23,42,.04);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: niam, Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.app-shell main.container {
    padding-top: 18px;
    padding-bottom: 18px;
}

/* =========================
   RESPONSIVE HELPERS
========================= */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: grid !important;
    }

    .container {
        padding: 0 14px;
    }
}

/* =========================
   HEADER
========================= */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
}

.header-spacer {
    flex: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg,#0ea5e9,#2563eb);
    box-shadow: var(--shadow);
}

.nav {
    display: flex;
    gap: 18px;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

    .nav a {
        padding: 8px 10px;
        border-radius: 12px;
    }

        .nav a.active {
            background: #eaf2ff;
            color: #1d4ed8;
        }

/* Search */
.search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 14px;
    min-width: 320px;
}

    .search input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 14px;
        background: transparent;
    }

/* Icon button */
.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    display: grid;
    place-items: center;
}

@media (max-width: 900px) {
    .search {
        min-width: 0;
    }
}

/* =========================
   MOBILE DRAWER
========================= */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.45);
    backdrop-filter: blur(2px);
    z-index: 60;
}

.mobile-drawer {
    position: fixed;
    top: 64px;
    left: 14px;
    right: 14px;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 12px;
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 10px;
}

    .mobile-search input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 14px;
        background: transparent;
    }

.mobile-links {
    display: grid;
    gap: 10px;
}

    .mobile-links a {
        padding: 10px 12px;
        border-radius: 14px;
        background: #f6f9ff;
        font-weight: 900;
        color: #1e293b;
        border: 1px solid #eaf0ff;
    }

        .mobile-links a.active {
            background: #eaf2ff;
            border-color: #cfe1ff;
            color: #1d4ed8;
        }

/* =========================
   BUTTONS
========================= */
.btn {
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn.primary {
        background: var(--primary);
        color: #fff;
    }

    .btn.ghost {
        background: rgba(255,255,255,.10);
        border: 1px solid rgba(255,255,255,.18);
        color: #fff;
    }

.pill-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

    .pill-btn.primary {
        background: var(--primary);
        color: #fff;
        border-color: transparent;
    }

/* =========================
   HERO (Swiper)
========================= */
.hero {
    margin-top: 18px;
    background: radial-gradient(80% 120% at 70% 40%, #1e3a8a 0%, #0b1220 60%, #071022 100%);
    border-radius: 22px;
    height: 340px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

    .hero::after {
        content: "";
        position: absolute;
        inset: -60px -60px auto auto;
        width: 420px;
        height: 420px;
        background: radial-gradient(circle at 30% 30%, rgba(43,127,255,.6), rgba(14,165,233,0) 60%);
        transform: rotate(18deg);
    }

    .hero .swiper {
        height: 100%;
    }

    .hero .swiper-slide {
        height: 100%;
        position: relative;
    }

    .hero .swiper-pagination {
        bottom: 14px !important;
    }

    .hero .swiper-button-next,
    .hero .swiper-button-prev {
        width: 38px;
        height: 38px;
        border-radius: 14px;
        background: rgba(255,255,255,.10);
        border: 1px solid rgba(255,255,255,.18);
        backdrop-filter: blur(8px);
    }

        .hero .swiper-button-next::after,
        .hero .swiper-button-prev::after {
            font-size: 14px;
            color: #fff;
        }

@media (max-width: 640px) {
    .hero .swiper-button-next,
    .hero .swiper-button-prev {
        display: none;
    }
}

@media (max-width: 900px) {
    .hero {
        height: 300px;
    }
}

/* hero background image layer */
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05) contrast(1.05);
    transform: scale(1.02);
}

.hero-slide-link {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 28px;
}

.hero-right {
    margin-right: auto;
    max-width: 460px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
}

.hero-title {
    margin: 14px 0 8px;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.hero-desc {
    color: rgba(255,255,255,.78);
    line-height: 1.9;
    font-size: 14px;
}

.hero-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

@media (max-width: 900px) {
    .hero-title {
        font-size: 32px;
    }
}

/* =========================
   SECTIONS
========================= */
.section {
    margin-top: 22px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.section-title {
    font-weight: 900;
}

.section-sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.link-btn {
    font-size: 12px;
    color: #1d4ed8;
    font-weight: 900;
    background: transparent;
    padding: 6px 0;
    border-radius: 10px;
}

/* =========================
   SHOW CARD (shared everywhere)
========================= */
.show-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    overflow: hidden;
}

    .show-card.clickable {
        cursor: pointer;
        transition: transform .12s ease;
    }

        .show-card.clickable:hover {
            transform: translateY(-2px);
        }

/* Poster ratio 2:3 */
.card-poster {
    aspect-ratio: 2 / 3;
    width: 100%;
    background: #0f172a;
    overflow: hidden;
}

    .card-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

.card-body {
    padding: 12px 12px 14px;
}

.card-title {
    font-weight: 900;
    margin-bottom: 6px;
    font-size: 14px;
}

.card-meta {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.8;
}

.card-price {
    margin-top: 8px;
    font-weight: 900;
    color: var(--good);
    font-size: 12px;
}

/* Cards Swiper */
.cards-swiper {
    width: 100%;
    padding: 6px 2px 16px;
}

    .cards-swiper .swiper-slide {
        width: auto;
    }

    .cards-swiper .swiper-button-next,
    .cards-swiper .swiper-button-prev {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        background: #fff;
        border: 1px solid var(--border);
        box-shadow: 0 10px 24px rgba(15,23,42,.06);
    }

        .cards-swiper .swiper-button-next::after,
        .cards-swiper .swiper-button-prev::after {
            font-size: 14px;
            color: #0f172a;
        }

@media (max-width: 640px) {
    .cards-swiper .swiper-button-next,
    .cards-swiper .swiper-button-prev {
        display: none;
    }
}

/* =========================
   SHOWS PAGE
========================= */
.filters {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    padding: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
}

.field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 10px 12px;
    border-radius: 14px;
    min-width: 220px;
}

    .field label {
        color: var(--muted);
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

    .field input, .field select {
        border: none;
        outline: none;
        width: 100%;
        background: transparent;
        font-size: 14px;
    }

.filters-actions {
    display: flex;
    gap: 10px;
}

.grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 1100px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* موبایل: 2تا در هر ردیف (طبق خواسته) */
@media (max-width: 520px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
    }

    .field {
        min-width: 100% !important;
    }

    .filters-actions {
        width: 100%;
        flex-direction: column;
    }

    .filters .btn {
        width: 100%;
    }

    .card-body {
        padding: 10px 10px 12px;
    }

    .card-title {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .card-meta {
        font-size: 10px;
        line-height: 1.6;
    }

    .card-price {
        font-size: 11px;
    }
}

/* =========================
   SHOW DETAILS
========================= */
.details {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    align-items: start;
}

.details-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    padding: 12px;
}

.poster-box .card-poster {
    border-radius: 16px;
}

.kv {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

    .kv strong {
        color: var(--text);
        font-weight: 900;
    }

.details-title {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.details-sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    font-size: 11px;
    font-weight: 900;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
}

.sessions {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.session {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(15,23,42,.03);
}

.session-meta {
    display: grid;
    gap: 4px;
}

.session-line1 {
    font-weight: 900;
}

.session-line2 {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .details {
        grid-template-columns: 1fr;
    }

    .poster-box {
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: 12px;
        align-items: start;
    }
}

/* =========================
   CHECKOUT / SEAT PICK
========================= */
.checkout {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 16px;
    align-items: start;
}

.box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    padding: 14px;
}

    .box h3 {
        margin: 0 0 10px;
        font-weight: 900;
    }

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #e9eff8;
}

    .row:last-child {
        border-bottom: none;
    }

.muted {
    color: var(--muted);
    font-size: 12px;
}

.pay-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
}

@media (max-width: 900px) {
    .checkout {
        grid-template-columns: 1fr;
    }
}

/* =========================
   SEAT MAP (SVG)
========================= */
.seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin: 10px 0 12px;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 10px;
    box-shadow: 0 6px 16px rgba(15,23,42,.05);
    font-weight: 900;
    font-size: 12px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid rgba(15,23,42,.12);
}

.legend-free {
    background: #dfffe9;
    border-color: #bbf7d0;
}

.legend-selected {
    background: #dbeafe;
    border-color: #93c5fd;
}

.legend-sold {
    background: #fee2e2;
    border-color: #fecaca;
}

.legend-locked {
    background: #ffedd5;
    border-color: #fed7aa;
}

.seatmap-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    padding: 12px;
}

.seatmap-scroll {
    width: 100%;
    overflow: auto;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #edf3ff;
    padding: 10px;
}

/* SVG should not stretch weird */
svg.seatmap {
    display: block;
    width: 1200px; /* دسکتاپ */
    height: 520px;
    max-width: none; /* مهم برای اسکرول */
}

/* موبایل: کوچیک‌تر ولی باز اسکرول */
@media (max-width: 900px) {
    svg.seatmap {
        width: 980px;
        height: 520px;
    }
}

@media (max-width: 520px) {
    svg.seatmap {
        width: 900px;
        height: 480px;
    }
}

.seatmap-bg {
    fill: #ffffff;
    stroke: #eaf2ff;
    stroke-width: 2;
}

/* Seat styles */
.seat rect {
    stroke: rgba(15,23,42,.18);
    stroke-width: 1.2;
}

.seat.free rect {
    fill: #e9fff2;
}

.seat.selected rect {
    fill: #cfe1ff;
    stroke: rgba(29,78,216,.45);
}

.seat.sold rect {
    fill: #fee2e2;
}

.seat.locked rect {
    fill: #ffedd5;
}

.seat.free:hover rect {
    stroke: rgba(22,163,74,.45);
    filter: drop-shadow(0 6px 10px rgba(15,23,42,.10));
}

/* Seat text */
.seat-text {
    fill: #0f172a;
    font-size: 10px;
    font-weight: 900;
    user-select: none;
    pointer-events: none; /* کلیک روی g کار کنه */
}

/* =========================
   FOOTER
========================= */
.footer {
    margin-top: 28px;
    background: #0b1220;
    color: rgba(255,255,255,.85);
}

.footer-inner {
    padding: 26px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 18px;
}

.footer h4 {
    margin: 0 0 10px;
}

.footer a {
    color: rgba(255,255,255,.75);
    font-size: 13px;
}

.footer small {
    color: rgba(255,255,255,.55);
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}
/* ===== Seat Map (DIV Absolute) ===== */
.seatmap-wrap {
    margin-top: 12px;
}

.seatmap-scroll {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    padding: 12px;
    overflow: auto; /* اسکرول افقی/عمودی */
    max-height: 520px; /* مثل نمونه‌ای که فرستادی */
    direction: ltr;
}

.seatmap-canvas {
    position: relative;
    border-radius: 18px;
    background: #f8fafc;
    direction: ltr;
}

/* بک‌گراند نرم شبیه همون قاب */
.seatmap-bg-layer {
    position: absolute;
    inset: 12px;
    border-radius: 28px;
    border: 8px solid #e6eefb;
    background: #ffffff;
    pointer-events: none;
    opacity: .9;
}

.seat {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 2px solid rgba(15,23,42,.18);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    user-select: none;
}

    .seat .seat-label {
        font-size: 10px;
        font-weight: 900;
        color: #0f172a;
        pointer-events: none;
    }

    /* وضعیت‌ها */
    .seat.free {
        background: #e8fff1;
        border-color: rgba(22,163,74,.25);
    }

    .seat.selected {
        background: #1d4ed8;
        border-color: rgba(15,23,42,.25);
    }

        .seat.selected .seat-label {
            color: #fff;
        }

    .seat.sold {
        background: #fee2e2;
        border-color: rgba(153,27,27,.25);
        cursor: not-allowed;
        opacity: .85;
    }

    .seat.locked {
        background: #fde68a;
        border-color: rgba(146,64,14,.25);
        cursor: not-allowed;
        opacity: .9;
    }

    .seat:disabled {
        pointer-events: none;
    }
/* =========================
   SEAT MAP (Stable / No SVG)
========================= */

.seatmap-wrap {
    margin-top: 12px;
}

.seatmap-scroll {
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    padding: 14px;
    direction: ltr; /* کلیدی: اسکرول افقی از چپ شروع شود (RTL خرابش نکند) */
}

.seatmap-canvas {
    position: relative;
    direction: ltr;
    min-width: 420px;
    min-height: 260px;
}

.seatmap-bg {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: #fbfdff;
    border: 1px solid #e7eef9;
}

.seat {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #dcfce7; /* قابل انتخاب */
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

    .seat .seat-label {
        font-size: 10px;
        font-weight: 900;
        color: #0f172a;
        pointer-events: none;
    }

    .seat.free {
        background: #dcfce7;
    }

    .seat.selected {
        background: #bfdbfe;
        border-color: #60a5fa;
    }

    .seat.sold {
        background: #fecaca;
        border-color: #f87171;
        cursor: not-allowed;
    }

    .seat.locked {
        background: #fde68a;
        border-color: #f59e0b;
        cursor: not-allowed;
    }

    .seat:disabled {
        opacity: .95;
    }

.seatmap-scroll {
    width: 100%;
    height: 520px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    padding: 10px;
}

.seatmap {
    display: block;
}

/* رنگ‌بندی */
.seatmap-bg {
    fill: #f8fafc;
}

.seat rect {
    stroke: #0f172a;
    stroke-width: 1;
}

.seat.free rect {
    fill: #eafff3;
}

.seat.selected rect {
    fill: #c7ddff;
}

.seat.sold rect {
    fill: #ffd6d6;
}

.seat.locked rect {
    fill: #ffe8bf;
}

.seat text {
    font-size: 14px;
    font-weight: 900;
    fill: #0f172a;
    user-select: none;
    pointer-events: none; /* مهم */
}

.seat.free rect {
    fill: #1e3a8a;
}

.seat.free svg\\:text {
    fill: #fff;
}

.seat.selected rect {
    fill: #2b7fff;
}

.seat.selected svg\\:text {
    fill: #fff;
}
/* ===== SeatMap SVG texts ===== */
.seatmap .seat-text {
    font-size: 12px;
    font-weight: 900;
    fill: #0f172a;
    pointer-events: none; /* کلیک روی صندلی بهم نخوره */
}

.seatmap .row-text {
    font-size: 13px;
    font-weight: 900;
    fill: #1e293b;
    opacity: .95;
    pointer-events: none;
}

/* Seat states (اگر نداری) */
.seatmap .seat rect {
    stroke: #cbd5e1;
    stroke-width: 1.2;
}

.seatmap .seat.free rect {
    fill: #dcfce7;
}

.seatmap .seat.selected rect {
    fill: #bfdbfe;
    stroke: #60a5fa;
}

.seatmap .seat.locked rect {
    fill: #fde68a;
    stroke: #f59e0b;
}

.seatmap .seat.sold rect {
    fill: #fecaca;
    stroke: #f87171;
}

/* Hover */
.seatmap g.seat.free:hover rect {
    filter: brightness(.98);
    stroke-width: 1.8;
}

.seat-legend {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin: 10px 0 8px;
}

.seat-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
}

.seat-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    border: 2px solid rgba(15,23,42,.25);
}

    .seat-legend .dot.free {
        background: #22c55e33;
        border-color: #22c55e;
    }

    .seat-legend .dot.selected {
        background: #3b82f633;
        border-color: #3b82f6;
    }

    .seat-legend .dot.locked {
        background: #f59e0b33;
        border-color: #f59e0b;
    }

    .seat-legend .dot.sold {
        background: #ef444433;
        border-color: #ef4444;
    }
/* force show seat numbers inside svg */
.seatmap .seat-text {
    fill: #0f172a !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    dominant-baseline: middle;
    pointer-events: none;
    user-select: none;
}
/* ===== Seat Map (React-like) ===== */
.seatmap-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    padding: 12px;
}

.seatmap-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.seatmap-stage-bar {
    width: 100%;
    height: 64px;
    border: 1px solid #dbe7ff;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.seatmap-stage-title {
    font-weight: 900;
    color: var(--muted);
    font-size: 12px;
}

.seatmap-plan {
    margin-top: 14px;
}

.seatmap-plan-title {
    text-align: center;
    font-weight: 900;
    margin-bottom: 10px;
}

.seatmap-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-top: 1px solid #eef2ff;
}

    .seatmap-row:first-of-type {
        border-top: none;
    }

.seatmap-row-seats {
    flex: 1;
    display: flex;
    flex-direction: row-reverse; /* دقیقا مثل React */
    gap: 2px;
    flex-wrap: nowrap;
    overflow: auto;
    padding: 6px 8px;
}

.seatmap-row-label {
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 2px solid var(--primary);
    border-radius: 10px;
    height: 34px;
    background: #fff;
    flex: 0 0 auto;
}

.seat {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid rgba(15,23,42,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform .12s ease;
}

    .seat:active {
        transform: scale(.98);
    }

    .seat:disabled {
        cursor: not-allowed;
        opacity: .85;
    }

    .seat .seat-num {
        font-size: 11px;
        font-weight: 900;
        color: #fff;
        line-height: 1;
    }

    /* status colors */
    .seat.free {
        background: #1f4aa8;
    }
    /* آبی پررنگ */
    .seat.selected {
        background: #16a34a;
    }
    /* سبز */
    .seat.locked {
        background: #cbd5e1;
    }
    /* خاکستری */
    .seat.sold {
        background: #dc2626;
    }
    /* قرمز */
    .seat.inactive {
        background: #e5e7eb;
    }
        /* غیرفعال */
        .seat.inactive .seat-num {
            color: #475569;
        }

/* legend */
.seatmap-legend {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 999px;
}

.lg-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

    .lg-dot.free {
        background: #1f4aa8;
    }

    .lg-dot.selected {
        background: #16a34a;
    }

    .lg-dot.locked {
        background: #cbd5e1;
    }

    .lg-dot.sold {
        background: #dc2626;
    }

@media (max-width: 520px) {
    .seat {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

        .seat .seat-num {
            font-size: 10px;
        }

    .seatmap-row-label {
        width: 42px;
        height: 32px;
    }
}
/* ===== Seat Map Absolute ===== */
.seatmap-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    padding: 12px;
}

.seatmap-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.seatmap-stage-bar {
    width: 100%;
    height: 64px;
    border: 1px solid #dbe7ff;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.seatmap-stage-title {
    font-weight: 900;
    color: var(--muted);
    font-size: 12px;
}

.seatmap-scroll {
    width: 100%;
    overflow: auto;
    border: 1px solid #eef2ff;
    border-radius: 18px;
    padding: 10px;
    background: #fbfdff;
}

.seatmap-canvas {
    position: relative;
    border-radius: 16px;
    background: #f8fbff;
}

.seat {
    position: absolute;
    border-radius: 7px;
    border: 1px solid rgba(15,23,42,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform .12s ease;
}

    .seat:active {
        transform: scale(.98);
    }

    .seat:disabled {
        cursor: not-allowed;
        opacity: .85;
    }

    .seat .seat-num {
        font-size: 11px;
        font-weight: 900;
        color: #fff;
        line-height: 1;
    }

    /* status colors */
    .seat.free {
        background: #1f4aa8;
    }

    .seat.selected {
        background: #16a34a;
    }

    .seat.locked {
        background: #cbd5e1;
    }

    .seat.sold {
        background: #dc2626;
    }

    .seat.inactive {
        background: #e5e7eb;
    }

        .seat.inactive .seat-num {
            color: #475569;
        }

.seatmap-rowlabel {
    position: absolute;
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
}

/* legend */
.seatmap-legend {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 999px;
}

.lg-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

    .lg-dot.free {
        background: #1f4aa8;
    }

    .lg-dot.selected {
        background: #16a34a;
    }

    .lg-dot.locked {
        background: #cbd5e1;
    }

    .lg-dot.sold {
        background: #dc2626;
    }
/* ===== Seat Map (HTML layout like old React/MVC) ===== */
.seatmap-wrap {
    width: 100%;
}

.seatmap-plan {
    margin-top: 12px;
}

.seatmap-plan-title {
    font-weight: 900;
    margin: 8px 2px 10px;
    color: #0f172a;
}

.seatmap-scroll {
    overflow: auto;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    padding: 12px;
}

.seatmap-canvas {
    min-width: max-content;
    padding: 10px 8px 16px;
}

.seatmap-screen {
    width: 100%;
    height: 70px;
    border: 1px solid #dbe7ff;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #334155;
    margin-bottom: 14px;
}

/* =========================================================
   ✅ SEAT MAP (ONE TRUE IMPLEMENTATION - React-like Row Layout)
   - No SVG
   - No absolute positioning
   - Works with inline style margin-left you generate in Razor
========================================================= */

/* outer card */
.seatmap-wrap {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    padding: 12px;
}

/* scroll area (important: LTR so scrollbar behaves normally even in RTL pages) */
.seatmap-scroll {
    width: 100%;
    overflow: auto;
    border: 1px solid #eef2ff;
    border-radius: 18px;
    padding: 10px;
    background: #fbfdff;
    direction: ltr;
}

/* canvas */
.seatmap-canvas {
    min-width: max-content; /* allow horizontal growth */
    padding: 10px 8px 16px;
    direction: ltr;
}

/* stage */
.seatmap-screen {
    width: 100%;
    height: 70px;
    border: 1px solid #dbe7ff;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #334155;
    margin-bottom: 14px;
}

/* each row */
.seat-row {
    display: flex;
    align-items: center; /* label + seats aligned */
    gap: 100px;
    border-top: 1px dashed #eef2ff;
}

    .seat-row:first-child {
        border-top: none;
    }

/* row label (LEFT side, under each other) */
.row-label {
    width: 32px;
    flex: 0 0 32px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary2);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-weight: 900;
    font-size: 12px;
}

/* seats container:
   - row-reverse => seats start from RIGHT like your React sample
   - NO gap here because spacing is controlled by:
        DefaultGap (you apply in SeatStyle) + seat.MarginLeft
*/
.row-seats {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 1px;
    padding: 6px 0;
}

    /* the seat button itself (IMPORTANT: not absolute) */
    .row-seats > button {
        position: static !important; /* prevents any older css from making it absolute */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: 1;
        border-radius: 8px;
        border: 1px solid rgba(15,23,42,.25);
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        transform: translateZ(0);
    }

        /* seat number */
        .row-seats > button .seat-num {
            font-size: 10px;
            font-weight: 900;
            color: #fff;
            line-height: 1;
            transform: translateY(1px);
            pointer-events: none;
        }

        /* disabled */
        .row-seats > button:disabled {
            cursor: not-allowed;
            opacity: .65;
        }

/* seat status classes (match your GetSeatClass) */
.seat.free {
    background: #1e3a8a;
    border-color: #0b1f4a;
}

.seat.selected {
    background: #16a34a;
    border-color: #0f7a33;
}

.seat.locked {
    background: #f59e0b;
    border-color: #b45309;
}

.seat.sold {
    background: #ef4444;
    border-color: #991b1b;
}

/* optional hover for selectable */
.row-seats > button.seat.free:hover {
    filter: brightness(.98);
    box-shadow: 0 10px 18px rgba(15,23,42,.08);
}

/* Legend */
.seatmap-legend {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(15,23,42,.05);
}

.lg-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

    .lg-dot.free {
        background: #1e3a8a;
    }

    .lg-dot.selected {
        background: #16a34a;
    }

    .lg-dot.locked {
        background: #f59e0b;
    }

    .lg-dot.sold {
        background: #ef4444;
    }

/* responsive */
@media (max-width: 520px) {
    .row-label {
        width: 46px;
        flex: 0 0 46px;
        height: 32px;
        font-size: 11px;
    }

    .row-seats > button .seat-num {
        font-size: 9px;
    }
}

.seat-free {
    background: #1e3a8a; /* آبی پررنگ مثل نمونه */
    border-color: #0b1f4a;
}

.seat-selected {
    background: #16a34a;
    border-color: #0f7a33;
}

.seat-locked {
    background: #f59e0b;
    border-color: #b45309;
}

.seat-sold {
    background: #ef4444;
    border-color: #991b1b;
}


/* Seat button base */
.seat-btn {
    border-radius: 8px;
    border: 1px solid rgba(15,23,42,.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: transform .12s ease, filter .12s ease;
}

    .seat-btn:active {
        transform: scale(.98);
    }

    .seat-btn:disabled {
        cursor: not-allowed;
        opacity: .6;
    }

.seat-num {
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

/* states */
.seat-btn.free {
    background: #1e3a8a;
}

.seat-btn.selected {
    background: #16a34a;
}

.seat-btn.locked {
    background: #f59e0b;
}

.seat-btn.sold {
    background: #ef4444;
}

.seat-btn.inactive {
    background: #e5e7eb;
}

    .seat-btn.inactive .seat-num {
        color: #475569;
    }

/* Tooltip */
.seat-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    background: rgba(15, 23, 42, .96);
    color: #fff;
    border-radius: 14px;
    padding: 10px 10px 9px;
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
}

    .seat-tooltip::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 7px solid transparent;
        border-top-color: rgba(15, 23, 42, .96);
    }

.seat-btn.free:hover .seat-tooltip,
.seat-btn.selected:hover .seat-tooltip {
    opacity: 1;
    visibility: visible;
}

.tt-title {
    display: block;
    font-weight: 900;
    font-size: 12px;
    margin-bottom: 6px;
}

.tt-line {
    display: block;
    font-size: 11px;
    opacity: .92;
    line-height: 1.6;
}

/* mobile: tooltip off */
@media (max-width: 900px) {
    .seat-tooltip {
        display: none;
    }
}
.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 900;
    color: #334155;
    font-size: 12px;
    white-space: nowrap;
}

.cart-row {
    display: flex;
    gap: 10px;
    overflow: auto;
    padding: 8px 2px 12px;
    border-top: 1px dashed #e9eff8;
    margin-top: 10px;
}

.cart-chip {
    flex: 0 0 auto;
    min-width: 150px;
    border: 1px solid #eef2ff;
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.cart-chip-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cart-chip-seat {
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    white-space: nowrap;
}

.cart-chip-price {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 900;
    color: #16a34a;
    white-space: nowrap;
}

.cart-chip-remove {
    width: 26px;
    height: 26px;
    border-radius: 10px;
    border: 1px solid #ffe4e6;
    background: #fff;
    color: #991b1b;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
}

    .cart-chip-remove:hover {
        background: #fee2e2;
    }
/* ===== Bottom Cart Bar (Pinned) ===== */
.cartbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15,23,42,.16);
    transform: translateY(140%);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    direction: rtl;
}

    .cartbar.show {
        transform: translateY(0);
        opacity: 1;
    }

.cartbar-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
}

.cartbar-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cartbar-title {
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
}

.cartbar-meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

    .cartbar-meta .money {
        color: var(--good);
    }

    .cartbar-meta .sep {
        opacity: .35;
    }

.cartbar-items {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

    .cartbar-items::-webkit-scrollbar {
        height: 6px;
    }

    .cartbar-items::-webkit-scrollbar-thumb {
        background: #e6edf6;
        border-radius: 999px;
    }

.cartbar-chip {
    flex: 0 0 auto;
    min-width: 140px;
    border: 1px solid #eef2ff;
    background: #fbfdff;
    border-radius: 14px;
    padding: 10px 10px 8px;
    position: relative;
}

.cartbar-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 10px;
    border: 1px solid #ffe4e6;
    background: #fff;
    color: #dc2626;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
}

.chip-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-right: 34px;
}

.chip-seat {
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    white-space: nowrap;
}

.chip-price {
    margin-top: 6px;
    font-weight: 900;
    font-size: 12px;
    color: var(--good);
    white-space: nowrap;
}

.cartbar-more {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-width: 52px;
    border-radius: 14px;
    border: 1px dashed #cfe1ff;
    background: #eef6ff;
    font-weight: 900;
    color: #1d4ed8;
}

.cartbar-pay {
    border-radius: 16px;
    padding: 12px 14px;
    width: 100%;
}

/* Spacer so page content doesn't hide behind fixed cartbar */
.cartbar-spacer {
    height: 120px;
}

/* Desktop: می‌تونی ثابتش نکنی یا کوچیکش کنی */
@media (min-width: 900px) {
    .cartbar {
        left: 50%;
        right: auto;
        transform: translate(-50%, 140%);
        width: min(820px, calc(100% - 32px));
        bottom: 18px;
    }

        .cartbar.show {
            transform: translate(-50%, 0);
        }

    .cartbar-inner {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .cartbar-pay {
        width: auto;
        min-width: 180px;
    }
}

