:root {
  --primary-color: #4a8f29;
  --secondary-color: #f8f1e5;
  --accent-color: #e67e22;
  --text-dark: #333;
  --text-light: #777;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #f5f7fa;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.back-arrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #4a8f29;
  text-decoration: none;
  font-weight: bold;
}

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


/* ===== Header Title + Button ===== */
h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(1.25rem, 2vw, 2rem); /* Responsive text */
}

.add-product-btn {
  background-color: #3498db;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

/* ===== Search Bar ===== */
.search-bar {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-bar input {
  flex: 1 1 200px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.search-bar button {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

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

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

/* ===== Product Image ===== */
.product-image {
  height: 220px;
  background-color: #ecf0f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

/* ===== Product Info ===== */
.product-info {
  padding: 15px;
}

.product-title {
  font-size: 1rem;
  margin: 0 0 10px;
  color: #2c3e50;
}

.product-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 10px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 5px;
}

/* ===== Product Actions ===== */
.product-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1 1 100px;
  padding: 8px;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
}

.view-btn {
  background-color: #3498db;
  color: white;
}

.addtocart-btn {
  background-color: #2ecc71;
  color: white;
}

.delete-btn {
  background-color: #e74c3c;
  color: white;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination a {
  padding: 8px 12px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #3498db;
  font-size: 0.95rem;
}

.pagination a.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}

/* ===== Footer ===== */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 50px 0 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
  margin-bottom: 30px;
}

.footer-column h3 {
  color: white;
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: white;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--accent-color);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.9rem;
  /* color: #ddd; */
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}


/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Search bar stacks vertically */
  .search-bar {
    flex-direction: row;
  }

  .search-bar input,
  .search-bar button,
  .view-btn,
  .addtocart-btn {
    width: 100%;          
    height: 44px;         
    padding: 12px 16px;   
    font-size: 1rem;
    box-sizing: border-box;
  }


  /* Product actions stack vertically */
  .product-actions {
    flex-direction: row;
  }
}

  .footer-column {
    width: 100%;
    max-width: 300px;
  }
  
 
