/* Products Categories Page Styles */

/* Color Variables (using existing design system) */
:root {
  --primary-dark: #0a5c36;
  --primary: #0f5132;
  --primary-light: #14452f;
  --secondary-dark: #18392b;
  --secondary: #1d2e28;
  --light-accent: #cbd5c0;
  --lightest: #dfe6da;
  --warm-accent: #a68a64;
  --neutral: #b6ad90;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

/* Body and Page Layout */
body {
  margin: 0;
  padding: 0;
}

/* Main content wrapper with natural content flow */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  font-family: "Spectral", serif;

}

/* Admin Controls */
.admin-controls {
  margin-bottom: 20px;
}

.admin-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--primary);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
}

.admin-back-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Products Header Section */
.products-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
}

.header-content {
  max-width: 600px;
  margin: 0 auto;
}

.products-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.products-description {
  font-size: 1.1rem;
  color: var(--secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 400;
}

.business-hours {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
}

.hours-label {
  opacity: 0.9;
}

.hours-time {
  font-weight: 600;
}

/* Categories Container */
.categories-container {
  margin-top: 40px;
  margin-bottom: 120px; /* Generous bottom margin to push footer down */
  padding-bottom: 60px; /* Additional padding for content height */
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 0;
}

/* Category Card Styles */
.category-card {
  display: block;
  background-color: var(--white);
  border: 2px solid var(--light-accent);
  border-radius: 16px;
  padding: 32px 24px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(15, 81, 50, 0.05),
    transparent
  );
  transition: left 0.5s ease;
}

.category-card:hover::before {
  left: 100%;
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(15, 81, 50, 0.1);
}

.category-card:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.category-card:active {
  transform: translateY(-2px);
}

/* Category Content */
.category-content {
  text-align: center;
  width: 100%;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  transition: color var(--transition-speed) ease;
}

.category-card:hover .category-title {
  color: var(--primary-dark);
}

.category-description {
  font-size: 1rem;
  color: var(--secondary);
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
  opacity: 0.8;
  transition: opacity var(--transition-speed) ease;
}

.category-card:hover .category-description {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wrapper {
    padding: 0 16px 100px 16px; /* Natural padding approach */
  }

  .products-header {
    margin-bottom: 30px;
    padding: 24px 16px;
  }

  .products-title {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .products-description {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .business-hours {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .category-card {
    padding: 24px 20px;
    min-height: 150px;
  }

  .category-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .category-description {
    font-size: 0.9rem;
  }

  .categories-container {
    margin-bottom: 140px; /* Increased for mobile */
    padding-bottom: 80px;
  }
}

@media (max-width: 480px) {
  .wrapper {
    padding: 12px 12px 120px 12px; /* Natural padding approach */
  }

  .products-header {
    padding: 20px 12px;
  }

  .products-title {
    font-size: 1.8rem;
  }

  .business-hours {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .category-card {
    padding: 20px 16px;
    min-height: 130px;
  }

  .category-title {
    font-size: 1.2rem;
  }

  .category-description {
    font-size: 0.85rem;
  }

  .categories-container {
    margin-bottom: 160px; /* Extra space for small screens */
    padding-bottom: 100px;
  }
}

/* Desktop Grid Enhancement */
@media (min-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .category-card {
    padding: 40px 32px;
    min-height: 200px;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.products-header {
  animation: fadeInUp 0.6s ease-out;
}

.category-card {
  animation: fadeInUp 0.6s ease-out;
}

.category-card:nth-child(1) {
  animation-delay: 0.1s;
}
.category-card:nth-child(2) {
  animation-delay: 0.2s;
}
.category-card:nth-child(3) {
  animation-delay: 0.3s;
}
.category-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* Loading state for animations */
.categories-grid {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
}
