/* ========== Global Structure ========== */

body {
  font-family: 'Inter', sans-serif;
  color: #222;
}

h1, h2, h3 {
  font-weight: 700;
}

/* ========== Product Listing Page ========== */

.product-list-page {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1.5rem;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.search-form,
.search-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem auto;
  flex-wrap: wrap;
}

.search-form input,
.search-bar input {
  width: 280px;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.search-form button,
.search-bar button {
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.search-form button:hover,
.search-bar button:hover {
  background-color: #388e3c;
}

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

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

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

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.product-meta {
  color: #666;
  font-size: 0.95rem;
}

.pagination {
  text-align: center;
  margin-top: 2rem;
  font-size: 1rem;
}

.pagination a {
  margin: 0 0.5rem;
  font-weight: 600;
  color: #4caf50;
  text-decoration: none;
}

.pagination a:hover {
  text-decoration: underline;
}

/* ========== Product Detail Page ========== */

.product-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.product-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  border-radius: 8px;
  background: linear-gradient(90deg, #4caf50 0%, #81c784 100%);
  color: white;
}

.product-title {
  font-size: 2.8rem;
  font-weight: 800;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
}

.product-meta,
.product-brand,
.product-size {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.95;
  display: inline-block;
  margin-top: 0.5rem;
}

.product-brand {
  font-weight: 700;
}

.product-size {
  font-style: italic;
}

.label {
  font-weight: 600;
  color: #444;
}

.divider {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #ddd;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  border-left: 4px solid #4caf50;
}

/* ========== Reviews ========== */

.review-card,
.review {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-left: 4px solid #4caf50;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.review-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.75rem;
  border: 2px solid #4caf50;
}

.review-meta {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.review-text {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.review-rating {
  font-size: 1.2rem;
  color: #fbc02d;
}

.review-rating .numeric {
  font-size: 0.9rem;
  color: #555;
  margin-left: 0.5rem;
}

.review-actions {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.review-actions a {
  color: #007bff;
  text-decoration: none;
}

.review-actions a:hover {
  text-decoration: underline;
}

/* ========== Forms ========== */

form {
  margin-top: 1rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

form label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ========== Auth CTA ========== */

.login-cta {
  text-align: center;
  margin-top: 1.5rem;
}

.login-button {
  background: #4caf50;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.login-button:hover {
  background: #388e3c;
}
