:root {
    --wy-bg: #f4f7fb;
    --wy-surface: #ffffff;
    --wy-surface-soft: #f7f9fc;
    --wy-surface-muted: #eef3f9;
    --wy-text: #2f3440;
    --wy-text-soft: #69707f;
    --wy-muted: #a0a6b2;
    --wy-border: #eceef3;
    --wy-accent: #5d77da;
    --wy-accent-deep: #4566cd;
    --wy-highlight: #4566cd;
    --wy-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    --wy-shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.08);
    --wy-radius-xl: 24px;
    --wy-radius-lg: 18px;
    --wy-radius-md: 14px;
    --wy-font: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.wy-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 34%),
        linear-gradient(180deg, #f9fbff 0%, var(--wy-bg) 100%);
    color: var(--wy-text);
    font-family: var(--wy-font);
}

body.wy-body.wy-lock {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
textarea {
    font: inherit;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: var(--wy-surface);
    border: 1px solid var(--wy-border);
    border-radius: var(--wy-radius-xl);
    box-shadow: var(--wy-shadow-lg);
}

#mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.2);
    backdrop-filter: blur(3px);
    z-index: 860;
}

#mask.is-visible {
    display: block;
}

.wy-header {
    z-index: 900;
}

.wy-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--wy-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(16px);
}

.wy-header-shell {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 0;
    padding: 14px 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.wy-brand-box {
    flex: 0 0 auto;
    min-width: 0;
}

.wy-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.wy-brand-link.is-text {
    gap: 0;
}

.wy-brand-mark,
.wy-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef3ff, #f8fbff);
    color: var(--wy-highlight);
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(93, 119, 218, 0.14);
    overflow: hidden;
    flex-shrink: 0;
}

.wy-brand-mark {
    display: none;
}

.wy-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wy-brand-copy {
    display: inline-flex;
    flex-direction: column;
    min-width: 0;
}

.wy-brand-title {
    color: var(--wy-text);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wy-brand-subtitle {
    display: none;
}

.wy-header-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.wy-nav-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.wy-nav .nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.wy-nav .nav::-webkit-scrollbar {
    display: none;
}

.wy-nav .nav > li {
    position: relative;
    flex: 0 0 auto;
}

.wy-nav .nav > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: transparent;
    color: #4f5565;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.wy-nav .nav > li:hover > a,
.wy-nav .nav > li.active > a {
    background: #edf2ff;
    color: #5d77da;
}

.wy-nav .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 170px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--wy-border);
    box-shadow: var(--wy-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 20;
}

.wy-nav li:hover > .sub-menu,
.wy-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wy-nav .sub-menu li + li {
    margin-top: 4px;
}

.wy-nav .sub-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--wy-text-soft);
    font-size: 13px;
}

.wy-nav .sub-menu a:hover {
    background: var(--wy-surface-soft);
    color: var(--wy-highlight);
}

.wy-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.wy-header-actions-mobile {
    display: none;
}

.wy-ghost-link,
.wy-user-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #f8faff;
    border: 1px solid #e8edf8;
    color: #64748b;
    transition: all 0.2s ease;
    font-size: 14px;
}

.wy-ghost-link:hover,
.wy-user-card:hover {
    background: #ffffff;
    color: #5d77da;
}

.wy-ghost-link {
    color: #5d77da;
    font-weight: 700;
}

.wy-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.wy-user-meta {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wy-user-name {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--wy-text);
    font-size: 13px;
    font-weight: 700;
}

.wy-user-balance {
    color: var(--wy-muted);
    font-size: 11px;
}

.wy-auth-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wy-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wy-auth-btn.is-ghost {
    background: var(--wy-surface-soft);
    border: 1px solid var(--wy-border);
    color: var(--wy-text-soft);
}

.wy-auth-btn.is-solid {
    background: #edf3ff;
    border: 1px solid #dbe5ff;
    color: var(--wy-highlight);
}

.wy-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--wy-border);
    border-radius: 12px;
    background: #f8faff;
    color: var(--wy-text-soft);
}

.wy-footer.main-footer {
    margin-top: auto;
    padding: 0 0 28px;
    background: transparent;
    border: 0;
}

