:root {
    --v3-ink: #1b2622;
    --v3-muted: #6f7b76;
    --v3-line: #dde5e1;
    --v3-paper: #ffffff;
    --v3-page: #f7f9f8;
    --v3-green: #168567;
    --v3-green-dark: #0d644d;
    --v3-green-soft: #e9f7f1;
    --v3-coral: #e66552;
    --v3-coral-soft: #fff0ed;
    --v3-blue: #3f7fbd;
    --v3-blue-soft: #edf5fc;
    --v3-gold: #a9781b;
    --v3-gold-soft: #fff6df;
}

html.luna-v3,
html.luna-v3 body {
    min-height: 100%;
    margin: 0;
    background: var(--v3-page);
    color: var(--v3-ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    letter-spacing: 0;
}

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

.luna-v3 button,
.luna-v3 input,
.luna-v3 select,
.luna-v3 textarea {
    font-family: inherit;
    letter-spacing: 0;
}

.luna-v3 .background {
    display: none;
}

.v3-site-header {
    height: 76px;
    background: var(--v3-paper);
    border-bottom: 1px solid var(--v3-line);
}

.v3-header-inner,
.v3-notice-inner,
.v3-category-inner,
.v3-home-main,
.v3-footer-inner {
    width: min(1360px, calc(100% - 40px));
    margin: 0 auto;
}

.v3-header-inner {
    height: 100%;
    display: grid;
    grid-template-columns: 245px minmax(350px, 620px) 1fr;
    gap: 28px;
    align-items: center;
}

.v3-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--v3-ink);
}

.v3-brand:hover {
    color: var(--v3-ink);
}

.v3-brand-mark,
.v3-brand-image {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.v3-brand-mark {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--v3-green);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.v3-brand-mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 5px;
}

.v3-brand-image {
    object-fit: contain;
    background: #fff;
}

.v3-brand-copy {
    min-width: 0;
}

.v3-brand-copy strong,
.v3-brand-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v3-brand-copy strong {
    font-size: 18px;
    line-height: 1.2;
}

.v3-brand-copy small {
    margin-top: 4px;
    color: var(--v3-muted);
    font-size: 10px;
}

.v3-header-search {
    height: 43px;
    padding: 0 7px 0 14px;
    border: 1px solid #b9c8c2;
    border-radius: 7px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
}

.v3-header-search:focus-within {
    border-color: var(--v3-green);
    box-shadow: 0 0 0 3px rgba(22, 133, 103, .1);
}

.v3-header-search svg {
    flex: 0 0 17px;
    width: 17px;
    color: #7e8a85;
}

.v3-header-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--v3-ink);
    font-size: 12px;
}

.v3-header-search button {
    flex: 0 0 auto;
    min-width: 58px;
    height: 31px;
    padding: 0 14px;
    border: 0;
    border-radius: 5px;
    background: var(--v3-green);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.v3-header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v3-header-action {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--v3-line);
    border-radius: 6px;
    background: #fff;
    color: #45514c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    cursor: pointer;
}

.v3-header-action:hover {
    border-color: #b6c9c1;
    color: var(--v3-green-dark);
}

.v3-header-action svg {
    width: 16px;
    height: 16px;
    color: var(--v3-green-dark);
}

.v3-site-notice {
    min-height: 36px;
    background: #fff9ea;
    border-bottom: 1px solid #efe2bd;
    color: #72551b;
}

.v3-notice-inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
}

.v3-notice-inner svg {
    flex: 0 0 14px;
    width: 14px;
    color: var(--v3-gold);
}

.v3-notice-link {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #72551b;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.v3-notice-text {
    min-width: 0;
    flex: 1;
}

.v3-mobile-nav {
    display: none;
}

.v3-site-footer {
    margin-top: 42px;
    padding: 22px 0 28px;
    border-top: 1px solid var(--v3-line);
    background: #fff;
}

.v3-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #89938f;
    font-size: 10px;
}

.v3-footer-inner a {
    color: var(--v3-green-dark);
}

html.luna-v3.v3-notice-open,
html.luna-v3.v3-notice-open body {
    overflow: hidden;
}

.v3-notice-overlay {
    position: fixed;
    z-index: 80;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(20, 32, 28, .16);
    transition: opacity .2s ease, visibility .2s ease;
}

.v3-notice-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.v3-notice-panel {
    position: fixed;
    z-index: 81;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 100%);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--v3-line);
    background: #fff;
    box-shadow: -18px 0 42px rgba(27, 38, 34, .12);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform .22s ease, visibility .22s ease;
}

.v3-notice-panel.is-open {
    visibility: visible;
    transform: translateX(0);
}

.v3-notice-panel-head {
    flex: 0 0 76px;
    min-height: 76px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--v3-line);
}

.v3-notice-panel-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--v3-green-soft);
    color: var(--v3-green-dark);
}

.v3-notice-panel-icon svg,
.v3-notice-close svg {
    width: 17px;
    height: 17px;
}

.v3-notice-panel-head > span:nth-child(2) {
    min-width: 0;
}

