/* ============================================
   VIRTUAL TRY-ON PAGE STYLES
   ============================================ */

.tryon-page {
    min-height: 100vh;
    padding: 30px 0 88px;
    background: var(--bg-white);
}

.tryon-container {
    max-width: 1280px;
}

.tryon-topbar {
    min-height: 28px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.back-link:hover {
    color: var(--primary-dark);
}

.tryon-hero {
    max-width: 760px;
    margin: 18px 0 28px;
    text-align: left;
}

.tryon-kicker,
.tryon-subtitle,
.panel-eyebrow,
.selected-item-label {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.3;
    text-transform: uppercase;
}

.tryon-title {
    margin: 6px 0 0;
    color: var(--text-dark);
    font-size: clamp(38px, 5vw, 64px);
    line-height: 0.95;
    letter-spacing: 0.04em;
}

.tryon-hero-rule {
    display: none;
    align-items: center;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px auto 14px;
    color: var(--primary);
}

.tryon-hero-rule span {
    width: min(22vw, 190px);
    height: 1px;
    background: var(--border-color);
}

.tryon-hero-rule svg {
    width: 48px;
    height: 18px;
}

.tryon-intro {
    max-width: 440px;
    margin: 8px 0 0;
    color: var(--text-gray);
    font-size: 15px;
}

.tryon-how-it-works {
    max-width: 980px;
    margin: 0 auto 28px;
    padding: 20px 24px;
    border: 1px solid rgba(143, 178, 158, 0.45);
    border-radius: 16px;
    background: rgba(251, 253, 251, 0.9);
}

.tryon-how-it-works-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.tryon-how-it-works-heading .tryon-kicker {
    margin: 0;
}

.tryon-how-it-works-heading h2 {
    margin: 4px 0 0;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 400;
    line-height: 1;
}

.tryon-how-it-works-heading > p {
    max-width: 240px;
    margin: 0;
    color: var(--text-gray);
    font-size: 12px;
    text-align: right;
}

.tryon-how-it-works-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tryon-how-it-works-list li {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px 14px;
    text-align: center;
}

.tryon-how-it-works-list li:not(:last-child)::after {
    position: absolute;
    top: 92px;
    right: -9px;
    color: var(--primary);
    content: '›';
    font-family: var(--font-heading);
    font-size: 38px;
    line-height: 1;
}

.tryon-how-it-works-icon {
    display: grid;
    width: 112px;
    height: 112px;
    margin-bottom: 8px;
    place-items: center;
    border-radius: 50%;
    background: #f4f7ec;
}

.tryon-how-it-works-icon img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.tryon-how-it-works-number {
    display: block;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 24px;
    line-height: 1;
}

.tryon-how-it-works-list h3 {
    margin: 6px 0 4px;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.tryon-how-it-works-list p {
    max-width: 180px;
    margin: 0;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.45;
}

.tryon-tour-overlay[hidden] {
    display: none;
}

.tryon-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

body.tryon-tour-open {
    overflow: hidden;
}

.tryon-tour-spotlight {
    position: fixed;
    z-index: 1;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.78), 0 0 0 5px rgba(255, 255, 255, 0.16);
    pointer-events: none;
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.tryon-tour-card {
    position: fixed;
    z-index: 2;
    width: min(360px, calc(100vw - 32px));
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    background: #101713;
    color: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.tryon-tour-progress {
    margin: 0 0 8px;
    color: #b8d9c3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.tryon-tour-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
}

.tryon-tour-card > p:not(.tryon-tour-progress) {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

.tryon-tour-understood {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    cursor: pointer;
}

.tryon-tour-understood[hidden] {
    display: none;
}

.tryon-tour-understood input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-light);
}

.tryon-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
}

.tryon-tour-skip {
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tryon-tour-skip:hover,
.tryon-tour-skip:focus-visible {
    color: #fff;
}

.tryon-tour-next {
    min-width: 94px;
}

.tryon-step-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr) 70px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto 54px;
}

.tryon-step-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-white);
    color: var(--text-light);
    text-align: center;
    transition: var(--transition);
}

.tryon-step-indicator.is-current,
.tryon-step-indicator.is-complete {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.tryon-step-indicator.is-current {
    box-shadow: 0 0 0 4px rgba(74, 124, 98, 0.1);
}

.step-number {
    flex: 0 0 auto;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 26px;
    line-height: 1;
}

.step-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.3;
}

