* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, sans-serif;
}

:root {
  --page-bg: #f4f4f5;
  --card-bg: #fff;
  --gray-bg: #f3f3f3;
  --primary: #4f46e5;
  --black-text: #000;
  --gray-text: #9ca3af;
  --transition: all 0.3s ease-in-out;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--page-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.truncate-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.page-title {
  position: relative;
  font-size: 2.25rem;
  color: var(--black-text);
  text-align: center;
  padding-bottom: 0.75rem;
}

.page-title::after {
  content: "";
  position: absolute;
  width: 5rem;
  height: 0.25rem;
  border-radius: 0.25rem;
  background-color: var(--primary);
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 0);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0.75rem;
  background-color: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  overflow: hidden;
}

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

.product-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-text);
  text-transform: uppercase;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--black-text);
}

.product-desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-text);
}

.product-features {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.feature-item {
  padding: 3px 6px;
  background-color: var(--gray-bg);
  color: var(--gray-text);
  font-size: 0.65rem;
  border-radius: 0.5rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-prices {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: max-content;
}

.new-price {
  color: var(--black-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.old-price {
  color: var(--gray-text);
  font-size: 1rem;
  font-weight: 400;
  text-decoration-line: line-through;
}

.product-reviews {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.review-stars {
  color: #ffd700;
  font-size: 0.75rem;
}

.review-count {
  font-size: 0.75rem;
  color: var(--gray-text);
}

.add-basket-btn {
  background-color: #000;
  color: #fff;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  outline: none;
  cursor: pointer;
  transition: 0.1s ease-in-out;
}

.add-basket-btn:active {
  transform: scale(0.9);
}

.status {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.75rem;
  padding: 4px 6px;
  border-radius: 8px;
}

.status.red {
  background-color: #ffe4e6;
  color: #9f1239;
}

.status.green {
  background-color: #dcfce7;
  color: #166534;
}

.status.yellow {
  background-color: #ede9fe;
  color: #5b21b6;
}

.add-favourite-btn {
  position: absolute;
  top: 0.5rem;
  right: 0;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-radius: 50%;
  background-color: #ffffffd3;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: 0.25s ease-in-out;
}

.add-favourite-btn .fill-icon {
  display: none;
}

.add-favourite-btn:hover {
  color: #db2777;
}

.add-favourite-btn:hover .outline-icon {
  display: none;
}

.add-favourite-btn:hover .fill-icon {
  display: block;
}

.product-card:hover .add-favourite-btn {
  opacity: 1;
  pointer-events: visible;
  right: 0.5rem;
}

/* Responsive Styles */

@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}
