/* Product live try-on page */
.live-tryon-page {
    --live-ink: #12151b;
    --live-muted: #626976;
    --live-paper: #f6f7f6;
    --live-line: #e1e4e5;
    --live-copper: #ff5a36;
    --live-copper-dark: #d6431f;
    --live-copper-soft: #fff0ea;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: var(--live-paper);
    color: var(--live-ink);
    font-family: var(--f-body, "Vazirmatn", Tahoma, sans-serif);
}

.live-tryon-page *,
.live-tryon-page *::before,
.live-tryon-page *::after {
    box-sizing: border-box;
}

.live-tryon-page .live-tryon-intro {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 24px 28px;
    background: radial-gradient(ellipse at 50% 0, #fff 0, var(--live-paper) 68%);
}

.live-tryon-page .live-tryon-header {
    width: min(100%, 1100px);
    min-height: 48px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.live-tryon-page .live-tryon-brand,
.live-tryon-page .live-tryon-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--live-ink);
    text-decoration: none;
    font-weight: 700;
}

.live-tryon-page .live-tryon-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--live-copper);
    color: #fff;
    font-size: 20px;
}

.live-tryon-page .live-tryon-back {
    color: var(--live-muted);
    font-size: 14px;
    transition: color .18s ease;
}

.live-tryon-page .live-tryon-back:hover {
    color: var(--live-copper-dark);
}

.live-tryon-page .live-tryon-back svg {
    width: 18px;
    height: 18px;
}

.live-tryon-page .live-tryon-main {
    width: min(100%, 920px);
    margin: 0 auto;
}

.live-tryon-page .live-tryon-card {
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--live-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 54px rgb(18 21 27 / 7%);
}

.live-tryon-page .live-tryon-heading {
    margin-bottom: 28px;
}

.live-tryon-page .live-tryon-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--live-copper-dark);
    font-size: 13px;
    font-weight: 700;
}

.live-tryon-page .live-tryon-heading-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.live-tryon-page .live-tryon-heading-icon,
.live-tryon-page .live-tryon-info-icon,
.live-tryon-page .live-tryon-camera-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--live-copper-dark);
    background: var(--live-copper-soft);
    border-radius: 14px;
}

.live-tryon-page .live-tryon-heading-icon {
    width: 52px;
    height: 52px;
}

.live-tryon-page .live-tryon-heading-icon svg {
    width: 29px;
    height: 29px;
}

.live-tryon-page .live-tryon-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(21px, 3vw, 28px);
    line-height: 1.55;
}

.live-tryon-page .live-tryon-heading p,
.live-tryon-page .live-tryon-info-card p,
.live-tryon-page .live-tryon-camera-note p,
.live-tryon-page .live-tryon-camera-steps,
.live-tryon-page .live-tryon-start-area > p {
    margin: 0;
    color: var(--live-muted);
    font-size: 14px;
    line-height: 2;
}

.live-tryon-page .live-tryon-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.live-tryon-page .live-tryon-info-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--live-line);
    border-radius: 16px;
    background: #fff;
}

.live-tryon-page .live-tryon-info-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.live-tryon-page .live-tryon-info-icon svg,
.live-tryon-page .live-tryon-camera-icon svg {
    width: 21px;
    height: 21px;
}

.live-tryon-page .live-tryon-info-card h2,
.live-tryon-page .live-tryon-camera-note h2 {
    margin: 0 0 7px;
    color: var(--live-ink);
    font-size: 15px;
    line-height: 1.7;
}

.live-tryon-page .live-tryon-info-card p {
    font-size: 13px;
    line-height: 1.9;
}

.live-tryon-page .live-tryon-camera-note {
    padding: 18px 20px;
    border: 1px solid #f3d3c8;
    border-radius: 16px;
    background: #fffaf8;
}

.live-tryon-page .live-tryon-camera-note-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.live-tryon-page .live-tryon-camera-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.live-tryon-page .live-tryon-camera-note h2 {
    margin: 0;
}

.live-tryon-page .live-tryon-camera-steps {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    padding-right: 20px;
}

.live-tryon-page .live-tryon-camera-steps li::marker {
    color: var(--live-copper);
}

