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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
}

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

/* Header */
.header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: #666;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #1a1a1a;
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #1a1a1a;
  transition: transform 0.2s;
}

.cart-btn:hover {
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #dc2626;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  padding: 80px 0;
  text-align: center;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -1px;
  color: #1a1a1a;
}

.hero-subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: #dc2626;
  color: white;
}

.btn-primary:hover {
  background-color: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-block {
  width: 100%;
}

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

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: #1a1a1a;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e5e5e5;
}

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

.product-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background-color: #f5f5f5;
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.product-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
}

.add-to-cart-btn {
  background-color: #1a1a1a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.add-to-cart-btn:hover {
  background-color: #333;
  transform: scale(1.05);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  transition: right 0.3s;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e5e5;
}

.cart-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #666;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #1a1a1a;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
}

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

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

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

.cart-item-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.cart-item-price {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-btn {
  background-color: #f5f5f5;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.quantity-btn:hover {
  background-color: #e5e5e5;
}

.quantity {
  font-size: 14px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 13px;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
  transition: opacity 0.2s;
}

.remove-btn:hover {
  opacity: 0.7;
}

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

.cart-footer {
  padding: 24px;
  border-top: 1px solid #e5e5e5;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a1a;
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background-color: #1a1a1a;
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 1001;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 240px;
  }
}
