.at-qo-overlay {
    position: fixed;
    inset: 0;
    z-index: 12100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(17, 17, 19, 0.52);
}

.at-qo-overlay.is-open {
    display: flex;
}

.at-qo-overlay[hidden] {
    display: none !important;
}

body.at-qo-lock {
    overflow: hidden;
}

.at-qo-sheet {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    width: min(1080px, calc(100vw - 28px));
    height: min(720px, calc(100vh - 40px));
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(17, 17, 17, 0.22);
}

.at-qo-rail {
    background: linear-gradient(180deg, #c4161d 0%, #8e1016 100%);
    color: #fff;
    padding: 28px 22px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.at-qo-rail__kicker {
    margin: 0 0 22px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.82;
}

.at-qo-rail__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
}

.at-qo-rail__foot {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    gap: 10px;
}

.at-qo-rail__reset,
.at-qo-rail__login,
.at-qo-rail__register,
.at-qo-rail__account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.42);
    color: #fff;
    background: transparent;
    width: 100%;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.at-qo-rail__reset:hover,
.at-qo-rail__register:hover,
.at-qo-rail__account:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.at-qo-rail__auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.at-qo-rail__login {
    background: #fff;
    border-color: #fff;
    color: #c4161d;
}

.at-qo-rail__login:hover {
    background: #fff4f4;
    color: #8e1016;
}

.at-qo-rail__item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    opacity: 0.58;
}

.at-qo-rail__item.is-done,
.at-qo-rail__item.is-current {
    opacity: 1;
}

.at-qo-rail__item.is-current {
    cursor: default;
}

.at-qo-rail__item.is-done {
    cursor: pointer;
}

.at-qo-rail__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 800;
}

.at-qo-rail__item.is-current .at-qo-rail__dot,
.at-qo-rail__item.is-done .at-qo-rail__dot {
    background: #fff;
    color: #c4161d;
    border-color: #fff;
}

.at-qo-rail__item strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.at-qo-rail__item em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
}

.at-qo-main {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.at-qo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px 12px;
    background: #fff;
    border-bottom: 1px solid #ececec;
}

.at-qo-head__step {
    margin: 0 0 4px;
    color: #8a8a8f;
    font-size: 12px;
    font-weight: 700;
}

.at-qo-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111;
}

.at-qo-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f3f3f5;
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.at-qo-close svg {
    width: 16px;
    height: 16px;
}

.at-qo-mobile-steps {
    display: none;
    gap: 8px;
    padding: 10px 16px 0;
}

.at-qo-mobile-steps span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: #eee;
    color: #666;
}

.at-qo-mobile-steps span.is-current,
.at-qo-mobile-steps span.is-done {
    background: var(--app-accent, #e41f27);
    color: #fff;
}

.at-qo-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 18px 24px 12px;
}

.at-qo-pane[hidden] {
    display: none !important;
}

.at-qo-search input,
.at-qo-form input,
.at-qo-form select,
.at-qo-form textarea {
    width: 100%;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}

.at-qo-search--icon {
    position: relative;
}

.at-qo-search--icon input {
    padding-left: 42px;
    padding-right: 40px;
}

.at-qo-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #8a8a8f;
    pointer-events: none;
}

.at-qo-search__icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.at-qo-search__clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.at-qo-search__clear svg {
    width: 14px;
    height: 14px;
}

.at-qo-toolbar {
    position: sticky;
    top: -18px;
    z-index: 3;
    background: #fafafa;
    padding: 0 0 12px;
    margin: 0 0 2px;
}

.at-qo-toolbar__meta {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: #8a8a8f;
}

.at-qo-context {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
}

.at-qo-search {
    margin-bottom: 14px;
}

.at-qo-brands {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
}

.at-qo-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 108px;
    padding: 12px 10px;
    border: 1px solid #eceff3;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: center;
}

