* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: #f8f8f8;
    color: #222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }

.main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px 80px;
}

/* ===== Decorative Elements ===== */
.main::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #111, #555, #111);
    z-index: 1000;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 2px solid #222;
    margin-bottom: 20px;
    position: relative;
}
.header::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; right: 0;
    height: 1px;
    background: #999;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.shop-img {
    width: 44px; height: 44px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #222;
}
.shop-title {
    font-weight: 800;
    font-size: 18px;
    color: #111;
    letter-spacing: 0.5px;
}
.header-right { display: flex; gap: 8px; align-items: center; }
.header-right a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.search-box input {
    padding: 8px 14px;
    border: 2px solid #222;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    width: 160px;
    background: #f8f8f8;
    transition: border-color 0.2s, width 0.2s;
    font-family: inherit;
}
.search-box input:focus {
    border-color: #111;
    width: 200px;
}
.search-box input::placeholder {
    color: #999;
}
.btn-secondary {
    background: transparent;
    color: #222;
    border: 2px solid #222;
}
.btn-secondary:hover {
    background: #222;
    color: #fff;
}

/* ===== Notice ===== */
.notice-section {
    background: #f5f5f5;
    border: 2px solid #222;
    padding: 11px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.notice-dot {
    width: 8px; height: 8px;
    background: #222;
    border-radius: 50%;
    flex-shrink: 0;
}
.notice-text {
    color: #333;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Product description ===== */
.product-gallery {
    background: #fafafa;
    border: 2px solid #222;
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.product-gallery-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}
.product-gallery-body {
    font-size: 13px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Banner ===== */
.banner-wrap { margin-bottom: 24px; }
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid #222;
}
.banner-track { display: flex; transition: transform 0.6s ease; }
.banner-slide { min-width: 100%; aspect-ratio: 21 / 9; }
.banner-slide a { display: block; width: 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: #222; border: none;
    cursor: pointer; font-size: 16px; display: flex;
    align-items: center; justify-content: center; z-index: 5;
    color: #fff; transition: 0.2s; line-height: 1;
}
.banner-arrow:hover { background: #111; }
.banner-arrow-prev { left: 10px; }
.banner-arrow-next { right: 10px; }
.banner-dots {
    display: flex; justify-content: center; gap: 8px;
    padding: 10px 0; position: absolute; bottom: 6px; left: 0; right: 0;
}
.banner-dots .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer; transition: 0.3s;
}
.banner-dots .dot.active { background: #fff; transform: scale(1.3); }

/* ===== Featured Section ===== */
.featured-section {
    margin-bottom: 28px;
    position: relative;
}
.featured-badge {
    display: inline-block;
    background: #222;
    color: #fff;
    padding: 4px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-radius: 2px;
}
.featured-card {
    border-color: #222 !important;
    background: #fafafa;
}
.featured-card .product-title {
    color: #111;
}

/* ===== Section Divider ===== */
.section-divider {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}
.section-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: #222;
    transform: translateY(-50%);
}
.section-divider span {
    display: inline-block;
    background: #f8f8f8;
    padding: 0 18px;
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 16px;
    color: #111;
    letter-spacing: 1px;
}

/* ===== Product Card ===== */
.product-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 14px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 0;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    border-color: #999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.product-card.active {
    background: #f5f5f5;
    border-color: #222;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.product-wrapper { margin-bottom: 12px; }

.product-image {
    width: 64px; height: 64px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 14px;
    border: 2px solid #eee;
    flex-shrink: 0;
}
.product-info { flex: 1; min-width: 0; }
.product-title {
    font-weight: 700;
    margin-bottom: 6px;
    color: #111;
    font-size: 15px;
    line-height: 1.4;
}
.product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.product-price {
    font-size: 16px;
    color: #c62828;
    font-weight: 800;
}
.product-original-price {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}
.product-sold {
    font-size: 12px;
    color: #888;
}
.product-stock {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: auto;
    font-weight: 600;
}
.stock-available { background: #e8f5e9; color: #1b5e20; }
.stock-limited { background: #ffebee; color: #b71c1c; }
.stock-out { background: #f5f5f5; color: #999; }

.chevron {
    flex-shrink: 0;
    transition: transform 0.3s;
    margin-left: 8px;
}
.product-card.active .chevron {
    transform: rotate(90deg);
    stroke: #222;
}

/* ===== Buy Panel ===== */
.buy-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-left: 2px solid #ddd;
    border-right: 2px solid #ddd;
    border-radius: 0 0 6px 6px;
    background: #fcfcfc;
}
.buy-panel.open {
    max-height: 500px;
    border-bottom: 2px solid #222;
    border-left-color: #222;
    border-right-color: #222;
}
.buy-panel-body { padding: 18px 16px; }

.panel-desc {
    padding: 12px 16px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.panel-group {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px 0;
    margin-bottom: 16px;
    background: #fff;
}
.panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}
.panel-row:last-child { border-bottom: none; }
.panel-label {
    font-weight: 700;
    font-size: 14px;
    color: #222;
    white-space: nowrap;
    margin-right: 12px;
}
.panel-label .required { color: #c62828; }

.panel-row .quantity-control { flex-shrink: 0; display: flex; align-items: center; }
.quantity-btn {
    width: 32px; height: 32px;
    line-height: 32px; text-align: center;
    background: #222; color: #fff;
    border-radius: 4px; cursor: pointer;
    border: none; font-size: 18px;
    font-weight: 700;
    transition: 0.15s;
}
.quantity-btn:hover { background: #111; }
.quantity-input {
    width: 56px; height: 32px;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 0 4px;
    margin: 0 6px;
    text-align: center;
    background: #fff;
    font-weight: 700;
    font-size: 15px;
}

.panel-row .contact-input {
    width: 200px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.panel-row .contact-input:focus { border-color: #222; }

.panel-row .payment-options {
    display: flex;
    gap: 8px;
}
.panel-row .payment-option { flex: 0 1 auto; min-width: 80px; }
.panel-row .payment-option input { display: none; }
.panel-row .payment-option-content {
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #555;
}
.panel-row .payment-option input:checked + .payment-option-content {
    border-color: #222;
    background: #222;
    color: #fff;
}

.panel-hint {
    font-size: 12px;
    color: #888;
    margin-top: -10px;
    margin-bottom: 14px;
    padding: 0 16px;
    border-left: 3px solid #222;
}

.panel-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: #222;
    color: #fff;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 1px;
}
.panel-submit:hover {
    background: #111;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* Pulsing effect for featured button */
.panel-submit.pulse {
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,34,34,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34,34,34,0); }
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 20px 0;
    line-height: 1.6;
}
.footer-divider {
    height: 2px;
    background: #222;
    margin-bottom: 16px;
    max-width: 60px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ===== Order Query ===== */
.query-page { padding: 20px 0; }
.query-card {
    max-width: 500px; margin: 0 auto;
    background: #fff;
    border: 2px solid #222;
    border-radius: 6px;
    padding: 28px;
}
.query-card h2 { font-size: 18px; margin-bottom: 20px; font-weight: 800; }
.query-form { display: flex; gap: 10px; }
.query-form input {
    flex: 1; padding: 10px 14px;
    border: 2px solid #ddd; border-radius: 4px;
    font-size: 14px; outline: none;
}
.query-form input:focus { border-color: #222; }
.query-form button {
    padding: 10px 24px; background: #222; color: #fff;
    border: none; border-radius: 4px; cursor: pointer;
    font-size: 14px; font-weight: 600;
}
.query-form button:hover { background: #111; }
.order-result { margin-top: 20px; }
.order-row {
    display: flex; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #eee;
    font-size: 14px;
}
.order-row:last-child { border-bottom: none; }
.order-label { color: #888; font-weight: 600; }
.order-value { font-weight: 700; text-align: right; }
.card-info-box {
    background: #f5f5f5;
    border: 2px solid #222;
    border-radius: 4px;
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 8px;
}

/* ===== Success Page ===== */
.success-page { padding: 40px 0; text-align: center; }
.success-card {
    max-width: 480px; margin: 0 auto;
    background: #fff; border: 2px solid #222;
    border-radius: 6px; padding: 36px 28px;
}
.success-card .icon { font-size: 48px; margin-bottom: 12px; }
.success-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.success-card p { color: #888; margin-bottom: 20px; }
.info-block { text-align: left; }
.info-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #eee;
    font-size: 14px;
}
.info-label { color: #888; font-weight: 600; }
.info-value { font-weight: 700; text-align: right; }
.success-card .btn-back {
    display: inline-block; margin-top: 20px;
    padding: 12px 36px; background: #222; color: #fff;
    border-radius: 4px; font-weight: 700; transition: 0.2s;
}
.success-card .btn-back:hover { background: #111; }

/* ===== Badge ===== */
.badge { display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 700; border-radius: 2px; }
.badge-success { background: #e8f5e9; color: #1b5e20; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-info { background: #e3f2fd; color: #0d47a1; }
.badge-secondary { background: #f5f5f5; color: #666; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .header { flex-wrap: wrap; gap: 10px; }
    .header-right { width: 100%; justify-content: flex-end; }
    .header-right a { padding: 6px 12px; font-size: 12px; }
    .search-box input { width: 120px; }
    .search-box input:focus { width: 140px; }
    .panel-row { flex-wrap: wrap; gap: 8px; }
    .panel-row .contact-input { width: 100%; }
    .panel-row .payment-options { width: 100%; }
    .banner-slide { aspect-ratio: 16 / 9; }
    .product-image { width: 56px; height: 56px; }
}