.v3-notice-panel-head strong,
.v3-notice-panel-head small {
    display: block;
}

.v3-notice-panel-head strong {
    color: var(--v3-ink);
    font-size: 16px;
}

.v3-notice-panel-head small {
    margin-top: 3px;
    color: var(--v3-muted);
    font-size: 9px;
}

.v3-notice-close {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-left: auto;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--v3-line);
    border-radius: 6px;
    background: #fff;
    color: #5e6b66;
    cursor: pointer;
}

.v3-notice-panel-body {
    min-height: 0;
    flex: 1;
    padding: 15px 20px;
    overflow-y: auto;
}

.v3-notice-content {
    color: #5f6b66;
    font-size: 11px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.v3-notice-content h1,
.v3-notice-content h2,
.v3-notice-content h3,
.v3-notice-content h4,
.v3-notice-content strong {
    color: var(--v3-ink);
}

.v3-notice-content h1,
.v3-notice-content h2,
.v3-notice-content h3,
.v3-notice-content h4,
.v3-notice-content p,
.v3-notice-content ul,
.v3-notice-content ol,
.v3-notice-content blockquote {
    margin: 0 0 12px;
}

.v3-notice-content ul,
.v3-notice-content ol {
    padding-left: 18px;
}

.v3-notice-content li {
    margin-bottom: 8px;
    list-style: disc;
}

.v3-notice-content ol li {
    list-style: decimal;
}

.v3-notice-content a {
    color: var(--v3-green-dark);
    text-decoration: underline;
}

.v3-notice-content img {
    max-width: 100%;
    height: auto;
}

.v3-notice-panel-foot {
    flex: 0 0 auto;
    padding: 14px 20px 20px;
    border-top: 1px solid var(--v3-line);
    background: #fbfcfb;
}

.v3-notice-panel-foot button {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 6px;
    background: var(--v3-green);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

/* Home */
.v3-category-band {
    position: relative;
    overflow: hidden;
    background: #eef8f4;
    border-bottom: 1px solid #d7e9e1;
}

.v3-category-band::before,
.v3-page-pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .6;
    background-image:
        linear-gradient(90deg, rgba(22, 133, 103, .065) 1px, transparent 1px),
        linear-gradient(rgba(22, 133, 103, .065) 1px, transparent 1px);
    background-size: 26px 26px;
}

.v3-category-band::after,
.v3-page-pattern::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: 5%;
    top: -170px;
    border: 18px double rgba(22, 133, 103, .07);
    transform: rotate(45deg);
}

.v3-category-inner {
    position: relative;
    z-index: 1;
    padding: 16px 0 18px;
}

.v3-category-head,
.v3-home-head,
.v3-home-toolbar,
.v3-pagination {
    display: flex;
    align-items: center;
}

.v3-category-head {
    margin-bottom: 11px;
}

.v3-category-head h1,
.v3-home-head h2 {
    margin: 0;
    color: var(--v3-ink);
    font-weight: 750;
}

.v3-category-head h1 {
    font-size: 14px;
}

.v3-category-head span,
.v3-home-head span {
    margin-left: 8px;
    color: #71817b;
    font-size: 9px;
}

.v3-category-head button {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--v3-green-dark);
    font-size: 10px;
    font-weight: 750;
}

.v3-category-list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 0;
}

.v3-category-list .cate-box {
    position: relative;
    min-width: 0;
    height: 72px;
    margin: 0;
    padding: 10px;
    overflow: hidden;
    border: 1px solid rgba(22, 133, 103, .14);
    border-radius: 7px;
    background: rgba(255, 255, 255, .9);
    color: var(--v3-ink);
    cursor: pointer;
    text-align: left;
}

.v3-category-list .cate-box::after {
    content: "";
    position: absolute;
    width: 52px;
    height: 52px;
    right: -28px;
    bottom: -29px;
    border: 8px solid rgba(22, 133, 103, .08);
    transform: rotate(45deg);
}

.v3-category-list .cate-box p,
.v3-category-list .cate-box div {
    position: relative;
    z-index: 1;
}

.v3-category-list .cate-box p {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--v3-ink);
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v3-category-list .cate-box div {
    margin-top: 7px;
    color: #7b8782;
    font-size: 9px;
}

.v3-category-list .cate-box-select {
    border-color: var(--v3-green);
    background: var(--v3-green);
    color: #fff;
}

.v3-category-list .cate-box-select p {
    color: #fff;
}

.v3-category-list .cate-box-select div {
    color: #d4eee5;
}

.v3-category-list .cate-box-select::after {
    border-color: rgba(255, 255, 255, .12);
}

.v3-home-main {
    padding: 22px 0 50px;
}

.v3-home-head {
    align-items: flex-end;
}

.v3-home-head h2 {
    font-size: 20px;
}

