:root {
    --snow: #f5f5f7;
    --paper: #ffffff;
    --ink: #1d1d1f;
    --graphite: #6e6e73;
    --line: #d2d2d7;
    --noon: #feee00;
    --action: #0071e3;
    --danger: #c9342f;
    --success: #1c7c3e;
    --display: "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    --body: "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
    --utility: "SFMono-Regular", Consolas, monospace;
}

html {
    scroll-behavior: smooth;
}

body.checkout-page {
    margin: 0;
    color: var(--ink);
    background: var(--snow);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

.checkout-page *,
.checkout-page *::before,
.checkout-page *::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

.checkout-page a {
    color: inherit;
    text-decoration: none;
}

.checkout-page img {
    display: block;
    max-width: 100%;
}

.checkout-page button,
.checkout-page input {
    font: inherit;
}

.checkout-page :focus-visible {
    outline: 3px solid var(--action);
    outline-offset: 3px;
}

.checkout-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.checkout-skip {
    position: fixed;
    top: 8px;
    left: 16px;
    z-index: 1000;
    padding: 10px 14px;
    color: var(--paper) !important;
    background: var(--ink);
    border-radius: 6px;
    transform: translateY(-160%);
}

.checkout-skip:focus-visible {
    transform: translateY(0);
}

.checkout-nav {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 56px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(250, 250, 252, 0.88);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.checkout-nav__inner,
.checkout-brand,
.checkout-nav__actions {
    display: flex;
    align-items: center;
}

.checkout-nav__inner {
    justify-content: space-between;
    height: 100%;
}

.checkout-brand {
    gap: 10px;
    font-family: var(--display);
    font-weight: 650;
}

.checkout-brand img {
    border-radius: 7px;
}

.checkout-nav__actions {
    gap: 28px;
    color: #333336;
    font-size: 13px;
}

.checkout-nav__actions a:hover {
    color: var(--action);
}

.product-hero {
    padding: 70px 0 86px;
    background: var(--paper);
}

.product-hero__grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.88fr) minmax(0, 1.12fr);
    align-items: center;
    gap: 86px;
}