.step-status {
    display: none;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--primary);
}

.tryon-step-indicator.is-complete .step-status {
    display: block;
}

.tryon-step-indicator.is-complete .step-status::after {
    content: '';
    display: block;
    width: 7px;
    height: 4px;
    margin: 5px 0 0 4px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: rotate(-45deg);
}

.step-connector {
    display: flex;
    justify-content: center;
    color: var(--primary-light);
}

.step-connector svg {
    width: 56px;
}

.tryon-wizard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.tryon-step-panel {
    min-width: 0;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--border-light);
    background: #fff;
    box-shadow: 0 12px 34px rgba(29, 53, 41, 0.05);
}

/* Try-On Layout */
.product-step {
    grid-column: 1 / -1;
}

.result-step {
    grid-column: 1 / -1;
}

.step-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.panel-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-cream);
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 26px;
    line-height: 1;
}

.step-panel-heading h2 {
    margin-top: 3px;
    color: var(--text-dark);
    font-size: 30px;
    line-height: 1;
}

.panel-copy {
    max-width: 580px;
    margin: 14px 0 26px 62px;
    color: var(--text-gray);
    font-size: 14px;
}

.tryon-selected-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f5faf6, #eef5f0);
    box-shadow: 0 8px 20px rgba(47, 90, 69, 0.08);
}

/* The other half of the outfit, tried on with the selected item */
.tryon-pair {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 12px 18px;
    border: 1px dashed var(--primary-light);
    border-radius: var(--radius-md);
    background: #fff;
}

.tryon-pair[hidden] {
    display: none;
}

.tryon-pair-text {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.tryon-pair-text strong {
    overflow: hidden;
    color: var(--text-dark);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tryon-pair-remove {
    flex-shrink: 0;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.summary-pair-name,
.result-pair-name {
    display: block;
    color: var(--primary-dark);
    font-size: 0.92em;
}

.summary-pair-name[hidden],
.result-pair-name[hidden] {
    display: none;
}

@media (max-width: 575px) {
    .tryon-pair {
        flex-wrap: wrap;
    }

    .tryon-pair-remove {
        width: 100%;
    }
}

.tryon-selected-product-preview {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.selected-product-image {
    display: grid;
    flex: 0 0 64px;
    width: 64px;
    height: 78px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 26px;
}

.selected-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tryon-selected-product-preview > div:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.tryon-selected-product-preview strong {
    overflow: hidden;
    color: var(--text-dark);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tryon-selected-product-preview > div:last-child > span:last-child {
    color: var(--text-gray);
    font-size: 13px;
}

.tryon-selected-product > .btn {
    flex: 0 0 auto;
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.62);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tryon-selected-product > .btn:hover,
.tryon-selected-product > .btn:focus-visible {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.tryon-product-modal[hidden] {
    display: none;
}

.tryon-product-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.tryon-product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 35, 27, 0.58);
}

.tryon-product-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    box-shadow: 0 20px 60px rgba(17, 35, 27, 0.28);
}

.tryon-product-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.tryon-product-modal-header h3 {
    margin-top: 4px;
    color: var(--text-dark);
    font-size: 28px;
}

.tryon-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-dark);
    font-size: 24px;
    line-height: 1;
}

.tryon-product-modal .tryon-product-grid {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
}

body.tryon-picker-open {
    overflow: hidden;
}

.tryon-product-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 14px;
}

.tryon-product-card {
    position: relative;
    display: block;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-dark);
    text-align: left;
    transition: var(--transition);
}

.tryon-product-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.tryon-product-card.is-selected {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 124, 98, 0.13);
}

.product-card-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-cream);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-fallback {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e5efe8;
    color: var(--primary);
}

.product-image-fallback svg,
.product-image-fallback img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.product-selected-mark {
    position: absolute;
    top: 9px;
    right: 9px;
    display: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
}

.product-selected-mark svg {
    width: 100%;
    height: 100%;
    padding: 4px;
}

.tryon-product-card.is-selected .product-selected-mark {
    display: block;
}

.product-card-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 10px 13px;
}

.product-card-details strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-details > span {
    color: var(--text-gray);
    font-size: 12px;
}

.product-step-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 28px;
}

.selected-product-note {
    margin: 0 auto 0 0;
    color: var(--text-gray);
    font-size: 13px;
}

