@font-face {
  font-family: vazir;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url("./assets/font/Farsi-Digits-Without-Latin/Vazir-Light-FD-WOL.woff2")
      format("woff2"),
    url("./assets/font/Farsi-Digits-Without-Latin/Vazir-Light-FD-WOL.woff")
      format("woff");
}

@font-face {
  font-family: vazir;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src:
    url("./assets/font/Farsi-Digits-Without-Latin/Vazir-Medium-FD-WOL.woff2")
      format("woff2"),
    url("./assets/font/Farsi-Digits-Without-Latin/Vazir-Medium-FD-WOL.woff")
      format("woff");
}

@font-face {
  font-family: Dana;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url("./assets/font/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.woff2")
      format("woff2"),
    url("./assets/font/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.woff")
      format("woff");
}

:root {
  --light: #f9f4ea;
  --blue: #92afb5;
  --dark: #1a2d3e;
  --brown: #b88737;
}

* {
  direction: rtl;
  font-family: vazir;
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--light);
  padding-bottom: 96px;
  position: relative;
}

header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--light);
  font-size: 22px;
  font-weight: bold;
  color: var(--dark);
  z-index: 10;

  img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 500px) {
  header {
    font-size: 16px;

    img {
      width: 75px !important;
      height: 75px !important;
    }
  }
}

footer {
  background-color: #01819e;
  color: var(--light);
  width: 100%;
  padding: 24px;
  position: absolute;
  bottom: 0;
  font-size: 16px;
  font-weight: 500;
}

.address {
  margin-bottom: 6px;
}

/* 1. Container Setup */
.product-grid {
  display: grid;
  /* 
     Key Logic:
     - minmax(280px, 1fr): Each card must be at least 280px wide.
     - If there's room for another 280px card, it creates a new column.
     - If not, it wraps to the next line.
     - fr distributes remaining space equally.
  */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

  /* Spacing between cards */
  gap: 24px;

  /* Optional: Center the grid if it doesn't fill the full width */
  justify-content: center;

  /* Optional: Padding for the container itself */
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 2. Card Setup */
.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden; /* Ensures image respects border-radius */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Hover Effect */
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* 3. Image Handling */
.product-card__image-wrapper {
  width: 100%;
  aspect-ratio: 1; /* Keeps images consistent regardless of resolution */
  overflow: hidden;
  background-color: #f3f4f6;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image fills the box without stretching */
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.05); /* Subtle zoom on hover */
}

/* 4. Content Area */
.product-card__content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Pushes footer to bottom if needed */
}

.product-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.product-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563eb; /* Blue accent */
  margin: 0 0 16px 0;
}

.product-card__description {
  font-size: 0.9rem;
  color: #6b7280;
  /* margin: 0 0 20px 0; */
  line-height: 1.5;
  /* Limit description to 3 lines for consistency */
  /* display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden; */
}

/* 5. Button Area */
.product-card__footer {
  margin-top: auto; /* Pushes button to the bottom of the card */
}

.product-card__button {
  width: 100%;
  padding: 12px;
  background-color: #1f2937;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-card__button:hover {
  background-color: #374151;
}
