product.css 5.02 KB
.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

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

.product-image {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
}

.product-name h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
  line-height: 1.4;
}

.product-category {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c5aa0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.original-price {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 1rem;
  font-weight: 400;
}

.product-rating {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.25rem;
}

.star {
  color: #dee2e6;
  font-size: 1rem;
}

.star.filled {
  color: #ffc107;
}

.rating-count {
  margin-left: 0.5rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.add-to-cart-button {
  width: 100%;
  background: #28a745;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-to-cart-button:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
}

.add-to-cart-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

/* Product Detail Styles */
.product-detail {
  padding: 2rem 0;
}

.product-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.image-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail.active {
  border-color: #2c5aa0;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rating-text {
  color: #6c757d;
  font-size: 0.9rem;
}

.product-sku {
  color: #6c757d;
  font-size: 0.9rem;
}

.product-price-large {
  font-size: 2rem;
  font-weight: 700;
  color: #2c5aa0;
  margin-bottom: 1.5rem;
}

.product-description {
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #495057;
}

.product-features {
  margin-bottom: 2rem;
}

.product-features h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #212529;
}

.product-features ul {
  list-style: none;
  padding: 0;
}

.product-features li {
  padding: 0.25rem 0;
  color: #495057;
  position: relative;
  padding-left: 1.5rem;
}

.product-features li:before {
  content: '✓';
  color: #28a745;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.product-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-selector label {
  font-weight: 500;
  color: #495057;
}

.quantity-selector select {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: white;
}

.add-to-cart-btn {
  background: #28a745;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  flex: 1;
}

.add-to-cart-btn:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
}

.buy-now-btn {
  background: #2c5aa0;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  flex: 1;
}

.buy-now-btn:hover {
  background: #1e3d6f;
  transform: translateY(-1px);
}

.product-specs {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

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

.spec-item strong {
  color: #495057;
}

@media (max-width: 768px) {
  .product-detail-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-actions {
    flex-direction: column;
  }

  .quantity-selector {
    width: 100%;
    justify-content: space-between;
  }
}