/*
 * Sideman Plugin Store
 * Standalone storefront styles: no legacy site styles are required here so
 * checkout and payment pages remain stable when opened directly by a provider.
 */
:root {
    --shop-bg: #f5f5f7;
    --shop-surface: #ffffff;
    --shop-surface-subtle: #fbfbfd;
    --shop-text: #1d1d1f;
    --shop-text-secondary: #6e6e73;
    --shop-text-tertiary: #86868b;
    --shop-line: #e8e8ed;
    --shop-line-strong: #d2d2d7;
    --shop-blue: #0071e3;
    --shop-blue-hover: #0077ed;
    --shop-blue-soft: #eef6ff;
    --shop-green: #16803d;
    --shop-green-soft: #edf9f0;
    --shop-orange: #a85700;
    --shop-orange-soft: #fff6e8;
    --shop-red: #bf3030;
    --shop-red-soft: #fff1f0;
    --shop-shadow: 0 18px 44px rgba(25, 28, 35, .07);
    --shop-shadow-hover: 0 24px 56px rgba(25, 28, 35, .12);
    --shop-radius-lg: 28px;
    --shop-radius-md: 20px;
    --shop-radius-sm: 14px;
    --shop-max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--shop-bg);
}

body.plugin-shop {
    min-width: 320px;
    margin: 0;
    color: var(--shop-text);
    background:
        radial-gradient(circle at 82% -10%, rgba(115, 178, 255, .16), transparent 29rem),
        radial-gradient(circle at 9% 16%, rgba(196, 222, 255, .22), transparent 23rem),
        var(--shop-bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.plugin-shop a {
    color: inherit;
}

body.plugin-shop button,
body.plugin-shop a {
    -webkit-tap-highlight-color: transparent;
}

.shop-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
}

.shop-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 48px), var(--shop-max-width));
    min-height: 72px;
    margin: 0 auto;
    gap: 28px;
}

.shop-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 40px;
    color: var(--shop-text);
    text-decoration: none;
}

.shop-brand__mark {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.shop-brand__wordmark {
    margin-left: 7px;
    color: #2f4b9d;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1;
}

.shop-brand__divider {
    width: 1px;
    height: 20px;
    margin: 0 13px;
    background: var(--shop-line-strong);
}

.shop-brand__section {
    color: #3a3a3c;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.shop-header__nav,
.shop-header__account {
    display: flex;
    align-items: center;
}

.shop-header__nav {
    flex: 1 1 auto;
    justify-content: center;
    gap: 28px;
}

.shop-header__account {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 10px;
}

.shop-nav-link,
.shop-account-link {
    position: relative;
    color: var(--shop-text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 32px;
    text-decoration: none;
    transition: color .18s ease;
}

.shop-nav-link:hover,
.shop-account-link:hover {
    color: var(--shop-blue);
}

.shop-nav-link.is-active {
    color: var(--shop-text);
    font-weight: 600;
}

.shop-nav-link.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--shop-blue);
    content: "";
}

.shop-account-chip {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--shop-line);
    border-radius: 999px;
    color: var(--shop-text-secondary);
    background: var(--shop-surface-subtle);
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}

.shop-account-chip::before {
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: #36a85e;
    box-shadow: 0 0 0 3px rgba(54, 168, 94, .11);
    content: "";
}

.shop-account-chip strong {
    overflow: hidden;
    max-width: 190px;
    margin-left: 4px;
    color: var(--shop-text);
    font-weight: 600;
    text-overflow: ellipsis;
}

.shop-button,
.shop-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--shop-blue);
    box-shadow: 0 8px 18px rgba(0, 113, 227, .18);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.shop-button {
    padding: 0 18px;
}

.shop-button:hover,
.shop-action-button:hover {
    color: #fff;
    background: var(--shop-blue-hover);
    box-shadow: 0 10px 24px rgba(0, 113, 227, .24);
    transform: translateY(-1px);
}

.shop-button:focus,
.shop-action-button:focus,
.shop-nav-link:focus,
.shop-account-link:focus,
.shop-brand:focus,
.shop-back-link:focus {
    outline: 3px solid rgba(0, 113, 227, .25);
    outline-offset: 3px;
}