.selected-product-note strong {
    color: var(--text-dark);
}

.tryon-continue,
.tryon-action .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tryon-step-panel.is-locked {
    opacity: 0.62;
}

.upload-options {
    display: flex;
    gap: 0;
    width: 100%;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.upload-tab {
    position: relative;
    flex: 1;
    padding: 12px 16px;
    background: none;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.upload-tab::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
    content: '';
}

.upload-tab.active {
    color: var(--primary-dark);
}

.upload-tab.active::after {
    background: var(--primary);
}

.upload-area,
.camera-area {
    min-height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-cream);
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 22px;
    text-align: center;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(74, 124, 98, 0.08);
}

.tryon-icon-backplate {
    display: inline-grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #e5efe8;
    color: var(--primary-dark);
}

.tryon-icon-backplate svg,
.tryon-icon-backplate img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.upload-area p {
    margin: 17px 0 4px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 700;
}

.upload-area > span:not(.tryon-icon-backplate) {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 12px;
}

.upload-preview {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-cream);
    text-align: center;
}

.upload-preview img {
    width: 100%;
    max-height: 300px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.camera-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.camera-area video,
.camera-captured,
.camera-captured img {
    width: 100%;
    height: 100%;
}

.camera-area video,
.camera-captured img {
    object-fit: cover;
}

.camera-area video {
    transform: scaleX(-1);
}

.camera-placeholder {
    padding: 24px;
    text-align: center;
}

.camera-placeholder p {
    margin-top: 14px;
    color: var(--text-gray);
    font-size: 13px;
}

.camera-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.tryon-action {
    margin-top: 18px;
}

.tryon-action .btn:disabled,
.tryon-continue:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.tryon-error {
    margin-top: 16px;
    padding: 12px 15px;
    border: 1px solid #e6b8b8;
    border-radius: var(--radius-sm);
    background: #fff3f3;
    color: #9b3434;
    font-size: 13px;
}

.result-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1.2fr);
    gap: 34px;
    align-items: start;
}

.preview-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    max-height: 480px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-cream);
}

.preview-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--primary-light);
}

.preview-placeholder svg,
.preview-placeholder img {
    width: 40%;
    max-width: 120px;
    object-fit: contain;
}

.result-empty,
.preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(242, 247, 243, 0.82);
    text-align: center;
}

.result-empty p,
.preview-loading p {
    margin-top: 13px;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 600;
}

.preview-loading {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.tryon-counter {
    margin-top: 12px;
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
    color: var(--text-gray);
    font-size: 12px;
    text-align: center;
}

.result-details {
    min-width: 0;
}

.selected-item-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px;
    border-left: 3px solid var(--primary);
    background: var(--bg-cream);
}

.selected-item-card strong {
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
}

.selected-item-card > span:last-child {
    color: var(--text-gray);
    font-size: 13px;
}

.recent-tryons {
    margin-top: 28px;
}

.recent-tryons h3 {
    margin-bottom: 13px;
    color: var(--text-dark);
    font-size: 18px;
}

.recent-tryons-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.recent-tryon-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 92px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
}

.recent-tryon-thumb:hover,
.recent-tryon-thumb.is-active {
    border-color: var(--primary);
}

.recent-tryon-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-stage {
    isolation: isolate;
}

.compare-stage .compare-image {
    display: block;
    transition: opacity 0.2s ease;
}

