/*
Theme Name: Premium Computers
Author: Premium Computers
Description: Custom theme for Premium Computers store
Version: 1.0
*/

/* Fonts */
/* @import removed - fonts loaded via link tag in HTML */

/* CSS Variables */
:root {
  --primary: #1a237e;
  --secondary: #00bcd4;
  --accent: #ffc107;
  --background: #f5f5f5;
  --surface: #ffffff;
  --text-primary: #212121;
  --text-secondary: #757575;
  --success: #4caf50;
  --error: #f44336;
  --used: #ff9800;
  --new: #4caf50;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Open Sans', sans-serif; background: var(--background); color: var(--text-primary); line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; font-weight: 600; }
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.75rem; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border: none; border-radius: 8px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #151b60; }
.btn-accent { background: var(--accent); color: var(--text-primary); }
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-new { background: var(--new); color: white; }
.badge-used { background: var(--used); color: white; }
.badge-refurbished { background: #9c27b0; color: white; }

/* Header */
.navbar { position: fixed; top: 0; left: 0; right: 0; background: var(--surface); box-shadow: 0 2px 10px rgba(0,0,0,0.08); z-index: 1000; height: 70px; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo img { height: 70px; width: auto; vertical-align: middle; }
.logo span { color: var(--secondary); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.cart-btn { position: relative; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.cart-count { position: absolute; top: -8px; right: -8px; background: var(--accent); font-size: 0.7rem; font-weight: 600; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #2c3e93 100%); color: white; padding: 8rem 0 6rem; margin-top: 70px; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero h1 { font-size: 3rem; margin-bottom: 1.5rem; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; }
.hero-btn { padding: 1rem 2rem; border-radius: 8px; font-weight: 600; transition: all 0.3s; }
.hero-btn.primary { background: var(--accent); color: var(--text-primary); }
.hero-btn.primary:hover { background: #e6ae06; }
.hero-btn.secondary { background: transparent; color: white; border: 2px solid white; }
.hero-btn.secondary:hover { background: white; color: var(--primary); }
.hero img { max-width: 100%; border-radius: 12px; }

/* Section */
.section { padding: 4rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.view-all { color: var(--primary); font-weight: 500; }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.product-card { background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: all 0.3s; cursor: pointer; }
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-4px); }
.product-img { width: 100%; height: 200px; object-fit: cover; }
.product-badge { position: absolute; top: 12px; left: 12px; padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.product-img-wrap { position: relative; }
.product-content { padding: 1.25rem; }
.product-cat { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 0.5rem; }
.product-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.product-specs { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.product-warranty { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 1rem; }
.add-cart { width: 100%; padding: 0.75rem; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: 500; cursor: pointer; }
.add-cart:hover { background: #151b60; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card { background: var(--surface); padding: 2rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-align: center; }
.service-icon { font-size: 3rem; margin-bottom: 1rem; }
.service-name { font-size: 1.25rem; margin-bottom: 0.75rem; }
.service-desc { color: var(--text-secondary); margin-bottom: 1rem; }
.service-price { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 1.5rem; }

/* CTA */
.cta { background: var(--primary); border-radius: 16px; padding: 4rem; text-align: center; color: white; }
.cta h2 { font-size: 2rem; margin-bottom: 1rem; }
.cta p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }
.cta-btn { display: inline-block; padding: 1rem 2.5rem; background: var(--accent); color: var(--text-primary); border-radius: 8px; font-weight: 600; }

/* Footer */
.footer { background: var(--primary); color: white; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer h3 { font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--accent); }
.footer ul li { margin-bottom: 0.75rem; }
.footer a { color: rgba(255,255,255,0.8); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; color: rgba(255,255,255,0.6); }

/* Page Header */
.page-header { background: var(--primary); padding: 3rem 0; color: white; margin-top: 70px; }
.page-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.9; }

/* Content Layout */
.content { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem; display: grid; grid-template-columns: 280px 1fr; gap: 2rem; }

/* Cart & Checkout overrides */
#cartContent, #checkoutContent { display: flex; flex-direction: column; gap: 1.5rem; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.cart-item-actions { margin-left: auto; }
.empty { grid-column: 1/-1; text-align: center; padding: 4rem; }
.checkout-btn, .submit-btn { width: 100%; padding: 1rem; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 1rem; }
.checkout-btn:hover, .submit-btn:hover { background: #151b60; }
.continue-link { display: block; text-align: center; margin-top: 1rem; color: var(--text-secondary); }
.success { text-align: center; padding: 3rem; }
.success-icon { font-size: 4rem; width: 80px; height: 80px; background: var(--success); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.order-id { background: var(--surface); padding: 1rem; border-radius: 8px; margin: 1.5rem 0; }
.row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.form { background: var(--surface); padding: 2rem; border-radius: 12px; }
.items { margin-bottom: 1rem; }
.item { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #f0f0f0; }
.item-name { flex: 1; }
.item-qty { padding: 0 1rem; color: var(--text-secondary); }
.remove-btn { background: none; border: none; cursor: pointer; font-size: 1.25rem; }
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: var(--success); color: white; padding: 0.75rem 1.5rem; border-radius: 8px; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(1rem); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Filters */
.filters { background: var(--surface); padding: 1.5rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); height: fit-content; }
.filter-section { margin-bottom: 1.5rem; }
.filter-section h3 { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 0.75rem; }
.filter-btn { display: block; width: 100%; padding: 0.6rem 1rem; text-align: left; background: none; border: none; border-radius: 6px; cursor: pointer; font-size: 0.95rem; }
.filter-btn.active { background: var(--primary); color: white; }
.search-input { width: 100%; padding: 0.75rem 1rem; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 0.95rem; }
.search-input:focus { outline: none; border-color: var(--primary); }

/* Cart */
.cart-item { display: flex; gap: 1.5rem; padding: 1.5rem; background: var(--surface); border-radius: 12px; margin-bottom: 1rem; }
.cart-item img { width: 100px; height: 80px; object-fit: cover; border-radius: 8px; }
.qty-controls { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn { width: 32px; height: 32px; border: 2px solid #e0e0e0; background: var(--surface); border-radius: 6px; cursor: pointer; }
.summary { background: var(--surface); padding: 1.5rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.row-total { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e0e0e0; font-size: 1.25rem; font-weight: 700; }
.row-total span:last-child { color: var(--primary); }

/* Checkout */
.checkout-form { background: var(--surface); padding: 2rem; border-radius: 12px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: var(--surface); padding: 2rem; border-radius: 12px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 1.5rem; }
.close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Responsive */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-btns { justify-content: center; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Admin Panel */
body.locked { overflow: hidden; }
body.locked .sidebar,
body.locked .main,
body.locked .footer { display: none !important; }

#loginOverlay { display: none; }

.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: var(--primary); padding: 1.5rem; color: white; z-index: 9999; }
.sidebar .logo h1 { font-size: 1.25rem; margin-bottom: 2rem; color: white; }
.sidebar .logo span { color: var(--secondary); }
.sidebar .nav { margin-top: 1rem; }
.sidebar .nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border-radius: 8px; cursor: pointer; transition: background 0.2s; font-size: 0.95rem; color: rgba(255,255,255,0.9); }
.sidebar .nav-item:hover { background: rgba(255,255,255,0.15); color: white; }
.sidebar .nav-item.active { background: rgba(255,255,255,0.2); color: white; }
.sidebar .logout { position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; }
.sidebar .logout button { width: 100%; padding: 0.75rem; background: rgba(255,255,255,0.1); color: white; border: none; border-radius: 8px; cursor: pointer; }

.main { margin-left: 260px; padding: 2rem; min-height: 100vh; background: var(--background); }
.main .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid #e0e0e0; }
.main .header h2 { font-size: 1.5rem; }
.main .user { display: flex; align-items: center; gap: 0.75rem; }
.main .user-avatar { width: 36px; height: 36px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); padding: 1.5rem; border-radius: 12px; display: flex; align-items: center; gap: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.stat-icon { font-size: 1.75rem; width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-sales { background: #e8f5e9; }
.stat-orders { background: #e3f2fd; }
.stat-products { background: #f3e5f5; }
.stat-revenue { background: #fff3e0; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); }

.table-card { background: var(--surface); border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.table-header h3 { font-size: 1.1rem; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; border-bottom: 2px solid #e0e0e0; }
.table td { padding: 1rem; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; }
.table tr:hover { background: #fafafa; }

.form-card { background: var(--surface); border-radius: 12px; padding: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.5rem; }

.btn-secondary { background: #e0e0e0; color: var(--text-primary); }
.btn-danger { background: var(--error); color: white; }

select { padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.9rem; cursor: pointer; }

.status-pending { background: #fff3e0; color: #e65100; }
.status-processing { background: #e3f2fd; color: #1565c0; }
.status-shipped { background: #f3e5f5; color: #6a1b9a; }
.status-delivered { background: #e8f5e9; color: #2e7d32; }
.status-contacted { background: #e3f2fd; color: #1565c0; }
.status-completed { background: #e8f5e9; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }

@media (max-width: 1024px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}