* { 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;
}
body.motion-ready { overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* ===== Brand intro and entrance motion ===== */
.brand-intro {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    background: #f8f8f8;
    opacity: 1;
    visibility: visible;
    transition: opacity .48s ease, visibility .48s ease;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}
.brand-intro.skip { display: none; }
.brand-intro.leave { opacity: 0; visibility: hidden; pointer-events: none; }
.brand-intro-inner { text-align: center; padding: 24px; }
.brand-intro-logo {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid #222;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(0,0,0,.12);
    transform: translateY(12px) scale(.88);
    opacity: 0;
}
.brand-intro-logo img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-intro-logo span { font-size: 34px; font-weight: 900; color: #111; }
.brand-intro-name { font-size: 22px; font-weight: 900; color: #111; opacity: 0; transform: translateY(8px); }
.brand-intro-desc { margin-top: 6px; color: #777; font-size: 13px; opacity: 0; transform: translateY(6px); }
.brand-intro-line { width: 92px; height: 2px; margin: 20px auto 0; overflow: hidden; background: #e3e3e3; opacity: 0; }
.brand-intro-line i { display: block; width: 100%; height: 100%; background: #222; transform: translateX(-100%); }
.brand-intro.play .brand-intro-logo { animation: brandLogoIn .64s cubic-bezier(.22,.8,.3,1) forwards; }
.brand-intro.play .brand-intro-name { animation: brandTextIn .48s .25s ease forwards; }
.brand-intro.play .brand-intro-desc { animation: brandTextIn .48s .38s ease forwards; }
.brand-intro.play .brand-intro-line { animation: brandFadeIn .2s .46s ease forwards; }
.brand-intro.play .brand-intro-line i { animation: brandLine 1s .48s cubic-bezier(.22,.8,.3,1) forwards; }
@keyframes brandLogoIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes brandTextIn { to { opacity: 1; transform: translateY(0); } }
@keyframes brandFadeIn { to { opacity: 1; } }
@keyframes brandLine { to { transform: translateX(0); } }
.motion-ready .header { opacity: 0; transform: translateY(-10px); }
.motion-ready.page-ready .header { opacity: 1; transform: translateY(0); transition: opacity .5s ease, transform .5s ease; }
.motion-ready .reveal-item { opacity: 0; transform: translateY(16px); }
.motion-ready .reveal-item.is-visible { opacity: 1; transform: translateY(0); transition: opacity .55s var(--reveal-delay, 0ms) ease, transform .55s var(--reveal-delay, 0ms) cubic-bezier(.22,.8,.3,1); }

.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: contain;
    border: 2px solid #222;
}
.shop-img-fallback { display: grid; place-items: center; background: #fff; color: #111; font-size: 18px; font-weight: 900; }
.page-ready .shop-img { animation: headerLogoSettle .62s cubic-bezier(.22,.8,.3,1) both; }
@keyframes headerLogoSettle {
    0% { opacity: 0; transform: scale(.72) rotate(-5deg); }
    70% { opacity: 1; transform: scale(1.06) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
.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;
}
.btn-secondary {
    background: transparent;
    color: #222;
    border: 2px solid #222;
}
.btn-secondary:hover {
    background: #222;
    color: #fff;
}
.btn-service {
    background: #222;
    color: #fff;
    border: 2px solid #222;
}
.btn-service:hover {
    background: #111;
    border-color: #111;
}

/* ===== 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;
}

/* ===== 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);
    transform: translateY(-2px);
}
.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-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: 8px; font-weight: 800; }
.query-tip { color: #718096; font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
.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; }
.query-summary { margin-top: 20px; padding: 9px 12px; background: #f5f5f5; color: #555; border-radius: 4px; font-size: 13px; }
.query-empty { text-align: center; padding: 36px 10px 20px; color: #888; font-size: 14px; }
.order-result { margin-top: 18px; padding: 4px 16px 16px; border: 1px solid #ddd; border-radius: 6px; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.04); }
.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; }
.order-number { word-break: break-all; margin-left: 20px; }
.order-price { color: #e53935; }
.delivery-row { flex-direction: column; align-items: stretch; gap: 8px; }
.delivery-image { text-align: center; margin-top: 8px; }
.delivery-image img { display: block; max-width: 100%; max-height: 520px; margin: 0 auto; border-radius: 6px; object-fit: contain; }
.after-sales-btn { display: block; width: 100%; margin-top: 12px; padding: 11px 16px; background: #222; color: #fff; border: 2px solid #222; border-radius: 4px; text-align: center; font-size: 14px; font-weight: 700; transition: .2s; }
.after-sales-btn:hover { background: #fff; color: #222; }
.pending-hint { margin-top: 12px; padding: 10px 12px; border-radius: 4px; background: #fff8e1; color: #8a6200; font-size: 13px; }
.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) {
    .brand-intro { display: none !important; }
    .motion-ready .header, .motion-ready .reveal-item { opacity: 1 !important; transform: none !important; }
    .header { flex-wrap: wrap; gap: 10px; }
    .header-right a { padding: 6px 12px; font-size: 12px; }
    .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; }
    .query-card { padding: 20px 15px; }
    .query-form { flex-direction: column; }
    .query-form button { width: 100%; }
    .order-result { padding: 4px 12px 14px; }
    .order-row { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .brand-intro { display: none !important; }
    .motion-ready .header, .motion-ready .reveal-item { opacity: 1; transform: none; }
}

/* Payment methods are configured independently in the admin panel. */
.payment-options { display:flex; gap:8px; width:100%; }
.payment-option { flex:1 1 0; min-width:0; }
.payment-option input { display:none; }
.payment-option-content { display:flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:8px 12px; border:2px solid #e2e8f0; border-radius:8px; background:#fff; cursor:pointer; transition:.2s; }
.payment-option input:checked + .payment-option-content { border-color:#222; background:#222; color:#fff; }
.payment-option input:disabled + .payment-option-content { opacity:.5; cursor:not-allowed; }