.v3-home-tabs {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.v3-home-tab {
    height: 32px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #697570;
    font-size: 11px;
}

.v3-home-tab.is-active {
    border-bottom-color: var(--v3-green);
    color: var(--v3-green-dark);
    font-weight: 800;
}

.v3-home-toolbar {
    min-height: 55px;
    gap: 7px;
    border-bottom: 1px solid var(--v3-line);
}

.v3-filter-button,
.v3-sort-select {
    height: 30px;
    border: 1px solid var(--v3-line);
    border-radius: 5px;
    background: #fff;
    color: #55615c;
    font-size: 10px;
}

.v3-filter-button {
    padding: 0 10px;
}

.v3-filter-button.is-active {
    border-color: #acd8c7;
    background: var(--v3-green-soft);
    color: var(--v3-green-dark);
    font-weight: 700;
}

.v3-sort-select {
    margin-left: auto;
    padding: 0 26px 0 8px;
}

.v3-goods-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding-top: 15px;
}

.luna-v3 .v3-goods-grid .v3-goods-card {
    position: relative;
    min-width: 0;
    min-height: 268px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--v3-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    display: block;
    color: var(--v3-ink);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.luna-v3 .v3-goods-grid .v3-goods-card:hover {
    border-color: #a8c8bc;
    box-shadow: 0 8px 20px rgba(27, 38, 34, .075);
    transform: translateY(-2px);
}

.v3-product-image {
    position: relative;
    height: 124px;
    padding: 15px;
    display: grid;
    place-items: center;
    background-color: #f0f7f4;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, .52) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .52) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, .52) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .52) 75%);
    background-position: 0 0, 13px 13px;
    background-size: 26px 26px;
}

.v3-product-image img {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.v3-product-body {
    padding: 12px;
}

.v3-product-name {
    height: 36px;
    margin: 0 0 7px;
    overflow: hidden;
    color: var(--v3-ink);
    font-size: 12px;
    font-weight: 750;
    line-height: 18px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.v3-product-tags {
    min-height: 19px;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.v3-tag {
    height: 19px;
    padding: 0 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
}

.v3-tag-green {
    background: var(--v3-green-soft);
    color: var(--v3-green-dark);
}

.v3-tag-blue {
    background: var(--v3-blue-soft);
    color: var(--v3-blue);
}

.v3-tag-gold {
    background: var(--v3-gold-soft);
    color: var(--v3-gold);
}

.v3-product-bottom {
    display: flex;
    align-items: flex-end;
}

.v3-product-price {
    color: var(--v3-coral);
    font-size: 18px;
    font-weight: 850;
    line-height: 1;
}

.v3-product-price small {
    margin-right: 1px;
    font-size: 10px;
}

.v3-product-stock {
    margin-top: 5px;
    color: #88928e;
    font-size: 9px;
}

.v3-product-buy {
    margin-left: auto;
    height: 31px;
    padding: 0 11px;
    border: 1px solid var(--v3-green);
    border-radius: 5px;
    background: #fff;
    color: var(--v3-green-dark);
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 750;
}

.v3-product-sold-out {
    opacity: .62;
}

.v3-pagination {
    min-height: 54px;
    justify-content: center;
    gap: 5px;
}

.v3-page-button {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--v3-line);
    border-radius: 5px;
    background: #fff;
    color: #5e6965;
    font-size: 10px;
}

.v3-page-button.is-active {
    border-color: var(--v3-green);
    background: var(--v3-green);
    color: #fff;
}

.v3-empty-state {
    grid-column: 1 / -1;
    padding: 54px 20px;
    border: 1px dashed #bfd0c9;
    border-radius: 8px;
    background: #fff;
    color: var(--v3-muted);
    text-align: center;
    font-size: 11px;
}

.v3-product-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    background: #fff;
    color: var(--v3-green-dark);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
}

.v3-category-list.is-expanded .cate-box:nth-child(n) {
    display: block;
}

.v3-state-page {
    width: min(650px, calc(100% - 40px));
    margin: 0 auto;
    padding: 58px 0 80px;
    text-align: center;
}

.v3-state-panel {
    position: relative;
    min-height: 320px;
    padding: 38px 34px;
    overflow: hidden;
    border: 1px solid #f0d7d7;
    border-radius: 8px;
    background-color: #fff5f5;
}

.v3-state-panel.v3-page-pattern::before {
    background-image:
        linear-gradient(90deg, rgba(200, 69, 69, .05) 1px, transparent 1px),
        linear-gradient(rgba(200, 69, 69, .05) 1px, transparent 1px);
    background-size: 25px 25px;
}

.v3-state-panel > * {
    position: relative;
    z-index: 1;
}

.v3-state-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 17px;
    border-radius: 50%;
    background: #fff;
    color: #c84545;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 16px rgba(200, 69, 69, .1);
}

.v3-state-icon svg {
    width: 34px;
    height: 34px;
}

.v3-state-panel h1 {
    margin: 0 0 10px;
    color: var(--v3-ink);
    font-size: 20px;
}

.v3-state-content {
    max-width: 430px;
    margin: 0 auto;
    color: #68746f;
    font-size: 11px;
    line-height: 1.8;
}

.v3-state-action {
    height: 40px;
    margin-top: 24px;
    padding: 0 18px;
    border-radius: 6px;
    background: var(--v3-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
}

.v3-state-action:hover {
    color: #fff;
}

.v3-state-action svg {
    width: 15px;
}

/* Legacy Luna pages restyled without changing their contracts. */
.luna-v3 .layui-row {
    margin: 0;
}

.luna-v3 .main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.luna-v3 .main > .layui-row > .layui-col-md8.layui-col-md-offset2,
.luna-v3 .main > .layui-row > .layui-col-sm12 {
    width: 100%;
    margin-left: 0;
}

.luna-v3 .main .main-box {
    margin-top: 20px;
    padding: 0 0 18px;
    overflow: hidden;
    border: 1px solid var(--v3-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.luna-v3 .v3-buy-layout {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    align-items: start;
}

.luna-v3 .v3-buy-layout > .title {
    grid-column: 1 / -1;
}

.luna-v3 .v3-buy-layout > .layui-col-md4,
.luna-v3 .v3-buy-layout > form > .layui-col-md8,
.luna-v3 .v3-buy-layout > form > .buy {
    width: 100%;
    margin-left: 0;
    float: none;
}

.luna-v3 .v3-buy-layout > form {
    min-width: 0;
    padding-bottom: 16px;
}

.luna-v3 .v3-buy-layout > form > .buy {
    padding: 0 16px 0 8px;
}

.luna-v3 .v3-buy-layout .goods-img {
    width: calc(100% - 24px);
    height: 400px;
    margin: 0 8px 16px 16px;
    padding: 0;
    display: grid;
    place-items: center;
}

.luna-v3 .v3-buy-layout .goods-img img {
    position: static;
    inset: auto;
    width: 250px;
    height: 250px;
    margin: 0;
}

.luna-v3 .v3-buy-layout .goods-msg {
    margin: 0 16px 0 8px;
}

.luna-v3 .main .main-box > .title,
.luna-v3 .main .main-box > .pay-title {
    position: relative;
    min-height: 62px;
    margin: 0 0 16px !important;
    padding: 13px 16px !important;
    overflow: hidden;
    border: 0 !important;
    border-bottom: 1px solid #d8e9e2 !important;
    background-color: #eef8f4;
    background-image:
        linear-gradient(90deg, rgba(22, 133, 103, .06) 1px, transparent 1px),
        linear-gradient(rgba(22, 133, 103, .06) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--v3-ink);
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 750;
}

.luna-v3 .main .main-box > .title svg,
.luna-v3 .main .main-box > .pay-title svg {
    width: 30px;
    height: 30px;
    margin: 0 10px 0 0 !important;
}

.luna-v3 .main .main-box > .title svg path,
.luna-v3 .main .main-box > .pay-title svg path {
    fill: var(--v3-green);
}

.luna-v3 .main-box .goods-img {
    width: calc(100% - 32px);
    margin: 0 8px 0 16px;
    padding-bottom: calc(100% - 32px);
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--v3-coral-soft);
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, .55) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .55) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, .55) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .55) 75%);
    background-position: 0 0, 14px 14px;
    background-size: 28px 28px;
}