.compare-focus-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    max-width: calc(100% - 64px);
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(17, 35, 27, 0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.compare-expand-btn,
.compare-pip-expand {
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(17, 35, 27, 0.18);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.compare-expand-btn img,
.compare-pip-expand img {
    filter: none;
}

.compare-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 38px;
    height: 38px;
}

.compare-expand-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.preview-zoom-controls {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(17, 35, 27, 0.78);
    box-shadow: 0 7px 18px rgba(17, 35, 27, 0.22);
    backdrop-filter: blur(6px);
}

.preview-zoom-controls[hidden] {
    display: none;
}

.preview-zoom-btn {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(17, 35, 27, 0.18);
    cursor: pointer;
}

.preview-zoom-btn img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.preview-zoom-btn:hover,
.preview-zoom-btn:focus-visible {
    border-color: #fff;
    background: var(--primary);
    outline: none;
}

.preview-zoom-btn:hover img,
.preview-zoom-btn:focus-visible img {
    filter: brightness(0) invert(1);
}

.compare-expand-btn:hover,
.compare-expand-btn:focus-visible,
.compare-pip-expand:hover,
.compare-pip-expand:focus-visible {
    border-color: #fff;
    background: var(--primary);
    transform: scale(1.06);
}

.compare-expand-btn:hover img,
.compare-expand-btn:focus-visible img,
.compare-pip-expand:hover img,
.compare-pip-expand:focus-visible img {
    filter: brightness(0) invert(1);
}

.compare-pip {
    position: absolute;
    right: 14px;
    bottom: 68px;
    left: auto;
    z-index: 5;
    width: 98px;
    height: 126px;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
    box-shadow: 0 7px 18px rgba(17, 35, 27, 0.26);
    transition: var(--transition);
}

.compare-pip:hover,
.compare-pip:focus-within {
    transform: translateY(-3px);
}

.compare-pip-swap {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--bg-cream);
    color: inherit;
    cursor: pointer;
}

.compare-pip-swap .compare-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-pip-label {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 6px 4px 5px;
    overflow: hidden;
    background: rgba(17, 35, 27, 0.78);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.compare-pip-expand {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    width: 24px;
    height: 24px;
}

.compare-pip-expand img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.compare-toolbar {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.compare-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: var(--transition);
}

.compare-mode-btn svg {
    width: 17px;
    height: 17px;
}

.compare-mode-btn:hover,
.compare-mode-btn:focus-visible,
.compare-mode-btn[aria-pressed="true"] {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.compare-slider-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    touch-action: none;
}

.compare-slider-clip {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--slider-pos, 50%);
    overflow: hidden;
}

.compare-slider-clip .compare-image {
    width: var(--compare-stage-width, 100%);
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.compare-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--slider-pos, 50%);
    z-index: 2;
    width: 42px;
    transform: translateX(-50%);
    cursor: ew-resize;
}

.compare-slider-handle::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    box-shadow: 0 0 5px rgba(17, 35, 27, 0.54);
    content: '';
    transform: translateX(-50%);
}

.compare-slider-handle > span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 34px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 2px 9px rgba(17, 35, 27, 0.35);
    transform: translate(-50%, -50%);
}

.compare-slider-handle > span::before,
.compare-slider-handle > span::after {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid #fff;
    border-left: 1.5px solid #fff;
    content: '';
}

.compare-slider-handle > span::before {
    left: 8px;
    transform: translateY(-50%) rotate(-45deg);
}

.compare-slider-handle > span::after {
    right: 8px;
    transform: translateY(-50%) rotate(135deg);
}

.compare-slider-tag {
    position: absolute;
    top: 12px;
    z-index: 1;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(17, 35, 27, 0.76);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.compare-slider-tag-left {
    left: 12px;
}

.compare-slider-tag-right {
    right: 12px;
}

.tryon-lightbox[hidden] {
    display: none;
}

.tryon-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 24px;
}

.tryon-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 35, 27, 0.78);
}

.tryon-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    box-shadow: 0 24px 70px rgba(17, 35, 27, 0.4);
}

.tryon-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 0 3px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    background: rgba(17, 35, 27, 0.76);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    transition: var(--transition);
}

.tryon-lightbox-close:hover,
.tryon-lightbox-close:focus-visible {
    background: var(--primary);
}

.tryon-lightbox-image-wrap {
    display: flex;
    min-height: 260px;
    max-height: calc(100vh - 170px);
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
}

.tryon-lightbox-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
}

.tryon-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    background: #fff;
}

.tryon-lightbox-caption {
    margin: 0;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 700;
}

