body {
  font-family: 'Vazir', sans-serif;
  background: linear-gradient(#f3f7fa, #e0e6ed);
  margin: 0;
  padding: 0;
}

.controls-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem auto 1.5rem;
  width: 100%;
  animation: scaleFadeIn 0.6s ease both;
  animation-delay: 0.3s;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
}

.search-box input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
}

.search-box button {
  background: #333;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.search-box button:hover {
  background: #555;
}

a {
  text-decoration: none;
  color: #333;
}

.home1 { 
  color: #e0e0e0;
}

.main-header {
  background: #333;
  color: #fff;
  padding: 2rem;
  text-align: center;
}

.main-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.main-header nav {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.main-header nav span {
  margin: 0 0.5rem;
  color: #aaa;
}

.store {
  max-width: 1440px;
  margin: auto;
  padding: 2rem;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.product-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}


.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-card h3 {
  margin: 1rem;
  font-size: 1.05rem;
  color: #111;
}

.product-card .author {
  margin: 0 1rem;
  color: #555;
  font-size: 0.9rem;
  
}

.product-card .stars,
.product-card .stars1,
.product-card .stars3,
.product-card .stars4,
.product-card .stars5,
.product-card .stars6,
.product-card .stars7 {
  margin: 0.5rem 1rem;
}

.stars { color: orange; }
.stars1 { color: rgb(18, 206, 40); }
.stars3 { color: rgb(18, 187, 206); }
.stars4 { color: #000; }
.stars5 { color: rgb(255, 0, 230); }
.stars6 { color: red; }
.stars7 { color: rgb(157, 0, 255); }

.product-card .price {
  margin: 0 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.old-price {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9rem;
}

.new-price {
  color: #333;
  font-weight: bold;
  background: #e0e0e0;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* انیمیشن کارت‌ها */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* انیمیشن کنترل‌ها */
@keyframes scaleFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* تأخیر کارت‌ها */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }


@media (max-width: 768px) {
  body {
    background: linear-gradient(#f3f7fa, #e0e6ed);
    padding: 0;
    margin: 0;
  }

  .main-header {
    padding: 1.2rem 1rem;
    text-align: center;
  }

  .main-header h2 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .main-header nav a {
    font-size: 0.85rem;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #444;
    color: #fff;
    border-radius: 6px;
  }

  .controls-wrapper {
    padding: 0 1rem;
    margin: 2.5rem 0 2rem; /* فاصله بیشتر از هدر */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }

  .search-box {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    max-width: 240px; /* باکس کوچکتر */
    justify-content: center;
  }

  .search-box input {
    flex: 1;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  .search-box button {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
  }

  .store {
    padding: 0 1rem 2rem;
  }

  .product-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .product-card {
    width: 360px;
    max-width: 90%;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    background: #fff;
    animation: none;
    opacity: 1;
  }

  .product-card h3 {
    font-size: 1rem;
    margin: 0.8rem 1rem 0.3rem;
  }

  .product-card .author,
  .product-card .stars,
  .product-card .stars1,
  .product-card .stars3,
  .product-card .stars4,
  .product-card .stars5,
  .product-card .stars6,
  .product-card .stars7 {
    font-size: 0.85rem;
    margin: 0 1rem 0.5rem;
  }

  .image-wrapper {
    aspect-ratio: 16/9;
    border-radius: 12px 12px 0 0;
  }
}
