* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --nike-black: #111;
    --nike-dark: #1a1a1a;
    --nike-gray: #f5f5f5;
    --nike-gray2: #e5e5e5;
    --nike-text: #111;
    --nike-muted: #707072;
    --nike-accent: #fa5400;
    --nike-white: #fff;
    --nike-radius: 4px;
    --nike-font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body {
    font-family: var(--nike-font);
    color: var(--nike-text);
    background: var(--nike-white);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nike-black);
    color: var(--nike-white);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.navbar .logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -1px;
    cursor: pointer;
}

.navbar .logo span {
    color: var(--nike-white);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--nike-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 1; }

.nav-icons {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

/* ===== Hero Banner ===== */
.hero {
    position: relative;
    width: 100%;
    height: 480px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(250,84,0,0.08), transparent 60%),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.04), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--nike-white);
}

.hero-content .eyebrow {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 12px;
}

.hero-content h1 {
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.7;
    margin-bottom: 28px;
}

.hero-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--nike-white);
    color: var(--nike-black);
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.15s, background 0.2s;
}

.hero-btn:hover {
    transform: scale(1.05);
    background: var(--nike-gray2);
}

/* ===== Section Title ===== */
.section-title {
    padding: 48px 24px 24px;
    text-align: center;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.section-title p {
    color: var(--nike-muted);
    font-size: 15px;
    margin-top: 8px;
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    padding: 0 24px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: var(--nike-gray);
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-card.is-selected {
    outline: 3px solid var(--nike-black);
    outline-offset: -3px;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.product-card:nth-child(2n) .product-image {
    background: linear-gradient(135deg, #e8e8e8, #d8d8d8);
}

.product-card:nth-child(3n) .product-image {
    background: linear-gradient(135deg, #f5f0eb, #ebe5df);
}

.product-info {
    padding: 16px 20px 20px;
}

.product-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--nike-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-info .product-desc {
    font-size: 13px;
    color: var(--nike-muted);
    margin-bottom: 10px;
}

.product-info .product-colors {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--nike-gray2);
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
}

.buy-btn {
    padding: 8px 24px;
    background: var(--nike-black);
    color: var(--nike-white);
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.buy-btn:hover { opacity: 0.85; }
.buy-btn:active { transform: scale(0.95); }
.buy-btn:disabled { opacity: 0.4; cursor: default; }

/* ===== Payment Panel ===== */
.pay-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pay-overlay.show {
    display: flex;
}

.pay-panel {
    background: var(--nike-white);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.pay-panel-header {
    background: var(--nike-black);
    color: var(--nike-white);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pay-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--nike-white);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
}

.close-btn:hover { opacity: 1; }

.pay-panel-body {
    padding: 28px 24px;
    text-align: center;
}

.order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--nike-gray2);
    margin-bottom: 24px;
}

.order-summary .summary-name {
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}

.order-summary .summary-price {
    font-size: 22px;
    font-weight: 700;
}

.qr-shell {
    display: none;
    flex-direction: column;
    align-items: center;
}

.qr-shell.show { display: flex; }

.qrcode {
    padding: 12px;
    border: 1px solid var(--nike-gray2);
    border-radius: 8px;
    margin-bottom: 16px;
}

.qr-meta {
    text-align: center;
}

.qr-meta p {
    font-size: 13px;
    color: var(--nike-muted);
    margin-bottom: 4px;
}

.status-line {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    background: var(--nike-gray);
    color: var(--nike-text);
}

.status-line[data-mode="success"] {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-line[data-mode="error"] {
    background: #ffebee;
    color: #c62828;
}

.status-line[data-mode="warning"] {
    background: #fff3e0;
    color: #e65100;
}

.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--nike-black);
    color: var(--nike-white);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.primary-btn:hover { opacity: 0.85; }
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.4; cursor: default; }

/* ===== Footer ===== */
.footer {
    background: var(--nike-black);
    color: var(--nike-white);
    text-align: center;
    padding: 32px 24px;
    font-size: 13px;
    opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { height: 360px; }
    .hero-content h1 { font-size: 40px; }
    .product-grid { grid-template-columns: 1fr; padding: 0 16px 32px; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 32px; }
    .hero-content p { font-size: 15px; }
}
