/* ===== Wichit Parts - Motorcycle Spare Parts Store ===== */
/* Color Palette: Orange + Dark theme */
:root {
  --primary: #FF6B00;
  --primary-dark: #e55a00;
  --dark: #1a1a2e;
  --dark-light: #16213e;
  --light: #f8f9fa;
  --accent: #e94560;
  --gray: #6c757d;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light);
  color: #333;
  line-height: 1.6;
}

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

/* ===== Navbar ===== */
.navbar {
  background: var(--dark);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); text-decoration: none; }
.logo span { color: white; }
.nav-links { display: flex; list-style: none; gap: 25px; }
.nav-links a { color: white; text-decoration: none; font-size: 1rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }
.cart-icon { position: relative; }
.cart-btn { color: white; font-size: 1.3rem; text-decoration: none; position: relative; }
#cartCount {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  position: absolute;
  top: -8px;
  right: -10px;
}
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 4px; }
.mobile-menu-btn span { width: 25px; height: 3px; background: white; border-radius: 2px; }

/* ===== Hero Banner ===== */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '🏍️';
  position: absolute;
  font-size: 20rem;
  opacity: 0.05;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 30px; }
.search-box {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 50px;
  padding: 5px;
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 50px;
  outline: none;
}
.search-box button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s;
}
.search-box button:hover { background: var(--primary-dark); }

/* ===== Brand Selector ===== */
.brand-section { padding: 40px 0; text-align: center; }
.brand-section h2 { font-size: 1.8rem; margin-bottom: 25px; }
.brand-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.brand-card {
  background: white;
  padding: 20px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 2px solid transparent;
}
.brand-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.brand-card h3 { font-size: 1.2rem; color: var(--dark); }

/* ===== Category Grid ===== */
.category-section { padding: 40px 0; }
.category-section h2 { text-align: center; font-size: 1.8rem; margin-bottom: 30px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}
.category-card {
  background: white;
  padding: 30px 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s;
  text-decoration: none;
  color: var(--dark);
}
.category-card:hover { transform: translateY(-5px); }
.category-card .icon { font-size: 3rem; display: block; margin-bottom: 10px; }
.category-card .name { font-weight: bold; font-size: 1rem; }

/* ===== Products Grid ===== */
.products-section { padding: 40px 0; }
.products-section h2 { font-size: 1.8rem; margin-bottom: 25px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0,0,0,0.15); }
.product-image {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}
.product-info { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 1rem; font-weight: bold; margin-bottom: 5px; color: var(--dark); }
.product-sku { font-size: 0.8rem; color: var(--gray); margin-bottom: 8px; }
.product-price { font-size: 1.3rem; color: var(--primary); font-weight: bold; margin-bottom: 10px; }
.product-stock { font-size: 0.85rem; margin-bottom: 10px; }
.stock-in { color: var(--success); }
.stock-out { color: var(--danger); }
.stock-low { color: var(--warning); }
.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  transition: background 0.3s;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { background: var(--gray); cursor: not-allowed; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c82333; }
.btn-success { background: var(--success); }

/* ===== Filters Sidebar ===== */
.filters-bar {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 25px;
  align-items: center;
}
.filter-select {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
}

/* ===== Product Detail ===== */
.product-detail { padding: 40px 0; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-detail-image {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  border-radius: var(--radius);
}
.product-detail-info h1 { font-size: 1.8rem; margin-bottom: 10px; }
.product-detail-info .price { font-size: 2rem; color: var(--primary); margin: 15px 0; }
.product-detail-info .sku { color: var(--gray); margin-bottom: 15px; }
.product-detail-info .description { margin: 20px 0; line-height: 1.8; }
.compatible-list { margin: 20px 0; }
.compatible-list h3 { font-size: 1.1rem; margin-bottom: 10px; }
.compatible-list ul { list-style: none; padding-left: 0; }
.compatible-list li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.quantity-selector { display: flex; align-items: center; gap: 15px; margin: 20px 0; }
.quantity-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: white;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: var(--radius);
}
.quantity-input { width: 60px; text-align: center; font-size: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); padding: 5px; }

/* ===== Cart Page ===== */
.cart-page { padding: 40px 0; }
.cart-page h1 { font-size: 1.8rem; margin-bottom: 25px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 15px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}
.cart-item-image { font-size: 3rem; width: 80px; text-align: center; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1.1rem; margin-bottom: 5px; }
.cart-item-info .sku { font-size: 0.8rem; color: var(--gray); }
.cart-item-price { font-size: 1.2rem; color: var(--primary); font-weight: bold; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; }
.cart-summary {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.cart-summary h2 { font-size: 1.3rem; margin-bottom: 15px; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cart-summary-total { font-size: 1.4rem; font-weight: bold; color: var(--primary); border-bottom: none; }
.empty-cart { text-align: center; padding: 60px 20px; }
.empty-cart .icon { font-size: 5rem; margin-bottom: 20px; }
.empty-cart h2 { font-size: 1.5rem; margin-bottom: 10px; }
.empty-cart p { color: var(--gray); margin-bottom: 20px; }

/* ===== Checkout ===== */
.checkout-page { padding: 40px 0; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.checkout-form { background: white; padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); }
.checkout-form h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.pay-at-store-banner {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 2px solid var(--warning);
  padding: 15px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 20px;
}
.pay-at-store-banner h3 { color: #856404; }
.pay-at-store-banner p { color: #856404; margin: 0; }
.order-summary { background: white; padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); }
.order-summary h2 { margin-bottom: 15px; }
.order-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* ===== Orders ===== */
.orders-page { padding: 40px 0; }
.order-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.order-number { font-weight: bold; font-size: 1.1rem; }
.order-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-ready { background: #d4edda; color: #155724; }
.status-completed { background: #c3e6cb; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* ===== Login ===== */
.login-page { padding: 60px 0; }
.login-box {
  max-width: 400px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login-box h1 { text-align: center; margin-bottom: 30px; }
.login-box .form-group { margin-bottom: 20px; }
.login-box .btn { width: 100%; }
.login-switch { text-align: center; margin-top: 20px; }
.login-switch a { color: var(--primary); }

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: white;
  padding: 40px 0;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.footer-section h3 { color: var(--primary); margin-bottom: 15px; }
.footer-section p, .footer-section a { color: #ccc; text-decoration: none; line-height: 2; }
.footer-section a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; margin-top: 20px; color: #999; }

/* ===== Alerts ===== */
.alert {
  padding: 12px 20px;
  border-radius: var(--radius);
  margin-bottom: 15px;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
  }
  .nav-links.active { display: flex; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .cart-item { flex-direction: column; align-items: flex-start; }
  .cart-item-actions { width: 100%; justify-content: space-between; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { gap: 15px; }
  .brand-card { padding: 15px 25px; }
}