.live-tryon-page .live-tryon-camera-steps strong {
    color: var(--live-ink);
}

.live-tryon-page .live-tryon-start-area {
    display: grid;
    justify-items: center;
    gap: 9px;
    margin-top: 24px;
    text-align: center;
}

.live-tryon-page .start-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 25px;
    border: 0;
    border-radius: 12px;
    background: var(--live-copper);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgb(255 90 54 / 22%);
    transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.live-tryon-page .start-button:hover {
    background: var(--live-copper-dark);
    box-shadow: 0 10px 24px rgb(214 67 31 / 25%);
}

.live-tryon-page .start-button:active {
    transform: translateY(1px);
}

.live-tryon-page .start-button:focus-visible,
.live-tryon-page .live-tryon-back:focus-visible,
.live-tryon-page .live-tryon-brand:focus-visible {
    outline: 3px solid rgb(255 90 54 / 35%);
    outline-offset: 3px;
}

.live-tryon-page .start-button svg {
    width: 21px;
    height: 21px;
}

.live-tryon-page .live-tryon-start-area > p {
    font-size: 12px;
}

.live-tryon-page .live-tryon-footer {
    padding: 16px 8px 0;
    color: #858b94;
    font-size: 12px;
    text-align: center;
}

.live-tryon-page #webcam,
.live-tryon-page #overlay,
.live-tryon-page .status {
    display: none;
}

.live-tryon-page:has(#startButton[style*="display: none"]) {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #000;
}

.live-tryon-page:has(#startButton[style*="display: none"]) .live-tryon-intro {
    display: none;
}

.live-tryon-page:has(#startButton[style*="display: none"]) #webcam,
.live-tryon-page:has(#startButton[style*="display: none"]) #overlay,
.live-tryon-page:has(#startButton[style*="display: none"]) .status {
    display: block;
}

.live-tryon-page #webcam {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: cover;
    transform: scaleX(-1);
    background: #000;
}

.live-tryon-page #overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
}

.live-tryon-page .status {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10;
    max-width: calc(100vw - 24px);
    padding: 8px 11px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 8px;
    background: rgb(0 0 0 / 72%);
    color: #9cffc7;
    direction: rtl;
    font-size: 12px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Controls shown only once the camera stream is live. */
.live-tryon-page .live-product-panel,
.live-tryon-page .live-similar-panel {
    display: none;
}

.live-tryon-page.camera-ready .live-product-panel,
.live-tryon-page.camera-ready .live-similar-panel {
    display: flex;
}

.live-tryon-page .live-product-panel {
    position: fixed;
    z-index: 12;
    top: 58px;
    right: clamp(14px, 3vw, 38px);
    width: min(330px, calc(100vw - 28px));
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 20px;
    background: rgb(255 255 255 / 92%);
    box-shadow: 0 18px 48px rgb(0 0 0 / 22%);
    color: var(--live-ink);
    direction: rtl;
    text-align: right;
    backdrop-filter: blur(18px);
}

.live-tryon-page .live-product-panel-kicker {
    margin-bottom: 7px;
    color: var(--live-copper-dark);
    font-size: 12px;
    font-weight: 800;
}

.live-tryon-page .live-product-panel h2 {
    width: 100%;
    margin: 0;
    font-size: 18px;
    line-height: 1.65;
}

.live-tryon-page .live-product-material {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 16px;
    color: var(--live-muted);
    font-size: 13px;
}

.live-tryon-page .live-product-material > span:first-child {
    color: var(--live-copper);
    font-size: 10px;
}

.live-tryon-page .live-product-price {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 9px;
    margin: 0 0 15px;
}

.live-tryon-page .live-price-current {
    color: var(--live-copper-dark);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.5;
}

.live-tryon-page .live-price-old {
    color: #89909a;
    font-size: 12px;
    text-decoration: line-through;
}

.live-tryon-page .live-product-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 8px;
}