.shop-page {
    width: min(calc(100% - 48px), var(--shop-max-width));
    margin: 0 auto;
}

.shop-page--marketplace {
    padding: 44px 0 76px;
}

.shop-page--checkout {
    width: min(calc(100% - 48px), 1110px);
    padding: 34px 0 76px;
}

.shop-page--orders {
    padding: 48px 0 76px;
}

.shop-page--result {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding: 48px 0 72px;
}

.shop-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: var(--shop-radius-sm);
    color: var(--shop-text-secondary);
    background: var(--shop-surface);
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 8px 20px rgba(29, 29, 31, .035);
}

.shop-alert::before {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    color: var(--shop-blue);
    background: var(--shop-blue-soft);
    font-size: 13px;
    font-weight: 700;
    content: "i";
}

.shop-alert--warning {
    border-color: #f6e1ae;
    color: #805700;
    background: var(--shop-orange-soft);
}

.shop-alert--warning::before {
    color: #9a6300;
    background: #ffe7b0;
    content: "!";
}

.shop-alert--error {
    border-color: #ffd1ce;
    color: #9a2424;
    background: var(--shop-red-soft);
}

.shop-alert--error::before {
    color: #b92d2d;
    background: #ffe0de;
    content: "!";
}

.marketplace-hero {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    margin-bottom: 28px;
    padding: 50px 54px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--shop-radius-lg);
    background:
        radial-gradient(circle at 85% 25%, rgba(113, 172, 255, .42), transparent 10rem),
        radial-gradient(circle at 67% 74%, rgba(211, 230, 255, .65), transparent 16rem),
        linear-gradient(118deg, #ffffff 3%, #f7faff 59%, #eef5ff);
    box-shadow: var(--shop-shadow);
}

