/* Inventory Page Styles */
.inventory-main {
  width: 100%;
  max-width: 1000px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.inventory-main h1 {
  font-size: 2rem;
  color: var(--purple);
  text-align: center;
}

/* Controls: category filter + search */
.inventory-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.search-box {
  font-family: 'Baloo 2', cursive, sans-serif;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 999px;
  width: 100%;
  max-width: 360px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box:focus {
  border-color: var(--purple);
}

/* Product grid */
.product-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

/* Product card */
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

/* Cycle colored top border */
.product-card:nth-child(5n+1) { border-top: 4px solid var(--yellow); }
.product-card:nth-child(5n+2) { border-top: 4px solid var(--orange); }
.product-card:nth-child(5n+3) { border-top: 4px solid var(--pink); }
.product-card:nth-child(5n+4) { border-top: 4px solid var(--lilac); }
.product-card:nth-child(5n+5) { border-top: 4px solid var(--green); }

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f5f0fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-info {
  padding: 0.5rem 0.65rem 0.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
}

.product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
}

.product-category {
  font-size: 0.85rem;
  color: #999;
}

.product-description {
  display: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 1.1rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.page-btn {
  font-family: 'Baloo 2', cursive, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--purple);
  background: transparent;
  color: var(--purple);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-block;
}

a.page-btn:hover {
  background: var(--purple);
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-info {
  font-size: 0.95rem;
  color: #777;
}

/* Desktop tweaks */
@media (min-width: 768px) {
  .inventory-main {
    padding: 2rem;
    gap: 2rem;
  }

  .inventory-main h1 {
    font-size: 2.5rem;
  }

  .inventory-controls {
    flex-direction: row;
    justify-content: space-between;
  }

}