.wy-footer-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--wy-border);
    box-shadow: var(--wy-shadow);
}

.copyright {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--wy-muted);
    font-size: 13px;
    line-height: 1.7;
}

.copyright a:hover {
    color: var(--wy-highlight);
}

.wy-mobile-nav.footer-nav {
    display: none;
}

.goods-con {
    margin-top: 24px;
    padding-bottom: 28px;
}

.wy-goods-page,
.wy-page-shell {
    position: relative;
}

.wy-detail-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.wy-detail-main {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
}

.wy-detail-media {
    padding: 24px;
    background: linear-gradient(180deg, #f8fbff, #f1f5fb);
    border-right: 1px solid var(--wy-border);
}

.wy-detail-media-frame {
    position: sticky;
    top: 110px;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--wy-border);
    box-shadow: var(--wy-shadow);
}

.goods-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    background: var(--wy-surface-muted);
}

.wy-detail-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.wy-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--wy-border);
    color: var(--wy-text-soft);
    font-size: 13px;
}

.wy-meta-pill i {
    color: var(--wy-accent);
}

.wy-detail-content {
    padding: 26px 30px 30px;
}


.card-title {
    margin: 12px 0 10px;
    color: var(--wy-text);
    font-size: 30px;
    line-height: 1.45;
    font-weight: 700;
}

.wy-detail-copy {
    margin: 0;
    color: var(--wy-text-soft);
    font-size: 14px;
    line-height: 1.85;
}

.wy-price-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 22px 0 8px;
}

.wy-price-main {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.goods-attr .currency {
    color: var(--wy-accent);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.goods-attr .price {
    color: var(--wy-accent);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.wy-market-price {
    padding-bottom: 5px;
    color: var(--wy-muted);
    font-size: 16px;
    text-decoration: line-through;
}

.wy-buy-form {
    margin-top: 10px;
}

.form-group {
    padding: 18px 0;
    border-top: 1px solid var(--wy-border);
}

.form-title {
    margin-bottom: 12px;
    color: var(--wy-text);
    font-size: 14px;
    font-weight: 700;
}

.spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-option {
    padding: 10px 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--wy-border);
    color: var(--wy-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.spec-option:hover {
    border-color: #dbe5ff;
    background: #f6f9ff;
}

.spec-option.active {
    border-color: #dbe5ff;
    background: #edf3ff;
    color: var(--wy-highlight);
    font-weight: 700;
}

.spec-option.disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    background: #f2f3f5 !important;
    text-decoration: line-through !important;
}

.wy-quantity-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--wy-border);
}

.quantity-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wy-text-soft);
    cursor: pointer;
}

.quantity-input {
    width: 58px;
    height: 42px;
    border: 0;
    border-left: 1px solid var(--wy-border);
    border-right: 1px solid var(--wy-border);
    text-align: center;
    color: var(--wy-text);
    font-size: 15px;
    font-weight: 700;
    outline: none;
    background: transparent;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.wy-form-note {
    color: var(--wy-muted);
    font-size: 13px;
}

.layui-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--wy-border);
    background: #ffffff;
    color: var(--wy-text);
}

.layui-input:focus {
    border-color: #dbe5ff !important;
    box-shadow: 0 0 0 3px rgba(93, 119, 218, 0.12);
}

.coupon-input-wrap {
    position: relative;
}

.coupon-input-wrap .coupon-input {
    padding-right: 92px;
}

.coupon-apply-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    height: 32px;
    line-height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: #edf3ff;
    color: var(--wy-highlight);
    border: 1px solid #dbe5ff;
}

.coupon-change-link {
    display: none;
    margin-left: 6px;
    color: var(--wy-accent);
    font-size: 12px;
}

.coupon-tip {
    display: none;
    margin-top: 8px;
    color: var(--wy-highlight);
    font-size: 13px;
}

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

.payment-methods.is-single {
    grid-template-columns: 1fr;
}

.payment-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--wy-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-item:hover,
.payment-item.active {
    border-color: #dbe5ff;
    background: #f6f9ff;
}