.live-tryon-page .live-product-details,
.live-tryon-page .live-product-buy {
    min-width: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid var(--live-line);
    border-radius: 11px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.live-tryon-page .live-product-details {
    background: #fff;
    color: var(--live-ink);
    transition: border-color .18s ease, background-color .18s ease;
}

.live-tryon-page .live-product-details:hover {
    border-color: #c7ccd1;
    background: #f8f9f9;
}

.live-tryon-page .live-product-buy {
    width: auto;
    background: var(--live-copper);
    color: #fff;
    transition: background-color .18s ease, transform .18s ease, opacity .18s ease;
}

.live-tryon-page .live-product-buy:hover {
    transform: translateY(-1px);
    background: var(--live-copper-dark);
}

.live-tryon-page .live-product-buy:disabled {
    transform: none;
    opacity: .55;
    cursor: not-allowed;
}

.live-tryon-page .live-product-details:focus-visible,
.live-tryon-page .live-product-buy:focus-visible,
.live-tryon-page .live-carousel-arrow:focus-visible,
.live-tryon-page .live-similar-item:focus-visible {
    outline: 3px solid rgb(255 90 54 / 55%);
    outline-offset: 3px;
}

.live-tryon-page .live-product-buy svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.live-tryon-page .live-similar-panel {
    position: fixed;
    z-index: 12;
    right: 50%;
    bottom: 20px;
    width: min(830px, calc(100vw - 48px));
    align-items: center;
    gap: 12px;
    transform: translateX(50%);
    direction: rtl;
}

.live-tryon-page .live-similar-track-wrap {
    min-width: 0;
    flex: 1 1 auto;
    padding: 12px 14px 13px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 20px;
    background: rgb(255 255 255 / 92%);
    box-shadow: 0 16px 42px rgb(0 0 0 / 20%);
    backdrop-filter: blur(18px);
}

.live-tryon-page .live-similar-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 9px;
    color: var(--live-ink);
    font-size: 13px;
    font-weight: 800;
}

.live-tryon-page .live-similar-hint {
    color: var(--live-muted);
    font-size: 11px;
    font-weight: 500;
}

.live-tryon-page .live-similar-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #d6d9dc transparent;
    direction: rtl;
    -webkit-overflow-scrolling: touch;
}

