:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5849be;
    --bg-dark: #0f0f13;
    --bg-card: #1e1e24;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-red: #ff4757;
    --accent-green: #2ed573;
    --border-color: #2f2f36;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}
.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: white;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.qty-btn:hover {
    background: #2a2a2a;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-wrapper input {
    width: 70px;
    text-align: center;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: rgba(30, 30, 36, 0.9);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 0;
    background: radial-gradient(circle at center, #2d2d3a 0%, var(--bg-dark) 70%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-primary:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

/* Features */
.features {
    padding: 60px 0;
    background-color: var(--bg-card);
}

.features h2, .products-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-dark);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* Products */
.products-section {
    padding: 60px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 10px;
}

.stock-status {
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.stock-low {
    color: var(--accent-red);
    font-weight: bold;
    animation: pulse 2s infinite;
}

.stock-ok {
    color: var(--accent-green);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.buy-btn {
    margin-top: auto;
    width: 100%;
}

.badge-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-red);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--text-main);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: white;
}

.full-width {
    width: 100%;
}

.total-display {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: right;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* Payment Info Styles */
.payment-info {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.payment-instruction {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

#qrcode-container {
    background: white;
    padding: 15px;
    display: inline-block;
    border-radius: 8px;
    margin-bottom: 20px;
}

.address-box {
    background-color: var(--bg-dark);
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

#pay-address {
    word-break: break-all;
    text-align: left;
    margin-right: 10px;
    color: var(--accent-green);
}

#copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

#copy-btn:hover {
    color: var(--text-main);
}

.status-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.warning-text {
    font-size: 0.8rem;
    color: var(--accent-red);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
}

/* Filters */
.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