.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wy-surface-soft);
}

.payment-icon img {
    max-width: 24px;
    max-height: 24px;
}

.payment-name {
    color: var(--wy-text);
    font-size: 14px;
    font-weight: 600;
}

.payment-checked {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--wy-highlight);
    font-size: 18px;
}

.payment-item.active .payment-checked {
    display: block;
}

.drawer-footer {
    padding-top: 8px;
}

.buy-btn-g {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--wy-accent), var(--wy-accent-deep));
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 14px 28px rgba(93, 119, 218, 0.24);
    cursor: pointer;
}

.total-price {
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
}

.total-price .dynamic-price {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.wy-detail-desc {
    padding: 24px 26px 28px;
}

.wy-detail-desc-head {
    margin-bottom: 16px;
}

.wy-detail-desc-head h2 {
    margin: 8px 0 0;
    color: var(--wy-text);
    font-size: 24px;
    font-weight: 700;
}

.intro {
    color: var(--wy-text-soft);
    font-size: 15px;
    line-height: 1.9;
}

.intro img {
    max-width: 100%;
    height: auto;
    margin: 16px auto;
    border-radius: 14px;
    box-shadow: var(--wy-shadow);
}

.wy-page-shell {
    max-width: 940px;
    margin: 24px auto 0;
    padding: 0 16px 20px;
}

.wy-page-card {
    padding: 24px 26px 28px;
}

.wy-page-title {
    margin: 10px 0 18px;
    color: var(--wy-text);
    font-size: 30px;
    line-height: 1.45;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .wy-detail-main {
        grid-template-columns: 1fr;
    }

    .wy-detail-media {
        border-right: 0;
        border-bottom: 1px solid var(--wy-border);
    }

    .wy-detail-media-frame {
        position: static;
    }
}

@media (max-width: 920px) {
    .container {
        padding: 0 14px;
    }

    .wy-menu-btn {
        display: none;
        width: 42px;
        height: 42px;
        border: 1px solid var(--wy-border);
        border-radius: 12px;
        background: #f8faff;
        color: var(--wy-text-soft);
    }

    .wy-header-shell {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .wy-brand-box {
        flex: 0 1 auto;
        order: 1;
    }

    .wy-header-actions-mobile {
        flex: 0 1 auto;
        margin-left: auto;
        order: 2;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .wy-header-main {
        position: static;
        width: 100%;
        order: 3;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .wy-header-main.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .wy-nav-wrap {
        width: 100%;
    }

    .wy-nav .nav {
        flex-direction: row;
        align-items: center;
        overflow: visible;
    }

    .wy-nav .nav > li > a {
        width: auto;
        justify-content: center;
    }

    .wy-nav .sub-menu {
        position: static;
        min-width: 0;
        margin-top: 6px;
        padding: 4px 0 0 12px;
        background: transparent;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .wy-header-actions {
        display: none;
    }

    .wy-user-card,
    .wy-auth-group {
        width: auto;
    }

    .wy-auth-btn {
        flex: 0 1 auto;
    }
}

@media (max-width: 768px) {
    .wy-footer.main-footer {
        padding-bottom: 92px;
    }

    .wy-footer-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .wy-mobile-nav.footer-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        align-items: stretch;
        justify-content: space-around;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--wy-border);
        box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
    }

    .wy-mobile-nav .nav-item {
        flex: 1 1 0;
        min-height: 54px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--wy-muted);
        font-size: 11px;
    }

    .wy-mobile-nav .nav-item.active {
        color: var(--wy-highlight);
        font-weight: 700;
    }

    .wy-mobile-nav .nav-icon {
        font-size: 19px;
    }

    .goods-con {
        margin-top: 16px;
    }

    .wy-detail-media,
    .wy-detail-content,
    .wy-detail-desc,
    .wy-page-card {
        padding: 18px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .goods-attr .price {
        font-size: 36px;
    }
}

@media (max-width: 560px) {
    .wy-brand-title {
        font-size: 28px;
    }

    .card-title,
    .wy-page-title {
        font-size: 25px;
    }

    .wy-user-name {
        max-width: 80px;
    }
}