.luna-v3 .main-box .goods-img img {
    inset: 12%;
    width: 76%;
    height: 76%;
    margin: 0;
    border-radius: 8px;
    box-shadow: none;
    object-fit: contain;
    background: #fff;
}

.luna-v3 .v3-buy-layout .goods-img {
    padding-bottom: 0;
}

.luna-v3 .main-box .goods-msg {
    margin: 0 16px 0 8px;
}

.luna-v3 .main-box .goods-msg .goods-name {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--v3-line);
    color: var(--v3-ink);
    font-size: 15px;
    line-height: 1.6;
}

.luna-v3 .price .price-sign,
.luna-v3 .price .price-num {
    color: var(--v3-coral);
}

.luna-v3 .price .price-num {
    font-size: 24px;
    font-weight: 850;
}

.luna-v3 .small-tips {
    min-height: 19px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
}

.luna-v3 .tips-green {
    background: var(--v3-green-soft);
    color: var(--v3-green-dark);
}

.luna-v3 .tips-blue,
.luna-v3 .tips-cyan {
    background: var(--v3-blue-soft);
    color: var(--v3-blue);
}

.luna-v3 .tips-yellow,
.luna-v3 .tips-pink {
    background: var(--v3-gold-soft);
    color: var(--v3-gold);
}

.luna-v3 .entry {
    margin-top: 13px;
}

.luna-v3 .l-msg {
    width: 92px;
    color: #52605b;
    font-size: 11px;
    font-weight: 700;
}

.luna-v3 .v3-buy-layout .entry {
    min-height: 40px;
    display: flex;
    align-items: center;
}

.luna-v3 .v3-buy-layout .l-msg {
    flex: 0 0 92px;
}

.luna-v3 .v3-buy-layout .input,
.luna-v3 .v3-buy-layout .layui-form-select {
    min-width: 0;
    max-width: 360px;
    flex: 1;
}

