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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

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

header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

header p {
  color: #7f8c8d;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #3498db;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

footer {
  margin-top: 3rem;
  text-align: center;
  padding: 1.5rem 0;
  color: #7f8c8d;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}

/* Content layout */
.content-wrapper {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 4fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Category navigation */
.category-nav {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.category-nav h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  position: relative;
}

.category-nav h3:after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: #3498db;
  margin: 0.5rem 0;
}

.category-nav ul {
  list-style: none;
}

.category-nav li {
  margin-bottom: 0.5rem;
}

.category-nav a {
  color: #7f8c8d;
  text-decoration: none;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5f5f5;
  transition: color 0.2s ease;
}

.category-nav a:hover {
  color: #3498db;
}

/* Product showcase */
.product-showcase {
  margin: 1rem 0 2rem;
}

.product-showcase h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  text-align: center;
  position: relative;
}

.product-showcase h2:after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: #3498db;
  margin: 0.5rem auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Product cards */
.product-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info {
  padding: 1.25rem;
}

.product-info h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  font-weight: 600;
  font-size: 1.1rem;
  color: #e74c3c;
  margin: 0.5rem 0;
}

.product-rating {
  color: #f39c12;
  letter-spacing: 2px;
  margin: 0.5rem 0;
}

.product-category {
  display: inline-block;
  background-color: #ecf0f1;
  color: #7f8c8d;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* Product detail page */
.product-detail {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.product-description {
  display: flex;
  flex-direction: column;
}

.product-description h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.product-description p {
  margin-bottom: 2rem;
  flex-grow: 1;
}

.cta-button {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  font-weight: bold;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #c0392b;
}

/* Search and no results */
.search-form {
  display: flex;
  max-width: 600px;
  margin: 1rem auto 2rem;
}

.search-form input {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

.search-form button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: bold;
}

.no-results {
  text-align: center;
  padding: 3rem 0;
}

.no-results p {
  margin-bottom: 1.5rem;
  color: #7f8c8d;
}

/* API Status page */
.api-status {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.api-status h2 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
}

.status-section {
  margin-bottom: 2rem;
}

.status-section h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.2rem;
}

.status-item {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.status-label {
  font-weight: 600;
  width: 120px;
  color: #7f8c8d;
}

.status-value {
  font-family: monospace;
  background-color: #f8f9fa;
  padding: 0.5rem;
  border-radius: 4px;
  flex-grow: 1;
}

.status-ok {
  color: #27ae60;
}

.status-error {
  color: #e74c3c;
}

/* Responsive styles */
@media (max-width: 992px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .product-image {
    height: 150px;
  }
  
  .product-info {
    padding: 0.75rem;
  }
  
  .product-info h3 {
    font-size: 0.9rem;
  }
  
  .product-price {
    font-size: 1rem;
  }
  
  .status-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .status-label {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  
  .status-value {
    width: 100%;
  }
}