/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== 顶部购买通知 ========== */
.notification-container {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 70%;
}
.notification-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    padding: 8px 10px;
    backdrop-filter: blur(4px);
    opacity: 1;
    max-height: 40px;
    transition: all 0.5s ease;
    overflow: hidden;
}
.notification-item.removing {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    gap: 0;
}
.notification-item .text {
    flex: 1;
    color: #fff;
    margin-left: 8px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 主内容区 ========== */
.main-content {
    padding-bottom: 80px;
}

.banner-section img {
    width: 100%;
    display: block;
}

/* ========== 订单表单 ========== */
.form-section {
    background: #fff;
    border-top: 8px solid #f5f5f5;
}

.form-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 18px 15px;
    color: #dc2626;
}

.product-card {
    display: flex;
    padding: 0 15px 15px;
    gap: 12px;
}

.product-card .product-img {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card .product-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .express-tag {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #dc2626;
    color: #dc2626;
    font-size: 12px;
    border-radius: 3px;
    margin-top: 5px;
}

.product-card .price {
    color: #dc2626;
    font-weight: 700;
    font-size: 20px;
}

.product-card .price .symbol {
    font-size: 14px;
}

/* ========== 套餐选择 ========== */
.package-section {
    padding: 0 15px;
}

.package-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    padding: 10px 0;
    margin-top: 15px;
}

.package-option {
    border: 1px solid #dc2626;
    background: #fff5f5;
    color: #dc2626;
    padding: 12px 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

.package-option.active {
    background: #dc2626;
    color: #fff;
}

/* ========== 金额显示 ========== */
.amount-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 15px;
    margin-top: 5px;
}

.amount-row .label {
    font-size: 14px;
    color: #666;
}

.amount-row .value {
    color: #dc2626;
    font-weight: 700;
    font-size: 20px;
}

.amount-row .value .symbol {
    font-size: 13px;
}

/* ========== 表单字段 ========== */
.form-fields {
    padding: 0 15px;
}

.form-field {
    margin-bottom: 12px;
}

.form-field .field-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #dc2626;
    outline: none;
}

.form-field textarea {
    resize: vertical;
    min-height: 70px;
}

/* ========== 地区选择 ========== */
.area-select {
    display: flex;
    gap: 8px;
}

.area-select select {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    appearance: none;
}

/* ========== 付款方式 ========== */
.payment-section {
    padding: 0 15px;
    margin-top: 5px;
}

.payment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.payment-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding-top: 4px;
}

.payment-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-option {
    border: 2px solid #dc2626;
    color: #dc2626;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.payment-option.active {
    background: #dc2626;
    color: #fff;
}

.payment-option .check-icon {
    display: none;
}

.payment-option.active .check-icon {
    display: inline-block;
}

.payment-tip {
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    margin: 15px 0;
    background: #fff5f5;
}

/* ========== 运费 ========== */
.shipping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    margin-bottom: 15px;
}

.shipping-row .label {
    font-size: 14px;
    color: #666;
}

.shipping-row .value {
    font-size: 14px;
    color: #333;
}

/* ========== 提交按钮 ========== */
.submit-btn {
    display: block;
    width: calc(100% - 30px);
    margin: 0 auto 15px;
    padding: 14px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== 隐私条款 ========== */
.privacy-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0 15px 20px;
    font-size: 12px;
    color: #999;
}

.privacy-row svg {
    width: 16px;
    height: 16px;
}

.privacy-row a {
    color: #2563eb;
}

/* ========== 最新抢购 ========== */
.latest-section {
    background: #fff;
    margin-top: 10px;
    padding-bottom: 20px;
}

.latest-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 18px 0;
    color: #333;
}

.marquee-wrapper {
    height: 300px;
    overflow: hidden;
    margin: 0 15px;
    background: #f9f9f9;
    border-radius: 8px;
    position: relative;
}

.marquee-content {
    padding: 10px 15px;
}

.marquee-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.marquee-item:last-child {
    border-bottom: none;
}

.marquee-item .order-text {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* ========== 底部固定按钮 ========== */
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #dc2626;
    color: #fff;
    text-align: center;
    padding: 13px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.fixed-bottom.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* ========== 提交成功弹窗 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-box .success-icon {
    width: 60px;
    height: 60px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.modal-box .success-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.modal-box h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.modal-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-box .btn-close {
    padding: 10px 30px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    display: none;
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(4px);
}

.toast.show {
    display: block;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ========== 加载状态 ========== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 订单查询 ========== */
.order-query-section {
    background: #fff;
    margin-top: 10px;
    padding: 0 15px 20px;
}
.order-query-section .query-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 18px 0;
    color: #333;
}
.query-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 18px 16px;
}
.query-box .query-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    text-align: center;
}
.query-form {
    display: flex;
    gap: 10px;
}
.query-form input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}
.query-form input:focus {
    border-color: #dc2626;
}
.query-form button {
    padding: 12px 22px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}
.query-form button:hover {
    background: #b91c1c;
}
.query-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.query-result {
    margin-top: 14px;
    max-height: 400px;
    overflow-y: auto;
}
.query-result .no-result {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 30px 0;
}
.query-result .order-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.query-result .order-card:last-child {
    margin-bottom: 0;
}
.query-result .order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}
.query-result .order-card .order-no {
    color: #999;
    font-family: monospace;
}
.query-result .order-card .order-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.query-result .order-card .order-body {
    font-size: 13px;
    line-height: 1.8;
    color: #333;
}
.query-result .order-card .order-body span {
    color: #999;
}
.query-result .order-card .order-price {
    font-weight: 700;
    color: #dc2626;
}
.query-loading {
    text-align: center;
    padding: 20px 0;
    color: #999;
}
.query-loading .q-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: qspin 0.6s linear infinite;
}
@keyframes qspin {
    to { transform: rotate(360deg); }
}