.at-qo-brand.is-selected {
    border-color: var(--app-accent, #e41f27);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent, #e41f27) 18%, transparent);
}

.at-qo-brand img {
    width: 92px;
    height: 40px;
    object-fit: contain;
}

.at-qo-brand span {
    font-size: 12px;
    font-weight: 700;
    color: #111;
}

.at-qo-models {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.at-qo-model {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-height: 92px;
    padding: 14px 16px;
    border: 1px solid #eceff3;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.at-qo-model.is-selected {
    border-color: var(--app-accent, #e41f27);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent, #e41f27) 18%, transparent);
}

.at-qo-model strong {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.02em;
}

.at-qo-model span {
    font-size: 12px;
    font-weight: 600;
    color: #8a8a8f;
    line-height: 1.35;
}

.at-qo-chip {
    flex: 0 0 auto;
    border: 1px solid #e4e4e7;
    background: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #333;
}

.at-qo-chip.is-selected {
    background: var(--app-accent, #e41f27);
    border-color: var(--app-accent, #e41f27);
    color: #fff;
}

.at-qo-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.at-qo-product-group {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8f;
}

.at-qo-product-group:first-child {
    margin-top: 0;
}

.at-qo-nudge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 12px;
    padding: 12px 14px;
    background: #fff8f8;
    border: 1px solid #f3d0d2;
    border-radius: 14px;
    color: #3f3f46;
    font-size: 13px;
    line-height: 1.45;
}

.at-qo-nudge[hidden] {
    display: none;
}

.at-qo-nudge p {
    margin: 0;
    flex: 1 1 180px;
}

.at-qo-nudge__go {
    border: 0;
    background: var(--app-accent, #e41f27);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

.at-qo-upsell {
    margin: 0 0 12px;
    padding: 14px;
    background: #fff8f8;
    border: 1px solid #f3d0d2;
    border-radius: 16px;
}

.at-qo-upsell[hidden] {
    display: none;
}

.at-qo-upsell__title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.at-qo-upsell__copy {
    margin: 4px 0 12px;
    font-size: 13px;
    color: #52525b;
}

.at-qo-upsell__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.at-qo-upsell__card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 8px;
}

.at-qo-upsell__card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #f6f6f8;
    border-radius: 8px;
}

.at-qo-upsell__card h4 {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.3;
}

.at-qo-upsell__card p {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
}

.at-qo-upsell__add {
    border: 0;
    background: var(--app-accent, #e41f27);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}

.at-qo-product {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.at-qo-product__media {
    display: block;
    background: #f6f6f8;
    cursor: pointer;
}

.at-qo-product img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #f6f6f8;
}

.at-qo-product__name {
    color: inherit;
    text-decoration: none;
}

.at-qo-product__name:hover {
    color: var(--app-accent, #e41f27);
}

.at-qo-product__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.at-qo-product__model {
    font-size: 11px;
    font-weight: 700;
    color: var(--app-accent, #e41f27);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.at-qo-product h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
}

.at-qo-product__price {
    font-size: 15px;
    font-weight: 800;
}

.at-qo-product__price s {
    margin-left: 6px;
    color: #999;
    font-weight: 600;
    font-size: 12px;
}

.at-qo-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0;
}

.at-qo-swatch {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background-color: #d4d4d8;
    cursor: pointer;
    box-shadow: inset 0 0 0 2px #fff;
}

.at-qo-swatch.is-selected {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--app-accent, #e41f27);
    border-color: transparent;
}

.at-qo-color-name {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #666;
}

.at-qo-add {
    margin-top: auto;
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    background: var(--app-accent, #e41f27);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.at-qo-add.is-in {
    background: #111;
}

.at-qo-more {
    display: block;
    margin: 16px auto 0;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
}

.at-qo-cart {
    display: grid;
    gap: 10px;
}

.at-qo-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 10px;
}

.at-qo-line img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #f6f6f8;
    border-radius: 10px;
}

.at-qo-line h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.at-qo-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.at-qo-qty button {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    font-weight: 800;
}

.at-qo-line__sum {
    font-weight: 800;
    white-space: nowrap;
}

.at-qo-remove {
    display: block;
    margin-top: 6px;
    border: 0;
    background: none;
    color: #c4161d;
    font-size: 12px;
    font-weight: 700;
    padding: 0;
}

.at-qo-totals {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #ececec;
}

.at-qo-totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    margin: 6px 0;
}

.at-qo-totals .is-pay {
    font-size: 18px;
    font-weight: 800;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.at-qo-addresses {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.at-qo-address {
    text-align: left;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 12px 14px;
}

.at-qo-address.is-selected {
    border-color: var(--app-accent, #e41f27);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent, #e41f27) 16%, transparent);
}

.at-qo-address strong {
    display: block;
    margin-bottom: 4px;
}

.at-qo-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.at-qo-form label,
.at-qo-types label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #444;
}

.at-qo-form .is-full {
    grid-column: 1 / -1;
}

.at-qo-types {
    display: flex;
    gap: 16px;
    margin-top: 14px;
}

.at-qo-types label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.at-qo-form__error {
    margin: 10px 0 0;
    color: #c4161d;
    font-size: 13px;
    font-weight: 700;
}

.at-qo-pay-summary,
.at-qo-pay-opt {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 14px 16px;
}

.at-qo-pay-methods {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.at-qo-pay-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.at-qo-pay-opt.is-selected {
    border-color: var(--app-accent, #e41f27);
}

.at-qo-empty,
.at-qo-loading {
    padding: 32px 12px;
    text-align: center;
    color: #8a8a8f;
}

.at-qo-skel-brand,
.at-qo-skel-card,
.at-qo-skel-chip {
    position: relative;
    overflow: hidden;
}

.at-qo-shimmer {
    display: block;
    background: linear-gradient(90deg, #ececec 0%, #f6f6f6 45%, #ececec 90%);
    background-size: 220% 100%;
    animation: at-qo-shimmer 1.2s ease-in-out infinite;
}

.at-qo-skel-brand {
    min-height: 108px;
    border: 1px solid #eceff3;
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 10px;
}

.at-qo-skel-brand .at-qo-shimmer {
    width: 72px;
    height: 36px;
    border-radius: 8px;
}

.at-qo-skel-brand .at-qo-shimmer.is-line {
    width: 64%;
    height: 10px;
}

.at-qo-skel-chip {
    flex: 0 0 auto;
    width: 88px;
    height: 32px;
    border-radius: 999px;
    background: #fff;
}

.at-qo-skel-chip .at-qo-shimmer {
    width: 100%;
    height: 100%;
    border-radius: 999px;
}

.at-qo-skel-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    overflow: hidden;
}

.at-qo-skel-card__img {
    height: 140px;
    background: #f6f6f8;
}

.at-qo-skel-card__img .at-qo-shimmer {
    width: 100%;
    height: 100%;
}

.at-qo-skel-card__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.at-qo-skel-card__body .at-qo-shimmer {
    height: 10px;
    border-radius: 999px;
}

.at-qo-skel-card__body .is-sm { width: 38%; }
.at-qo-skel-card__body .is-title { width: 88%; height: 14px; }
.at-qo-skel-card__body .is-price { width: 46%; }
.at-qo-skel-card__body .is-btn {
    width: 100%;
    height: 34px;
    border-radius: 10px;
    margin-top: 4px;
}

.at-qo-skel-swatches {
    display: flex;
    gap: 8px;
}

.at-qo-skel-swatches .at-qo-shimmer,
.at-qo-skel-swatches i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

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

.at-qo-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px 16px;
    background: #fff;
    border-top: 1px solid #ececec;
    flex: 0 0 auto;
}

.at-qo-foot__total {
    margin: 0 auto 0 0;
    font-weight: 800;
}

.at-qo-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    border: 1.5px solid transparent;
}

.at-qo-btn--ghost {
    margin-right: auto;
    background: #fff;
    border-color: #ddd;
    color: #111;
}

.at-qo-btn--primary {
    margin-left: auto;
    flex: 0 0 auto;
    background: var(--app-accent, #e41f27);
    border-color: var(--app-accent, #e41f27);
    color: #fff;
}

.at-qo-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media only screen and (max-width: 991px) {
    .at-qo-overlay {
        padding: 0;
        align-items: stretch;
    }

    .at-qo-sheet {
        grid-template-columns: 1fr;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .at-qo-rail {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
        overflow: visible;
    }

    .at-qo-rail__kicker,
    .at-qo-rail__list {
        display: none;
    }

    .at-qo-rail__foot {
        width: 100%;
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        grid-template-columns: minmax(0, auto) minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .at-qo-rail__reset {
        width: auto;
        min-width: 118px;
        padding: 0 12px;
    }

    .at-qo-rail__auth,
    .at-qo-rail__account {
        justify-self: end;
    }

    .at-qo-rail__account {
        width: auto;
    }

    .at-qo-mobile-steps {
        display: flex;
        justify-content: center;
    }

    .at-qo-mobile-steps span {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .at-qo-title {
        font-size: 18px;
    }

    .at-qo-body {
        padding: 14px 14px 10px;
    }

    .at-qo-foot {
        padding: 10px 14px calc(12px + var(--app-safe-bottom, 0px));
    }

    .at-qo-models {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .at-qo-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .at-qo-product img {
        height: 110px;
    }

    .at-qo-skel-card__img {
        height: 110px;
    }

    .at-qo-form__grid {
        grid-template-columns: 1fr;
    }

    .at-qo-line {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .at-qo-line__sum {
        grid-column: 2;
    }
}

@media only screen and (max-width: 575px) {
    .at-qo-brands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .at-qo-head {
        padding: 14px 14px 10px;
    }
}
