﻿/* wwwroot/css/option-gallery.css — گالری آپشن: کاروسل مرکزی با پس‌زمینه‌ی زنده (تمام‌صفحه، لمسی) */
.og-dialog.mud-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #07080b !important
}

.og-dialog-content.mud-dialog-content {
    padding: 0 !important;
    height: 100%;
    overflow: hidden
}

.og-root {
    --acc: #eb0a1e;
    --bg: #07080b;
    --pan: #14171c;
    --line: #262a31;
    --txt: #f3f4f6;
    --mut: #a3aab6;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    color: var(--txt);
    font-family: 'Vazirmatn',Tahoma,sans-serif;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden
}

    .og-root * {
        box-sizing: border-box
    }

    .og-root button {
        font-family: inherit;
        cursor: pointer;
        border: 0;
        background: none;
        color: inherit;
        -webkit-tap-highlight-color: transparent
    }

    .og-root input {
        font-family: inherit
    }

/* ───── نوار بالا ───── */
.og-top {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    flex: 0 0 auto;
    background: linear-gradient(#000a,#0000)
}

.og-top-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px
}

.og-dot {
    width: 6px;
    height: 22px;
    border-radius: 3px;
    background: var(--acc)
}

.og-count {
    font-size: 13px;
    color: var(--mut);
    background: rgba(255,255,255,.1);
    padding: 2px 10px;
    border-radius: 99px
}

.og-top-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

.og-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 99px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    font-size: 14px
}

    .og-pill:active {
        background: rgba(255,255,255,.22)
    }

.og-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center
}

    .og-close:active {
        background: var(--acc)
    }

.og-center {
    flex: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--mut)
}

/* ───── شبکه ───── */
.og-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 18px 0;
    padding: 0 16px;
    background: var(--pan);
    border: 1px solid var(--line);
    border-radius: 14px;
    flex: 0 0 auto
}

    .og-search input {
        flex: 1;
        background: none;
        border: 0;
        outline: 0;
        color: var(--txt);
        font-size: 16px;
        padding: 14px 0
    }

.og-grid {
    flex: 1;
    overflow: auto;
    padding: 18px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
    align-content: start;
    -webkit-overflow-scrolling: touch
}

.og-nores {
    grid-column: 1/-1;
    text-align: center;
    color: var(--mut);
    padding: 40px 0
}

.og-tile {
    display: flex;
    flex-direction: column;
    text-align: right;
    background: var(--pan);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .15s,border-color .15s
}

    .og-tile:active {
        transform: scale(.97);
        border-color: var(--acc)
    }

.og-tile-img {
    position: relative;
    aspect-ratio: 4/3;
    background: #0b0c0f
}

    .og-tile-img img, .og-tile-img video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block
    }

.og-noimg {
    display: grid;
    place-items: center;
    height: 100%;
    width: 100%;
    color: #444
}

.og-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    display: grid;
    place-items: center;
    pointer-events: none
}

.og-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
    padding: 3px 11px;
    border-radius: 99px;
    font-size: 12px;
    z-index: 2;
    direction: ltr;
    unicode-bidi: isolate
}

.og-tile .og-badge {
    right: auto;
    left: 10px;
    top: 10px
}

.og-tile-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.og-tile-name {
    font-weight: 700;
    font-size: 14.5px;
    line-height: 1.5
}

.og-tile-price {
    color: var(--acc);
    font-weight: 800;
    direction: ltr;
    text-align: right
}

    .og-tile-price small {
        color: var(--mut);
        font-weight: 400
    }

/* ───── کاروسل ───── */
.og-viewer {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden
}

.og-ambient {
    position: absolute;
    inset: -70px;
    z-index: 0;
    animation: og-fade .7s ease;
    pointer-events: none
}

    .og-ambient img, .og-ambient video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(46px) saturate(1.7) brightness(.8);
        transform: scale(1.15)
    }

.og-dim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,rgba(0,0,0,.35) 0%,rgba(0,0,0,.25) 35%,rgba(0,0,0,.78) 72%,#000 100%);
    pointer-events: none
}

@keyframes og-fade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.og-stage {
    position: relative;
    z-index: 3;
    flex: 1 1 auto;
    min-height: 0;
    perspective: 1100px;
    touch-action: pan-y;
    --ch: min(calc(100% - 28px),560px)
}

