* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .logo {
    font-size: 24px;
    font-weight: 800;
    color: #ff6b00;
    letter-spacing: -1px;
}
.cart-btn {
    background: #ff6b00;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.cart-btn:hover { background: #e05f00; }
.cart-count {
    background: #ff003c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -6px;
}

/* ── Products Grid ── */
.products-section {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.products-section h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #fff;
}
.products-section .subtitle {
    color: #666;
    margin-bottom: 32px;
    font-size: 14px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
}
.product-card:hover {
    border-color: #ff6b00;
    transform: translateY(-4px);
}
.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.product-info {
    padding: 20px;
}
.product-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.product-desc {
    font-size: 13px;
    color: #777;
    margin-bottom: 16px;
    line-height: 1.5;
}
.product-price {
    font-size: 22px;
    font-weight: 800;
    color: #ff6b00;
    margin-bottom: 16px;
}
.product-actions {
    display: flex;
    gap: 8px;
}
.btn-add {
    flex: 1;
    background: #1a1a1a;
    color: #ccc;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-add:hover { background: #222; color: #fff; border-color: #555; }
.btn-buy {
    flex: 1;
    background: #ff6b00;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-buy:hover { background: #e05f00; }

/* ── Cart Sidebar ── */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
}
.cart-overlay.active { display: block; }
.cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #111;
    border-left: 1px solid #222;
    z-index: 201;
    transition: right 0.35s ease;
    display: flex;
    flex-direction: column;
}
.cart-panel.active { right: 0; }
.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 { font-size: 18px; color: #fff; }
.cart-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
}
.cart-close:hover { color: #fff; }
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
    align-items: center;
}
.cart-item img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}
.cart-item-details { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; color: #ddd; }
.cart-item-price { font-size: 15px; color: #ff6b00; font-weight: 700; margin-top: 2px; }
.cart-remove {
    background: none;
    border: none;
    color: #ff003c;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}
.cart-remove:hover { text-decoration: underline; }
.cart-empty {
    text-align: center;
    color: #555;
    padding: 40px 0;
    font-size: 14px;
}
.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid #222;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.btn-checkout {
    width: 100%;
    background: #ff6b00;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-checkout:hover { background: #e05f00; }
.btn-checkout:disabled { background: #333; color: #666; cursor: not-allowed; }

/* ── Checkout Page ── */
.checkout-container {
    max-width: 560px;
    margin: 40px auto;
    padding: 0 20px;
}
.checkout-container h2 {
    font-size: 26px;
    margin-bottom: 24px;
    color: #fff;
}
.checkout-card {
    background: #141414;
    border: 1px solid #222;
    border-radius: 14px;
    padding: 32px;
}
.checkout-card h3 {
    font-size: 16px;
    color: #ff6b00;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 600;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #ff6b00;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.card-preview {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,107,0,0.1);
    border-radius: 50%;
}
.card-preview .card-chip {
    width: 40px;
    height: 28px;
    background: linear-gradient(135deg, #d4a853, #f0d48a, #c9952a);
    border-radius: 4px;
    margin-bottom: 20px;
}
.card-preview .card-number {
    font-size: 18px;
    letter-spacing: 3px;
    font-weight: 500;
    color: #ddd;
    font-family: 'Courier New', monospace;
}
.card-preview .card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.card-preview .card-holder-label,
.card-preview .card-exp-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.card-preview .card-holder-value,
.card-preview .card-exp-value {
    font-size: 14px;
    color: #ddd;
    margin-top: 2px;
    font-family: 'Courier New', monospace;
}
.card-preview .card-brand {
    font-size: 28px;
    font-weight: 800;
    color: rgba(255,255,255,0.15);
    position: absolute;
    bottom: 24px;
    right: 24px;
}
.order-summary {
    margin-bottom: 24px;
    padding: 16px;
    background: #0a0a0a;
    border-radius: 8px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #aaa;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #ff6b00;
    border-top: 1px solid #222;
    margin-top: 8px;
}
.btn-pay {
    width: 100%;
    background: linear-gradient(135deg, #ff6b00, #ff3c00);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-pay:hover { opacity: 0.9; }
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #ff6b00;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.back-link:hover { text-decoration: underline; }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    border: 1px solid #333;
    font-size: 14px;
    font-weight: 600;
    z-index: 999;
    transition: transform 0.35s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Success ── */
.success-box {
    text-align: center;
    padding: 60px 20px;
}
.success-icon {
    width: 80px;
    height: 80px;
    background: #00c853;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 20px;
}
.success-box h2 { color: #fff; margin-bottom: 8px; }
.success-box p { color: #666; margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .navbar { padding: 14px 20px; }
    .products-section { padding: 20px; }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-img { height: 140px; }
    .product-info { padding: 12px; }
    .product-name { font-size: 14px; }
    .product-price { font-size: 17px; }
    .product-actions { flex-direction: column; }
    .checkout-card { padding: 20px; }
    .form-row { grid-template-columns: 1fr; }
}