.marketplace-hero::before,
.marketplace-hero::after {
    position: absolute;
    border: 1px solid rgba(0, 113, 227, .13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.marketplace-hero::before {
    top: -156px;
    right: -80px;
    width: 430px;
    height: 430px;
}

.marketplace-hero::after {
    right: 72px;
    bottom: -178px;
    width: 360px;
    height: 360px;
}

.marketplace-hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.shop-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 0 0 13px;
    color: var(--shop-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.shop-eyebrow::before {
    width: 22px;
    height: 1px;
    margin-right: 9px;
    background: currentColor;
    content: "";
}

.marketplace-hero h1,
.page-heading h1,
.checkout-heading h1,
.result-card h1 {
    margin: 0;
    color: var(--shop-text);
    font-weight: 700;
    letter-spacing: -.045em;
}

.marketplace-hero h1 {
    max-width: 650px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.marketplace-hero p {
    max-width: 560px;
    margin: 18px 0 0;
    color: var(--shop-text-secondary);
    font-size: 16px;
    line-height: 1.65;
}

.marketplace-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 25px;
    color: #4b5563;
    font-size: 13px;
}

.marketplace-hero__meta span {
    display: inline-flex;
    align-items: center;
}

.marketplace-hero__meta span::before {
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--shop-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .11);
    content: "";
}

.product-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 18px;
    padding: 0 4px;
}

.product-section__header h2 {
    margin: 0;
    color: var(--shop-text);
    font-size: 24px;
    letter-spacing: -.03em;
}

.product-section__header p {
    margin: 7px 0 0;
    color: var(--shop-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.product-count {
    flex: 0 0 auto;
    margin-bottom: 2px;
    color: var(--shop-text-tertiary);
    font-size: 13px;
    white-space: nowrap;
}

.product-count strong {
    color: var(--shop-text);
    font-weight: 650;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.product-card {
    position: relative;
    display: flex;
    overflow: hidden;
    min-width: 0;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 24px;
    background: var(--shop-surface);
    box-shadow: 0 12px 32px rgba(25, 28, 35, .055);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.product-card:hover {
    border-color: rgba(0, 113, 227, .18);
    box-shadow: var(--shop-shadow-hover);
    transform: translateY(-5px);
}

.product-card.is-deep-linked {
    border-color: rgba(0, 113, 227, .48);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, .08), var(--shop-shadow-hover);
    animation: product-card-focus 1.3s ease both;
}

@keyframes product-card-focus {
    0%, 100% { transform: translateY(0); }
    45% { transform: translateY(-5px); }
}

.product-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.36 / 1;
    min-height: 200px;
    margin: 10px 10px 0;
    border: 1px solid rgba(0, 0, 0, .045);
    border-radius: 17px;
    background: linear-gradient(145deg, #eff5ff, #e6ecff);
}

.product-card:nth-child(3n + 2) .product-cover {
    background: linear-gradient(145deg, #f4f0ff, #eee6ff);
}

.product-card:nth-child(3n) .product-cover {
    background: linear-gradient(145deg, #fff6e9, #f8ecd8);
}

.product-cover::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(25, 39, 73, .04));
    content: "";
    pointer-events: none;
}

.product-cover__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-cover__fallback::before,
.product-cover__fallback::after {
    position: absolute;
    border: 1px solid rgba(0, 113, 227, .34);
    content: "";
}

.product-cover__fallback::before {
    width: 48%;
    height: 1px;
    border-width: 1px 0 0;
    box-shadow: 0 -38px 0 rgba(0, 113, 227, .14), 0 38px 0 rgba(0, 113, 227, .14);
    transform: rotate(-31deg);
}

.product-cover__fallback::after {
    width: 46%;
    height: 46%;
    border-radius: 14px;
    background: rgba(255, 255, 255, .34);
    box-shadow: 24px 24px 0 rgba(255, 255, 255, .26);
    transform: rotate(24deg);
}

.product-card:nth-child(3n + 2) .product-cover__fallback::before {
    border-color: rgba(114, 88, 230, .35);
    box-shadow: 0 -38px 0 rgba(114, 88, 230, .14), 0 38px 0 rgba(114, 88, 230, .14);
}

.product-card:nth-child(3n) .product-cover__fallback::before {
    border-color: rgba(196, 117, 26, .35);
    box-shadow: 0 -38px 0 rgba(196, 117, 26, .14), 0 38px 0 rgba(196, 117, 26, .14);
}

.product-cover__label {
    position: relative;
    z-index: 1;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 9px;
    color: rgba(20, 56, 133, .68);
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 10px 30px rgba(72, 98, 156, .12);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
}

.product-card:nth-child(3n + 2) .product-cover__label {
    color: rgba(89, 61, 177, .68);
}

.product-card:nth-child(3n) .product-cover__label {
    color: rgba(145, 83, 13, .68);
}

.product-cover__image {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-cover__window {
    position: absolute;
    z-index: 3;
    top: 14px;
    left: 15px;
    display: flex;
    gap: 5px;
}

.product-cover__window span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(29, 29, 31, .18);
}

.product-card__index {
    position: absolute;
    z-index: 3;
    right: 14px;
    bottom: 11px;
    color: rgba(0, 91, 190, .48);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 22px;
    letter-spacing: -.06em;
}

.product-card:nth-child(3n + 2) .product-card__index {
    color: rgba(108, 78, 211, .48);
}

.product-card:nth-child(3n) .product-card__index {
    color: rgba(182, 112, 24, .52);
}

.product-card__body {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    padding: 22px 22px 20px;
}

.product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 10px;
    margin-bottom: 10px;
}

.product-type {
    color: var(--shop-blue);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.product-code {
    overflow: hidden;
    max-width: 48%;
    color: var(--shop-text-tertiary);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card h3 {
    margin: 0;
    color: var(--shop-text);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.18;
}

.product-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 14px;
}

.product-card__title-row h3 {
    flex: 1 1 auto;
    min-width: 0;
}

.product-download {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 68px;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid #d5e7fa;
    border-radius: 999px;
    color: #066bc7;
    background: #f4f9ff;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.product-download svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.45;
}

.product-download:hover {
    border-color: var(--shop-blue);
    color: #fff;
    background: var(--shop-blue);
    transform: translateY(-1px);
}

.product-download:focus-visible {
    outline: 2px solid rgba(0, 113, 227, .35);
    outline-offset: 2px;
}

.product-card__description {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 11px 0 0;
    color: var(--shop-text-secondary);
    font-size: 14px;
    line-height: 1.58;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.entitlement-state {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 27px;
    margin-top: 14px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--shop-green);
    background: var(--shop-green-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.entitlement-state::before {
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.entitlement-state--expired {
    color: var(--shop-orange);
    background: var(--shop-orange-soft);
}

.plan-list {
    display: grid;
    gap: 0;
    margin: auto 0 0;
    padding: 18px 0 0;
    list-style: none;
}

.plan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid var(--shop-line);
}

.plan-item:first-child {
    border-top-color: var(--shop-line-strong);
}

.plan-item__info {
    min-width: 0;
}

.plan-name {
    display: block;
    overflow: hidden;
    color: #303035;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-duration {
    display: block;
    margin-top: 4px;
    color: var(--shop-text-tertiary);
    font-size: 12px;
    line-height: 1.3;
}

.plan-item__purchase {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.plan-price {
    color: var(--shop-text);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.plan-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--shop-blue);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.plan-buy:hover {
    color: #fff;
    background: var(--shop-blue-hover);
    transform: translateY(-1px);
}

.plan-buy:focus {
    outline: 3px solid rgba(0, 113, 227, .25);
    outline-offset: 2px;
}

.shop-empty {
    padding: 54px 28px;
    border: 1px dashed var(--shop-line-strong);
    border-radius: var(--shop-radius-md);
    color: var(--shop-text-secondary);
    background: rgba(255, 255, 255, .72);
    font-size: 15px;
    line-height: 1.65;
    text-align: center;
}

.shop-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 16px;
    color: var(--shop-blue);
    background: var(--shop-blue-soft);
    font-size: 22px;
    font-weight: 600;
}

.shop-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0 0 18px;
    color: var(--shop-text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .18s ease;
}

.shop-back-link::before {
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.shop-back-link:hover {
    color: var(--shop-blue);
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 24px;
    align-items: start;
}

.checkout-intro,
.checkout-summary,
.orders-panel,
.result-card {
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: var(--shop-radius-lg);
    background: var(--shop-surface);
    box-shadow: var(--shop-shadow);
}

.checkout-intro {
    min-height: 516px;
    padding: 42px;
}

.checkout-heading {
    max-width: 520px;
}

.checkout-heading h1 {
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.14;
}

.checkout-heading p {
    max-width: 490px;
    margin: 12px 0 0;
    color: var(--shop-text-secondary);
    font-size: 15px;
    line-height: 1.65;
}

.checkout-product {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
    padding: 18px;
    border: 1px solid var(--shop-line);
    border-radius: 18px;
    background: var(--shop-surface-subtle);
}

.checkout-product__image {
    position: relative;
    display: flex;
    overflow: hidden;
    flex: 0 0 88px;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    background: linear-gradient(145deg, #eff5ff, #e6ecff);
}

.checkout-product__image::before,
.checkout-product__image::after {
    position: absolute;
    content: "";
}

.checkout-product__image::before {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0, 113, 227, .27);
    border-radius: 12px;
    transform: rotate(23deg);
}

.checkout-product__image::after {
    width: 38px;
    height: 1px;
    border-top: 1px solid rgba(0, 113, 227, .38);
    box-shadow: 0 -15px 0 rgba(0, 113, 227, .12), 0 15px 0 rgba(0, 113, 227, .12);
    transform: rotate(-35deg);
}

.checkout-product__image img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-product__copy {
    min-width: 0;
}

.checkout-product__type {
    display: block;
    margin-bottom: 7px;
    color: var(--shop-blue);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.checkout-product__copy h2 {
    overflow: hidden;
    margin: 0;
    color: var(--shop-text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-product__copy p {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 0;
    color: var(--shop-text-secondary);
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.checkout-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.checkout-features li {
    position: relative;
    min-height: 50px;
    padding: 14px 12px 12px 34px;
    border-radius: 13px;
    color: #505056;
    background: #f7f9fc;
    font-size: 13px;
    line-height: 1.45;
}

.checkout-features li::before {
    position: absolute;
    top: 17px;
    left: 14px;
    width: 9px;
    height: 5px;
    border-bottom: 1.5px solid var(--shop-blue);
    border-left: 1.5px solid var(--shop-blue);
    content: "";
    transform: rotate(-45deg);
}

.checkout-summary {
    overflow: hidden;
    border-radius: 22px;
}

.checkout-summary__header {
    padding: 26px 28px 19px;
    border-bottom: 1px solid var(--shop-line);
}

.checkout-summary__header h2 {
    margin: 0;
    color: var(--shop-text);
    font-size: 20px;
    letter-spacing: -.03em;
}

.checkout-summary__header p {
    margin: 7px 0 0;
    color: var(--shop-text-tertiary);
    font-size: 13px;
}

.checkout-details {
    margin: 0;
    padding: 9px 28px 0;
}

.checkout-detail {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--shop-line);
}

.checkout-detail dt {
    flex: 0 0 auto;
    color: var(--shop-text-secondary);
    font-size: 13px;
}

.checkout-detail dd {
    overflow: hidden;
    margin: 0;
    color: var(--shop-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.42;
    text-align: right;
    text-overflow: ellipsis;
}

.checkout-discount {
    padding: 15px 0;
    border-bottom: 1px solid var(--shop-line);
}

.checkout-discount label {
    display: block;
    margin-bottom: 9px;
    color: var(--shop-text);
    font-size: 13px;
    font-weight: 600;
}

.checkout-discount__controls {
    display: flex;
    gap: 8px;
}

.checkout-discount__controls input {
    min-width: 0;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--shop-line-strong);
    border-radius: 10px;
    color: var(--shop-text);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.checkout-discount__controls button {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 13px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--shop-blue);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.checkout-discount__controls input:focus {
    border-color: var(--shop-blue);
    outline: 3px solid rgba(0, 113, 227, .12);
}

.checkout-discount__controls button:disabled,
.checkout-discount__controls input:disabled {
    cursor: wait;
    opacity: .65;
}

.checkout-discount p {
    margin: 7px 0 0;
    color: var(--shop-text-tertiary);
    font-size: 11px;
    line-height: 1.4;
}

.checkout-discount p.is-applied {
    color: #16834d;
}

.checkout-detail--discount {
    padding: 10px 0;
}

.checkout-detail--discount dd {
    color: #16834d;
}

.checkout-detail--total {
    align-items: center;
    padding: 19px 0 18px;
    border-bottom: 0;
}

.checkout-detail--total dt {
    color: var(--shop-text);
    font-size: 15px;
    font-weight: 600;
}

.checkout-price {
    color: var(--shop-text);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.04em;
}

.checkout-price small {
    margin-right: 1px;
    font-size: 16px;
    vertical-align: 3px;
}

.payment-method-picker {
    margin: 0;
    padding: 2px 28px 21px;
    border: 0;
}

.payment-method-picker legend {
    margin-bottom: 11px;
    padding: 0;
    color: var(--shop-text);
    font-size: 13px;
    font-weight: 600;
}

.payment-method-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.payment-method-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.payment-method-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.payment-method-option__body {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid var(--shop-line);
    border-radius: 13px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.payment-method-option__icon {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #fff;
    background: #16a05d;
    font-size: 14px;
    font-weight: 700;
}

.payment-method-option--alipay .payment-method-option__icon {
    background: #1677ff;
}

.payment-method-option__body > span:last-child {
    min-width: 0;
}

.payment-method-option__body strong,
.payment-method-option__body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-method-option__body strong {
    color: var(--shop-text);
    font-size: 13px;
    line-height: 1.35;
}

.payment-method-option__body small {
    margin-top: 3px;
    color: var(--shop-text-tertiary);
    font-size: 10px;
    line-height: 1.25;
}

.payment-method-option input:checked + .payment-method-option__body {
    border-color: rgba(0, 113, 227, .58);
    background: #f5f9ff;
    box-shadow: 0 0 0 2px rgba(0, 113, 227, .09);
}

.payment-method-option input:focus-visible + .payment-method-option__body {
    outline: 2px solid rgba(0, 113, 227, .35);
    outline-offset: 2px;
}

.payment-method-option input:disabled + .payment-method-option__body {
    cursor: default;
    opacity: .7;
}

.payment-method-picker__note,
.payment-method-picker__unavailable {
    margin: 9px 0 0;
    color: var(--shop-text-tertiary);
    font-size: 11px;
    line-height: 1.45;
}

.payment-method-picker__unavailable {
    padding: 11px 12px;
    border-radius: 10px;
    color: #9b4d10;
    background: #fff6e9;
}

.checkout-submit {
    padding: 0 28px 27px;
}

.checkout-submit .shop-action-button {
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-size: 15px;
}

.checkout-submit .shop-action-button::before {
    width: 11px;
    height: 12px;
    margin-right: 9px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    content: "";
    opacity: .9;
}

.checkout-submit .shop-action-button.is-loading::before {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: shop-spin .75s linear infinite;
}

.checkout-submit .shop-action-button:disabled {
    box-shadow: none;
    cursor: wait;
    opacity: .7;
    transform: none;
}

.checkout-message {
    display: none;
    margin: 0 28px 24px;
    padding: 12px 14px;
    border: 1px solid #ffd3d0;
    border-radius: 12px;
    color: #a12b2b;
    background: var(--shop-red-soft);
    font-size: 13px;
    line-height: 1.5;
}

.checkout-message.is-success {
    border-color: #b9e5cd;
    color: #146c43;
    background: #effaf4;
}

.payment-box {
    display: none;
    margin: 0 28px 28px;
    padding: 23px 20px 21px;
    border: 1px solid #cce3ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #f6faff, #eef6ff);
    text-align: center;
}

.payment-box__eyebrow {
    display: block;
    margin: 0 0 8px;
    color: var(--shop-blue);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}

.payment-box strong {
    display: block;
    color: var(--shop-text);
    font-size: 15px;
    line-height: 1.5;
}

.payment-box img {
    display: block;
    width: min(230px, 100%);
    min-height: 0;
    margin: 18px auto 13px;
    padding: 8px;
    border: 1px solid var(--shop-line);
    border-radius: 12px;
    background: #fff;
}

.payment-order-text {
    margin: 0;
    color: var(--shop-text-secondary);
    font-size: 12px;
    line-height: 1.55;
    word-break: break-all;
}

.payment-mobile-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 12px 0 0;
    color: var(--shop-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.payment-mobile-link::after {
    margin-left: 5px;
    content: "↗";
}

.payment-test-button {
    width: 100%;
    min-height: 40px;
    margin-top: 16px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: #414147;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: background .18s ease;
}

.payment-test-button:hover {
    background: #28282c;
}

.checkout-safe-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 28px 0;
    padding: 0 0 25px;
    color: var(--shop-text-tertiary);
    font-size: 11px;
    line-height: 1.55;
}

.checkout-safe-note::before {
    width: 9px;
    height: 10px;
    margin-top: 3px;
    border: 1px solid currentColor;
    border-radius: 3px;
    content: "";
    opacity: .8;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px;
    padding: 4px 4px 0;
}

.page-heading h1 {
    font-size: clamp(31px, 4vw, 46px);
    line-height: 1.1;
}

.page-heading p {
    margin: 11px 0 0;
    color: var(--shop-text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.page-heading__hint {
    flex: 0 0 auto;
    padding-bottom: 4px;
    color: var(--shop-text-tertiary);
    font-size: 13px;
    white-space: nowrap;
}

.orders-panel {
    overflow: hidden;
    border-radius: 22px;
}

.orders-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.orders-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 18px 22px;
    border-bottom: 1px solid var(--shop-line);
    text-align: left;
    vertical-align: middle;
}

.orders-table th {
    color: var(--shop-text-tertiary);
    background: #fbfbfc;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
}

.orders-table td {
    color: #3a3a3c;
    font-size: 14px;
}

.orders-table tbody tr {
    transition: background .18s ease;
}

.orders-table tbody tr:hover {
    background: #fcfdff;
}

.orders-table tbody tr:last-child td {
    border-bottom: 0;
}

.order-number {
    color: #45454a;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 600;
}

.order-product {
    max-width: 300px;
    color: var(--shop-text);
    font-weight: 600;
    line-height: 1.45;
}

.order-amount {
    color: var(--shop-text);
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
}

.order-date {
    color: var(--shop-text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.order-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.order-status::before {
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.order-status--paid {
    color: var(--shop-green);
    background: var(--shop-green-soft);
}

.order-status--pending {
    color: var(--shop-orange);
    background: var(--shop-orange-soft);
}

.order-status--cancelled {
    color: #747478;
    background: #f0f0f2;
}

.orders-empty {
    padding: 66px 24px;
    text-align: center;
}

.orders-empty p {
    margin: 0;
    color: var(--shop-text-secondary);
    font-size: 15px;
}

.shop-pagination {
    display: flex;
    justify-content: center;
    padding: 22px 18px;
    border-top: 1px solid var(--shop-line);
}

.shop-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-pagination .pagination > li {
    display: block;
}

.shop-pagination .pagination > li > a,
.shop-pagination .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--shop-line);
    border-radius: 9px;
    color: var(--shop-text-secondary);
    background: #fff;
    font-size: 13px;
    text-decoration: none;
}

.shop-pagination .pagination > .active > span,
.shop-pagination .pagination > li > a:hover {
    border-color: #c4dcf8;
    color: var(--shop-blue);
    background: var(--shop-blue-soft);
}

.shop-pagination .pagination > .disabled > span {
    color: #b3b3b8;
    background: #fafafa;
}

.result-card {
    width: min(100%, 620px);
    padding: 48px 48px 42px;
    text-align: center;
}

.result-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 22px;
    border-radius: 50%;
}

.result-icon--success {
    background: var(--shop-green-soft);
}

.result-icon--success::after {
    width: 25px;
    height: 13px;
    margin-top: -4px;
    border-bottom: 3px solid var(--shop-green);
    border-left: 3px solid var(--shop-green);
    content: "";
    transform: rotate(-45deg);
}

.result-icon--pending {
    border: 1px solid #f2d59d;
    background: var(--shop-orange-soft);
}

.result-icon--pending::before {
    width: 22px;
    height: 22px;
    border: 2px solid var(--shop-orange);
    border-radius: 50%;
    content: "";
}

.result-icon--pending::after {
    position: absolute;
    top: 24px;
    left: 34px;
    width: 2px;
    height: 10px;
    border-radius: 2px;
    background: var(--shop-orange);
    box-shadow: 4px 7px 0 -1px var(--shop-orange);
    content: "";
    transform-origin: bottom center;
}

.result-icon--not-found {
    color: #5a5a60;
    background: #f0f0f2;
}

.result-icon--not-found::after {
    content: "?";
    font-size: 29px;
    font-weight: 650;
}

.result-card .shop-eyebrow {
    justify-content: center;
    margin-bottom: 11px;
}

.result-card .shop-eyebrow::before {
    display: none;
}

.result-card h1 {
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.18;
}

.result-card__description {
    max-width: 430px;
    margin: 15px auto 0;
    color: var(--shop-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.result-order {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 34px;
    margin: 22px auto 0;
    padding: 0 12px;
    border: 1px solid var(--shop-line);
    border-radius: 9px;
    color: #55555a;
    background: #fafafa;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.result-actions .shop-button {
    min-width: 126px;
    min-height: 42px;
}

.shop-button--secondary {
    border: 1px solid var(--shop-line-strong);
    color: var(--shop-text);
    background: #fff;
    box-shadow: none;
}

.shop-button--secondary:hover {
    border-color: #bddaff;
    color: var(--shop-blue);
    background: var(--shop-blue-soft);
    box-shadow: none;
}

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

@media (max-width: 1080px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkout-layout {
        grid-template-columns: minmax(0, 1fr) 350px;
    }

    .checkout-intro {
        padding: 34px;
    }
}

@media (max-width: 820px) {
    .shop-header__inner,
    .shop-page,
    .shop-page--checkout {
        width: min(calc(100% - 32px), var(--shop-max-width));
    }

    .shop-header__inner {
        min-height: 64px;
        gap: 14px;
    }

    .shop-brand__mark {
        width: 27px;
        height: 27px;
    }

    .shop-brand__wordmark {
        margin-left: 6px;
        font-size: 22px;
    }

    .shop-brand__divider {
        height: 18px;
        margin: 0 9px;
    }

    .shop-brand__section {
        font-size: 13px;
    }

    .shop-header__nav {
        display: none;
    }

    .shop-header__account {
        gap: 7px;
    }

    .shop-account-chip {
        display: none;
    }

    .shop-account-link {
        font-size: 13px;
    }

    .shop-button {
        min-height: 36px;
        padding: 0 14px;
        font-size: 13px;
    }

    .shop-page--marketplace,
    .shop-page--orders {
        padding-top: 28px;
    }

    .marketplace-hero {
        min-height: 0;
        padding: 38px 30px;
    }

    .marketplace-hero::after {
        right: -80px;
    }

    .product-section__header {
        display: block;
        margin-bottom: 16px;
    }

    .product-count {
        margin-top: 8px;
    }

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

    .checkout-intro {
        min-height: 0;
    }

    .checkout-summary {
        max-width: 560px;
    }

    .page-heading {
        display: block;
    }

    .page-heading__hint {
        margin-top: 8px;
    }

    .shop-page--result {
        min-height: calc(100vh - 64px);
    }
}

@media (max-width: 560px) {
    .shop-header__inner,
    .shop-page,
    .shop-page--checkout {
        width: min(calc(100% - 24px), var(--shop-max-width));
    }

    .shop-brand__mark {
        width: 24px;
        height: 24px;
    }

    .shop-brand__wordmark {
        margin-left: 5px;
        font-size: 20px;
    }

    .shop-brand__divider,
    .shop-brand__section {
        display: none;
    }

    .shop-header__account {
        gap: 8px;
    }

    .shop-account-link {
        display: none;
    }

    .shop-page--marketplace,
    .shop-page--orders {
        padding-bottom: 48px;
    }

    .marketplace-hero {
        padding: 31px 22px 29px;
        border-radius: 22px;
    }

    .marketplace-hero h1 {
        font-size: 35px;
    }

    .marketplace-hero p {
        margin-top: 14px;
        font-size: 14px;
    }

    .marketplace-hero__meta {
        display: block;
        margin-top: 19px;
    }

    .marketplace-hero__meta span + span {
        margin-top: 8px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-card h3 {
        font-size: 23px;
    }

    .product-cover {
        min-height: 205px;
    }

    .checkout-intro {
        padding: 28px 22px;
        border-radius: 22px;
    }

    .checkout-heading h1 {
        font-size: 31px;
    }

    .checkout-product {
        align-items: flex-start;
        gap: 13px;
        margin-top: 25px;
        padding: 14px;
    }

    .checkout-product__image {
        flex-basis: 66px;
        width: 66px;
        height: 66px;
        border-radius: 13px;
    }

    .checkout-product__copy h2 {
        font-size: 18px;
    }

    .checkout-product__copy p {
        font-size: 12px;
    }

    .checkout-features {
        grid-template-columns: 1fr;
    }

    .checkout-summary__header,
    .checkout-details {
        padding-right: 21px;
        padding-left: 21px;
    }

    .checkout-submit,
    .checkout-message,
    .payment-box,
    .checkout-safe-note {
        margin-right: 21px;
        margin-left: 21px;
    }

    .checkout-submit {
        padding-right: 0;
        padding-left: 0;
    }

    .checkout-price {
        font-size: 27px;
    }

    .orders-panel {
        border-radius: 18px;
    }

    .orders-table {
        min-width: 620px;
    }

    .orders-table th,
    .orders-table td {
        padding: 15px 16px;
    }

    .result-card {
        padding: 38px 22px 30px;
        border-radius: 22px;
    }

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

    .result-actions .shop-button {
        width: 100%;
    }
}

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