/* shop-style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -moz-tap-highlight-color: transparent;
}

@font-face {
  font-family: 'Vazir';
  src: url('/contents/font/Vazir-Black.woff2') format('woff2');
  font-display: swap;
}

body {
  font-family: 'Vazir', sans-serif;
  background: #fefaf5;
  color: #2c241a;
  line-height: 1.6;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* دکمه بازگشت */
.back-home-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2c241a;
  color: #efeadc;
  padding: 0.6rem 1rem;
  border-radius: 3rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #c7a252;
}
.back-home-btn:hover {
  background: #c7a252;
  color: #2c241a;
  transform: translateX(-4px);
}

/* صفحه فروشگاه */
.shop-page {
  padding: 4rem 0;
}

.shop-header {
  text-align: center;
  margin-bottom: 2rem;
}
.shop-header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  color: #3f2e1e;
}
.shop-header h1 span {
  background: linear-gradient(135deg, #b57c48, #7f5a30);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.shop-header p {
  font-size: 1.1rem;
  color: #7f6b4a;
}

/* فیلتر بار */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #eddabc;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fef9ef;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  flex: 1;
  min-width: 200px;
}
.search-box svg {
  color: #c7a252;
}
.search-box input {
  border: none;
  background: transparent;
  padding: 0.5rem 0;
  font-family: 'Vazir', sans-serif;
  font-size: 0.9rem;
  width: 100%;
  outline: none;
}
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-btn {
  background: none;
  border: 1px solid #e9dccc;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-family: 'Vazir', sans-serif;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: #c7a252;
  color: white;
  border-color: #c7a252;
}
.sort-box select {
  background: #fef9ef;
  border: 1px solid #e9dccc;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-family: 'Vazir', sans-serif;
  cursor: pointer;
  outline: none;
}

.results-count {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #7f6b4a;
}

/* گرید محصولات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-bottom: 2rem;
}
.product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #eddabc;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 25px -8px rgba(0,0,0,0.1);
  border-color: #c7a252;
}
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #e4d4be;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.product-info {
  padding: 1rem;
}
.product-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #3f2e1e;
}
.product-category {
  font-size: 0.8rem;
  color: #a78e6d;
  margin-bottom: 0.5rem;
}
.product-price {
  color: #b67b34;
  font-weight: bold;
  margin: 0.5rem 0;
}
.product-permeter {
  font-size: 0.7rem;
  color: #7a6233;
}
.detail-link {
  background: none;
  border: 1px solid #c7a252;
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 0.5rem;
  display: inline-block;
}
.detail-link:hover {
  background: #c7a252;
  color: white;
}

/* صفحه‌بندی */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.pagination button {
  background: white;
  border: 1px solid #eddabc;
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: 'Vazir', sans-serif;
  transition: 0.2s;
}
.pagination button.active, .pagination button:hover {
  background: #c7a252;
  color: white;
  border-color: #c7a252;
}
.empty-message {
  text-align: center;
  padding: 2rem;
  color: #7f6b4a;
}
.hidden {
  display: none;
}

/* مودال */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: white;
  border-radius: 1.5rem;
  max-width: 500px;
  width: 90%;
  padding: 1.5rem;
  position: relative;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #a78e6d;
}
.modal-close:hover {
  color: #c7a252;
}

/* ریسپانسیو */
@media (max-width: 800px) {
  .container {
    padding: 0 16px;
  }
  .shop-header h1 {
    font-size: 2rem;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .category-filter {
    justify-content: center;
  }
  .sort-box select {
    width: 100%;
  }
}
@media (max-width: 550px) {
  .shop-page {
    padding: 2rem 0;
  }
  .products-grid {
    gap: 1rem;
  }
  .back-home-btn {
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
  }
}

/* shop-style.css - فقط بخش ریسپانسیو اصلاح شده */
/* بقیه CSS مانند قبل است، فقط بخش زیر اضافه/تغییر می‌کند */

@media (max-width: 550px) {
  .shop-page {
    padding: 2rem 0;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr); /* دو ستون در موبایل */
    gap: 1rem;
  }
  .product-card {
    /* کاهش فاصله داخلی در موبایل */
  }
  .product-info {
    padding: 0.7rem;
  }
  .product-title {
    font-size: 0.9rem;
  }
  .product-category, .product-permeter {
    font-size: 0.7rem;
  }
  .product-price {
    font-size: 0.85rem;
  }
  .detail-link {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
  .back-home-btn {
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
  }
  .filter-bar {
    padding: 0.8rem;
  }
  .category-filter {
    justify-content: center;
  }
  .filter-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
  }
}