.og-card {
    position: absolute;
    left: 50%;
    top: 50%;
    height: var(--ch);
    aspect-ratio: 3/4;
    max-width: 78vw;
    border-radius: 28px;
    overflow: hidden;
    background: #0d0f13;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 28px 60px rgba(0,0,0,.6);
    transition: transform .5s cubic-bezier(.22,.9,.28,1),opacity .4s,filter .4s;
    will-change: transform
}

    .og-card.o0 {
        transform: translate(-50%,-50%) scale(1);
        z-index: 5;
        opacity: 1;
        filter: none
    }

    .og-card.o1 {
        transform: translate(-50%,-50%) translateX(-68%) scale(.8) rotateY(24deg);
        z-index: 3;
        opacity: 1;
        filter: brightness(.62) blur(1.5px);
        cursor: pointer
    }

    .og-card.om1 {
        transform: translate(-50%,-50%) translateX(68%) scale(.8) rotateY(-24deg);
        z-index: 3;
        opacity: 1;
        filter: brightness(.62) blur(1.5px);
        cursor: pointer
    }

    .og-card.o2 {
        transform: translate(-50%,-50%) translateX(-112%) scale(.62) rotateY(30deg);
        z-index: 1;
        opacity: 0;
        pointer-events: none
    }

    .og-card.om2 {
        transform: translate(-50%,-50%) translateX(112%) scale(.62) rotateY(-30deg);
        z-index: 1;
        opacity: 0;
        pointer-events: none
    }

.og-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    background: #000
}

.og-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(15,17,21,.6) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14) !important;
    display: grid;
    place-items: center;
    z-index: 9;
    transition: opacity .2s
}

    .og-nav .mud-icon-root {
        font-size: 30px
    }

    .og-nav:active {
        background: var(--acc) !important
    }

    .og-nav[disabled] {
        opacity: .2;
        pointer-events: none
    }

.og-nav-prev {
    right: 14px
}

.og-nav-next {
    left: 14px
}

.og-thumbs {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    justify-content: center;
    z-index: 9;
    padding: 6px 10px;
    border-radius: 99px;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px)
}

.og-thumb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.4) !important;
    padding: 0
}

    .og-thumb.on {
        width: 24px;
        border-radius: 5px;
        background: #fff !important
    }

/* ───── اطلاعات ───── */
.og-info {
    position: relative;
    z-index: 4;
    flex: 0 0 auto;
    text-align: center;
    padding: 6px 20px calc(18px + env(safe-area-inset-bottom,0px));
    max-width: 560px;
    width: 100%;
    margin: 0 auto
}

.og-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px
}

    .og-dots i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(255,255,255,.3);
        transition: all .3s
    }

        .og-dots i.on {
            width: 22px;
            border-radius: 4px;
            background: #fff
        }

.og-counter {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #d6d9df;
    background: rgba(255,255,255,.12);
    padding: 2px 12px;
    border-radius: 99px;
    direction: ltr
}

.og-info h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(0,0,0,.5)
}

.og-sub {
    display: flex;
    gap: 6px 14px;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 4px 0 14px;
    color: #cfd3da;
    font-size: 14px
}

.og-price b {
    color: #fff;
    font-size: 20px;
    direction: ltr;
    display: inline-block
}

.og-price small {
    display: block;
    font-size: 11px;
    color: var(--mut);
    margin-top: 1px
}

.og-actions {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.og-note {
    width: 100%;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    color: var(--txt);
    font-size: 14px;
    padding: 12px 14px;
    outline: 0
}

    .og-note::placeholder {
        color: #aeb4bf
    }

    .og-note:focus {
        border-color: #fff
    }

.og-add {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff !important;
    color: #111 !important;
    padding: 15px 24px;
    border-radius: 99px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0,0,0,.45)
}

    .og-add .mud-icon-root {
        color: var(--acc)
    }

    .og-add:active {
        transform: scale(.97)
    }

/* ───── غرفه / نمایشگر بزرگ ───── */
@media (min-width:900px) {
    .og-stage {
        --ch: min(calc(100% - 28px),640px)
    }

    .og-card {
        max-width: 36vw
    }

    .og-nav {
        width: 72px;
        height: 72px
    }

        .og-nav .mud-icon-root {
            font-size: 38px
        }

    .og-nav-prev {
        right: 5vw
    }

    .og-nav-next {
        left: 5vw
    }

    .og-info {
        max-width: 760px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom,0px))
    }

    .og-actions {
        flex-direction: row;
        align-items: stretch
    }

        .og-actions .og-note {
            flex: 1;
            margin: 0
        }

        .og-actions .og-add {
            width: auto;
            flex: 0 0 auto;
            padding: 14px 34px
        }

    .og-sub {
        margin-bottom: 10px
    }

    .og-info h2 {
        font-size: 26px
    }
}

