@import url("https://fonts.googleapis.com/css?family=Roboto:300");

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

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f8f8;
  color: #333;
}

/* Layout Containers */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}

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

.header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.product-card:hover {
  transform: translateY(-2px);
}

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

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.product-price {
  font-size: 1rem;
  color: #666;
  margin-bottom: 15px;
}

.product-price::before {
  content: '$';
}

/* Add to Bundle Button */
.add-to-bundle-btn {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #ddd;
  background: white;
  color: #333;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.add-to-bundle-btn:hover {
  border-color: #999;
}

.add-to-bundle-btn.added {
  background: #333;
  color: white;
  border-color: #333;
}

.add-to-bundle-btn .plus-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.add-to-bundle-btn.added .plus-icon {
  display: none;
}

.add-to-bundle-btn .check-icon {
  display: none;
  font-size: 1.2rem;
}

.add-to-bundle-btn.added .check-icon {
  display: block;
}

/* Sidebar */
.bundle-sidebar {
  background: white;
  border-radius: 0;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 20px;
}

.bundle-header {
  margin-bottom: 20px;
}

.bundle-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.bundle-subtitle {
  color: #666;
  font-size: 0.9rem;
}

/* Progress */
.progress-container {
  margin: 20px 0 30px 0;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #333;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
  text-align: right;
}

/* Bundle Items */
.bundle-items {
  height: auto;
  margin-bottom: 20px;
  min-height: 200px;
}

.bundle-items.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
}

.bundle-slot {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  padding: 10px;
}

.bundle-slot.empty {
  justify-content: space-between;
  font-style: italic;
  font-size: 0.9rem;
  padding: 10px;
}

/* Bundle Item */
.bundle-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

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

.bundle-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0;
  margin-right: 15px;
}

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

.bundle-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.bundle-item-price {
  font-size: 0.9rem;
  color: #666;
}

.bundle-item-price::before {
  content: '$';
}

/* Quantity Controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

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

.quantity {
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

/* Delete Button */
.delete-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  margin-left: 10px;
}

.delete-btn:hover {
  color: #666;
}

/* Bundle Summary */
.bundle-summary {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.summary-row.discount {
  color: #000;
}

.summary-row.total {
  font-weight: 600;
  font-size: 1rem;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* Proceed Button */
.proceed-btn {
  width: 100%;
  padding: 15px;
  background: #000;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proceed-btn:disabled {
  background: #000;
  color: white;
  cursor: not-allowed;
}

.proceed-btn .arrow {
  font-size: 1.2rem;
}

.proceed-btn.completed {
  background: #000;
}

.proceed-btn.completed .check-icon {
  display: block;
}

.proceed-btn.completed .arrow {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-image {
    height: 200px;
  }

  .bundle-sidebar {
    position: relative;
    top: 0;
  }
}

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

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