/* TechShop Demo - E-commerce Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Header / Navbar */
.navbar {
  background: #1a1a2e;
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.navbar .logo:hover {
  color: #4cc9f0;
}

.cart-link {
  position: relative;
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-link:hover {
  color: #4cc9f0;
}

.cart-icon {
  font-size: 1.4rem;
}

#cart-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #e63946;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.page-header p {
  color: #666;
  font-size: 1.1rem;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #eee;
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.product-description {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 16px;
  min-height: 48px;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2a9d8f;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: #4361ee;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #3a56d4;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-danger {
  background: #e63946;
  color: white;
}

.btn-danger:hover {
  background: #d62839;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Cart Page */
.cart-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cart-empty {
  text-align: center;
  padding: 48px 24px;
  color: #666;
}

.cart-empty h2 {
  margin-bottom: 16px;
  color: #999;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.cart-item-price {
  color: #2a9d8f;
  font-weight: 600;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: #f0f0f0;
}

.quantity-value {
  width: 40px;
  text-align: center;
  font-weight: 600;
}

.cart-item-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  min-width: 80px;
  text-align: right;
}

.cart-item-remove {
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* Cart Summary */
.cart-summary {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-total {
  font-size: 1.5rem;
}

.cart-total span {
  font-weight: 700;
  color: #2a9d8f;
}

.checkout-btn {
  padding: 16px 48px;
  font-size: 1.1rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2a9d8f;
  color: white;
  padding: 16px 32px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 1000;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }
  
  .container {
    padding: 16px;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .cart-item {
    flex-wrap: wrap;
  }
  
  .cart-item-image {
    width: 80px;
    height: 80px;
  }
  
  .cart-summary {
    flex-direction: column;
    gap: 16px;
  }
  
  .checkout-btn {
    width: 100%;
  }
}