/* ───── موبایل ───── */
@media (max-width:720px) {
    .og-top {
        padding: 8px 12px
    }

    .og-top-title {
        font-size: 15px;
        gap: 8px
    }

    .og-dot {
        height: 18px
    }

    .og-count {
        display: none
    }

    .og-pill {
        padding: 7px 12px;
        font-size: 13px
    }

    .og-close {
        width: 40px;
        height: 40px
    }

    .og-search {
        margin: 6px 12px 0;
        padding: 0 12px
    }

        .og-search input {
            font-size: 15px;
            padding: 11px 0
        }

    .og-grid {
        padding: 12px;
        gap: 10px;
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .og-tile {
        border-radius: 14px
    }

    .og-tile-body {
        padding: 8px 10px 10px;
        gap: 4px
    }

    .og-tile-name {
        font-size: 13px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden
    }

    .og-tile-price {
        font-size: 12px
    }

    .og-play {
        width: 40px;
        height: 40px
    }

    .og-card {
        border-radius: 24px;
        max-width: 74vw
    }

    .og-nav {
        display: none
    }

    .og-info {
        padding: 2px 16px calc(14px + env(safe-area-inset-bottom,0px))
    }

        .og-info h2 {
            font-size: 18px
        }

    .og-sub {
        margin: 2px 0 10px;
        font-size: 13px
    }

    .og-price b {
        font-size: 18px
    }

    .og-actions {
        gap: 8px
    }

    .og-note {
        padding: 10px 12px
    }

    .og-add {
        padding: 14px 20px;
        font-size: 15px
    }
}

/* گوشی در حالت افقی */
@media (max-height:520px) {
    .og-top {
        padding: 4px 12px
    }

    .og-stage {
        --ch: min(calc(100% - 12px),420px)
    }

    .og-note, .og-sub, .og-dots, .og-counter {
        display: none
    }

    .og-info {
        display: flex;
        align-items: center;
        gap: 12px;
        max-width: none;
        padding: 4px 16px 8px;
        text-align: right
    }

        .og-info h2 {
            flex: 1;
            font-size: 15px
        }

    .og-add {
        width: auto;
        padding: 10px 20px;
        font-size: 14px
    }
}

/* ───── کیوسک ───── */
.kiosk-ovl {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(10,12,16,.72);
    backdrop-filter: blur(6px)
}

.kiosk-bye {
    background: #0e1013;
    color: #fff;
    text-align: center
}

/* ───── کارت بدون عکس (placeholder زیبا) ───── */
.og-g0 {
    background: radial-gradient(120% 80% at 70% 20%,#1f6b7a 0%,#0e2a36 50%,#06090d 100%)
}

.og-g1 {
    background: radial-gradient(120% 80% at 30% 20%,#7a3b1f 0%,#2a140c 55%,#07090c 100%)
}

.og-g2 {
    background: radial-gradient(120% 80% at 60% 25%,#2b3f8f 0%,#10163a 55%,#07090c 100%)
}

.og-g3 {
    background: radial-gradient(120% 80% at 40% 20%,#1f7a54 0%,#0c2a1f 55%,#05090c 100%)
}

.og-g4 {
    background: radial-gradient(120% 80% at 65% 25%,#7a1f4a 0%,#2a0c1a 55%,#07090c 100%)
}

.og-g5 {
    background: radial-gradient(120% 80% at 35% 25%,#6b5a1f 0%,#2a230c 55%,#07090c 100%)
}

.og-ambient.og-g0, .og-ambient.og-g1, .og-ambient.og-g2, .og-ambient.og-g3, .og-ambient.og-g4, .og-ambient.og-g5 {
    filter: saturate(1.3)
}

.og-noimg.ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px;
    text-align: center;
    color: #fff
}

    .og-noimg.ph .mud-icon-root {
        font-size: 64px;
        opacity: .4
    }

    .og-noimg.ph b {
        font-size: 20px;
        line-height: 1.6;
        font-weight: 800;
        text-shadow: 0 2px 10px rgba(0,0,0,.4)
    }

    .og-noimg.ph small {
        font-size: 12px;
        color: rgba(255,255,255,.55)
    }

@media (max-width:720px) {
    .og-noimg.ph b {
        font-size: 17px
    }

    .og-noimg.ph .mud-icon-root {
        font-size: 52px
    }
}

/* ───── صفحه‌ی /Options: تمام‌صفحه روی خود صفحه ───── */
.og-root.og-fullpage {
    position: fixed;
    inset: 0;
    z-index: 1300;
    height: auto
}

.og-book {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--acc) !important;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 99px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(235,10,30,.4)
}

    .og-book:active {
        transform: scale(.96)
    }

@media (max-width:720px) {
    .og-book {
        padding: 8px 14px;
        font-size: 13px
    }
}

/* ───── گرید بزرگ‌تر (استند + گوشی + سیستم) ───── */
.og-grid {
    padding: 22px;
    gap: 20px;
    grid-template-columns: repeat(auto-fill,minmax(340px,1fr))
}

.og-tile {
    border-radius: 22px
}

.og-tile-img {
    aspect-ratio: 16/10
}

.og-tile-body {
    padding: 14px 16px 16px;
    gap: 6px
}

.og-tile-name {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 800
}

.og-tile-price {
    font-size: 16px
}

@media (min-width:1500px) {
    .og-grid {
        grid-template-columns: repeat(auto-fill,minmax(420px,1fr))
    }

    .og-tile-name {
        font-size: 20px
    }
}

@media (max-width:720px) {
    .og-grid {
        padding: 12px;
        gap: 14px;
        grid-template-columns: 1fr
    }

    .og-tile {
        border-radius: 18px
    }

    .og-tile-body {
        padding: 12px 14px 14px
    }

    .og-tile-name {
        font-size: 16px;
        -webkit-line-clamp: 3
    }

    .og-tile-price {
        font-size: 14px
    }
}