.tryon-lightbox-switch {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.lightbox-switch-btn {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lightbox-switch-btn:hover,
.lightbox-switch-btn:focus-visible,
.lightbox-switch-btn.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

body.tryon-lightbox-open {
    overflow: hidden;
}

.tryon-page {
    padding-top: 28px;
    background: #f7faf7;
}

.tryon-container {
    max-width: 1180px;
}

.tryon-hero {
    max-width: 900px;
    margin: 20px auto 28px;
    text-align: center;
}

.tryon-intro {
    max-width: 520px;
    margin-right: auto;
    margin-left: auto;
}

.tryon-step-rail {
    position: sticky;
    top: calc(120px + var(--cms-toolbar-offset, 0px) + 12px);
    z-index: 10;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr);
    max-width: 980px;
    margin-right: auto;
    margin-left: auto;
    padding: 10px;
    border: 1px solid rgba(143, 178, 158, 0.45);
    border-radius: 16px;
    background: rgba(251, 253, 251, 0.92);
    box-shadow: 0 8px 22px rgba(29, 53, 41, 0.08);
    backdrop-filter: blur(12px);
}

.tryon-step-indicator {
    appearance: none;
    cursor: pointer;
}

.tryon-step-indicator:disabled {
    cursor: not-allowed;
}

.tryon-step-indicator.is-locked {
    opacity: 0.52;
}

.tryon-step-indicator.is-error {
    border-color: #c86464;
    color: #9b3434;
    box-shadow: 0 0 0 3px rgba(200, 100, 100, 0.1);
}

.tryon-step-indicator.is-error .step-number {
    color: #b64848;
}

.tryon-wizard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1180px;
    margin: 0 auto;
}

