:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --accent: #e4002b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

html {
    background: linear-gradient(180deg, #ffa544 0%, #ffa544 66%, #d3d3d3 66%, #d3d3d3 100%);
    background-attachment: fixed;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f1a17;
}

.page-shell {
    width: 100%;
    height: 100%;
}

.page-container {
    position: relative;
    width: 88%;
    height: 78.8%;
    margin: 16% auto 0;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, #fffaf3 0%, #fff 220px, #f7f3ef 100%);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page-container::-webkit-scrollbar {
    display: none;
}

.page-content.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.page-state {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 24px;
    font-weight: 700;
    color: #6f5f54;
}

.product-hero,
.hero-poster,
.hero-image {
    width: 100%;
}

.hero-poster {
    height: 580px;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid red;
    box-shadow: 0 16px 36px rgba(45, 24, 12, 0.16);
}

.hero-image {
    width: 100%;
    height: 100%;
    display: block;
}

.main-content {
    margin-top: -10px;
}

.scroll-content {
    padding: 0 18px 240px;
}

.product-card,
.section-card,
.terms-card {
    margin-bottom: 16px;
    border-radius: 22px;
    background: #fff;
}

.product-card {
    padding: 18px 20px;
    margin-top: 20px;
}

.hero-copy-tip {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--accent);
}

.section-card,
.terms-card {
    padding: 20px;
}

.section-header {
    margin-bottom: 16px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-bar {
    width: 6px;
    height: 24px;
    border-radius: 999px;
    background: #1f1a17;
}

.section-title {
    font-size: 24px;
    font-weight: 900;
}

.section-hint {
    font-size: 18px;
    color: #645449;
    font-weight: 700;
}

.options-grid {
    display: flex;
    justify-content: start;
    gap: 20px;
}

.option-card {
    position: relative;
    width: 200px;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    border: 2px solid #f0e6dd;
    display: flex;
    flex-direction: column;
    min-height: 245px;
    cursor: pointer;
}

.option-card-locked {
    background: #fffaf3;
}

.option-card.selected {
    border-color: var(--accent);
}

.option-image-wrapper {
    height: 148px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-image {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.option-name {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #211814;
    line-height: 1.4;
    min-height: 50px;
    text-align: center;
}

.option-desc {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #7d6a5d;
    min-height: 42px;
    text-align: center;
}

.staple-stepper {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.staple-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f4ede6;
    color: #1f1a17;
    font-size: 26px;
    font-weight: 900;
    cursor: pointer;
}

.option-card.selected .staple-btn {
    background: #fff1f3;
    color: var(--accent);
}

.staple-count {
    min-width: 28px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
}

.terms-header {
    margin-bottom: 16px;
}

.terms-title {
    font-size: 22px;
    font-weight: 900;
}

.terms-content {
    padding: 18px;
    border-radius: 18px;
    background: #fbf7f1;
}

.term-item {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.7;
    color: #6f5f54;
}

.term-item:last-child {
    margin-bottom: 0;
}

.page-bottom-space {
    height: 220px;
}

.bottom-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    width: calc(88% - 36px);
    transform: translateX(-50%);
    z-index: 30;
}

.selected-strip {
    padding: 18px 18px 16px;
    border-radius: 28px 28px 0 0;
    background: #2a211f;
}

.selected-strip-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 8px;
}

.selected-chip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.selected-chip {
    position: relative;
    width: 72px;
    height: 72px;
}

.selected-chip-image-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 3px solid #ff234b;
}

.selected-chip-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-chip-remove,
.selected-chip-lock {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d8d1cb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.selected-chip-lock::before {
    content: "锁";
    font-size: 12px;
    font-weight: 900;
    color: #3a302d;
}

.selected-chip-remove-text {
    font-size: 16px;
    line-height: 1;
    color: #3a302d;
    font-weight: 900;
}

.selected-chip-count-row {
    margin-top: -6px;
}

.selected-chip-count {
    min-width: 42px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    text-align: center;
    font-weight: 800;
}

.bottom-actions {
    display: flex;
    gap: 14px;
    margin-top: -1px;
    padding: 14px;
    height: 116px;
    border-radius: 0 0 28px 28px;
    background: linear-gradient(180deg, #fff7de 0%, #ffe3a0 100%);
}

.reset-btn,
.add-to-cart-btn,
.mc005-home-btn {
    border: none;
    cursor: pointer;
}

.mc005-home-btn {
    position: fixed;
    top: calc(3% + 14px);
    left: calc(6% + 14px);
    z-index: 40;
    min-width: 132px;
    padding: 12px 20px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #ffb347 0%, #ff6b1a 55%, #e4002b 100%);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    animation: mc005-home-glow 1.2s ease-in-out infinite;
}

.mc005-home-btn:hover {
    filter: brightness(1.08);
}

.mc005-home-btn:active {
    transform: scale(0.98);
}

@keyframes mc005-home-glow {
    0%, 100% {
        box-shadow:
            0 0 6px rgba(255, 255, 255, 0.85),
            0 0 14px rgba(255, 107, 26, 0.65),
            0 0 0 0 rgba(255, 220, 120, 0);
        filter: brightness(1);
    }
    50% {
        box-shadow:
            0 0 12px rgba(255, 255, 255, 1),
            0 0 26px rgba(255, 80, 30, 0.95),
            0 0 40px rgba(255, 200, 80, 0.75);
        filter: brightness(1.12);
    }
}

.reset-btn {
    width: 150px;
    border-radius: 20px;
    background: #fff;
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
    border: 2px solid #ff3159;
}

.add-to-cart-btn {
    flex: 1;
    padding: 0 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ff214b 0%, #e4002b 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-price-section,
.cart-action-section {
    display: flex;
}

.cart-price-section {
    align-items: baseline;
    gap: 10px;
}

.cart-action-section {
    flex-direction: column;
    align-items: flex-end;
}

.btn-price-amount,
.btn-text {
    font-size: 24px;
    font-weight: 900;
}

.btn-price-origin,
.btn-price {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
}

.btn-price-origin {
    text-decoration: line-through;
}

.empty-selected {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 700;
}

.mc005-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc005-payment-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.mc005-payment-content {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 40px));
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.mc005-payment-header,
.mc005-payment-footer {
    padding: 18px 22px;
}

.mc005-payment-header h3 {
    font-size: 24px;
    font-weight: 900;
    color: #211814;
}

.mc005-payment-body {
    padding: 0 22px 22px;
}

.mc005-payment-amount {
    font-size: 20px;
    font-weight: 800;
    color: #211814;
}

.mc005-payment-tip {
    margin-top: 10px;
    font-size: 16px;
    color: #6f5f54;
    text-align: center;
}

.mc005-payment-footer {
    display: flex;
    gap: 14px;
}

.mc005-payment-btn {
    flex: 1;
    height: 52px;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.mc005-payment-btn.cancel {
    background: #efe7df;
    color: #5f5045;
}

.mc005-payment-btn.confirm {
    background: linear-gradient(180deg, #ff214b 0%, #e4002b 100%);
    color: #fff;
}

.mc005-payment-qrcode {
    margin-top: 18px;
    min-height: 220px;
    border-radius: 20px;
    background: #faf6f1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.mc005-payment-loading {
    font-size: 14px;
    color: #666;
}