.product-visual {
    display: grid;
    place-items: center;
    min-height: 460px;
    padding: 68px;
    background: var(--noon);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.product-visual img {
    width: min(300px, 100%);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.product-status {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    color: #7b6900;
    font-size: 13px;
    font-weight: 650;
}

.product-status span + span::before {
    content: "·";
    margin-right: 16px;
    color: #a99000;
}

.product-intro h1 {
    max-width: 660px;
    margin: 0;
    font-family: var(--display);
    font-size: 50px;
    line-height: 1.12;
    font-weight: 700;
}

.product-intro__summary {
    max-width: 640px;
    margin: 22px 0 0;
    color: var(--graphite);
    font-size: 19px;
    line-height: 1.6;
}

.product-intro__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 26px;
}

.product-intro__price > span,
.product-intro__price strong {
    font-family: var(--display);
    font-weight: 700;
}

.product-intro__price > span {
    font-size: 22px;
}

.product-intro__price strong {
    font-size: 38px;
}

.product-intro__price small {
    margin-left: 10px;
    color: var(--graphite);
    font-size: 13px;
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 34px 0 0;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.product-facts div {
    padding: 0 20px;
    border-right: 1px solid var(--line);
}

.product-facts div:first-child {
    padding-left: 0;
}

.product-facts div:last-child {
    border-right: 0;
}

.product-facts dt {
    color: var(--graphite);
    font-size: 12px;
}

.product-facts dd {
    margin: 5px 0 0;
    font-weight: 650;
}

.checkout-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 22px;
    color: var(--paper);
    background: var(--action);
    border: 0;
    border-radius: 8px;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.checkout-primary:hover {
    background: #0077ed;
    transform: translateY(-1px);
}

.checkout-primary:disabled {
    color: #86868b;
    background: #e8e8ed;
    cursor: default;
    transform: none;
}

.product-intro__buy {
    margin-top: 28px;
}

.product-component-note {
    margin: 14px 0 0;
    color: var(--graphite);
    font-size: 13px;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
    gap: 30px;
    padding-top: 72px;
    padding-bottom: 100px;
}

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

.product-details__heading {
    margin-bottom: 30px;
}

.product-details__heading p {
    margin: 0 0 10px;
    color: #806c00;
    font-size: 13px;
    font-weight: 650;
}

.product-details__heading h2 {
    max-width: 680px;
    margin: 0;
    font-family: var(--display);
    font-size: 38px;
    line-height: 1.18;
}

.list_info {
    min-width: 0;
    padding: 34px;
    background: var(--paper);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    content-visibility: auto;
    contain-intrinsic-size: 720px;
}

.list_info,
.list_info p,
.list_info li,
.list_info td,
.list_info th {
    color: #3a3a3c;
    font-family: var(--body) !important;
    line-height: 1.72;
}

.list_info > *:first-child {
    margin-top: 0 !important;
}

.list_info img {
    height: auto !important;
    max-width: 100% !important;
}

.list_info table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.checkout-sheet {
    position: sticky;
    top: 78px;
    width: 100%;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: var(--paper);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
    scrollbar-width: thin;
}

.checkout-sheet__handle,
.checkout-sheet__close {
    display: none;
}

.checkout-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 26px 20px;
    border-bottom: 1px solid var(--line);
}

.checkout-sheet__header span {
    color: #806c00;
    font-size: 12px;
    font-weight: 650;
}

.checkout-sheet__header h2 {
    margin: 3px 0 0;
    font-family: var(--display);
    font-size: 24px;
}

.checkout-form {
    padding: 24px 26px 26px;
}

.checkout-field {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

.checkout-field > label,
.checkout-field > legend,
.field-label-row label {
    display: block;
    margin-bottom: 9px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
}

.checkout-field > label span {
    color: var(--danger);
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-row > span {
    color: var(--graphite);
    font-size: 12px;
}

.checkout-input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid #b8b8bd;
    border-radius: 7px;
    outline: 0;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.checkout-input::placeholder {
    color: #98989d;
}

.checkout-input:focus {
    border-color: var(--action);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.checkout-input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(201, 52, 47, 0.12);
}

.field-help,
.field-error {
    margin: 7px 0 0;
    font-size: 12px;
}

.field-help {
    color: var(--graphite);
}

.field-error {
    color: var(--danger);
}

.field-error[hidden] {
    display: none;
}

.quantity-stepper {
    display: grid;
    grid-template-columns: 46px minmax(70px, 1fr) 46px;
    gap: 8px;
}

.quantity-stepper .checkout-input {
    text-align: center;
    font-family: var(--utility);
    font-weight: 650;
}

.quantity-button {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: var(--ink);
    background: #ededf0;
    border: 0;
    border-radius: 7px;
    font-size: 23px;
    cursor: pointer;
}

.quantity-button:hover {
    background: #e1e1e5;
}

.wholesale-panel {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
    padding: 14px;
    background: #f7f7f9;
    border-radius: 7px;
    font-size: 13px;
}

.wholesale-panel div {
    display: flex;
    justify-content: space-between;
    color: var(--graphite);
}

.payment-field {
    margin-bottom: 20px;
}

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

.payment-options > div {
    width: auto;
    padding: 0;
}

.checkout-payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 11px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
}

.checkout-payment-option::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: auto;
    border: 1px solid #a5a5aa;
    border-radius: 50%;
}

.checkout-payment-option.active {
    border-color: var(--action);
    box-shadow: inset 0 0 0 1px var(--action);
}

.checkout-payment-option.active::after {
    background: var(--action);
    border: 4px solid var(--paper);
    box-shadow: 0 0 0 1px var(--action);
}

.checkout-payment-option img {
    width: 25px;
    height: 25px;
}

.checkout-payment-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.checkout-payment-option small {
    position: absolute;
    top: -8px;
    right: 8px;
    padding: 1px 5px;
    color: #7b6100;
    background: #fff5bd;
    border-radius: 4px;
    font-size: 9px;
}

.checkout-summary {
    display: grid;
    gap: 10px;
    margin: 6px 0 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.checkout-summary > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    color: var(--graphite);
    font-size: 12px;
}

.checkout-summary > div span:last-child {
    max-width: 220px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-summary .checkout-summary__total {
    align-items: baseline;
    padding-top: 8px;
    color: var(--ink);
    font-size: 15px;
}

.checkout-summary__total strong:last-child {
    color: var(--ink);
    font-family: var(--display);
    font-size: 29px;
}

.checkout-summary__total small {
    margin-right: 2px;
    font-size: 16px;
}

.checkout-submit {
    width: 100%;
}

.submit-loading {
    display: none;
}

.checkout-submit.is-loading .submit-label {
    display: none;
}

.checkout-submit.is-loading .submit-loading {
    display: inline;
}

.checkout-security {
    margin: 11px 0 0;
    color: var(--graphite);
    text-align: center;
    font-size: 11px;
}

.checkout-overlay,
.mobile-purchase-dock {
    display: none;
}

.checkout-footer {
    padding: 28px 0;
    color: #77777c;
    background: var(--paper);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.checkout-footer .checkout-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.checkout-footer a:hover {
    color: var(--action);
}

.checkout-confirm-layer {
    overflow: hidden;
    border-radius: 8px !important;
}

.checkout-confirm-layer .layui-layer-title {
    height: auto;
    padding: 22px 24px 14px;
    border: 0;
    background: var(--paper);
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.checkout-confirm-layer .layui-layer-content {
    padding: 0 24px 18px !important;
}

.checkout-confirm-layer .layui-layer-btn {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    padding: 14px 24px 22px;
    border: 0;
}

.checkout-confirm-layer .layui-layer-btn a {
    flex: 1;
    height: 44px;
    margin: 0;
    border-radius: 7px;
    line-height: 44px;
    text-align: center;
}

.checkout-confirm-layer .layui-layer-btn .layui-layer-btn0 {
    color: var(--paper);
    background: var(--action);
    border-color: var(--action);
}

.order-confirm__status {
    margin: 0;
    color: var(--success);
    font-size: 13px;
    font-weight: 650;
}

.order-confirm__amount {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 12px 0 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.order-confirm__amount span {
    color: var(--graphite);
}

.order-confirm__amount strong {
    font-family: var(--display);
    font-size: 27px;
}

.order-confirm dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.order-confirm dl div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.order-confirm dt {
    color: var(--graphite);
}

.order-confirm dd {
    margin: 0;
    font-family: var(--utility);
    text-align: right;
    overflow-wrap: anywhere;
}

.order-confirm__note {
    margin: 16px 0 0;
    padding: 10px 12px;
    color: #6f5b00;
    background: #fff9d6;
    border-radius: 6px;
    font-size: 12px;
}

@media (max-width: 980px) {
    .product-hero__grid {
        gap: 44px;
    }

    .product-intro h1 {
        font-size: 42px;
    }

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

@media (max-width: 760px) {
    .checkout-shell {
        width: min(100% - 28px, 620px);
    }

    .checkout-nav {
        height: 52px;
    }

    .checkout-brand {
        font-size: 14px;
    }

    .checkout-brand img {
        width: 27px;
        height: 27px;
    }

    .checkout-nav__actions {
        gap: 15px;
        font-size: 12px;
    }

    .checkout-nav__actions a:first-child {
        display: none;
    }

    .product-hero {
        padding: 28px 0 44px;
    }

    .product-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .product-visual {
        min-height: 0;
        padding: 32px;
        aspect-ratio: 1.45 / 1;
    }

    .product-visual img {
        width: min(190px, 58%);
    }

    .product-status {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .product-intro h1 {
        font-size: 34px;
        overflow-wrap: anywhere;
    }

    .product-intro__summary {
        margin-top: 14px;
        font-size: 16px;
    }

    .product-intro__price {
        margin-top: 18px;
    }

    .product-intro__price strong {
        font-size: 31px;
    }

    .product-intro__price small {
        flex-basis: 100%;
        margin: 5px 0 0;
    }

    .product-facts {
        margin-top: 24px;
    }

    .product-facts div {
        padding: 0 11px;
    }

    .product-facts dd {
        font-size: 13px;
    }

    .product-intro__buy {
        display: none;
    }

    .product-layout {
        display: block;
        padding-top: 56px;
        padding-bottom: 116px;
    }

    .product-details__heading {
        margin-bottom: 24px;
    }

    .product-details__heading h2 {
        font-size: 30px;
    }

    .list_info {
        padding: 18px;
    }

    .checkout-overlay {
        position: fixed;
        inset: 0;
        z-index: 190;
        display: block;
        background: rgba(0, 0, 0, 0.42);
        opacity: 0;
        visibility: hidden;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    .checkout-open .checkout-overlay {
        opacity: 1;
        visibility: visible;
    }

    .checkout-sheet {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        top: auto;
        z-index: 200;
        width: 100%;
        max-height: min(90svh, 760px);
        border: 0;
        border-radius: 8px 8px 0 0;
        box-shadow: 0 -18px 54px rgba(0, 0, 0, 0.2);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 260ms cubic-bezier(0.25, 0.8, 0.25, 1), visibility 260ms ease;
    }

    .checkout-sheet.is-open {
        transform: translateY(0);
        visibility: visible;
    }

    .checkout-sheet__handle {
        display: block;
        width: 38px;
        height: 4px;
        margin: 8px auto 0;
        background: #c7c7cc;
        border-radius: 2px;
    }

    .checkout-sheet__header {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 13px 18px 12px;
        background: var(--paper);
    }

    .checkout-sheet__header h2 {
        font-size: 21px;
    }

    .checkout-sheet__close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        color: var(--ink);
        background: #ededf0;
        border: 0;
        border-radius: 8px;
        font-size: 25px;
        cursor: pointer;
    }

    .checkout-form {
        padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
    }

    .payment-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .checkout-open {
        overflow: hidden;
    }

    .mobile-purchase-dock {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 120;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        min-height: 72px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.94);
        border-top: 1px solid var(--line);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-purchase-dock > div {
        display: flex;
        flex-direction: column;
    }

    .mobile-purchase-dock span {
        color: var(--graphite);
        font-size: 11px;
    }

    .mobile-purchase-dock strong {
        color: var(--ink);
        font-family: var(--display);
        font-size: 22px;
    }

    .mobile-purchase-dock strong span {
        color: inherit;
        font-size: inherit;
    }

    .mobile-purchase-dock .checkout-primary {
        min-width: 138px;
    }

    .checkout-footer {
        padding-bottom: 96px;
    }

    .checkout-footer .checkout-shell {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .checkout-confirm-layer .layui-layer-btn {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .checkout-primary,
    .checkout-overlay,
    .checkout-sheet {
        transition: none;
    }
}