.luna-v3 .v3-buy-layout .input input,
.luna-v3 .v3-buy-layout .layui-form-select {
    width: 100% !important;
}

.luna-v3 .v3-buy-layout .v3-quantity-control {
    width: 100%;
    flex: 0 1 220px;
    max-width: 220px;
    height: 40px;
    display: grid;
    grid-template-columns: 40px minmax(64px, 1fr) 40px;
    overflow: hidden;
    border: 1px solid #cfd9d5;
    border-radius: 6px;
    background: #fff;
}

.luna-v3 .v3-quantity-control .sub,
.luna-v3 .v3-quantity-control .add {
    width: 40px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: #f4f8f6;
    color: var(--v3-green-dark);
    cursor: pointer;
}

.luna-v3 .v3-quantity-control .sub {
    border-right: 1px solid #dfe7e3;
}

.luna-v3 .v3-quantity-control .add {
    border-left: 1px solid #dfe7e3;
}

.luna-v3 .v3-quantity-control .sub:hover,
.luna-v3 .v3-quantity-control .add:hover {
    background: var(--v3-green-soft);
}

.luna-v3 .v3-quantity-control .sub svg,
.luna-v3 .v3-quantity-control .add svg {
    width: 16px;
    height: 16px;
    margin: 0;
}

.luna-v3 .v3-quantity-control .sub svg path,
.luna-v3 .v3-quantity-control .add svg path {
    fill: currentColor !important;
}

.luna-v3 .v3-quantity-control .sub svg path:first-child,
.luna-v3 .v3-quantity-control .add svg path:first-child {
    display: none;
}

.luna-v3 .v3-quantity-control .pay-num {
    width: 100% !important;
    height: 38px;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    font-size: 14px !important;
    text-align: center;
    appearance: textfield;
}

.luna-v3 .v3-quantity-control .pay-num::-webkit-outer-spin-button,
.luna-v3 .v3-quantity-control .pay-num::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.luna-v3 .input input,
.luna-v3 .layui-form-pane .layui-input,
.luna-v3 .layui-form-select {
    height: 38px;
    border-color: #cfd9d5;
    border-radius: 6px;
    color: var(--v3-ink);
    box-shadow: none;
}

.luna-v3 .input input:focus,
.luna-v3 .layui-input:focus {
    border-color: var(--v3-green) !important;
    box-shadow: 0 0 0 3px rgba(22, 133, 103, .09) !important;
}

.luna-v3 .pay {
    margin-top: 16px;
    padding-top: 13px;
    border-top-color: var(--v3-line);
}

.luna-v3 .pay-type {
    min-width: 180px;
    min-height: 52px;
    margin: 0 8px 8px 0;
    padding: 9px 12px;
    border: 1px solid var(--v3-line);
    border-radius: 7px;
    background: #fff;
    color: #45514c;
    text-align: left;
}

.luna-v3 .pay-select {
    border: 1px solid var(--v3-green);
    background: var(--v3-green-soft);
    color: var(--v3-green-dark);
}