.live-tryon-page .live-similar-item {
    min-width: 128px;
    max-width: 150px;
    flex: 0 0 128px;
    display: grid;
    justify-items: stretch;
    gap: 4px;
    padding: 7px;
    border: 1px solid var(--live-line);
    border-radius: 13px;
    background: #fff;
    color: var(--live-ink);
    font: inherit;
    text-align: right;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.live-tryon-page .live-similar-item:hover {
    transform: translateY(-2px);
    border-color: #f2b09c;
}

.live-tryon-page .live-similar-item.is-active {
    border-color: var(--live-copper);
    box-shadow: 0 0 0 2px rgb(255 90 54 / 13%);
}

.live-tryon-page .live-similar-thumb {
    height: 62px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: #f6f7f6;
}

.live-tryon-page .live-similar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.live-tryon-page .live-similar-title,
.live-tryon-page .live-similar-material {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-tryon-page .live-similar-title {
    font-size: 11px;
    font-weight: 800;
}

.live-tryon-page .live-similar-material {
    color: var(--live-muted);
    font-size: 10px;
}

.live-tryon-page .live-carousel-arrow {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 50%;
    background: #fff;
    color: var(--live-ink);
    cursor: pointer;
    box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
    transition: color .18s ease, background-color .18s ease;
}

.live-tryon-page .live-carousel-arrow:hover {
    background: var(--live-copper);
    color: #fff;
}

.live-tryon-page .live-carousel-arrow svg {
    width: 21px;
    height: 21px;
}

@media (min-width: 761px) {
    .live-tryon-page .live-similar-panel {
        top: 16vh;
        right: auto;
        bottom: 10vh;
        left: clamp(18px, 2.5vw, 42px);
        width: 260px;
        height: auto;
        min-height: 0;
        gap: 7px;
        transform: none;
    }

    .live-tryon-page .live-similar-track-wrap {
        height: 100%;
        max-height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        padding: 13px 11px;
    }

    .live-tryon-page .live-similar-heading {
        flex: 0 0 auto;
        margin: 0 3px 10px;
    }

    .live-tryon-page .live-similar-track {
        height: 100%;
        max-height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        scroll-snap-type: y mandatory;
        scrollbar-width: thin;
    }

    .live-tryon-page .live-similar-item {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .live-tryon-page .live-similar-thumb {
        height: 76px;
    }

    .live-tryon-page .live-carousel-arrow {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        align-self: center;
    }
}

@media (max-width: 760px) {
    .live-tryon-page .live-product-panel {
        top: 52px;
        right: 12px;
        width: min(230px, calc(100vw - 24px));
        padding: 13px;
        border-radius: 15px;
        transform: scale(.85);
        transform-origin: top right;
    }

    .live-tryon-page .live-product-panel h2 {
        font-size: 15px;
        line-height: 1.5;
    }

    .live-tryon-page .live-product-material {
        margin: 4px 0 10px;
        font-size: 12px;
    }

    .live-tryon-page .live-product-price {
        gap: 3px 7px;
        margin-bottom: 10px;
    }

    .live-tryon-page .live-price-current {
        font-size: 15px;
    }

    .live-tryon-page .live-price-old {
        font-size: 10px;
    }

    .live-tryon-page .live-product-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: 5px;
    }

    .live-tryon-page .live-product-details,
    .live-tryon-page .live-product-buy {
        min-height: 42px;
        gap: 4px;
        padding: 6px 5px;
        font-size: 10px;
    }

    .live-tryon-page .live-product-buy svg {
        width: 15px;
        height: 15px;
    }

    .live-tryon-page .live-similar-panel {
        right: 8px;
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100vw - 16px);
        display: none;
        transform: none;
    }

    .live-tryon-page.camera-ready .live-similar-panel {
        display: block;
    }

    .live-tryon-page .live-similar-track-wrap {
        padding: 10px;
        border-radius: 16px;
    }

    .live-tryon-page .live-similar-heading {
        margin-bottom: 7px;
        font-size: 12px;
    }

    .live-tryon-page .live-similar-hint,
    .live-tryon-page .live-carousel-arrow {
        display: none;
    }

    .live-tryon-page .live-similar-track {
        gap: 8px;
        padding-bottom: 2px;
    }

    .live-tryon-page .live-similar-item {
        min-width: 102px;
        flex-basis: 102px;
        gap: 3px;
        padding: 6px;
    }

    .live-tryon-page .live-similar-thumb {
        height: 48px;
    }
}

@media (max-width: 760px) {
    .live-tryon-page .live-tryon-info-grid {
        grid-template-columns: 1fr;
    }

    .live-tryon-page .live-tryon-info-card {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: start;
        column-gap: 12px;
    }

    .live-tryon-page .live-tryon-info-icon {
        margin: 1px 0 0;
    }
}

@media (max-width: 520px) {
    .live-tryon-page .live-tryon-intro {
        padding: 14px 14px 20px;
    }

    .live-tryon-page .live-tryon-header {
        margin-bottom: 15px;
    }

    .live-tryon-page .live-tryon-brand {
        gap: 7px;
        font-size: 13px;
    }

    .live-tryon-page .live-tryon-brand-mark {
        width: 34px;
        height: 34px;
    }

    .live-tryon-page .live-tryon-back {
        gap: 4px;
        font-size: 12px;
    }

    .live-tryon-page .live-tryon-card {
        padding: 20px 16px;
        border-radius: 19px;
    }

    .live-tryon-page .live-tryon-heading-row {
        gap: 11px;
    }

    .live-tryon-page .live-tryon-heading-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .live-tryon-page .live-tryon-heading-icon svg {
        width: 24px;
        height: 24px;
    }

    .live-tryon-page .live-tryon-heading h1 {
        font-size: 19px;
    }

    .live-tryon-page .live-tryon-heading p,
    .live-tryon-page .live-tryon-info-card p,
    .live-tryon-page .live-tryon-camera-note p,
    .live-tryon-page .live-tryon-camera-steps {
        font-size: 13px;
    }

    .live-tryon-page .live-tryon-camera-note {
        padding: 15px 13px;
    }

    .live-tryon-page .live-tryon-camera-note h2 {
        font-size: 14px;
    }

    .live-tryon-page .live-tryon-camera-steps {
        padding-right: 18px;
    }

    .live-tryon-page .start-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .live-tryon-page *,
    .live-tryon-page *::before,
    .live-tryon-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