.tryon-step-panel {
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(143, 178, 158, 0.5);
    border-radius: 20px;
    box-shadow: 0 8px 26px rgba(29, 53, 41, 0.045);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.tryon-step-panel.is-active {
    border-color: rgba(74, 124, 98, 0.72);
    box-shadow: 0 18px 42px rgba(29, 53, 41, 0.11);
}

.tryon-step-panel.is-collapsed {
    border-color: rgba(143, 178, 158, 0.4);
    box-shadow: none;
}

.tryon-step-panel.is-disabled {
    opacity: 0.55;
}

.tryon-step-editor {
    padding: clamp(24px, 4vw, 42px);
}

.tryon-step-panel.is-collapsed .tryon-step-editor,
.tryon-step-panel:not(.is-active) .tryon-step-editor[hidden] {
    display: none !important;
}

.tryon-step-summary {
    display: grid;
    grid-template-columns: 24px 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 13px 18px;
    background: #fff;
}

.tryon-step-summary[hidden] {
    display: none;
}

.summary-check {
    display: inline-grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.summary-number {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 27px;
    line-height: 1;
}

.summary-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.summary-photo-thumb {
    display: block;
    width: 34px;
    height: 42px;
    margin-bottom: 3px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--bg-cream);
}

.summary-photo-thumb[hidden] {
    display: none;
}

.summary-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-kicker {
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.summary-content strong {
    overflow: hidden;
    color: var(--text-dark);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-content > span:last-child {
    overflow: hidden;
    color: var(--text-gray);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-edit {
    min-width: 58px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-edit:hover,
.summary-edit:focus-visible {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.tryon-step-panel.is-locked .tryon-step-editor {
    padding-top: 20px;
    padding-bottom: 20px;
}

.tryon-step-panel.is-locked .tryon-step-editor .result-layout,
.tryon-step-panel.is-locked .tryon-step-editor .result-actions,
.tryon-step-panel.is-locked .tryon-step-editor .recent-tryons,
.tryon-step-panel.is-locked .tryon-step-editor .compare-toolbar,
.tryon-step-panel.is-locked .tryon-step-editor .tryon-counter {
    display: none;
}

.tryon-step-panel.is-locked .tryon-step-editor .step-panel-heading {
    align-items: center;
}

.result-locked-placeholder {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: #fff;
}

.tryon-step-panel.is-locked .result-locked-placeholder {
    display: flex;
}

.result-placeholder-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--bg-cream);
    color: var(--primary-light);
}

.result-placeholder-icon svg,
.result-placeholder-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.result-locked-placeholder strong,
.result-locked-placeholder small {
    display: block;
}

.result-locked-placeholder strong {
    color: var(--text-dark);
    font-size: 12px;
}

.result-locked-placeholder small {
    margin-top: 3px;
    color: var(--text-light);
    font-size: 11px;
}

.tryon-step-panel.is-locked .tryon-step-editor .panel-copy {
    margin-bottom: 0;
}

.step-live-status {
    display: inline-flex;
    margin-top: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f3eb;
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.step-live-status[hidden] {
    display: none;
}

.product-step .step-panel-heading,
.photo-step .step-panel-heading,
.result-step .step-panel-heading {
    margin-bottom: 0;
}

.tryon-selected-product {
    margin-top: 24px;
    border-radius: 14px;
}

.selected-product-meta,
.result-product-meta {
    color: var(--text-light);
    font-size: 11px;
}

.product-card-details small {
    overflow: hidden;
    color: var(--text-light);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview-image-wrap {
    max-width: 420px;
    margin: 0 auto;
}

.upload-preview-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
}

.btn-ghost {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-gray);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    border-color: var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
}

.photo-quality {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin: 0 auto 16px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
}

.photo-quality span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.photo-quality b {
    color: var(--primary);
    font-size: 14px;
}

.generation-loader {
    display: flex;
    max-width: 460px;
    margin: 18px auto 0;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: linear-gradient(110deg, #f2f7f3 35%, #fbfdfb 50%, #f2f7f3 65%);
    background-size: 220% 100%;
    animation: tryon-shimmer 1.8s ease-in-out infinite;
    text-align: center;
}

.generation-loader[hidden] {
    display: none;
}

.generation-loader-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 50%;
    background: #e4f0e7;
    color: var(--primary);
    animation: tryon-loader-pulse 1.4s ease-in-out infinite;
}

.generation-loader-icon svg,
.generation-loader-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.generation-loader strong {
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.generation-loader p {
    margin: 4px 0 12px;
    color: var(--text-gray);
    font-size: 12px;
}

.generation-progress {
    display: block;
    width: min(100%, 300px);
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce9df;
}

.generation-progress i {
    display: block;
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    animation: tryon-progress 1.8s ease-in-out infinite;
}

@keyframes tryon-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes tryon-loader-pulse {
    50% { transform: scale(1.08) rotate(8deg); }
}

@keyframes tryon-progress {
    0% { transform: translateX(-130%); }
    100% { transform: translateX(310%); }
}

.result-layout {
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.8fr);
    gap: 32px;
}

.preview-main {
    min-height: 300px;
    max-height: 560px;
    aspect-ratio: 1 / 1;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.selected-item-card {
    padding: 18px;
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--primary);
    border-radius: 12px;
}

.selected-item-card strong {
    font-size: 27px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 18px;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: var(--bg-white);
}

.result-actions[hidden] {
    display: none;
}

.result-fit-note {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.result-fit-note span {
    display: inline-grid;
    width: 19px;
    height: 19px;
    margin-right: 5px;
    place-items: center;
    border-radius: 50%;
    background: #e4f0e7;
    color: var(--primary);
}

.result-primary-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.result-primary-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
}

.result-share-block {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 3px;
    border-top: 1px solid var(--border-light);
}

.result-action-label {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 800;
}

.result-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.share-action {
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--text-gray);
    font-size: 10px;
    font-weight: 700;
}

.share-action:hover,
.share-action:focus-visible {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.result-wishlist-form {
    margin: 0;
}

.wishlist-action {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    color: var(--text-gray);
    text-align: left;
}

.wishlist-action > span:first-child {
    color: var(--primary);
    font-size: 23px;
    line-height: 1;
}

.wishlist-action [data-wishlist-label] {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    line-height: 1.25;
}

.wishlist-action strong {
    color: var(--primary-dark);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wishlist-action.active {
    border-color: var(--primary);
    background: #eef6f0;
}

.result-stale-notice {
    padding: 11px 13px;
    border: 1px solid #e4c98c;
    border-radius: 9px;
    background: #fff9e9;
    color: #795d22;
    font-size: 12px;
    line-height: 1.45;
}

.result-stale-notice[hidden] {
    display: none;
}

.tryon-lightbox-dialog {
    width: min(980px, 100%);
}

.tryon-lightbox-footer {
    align-items: flex-start;
    flex-wrap: wrap;
}

.tryon-lightbox-tools {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lightbox-tool-btn,
.lightbox-zoom-value {
    display: inline-grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
}

.lightbox-tool-btn img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.lightbox-tool-btn:hover,
.lightbox-tool-btn:focus-visible {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.tryon-lightbox-switch {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tryon-empty-state {
    padding: 30px;
    border: 1px dashed var(--border-color);
    color: var(--text-gray);
    text-align: center;
}

.tryon-page [hidden] {
    display: none !important;
}

.tryon-page :focus-visible {
    outline: 3px solid rgba(74, 124, 98, 0.55);
    outline-offset: 3px;
}

@media (max-width: 991px) {
    .tryon-topbar {
        display: none;
    }
}

@media (max-width: 1100px) {
    .tryon-product-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
}

@media (max-width: 820px) {
    .tryon-page {
        padding-top: 22px;
    }

    .tryon-how-it-works {
        margin-bottom: 22px;
        padding: 17px 14px;
    }

    .tryon-how-it-works-heading {
        display: block;
        margin-bottom: 14px;
    }

    .tryon-how-it-works-heading > p {
        max-width: none;
        margin-top: 8px;
        text-align: left;
    }

    .tryon-how-it-works-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tryon-how-it-works-list li {
        padding: 11px;
    }

    .tryon-step-rail {
        top: calc(var(--cms-toolbar-offset, 0px) + var(--mobile-header-height, 64px) + var(--mobile-menu-strip-height, 40px) + var(--mobile-page-header-height, 52px) + 8px);
        grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
        gap: 4px;
        margin-bottom: 28px;
        padding: 6px;
        border-radius: 14px;
    }

    .tryon-step-indicator {
        min-height: 58px;
        flex-direction: column;
        gap: 3px;
        padding: 7px 4px;
        border-radius: 11px;
    }

    .step-number {
        font-size: 22px;
    }

    .step-label {
        font-size: 8px;
        letter-spacing: 0.06em;
    }

    .step-status {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 14px;
        height: 14px;
    }

    .tryon-step-indicator.is-complete .step-status::after {
        width: 6px;
        height: 3px;
        margin: 4px 0 0 3px;
    }

    .step-connector {
        height: auto;
        transform: none;
    }

    .step-connector svg {
        width: 24px;
    }

    .tryon-wizard {
        grid-template-columns: 1fr;
    }

    .product-step,
    .result-step {
        grid-column: auto;
    }

    .result-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .tryon-page {
        padding-bottom: 52px;
    }

    .tryon-title {
        font-size: 64px;
    }

    .tryon-hero {
        margin: 24px auto 32px;
    }

    .tryon-hero-rule span {
        width: 18vw;
    }

    .tryon-step-panel {
        padding: 0;
    }

    .tryon-step-editor {
        padding: 22px 17px;
    }

    .tryon-step-summary {
        grid-template-columns: 22px 28px minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 68px;
        padding: 11px 12px;
    }

    .summary-number {
        font-size: 23px;
    }

    .summary-content strong {
        font-size: 13px;
    }

    .summary-edit {
        min-width: 50px;
        padding: 7px 8px;
        font-size: 9px;
    }

    .step-panel-heading h2 {
        font-size: 26px;
    }

    .panel-copy {
        margin-left: 0;
    }

    .tryon-selected-product {
        align-items: stretch;
        flex-direction: column;
    }

    .tryon-selected-product .btn {
        width: 100%;
    }

    .tryon-product-modal {
        padding: 12px;
    }

    .tryon-product-modal-dialog {
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .tryon-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-step-action {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .selected-product-note {
        margin: 0;
    }

    .tryon-continue {
        width: 100%;
    }

    .tryon-action {
        position: sticky;
        bottom: calc(var(--mobile-tabbar-height, 72px) + 8px);
        z-index: 8;
        padding-top: 8px;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-white) 18%);
    }

    .result-layout {
        grid-template-columns: 1fr;
    }

    .preview-main {
        width: 100%;
        min-height: min(460px, 118vw);
        max-width: 360px;
        aspect-ratio: 3 / 4;
        margin: 0 auto;
    }

    .result-primary-actions {
        grid-template-columns: 1fr 1fr;
    }

    .compare-pip {
        right: 10px;
        bottom: 64px;
        left: auto;
        width: 82px;
        height: 106px;
    }

    .compare-pip-label {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 7px;
    }

    .compare-expand-btn {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }

    .tryon-lightbox {
        padding: 12px;
    }

    .tryon-lightbox-dialog {
        max-height: calc(100vh - 24px);
    }

    .tryon-lightbox-image-wrap {
        min-height: 220px;
        max-height: calc(100vh - 150px);
    }

    .tryon-lightbox-image-wrap img {
        max-height: calc(100vh - 150px);
    }

    .tryon-lightbox-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .tryon-lightbox-switch {
        width: 100%;
    }

    .lightbox-switch-btn {
        flex: 1;
    }

    .selected-item-card strong {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tryon-page *,
    .tryon-page *::before,
    .tryon-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