.luna-v3 .v3-buy-layout .pay {
    width: min(320px, calc(100% - 92px));
    margin-left: 92px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.luna-v3 .v3-buy-layout .pay-type {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    margin: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    line-height: 1.35;
}

.luna-v3 .v3-buy-layout .pay-type svg {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0 8px 0 0;
}

.luna-v3 .v3-buy-layout > form > .buy {
    width: calc(100% - 100px);
    margin-left: 100px;
    padding: 0;
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.luna-v3 .v3-buy-layout > form > .buy button {
    width: 170px;
}

/* V7 field alignment inside the existing Luna purchase page. */
.luna-v3 .v3-buy-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.luna-v3 .v3-buy-layout .goods-name {
    margin-bottom: 12px;
    padding-bottom: 12px;
    display: grid;
    gap: 8px;
}

.luna-v3 .v3-buy-product-title {
    display: block;
    color: var(--v3-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
}

.luna-v3 .v3-buy-product-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.luna-v3 .v3-buy-price-row {
    min-height: 64px;
    display: flex;
    align-items: flex-end;
    gap: 18px;
}

.luna-v3 .v3-buy-price-row .price {
    margin: 0;
    display: grid;
    gap: 3px;
}

.luna-v3 .v3-buy-price-label {
    color: #87918c;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.4;
}

.luna-v3 .v3-buy-price-value {
    display: flex;
    align-items: baseline;
}

.luna-v3 .v3-buy-layout .l-msg {
    flex: 0 0 110px;
    width: 110px;
}

.luna-v3 .v3-field-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.luna-v3 .v3-field-label > svg,
.luna-v3 .v3-buy-assurance > svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.luna-v3 .v3-field-label > svg {
    color: #46564f;
}

.luna-v3 .v3-buy-layout .input,
.luna-v3 .v3-buy-layout .layui-form-select {
    max-width: 340px;
}

.luna-v3 .v3-buy-layout .v3-quantity-control {
    flex: 0 1 180px;
    max-width: 180px;
    grid-template-columns: 40px minmax(80px, 1fr) 40px;
}

.luna-v3 .v3-quantity-control .sub,
.luna-v3 .v3-quantity-control .add {
    position: relative;
}

.luna-v3 .v3-quantity-control .sub svg,
.luna-v3 .v3-quantity-control .add svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.luna-v3 .v3-quantity-control .sub svg path,
.luna-v3 .v3-quantity-control .add svg path {
    fill: none !important;
    stroke: currentColor;
}

.luna-v3 .v3-buy-layout .v3-pay-field {
    width: 100%;
    margin-left: 0;
    padding-top: 13px;
    display: grid;
    grid-template-columns: 110px minmax(0, 340px);
    align-items: start;
    gap: 0;
    border-top: 1px solid var(--v3-line);
}

.luna-v3 .v3-pay-field > .v3-field-label {
    min-height: 54px;
}

.luna-v3 .v3-pay-options {
    width: 100%;
    display: grid;
    gap: 8px;
}

.luna-v3 .v3-pay-options .pay-type {
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 9px 34px 9px 12px;
    position: relative;
}

.luna-v3 .v3-pay-options .pay-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 17px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--v3-green);
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #fff;
    transform: translateY(-50%);
}

.luna-v3 .v3-buy-layout > form > .v3-buy-action {
    width: auto;
    margin: 16px 16px 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: 110px minmax(0, 340px) minmax(0, 1fr);
    align-items: center;
    gap: 0;
}

.luna-v3 .v3-buy-layout > form > .v3-buy-action button {
    grid-column: 2;
    width: 340px;
    max-width: 100%;
}

.luna-v3 .v3-buy-assurance {
    grid-column: 3;
    min-width: 0;
    min-height: 40px;
    padding-left: 18px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #68766f;
    font-size: 9px;
    line-height: 1.4;
    text-align: left;
}

.luna-v3 .v3-buy-assurance > svg {
    color: var(--v3-green);
}

.luna-v3 .buy button,
.luna-v3 .btn a,
.luna-v3 .btn button,
.luna-v3 .pay-btn,
.luna-v3 .copy-button {
    min-width: 150px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: var(--v3-green);
    background-image: none;
    box-shadow: none;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 40px;
}

.luna-v3 .intro {
    padding: 2px 20px 16px;
    color: #65716d;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: 0;
}

.luna-v3 .layui-table {
    width: calc(100% - 32px) !important;
    margin: 12px 16px !important;
    border: 1px solid var(--v3-line);
    border-radius: 8px;
    overflow: hidden;
}

.luna-v3 .layui-table th,
.luna-v3 .layui-table td {
    padding: 12px !important;
    border-bottom: 1px solid #edf1ef !important;
    font-size: 11px;
}

.luna-v3 .layui-table th {
    color: var(--v3-muted) !important;
}

.luna-v3 .layui-table td {
    color: var(--v3-ink) !important;
}

.luna-v3 .wallet-options {
    gap: 8px !important;
    width: calc(100% - 32px) !important;
}

.luna-v3 .wallet-option {
    min-height: 58px;
    border: 1px solid var(--v3-line) !important;
    border-radius: 7px !important;
    box-shadow: none !important;
}

.luna-v3 .wallet-option.selected {
    border-color: var(--v3-green) !important;
    background: var(--v3-green-soft) !important;
}

.luna-v3 .wallet-selection h3,
.luna-v3 .qr-code-title {
    color: var(--v3-green-dark) !important;
}

.luna-v3 .qr-code-box,
.luna-v3 #qrcode-container,
.luna-v3 .product-info + div {
    border-color: var(--v3-green) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.luna-v3 .product-pay-price,
.luna-v3 .product-info p {
    color: var(--v3-coral) !important;
}

.luna-v3 .layui-tab-title {
    border-bottom-color: var(--v3-line);
}

.luna-v3 .layui-tab-title li {
    color: #68746f;
    font-size: 11px;
}

.luna-v3 .layui-tab-title .layui-this {
    color: var(--v3-green-dark);
    font-weight: 800;
}

.luna-v3 .layui-tab-title .layui-this::after {
    border: 0;
    border-bottom: 2px solid var(--v3-green);
}

.luna-v3 .info-box {
    margin: 0 16px 12px;
    padding: 15px !important;
    border: 1px solid var(--v3-line);
    border-radius: 8px;
}

.luna-v3 .order-list {
    margin-top: 0;
    border-bottom: 0;
}

.luna-v3 .info-ui {
    color: #45514c;
    font-size: 11px;
    line-height: 1.9;
}

.luna-v3 .info-ui strong {
    color: var(--v3-muted);
}

.luna-v3 .order-info {
    min-height: 108px;
    border: 1px dashed #b8cbc3;
    border-radius: 7px;
    background: #f7faf9;
    box-shadow: none;
    color: #3d4a45;
    font-family: Consolas, monospace;
    font-size: 10px;
    line-height: 1.8;
}

.luna-v3 .err_title {
    color: var(--v3-ink);
}

.luna-v3 .err_content {
    color: var(--v3-muted);
    font-size: 11px;
}

.luna-v3 .home-tips {
    border-radius: 8px !important;
}

.luna-v3 .home-tips .layui-layer-title {
    border-radius: 8px 8px 0 0;
    background: var(--v3-green);
    background-image: none;
}

.luna-v3 .query-m,
.luna-v3 .order-m {
    display: none !important;
}

.luna-v3 .footer {
    display: none;
}

@media (max-width: 1120px) {
    .v3-header-inner {
        grid-template-columns: 210px minmax(300px, 1fr) auto;
    }

    .v3-header-action span {
        display: none;
    }

    .v3-header-action {
        width: 38px;
        padding: 0;
    }

    .v3-category-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .v3-category-list .cate-box:nth-child(n + 6) {
        display: none;
    }

    .v3-goods-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .luna-v3 .v3-buy-layout {
        grid-template-columns: clamp(280px, 32vw, 360px) minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    html.luna-v3 body {
        padding-bottom: 61px;
        background: var(--v3-page);
    }

    .v3-site-header {
        height: auto;
        margin: 0;
        border-radius: 0;
        background: #fff;
        background-image: none;
        color: var(--v3-ink);
    }

    .v3-header-inner {
        width: 100%;
        padding: 11px 14px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 11px;
    }

    .v3-brand-mark,
    .v3-brand-image {
        flex-basis: 35px;
        width: 35px;
        height: 35px;
    }

    .v3-brand-mark {
        font-size: 17px;
    }

    .v3-brand-copy strong {
        font-size: 15px;
    }

    .v3-brand-copy small {
        display: none;
    }

    .v3-header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .v3-header-action:first-child {
        display: none;
    }

    .v3-header-action {
        width: 36px;
        height: 36px;
    }

    .v3-header-search {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 40px;
    }

    .v3-notice-inner {
        width: 100%;
        padding: 0 14px;
    }

    .v3-notice-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .v3-notice-link {
        flex: 0 0 auto;
        display: inline-flex;
    }

    .v3-category-inner {
        width: 100%;
        padding: 13px 14px 15px;
    }

    .v3-category-head {
        margin-bottom: 9px;
    }

    .v3-category-list {
        margin: 0 -14px;
        padding: 0 14px;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .v3-category-list::-webkit-scrollbar {
        display: none;
    }

    .v3-category-list .cate-box,
    .v3-category-list .cate-box:nth-child(n + 6) {
        flex: 0 0 142px;
        height: 64px;
        display: block;
    }

    .v3-home-main {
        width: 100%;
        padding: 17px 14px 30px;
    }

    .v3-home-head h2 {
        font-size: 18px;
    }

    .v3-home-tabs {
        max-width: 150px;
        gap: 12px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .v3-home-tab {
        white-space: nowrap;
    }

    .v3-home-tab:nth-child(n + 3) {
        display: none;
    }

    .v3-home-toolbar {
        min-height: 49px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .v3-filter-button,
    .v3-sort-select {
        flex: 0 0 auto;
    }

    .v3-sort-select {
        margin-left: 0;
    }

    .v3-goods-grid {
        grid-template-columns: 1fr;
        gap: 9px;
        padding-top: 11px;
    }

    .luna-v3 .v3-goods-grid .v3-goods-card {
        min-height: 128px;
        display: grid;
        grid-template-columns: 106px minmax(0, 1fr);
    }

    .v3-product-image {
        width: 106px;
        height: 100%;
        min-height: 128px;
        padding: 11px;
    }

    .v3-product-image img {
        width: 72px;
        height: 72px;
    }

    .v3-product-body {
        min-width: 0;
        padding: 10px;
    }

    .v3-product-name {
        margin-bottom: 5px;
    }

    .v3-product-tags {
        margin-bottom: 7px;
    }

    .v3-product-price {
        font-size: 17px;
    }

    .v3-product-stock {
        display: none;
    }

    .v3-product-buy {
        height: 29px;
        padding: 0 9px;
    }

    .v3-mobile-nav {
        position: fixed;
        z-index: 30;
        left: 0;
        right: 0;
        bottom: 0;
        height: 58px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border-top: 1px solid var(--v3-line);
        background: #fff;
    }

    .v3-mobile-nav a,
    .v3-mobile-nav button {
        border: 0;
        background: #fff;
        color: #75807c;
        display: grid;
        place-content: center;
        justify-items: center;
        gap: 2px;
        font-size: 9px;
    }

    .v3-mobile-nav a.is-active,
    .v3-mobile-nav button.is-active {
        color: var(--v3-green-dark);
        font-weight: 800;
    }

    .v3-mobile-nav svg {
        width: 18px;
        height: 18px;
    }

    .v3-notice-panel {
        top: auto;
        left: 0;
        width: auto;
        height: 480px;
        max-height: 66vh;
        border: 0;
        border-top: 1px solid var(--v3-line);
        border-radius: 8px 8px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -18px 40px rgba(27, 38, 34, .14);
    }

    .v3-notice-panel.is-open {
        transform: translateY(0);
    }

    .v3-notice-panel-head {
        flex-basis: 62px;
        min-height: 62px;
        padding: 0 16px;
    }

    .v3-notice-panel-body {
        padding: 12px 16px;
    }

    .v3-notice-panel-foot {
        padding: 12px 16px 14px;
    }

    .v3-site-footer {
        display: none;
    }

    .v3-state-page {
        width: 100%;
        padding: 18px 14px 30px;
    }

    .v3-state-panel {
        min-height: 300px;
        padding: 34px 18px;
    }

    .luna-v3 .main {
        width: 100%;
        padding: 0 14px;
    }

    .luna-v3 .main .main-box {
        margin-top: 12px;
    }

    .luna-v3 .v3-buy-layout {
        display: block;
    }

    .luna-v3 .v3-buy-layout > .layui-col-md4,
    .luna-v3 .v3-buy-layout > form,
    .luna-v3 .v3-buy-layout > form > .layui-col-md8,
    .luna-v3 .v3-buy-layout > form > .buy {
        width: 100%;
    }

    .luna-v3 .v3-buy-layout .goods-img {
        width: calc(100% - 24px);
        height: 180px;
        margin: 0 12px 12px;
    }

    .luna-v3 .v3-buy-layout .goods-img img {
        width: 120px;
        height: 120px;
    }

    .luna-v3 .v3-buy-layout .goods-msg {
        margin: 14px 12px 0;
    }

    .luna-v3 .v3-buy-layout > form > .buy {
        padding: 0 12px;
    }

    .luna-v3 .v3-buy-layout .pay {
        grid-template-columns: 1fr;
    }

    .luna-v3 .main .main-box > .title,
    .luna-v3 .main .main-box > .pay-title {
        min-height: 58px;
        padding: 11px !important;
        font-size: 15px;
    }

    .luna-v3 .main-box .goods-img,
    .luna-v3 .main-box .goods-msg {
        margin-right: 12px;
        margin-left: 12px;
    }

    .luna-v3 .main-box .goods-msg {
        margin-top: 14px;
    }

    .luna-v3 .input input,
    .luna-v3 .layui-form-select {
        width: calc(100% - 100px) !important;
    }

    .luna-v3 .code input {
        width: calc(100% - 220px) !important;
    }

    .luna-v3 .pay-type {
        width: calc(100% - 100px);
        min-width: 0;
        margin-right: 0;
    }

    .luna-v3 .v3-buy-product-title {
        font-size: 15px;
    }

    .luna-v3 .v3-buy-price-row {
        min-height: 0;
        display: grid;
        gap: 13px;
    }

    .luna-v3 .v3-buy-layout .entry {
        min-height: 0;
        margin-top: 15px;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        align-items: stretch;
    }

    .luna-v3 .v3-buy-layout .l-msg,
    .luna-v3 .v3-buy-layout .v3-field-label {
        width: 100%;
        min-height: 22px;
        flex: none;
    }

    .luna-v3 .v3-buy-layout .input,
    .luna-v3 .v3-buy-layout .layui-form-select {
        width: 100% !important;
        max-width: 100%;
    }

    .luna-v3 .v3-buy-layout .input input,
    .luna-v3 .v3-buy-layout .layui-form-select,
    .luna-v3 .code input {
        width: 100% !important;
    }

    .luna-v3 .v3-buy-layout .v3-quantity-control {
        width: 180px !important;
        max-width: 180px;
    }

    .luna-v3 .v3-buy-layout .v3-pay-field {
        width: 100%;
        margin-left: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }

    .luna-v3 .v3-pay-field > .v3-field-label {
        min-height: 22px;
    }

    .luna-v3 .v3-pay-options,
    .luna-v3 .v3-pay-options .pay-type {
        width: 100% !important;
        max-width: 100%;
    }

    .luna-v3 .v3-buy-layout > form > .v3-buy-action {
        width: auto;
        margin: 16px 12px 0;
        padding: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        align-items: stretch;
    }

    .luna-v3 .v3-buy-layout > form > .v3-buy-action button {
        grid-column: 1;
        width: 100%;
    }

    .luna-v3 .v3-buy-assurance {
        grid-column: 1;
        min-height: 22px;
        padding-left: 0;
    }

    .luna-v3 .wallet-options {
        grid-template-columns: 1fr !important;
    }

    .luna-v3 .layui-table {
        width: calc(100% - 24px) !important;
        margin: 10px 12px !important;
    }

    .luna-v3 .layui-table th,
    .luna-v3 .layui-table td {
        padding: 10px 8px !important;
        font-size: 10px;
    }

    .luna-v3 .info-box {
        margin: 0 12px 10px;
        padding: 12px !important;
    }

    .luna-v3 .order-info {
        margin-top: 10px;
    }

    .luna-v3 .footer {
        display: none;
    }
}
