/* ================= Shop Page ================= */
.main-shop-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.sidebar-shop {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  height: fit-content;
}

.sidebar-shop .sidebar-title {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  border-right: 3px solid #e67e22;
  padding-right: 10px;
}

.sidebar-shop .filter-group {
  margin-bottom: 1.5rem;
}

.sidebar-shop .filter-group h4 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: #555;
}

.sidebar-shop .filter-group label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: #666;
}

.sidebar-shop .filter-btn,
.clear-filters-btn {
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
  display: block;
}

.sidebar-shop .filter-btn {
  background-color: #f39c12;
  color: #fff;
}

.sidebar-shop .filter-btn:hover {
  background-color: #e67e22;
}

.sidebar-shop .clear-filters-btn {
  background-color: #e0e0e0;
  color: #333;
  margin-top: 0.5rem;
}

.sidebar-shop .clear-filters-btn:hover {
  background-color: #d0d0d0;
}

.products-container {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-item {
  background: #f7f9fa;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.product-title {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.1rem;
  color: #27ae60;
  font-weight: bold;
  margin-bottom: 0.8rem;
}

/* ================= Product Item Actions ================= */
.product-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* Cart icon: circular green when added */
.add-to-cart-btn {
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
  width: 40px;
  height: 40px;
  background: #3498db;
  color: #fff;
}
.add-to-cart-btn:hover {
  transform: scale(1.1);
}

.add-to-cart-btn.in-cart {
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
  width: 40px;
  height: 40px;
  background: #28a745; /* green */
  color: #fff;
}

/* Heart (favorite) circular */
.add-to-favorites-btn {
  /* استایل دکمه در هر دو حالت (خاکستری کمرنگ) */
  display: inline-block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  border-radius: 50%;
  background: #f0f0f0; /* پس‌زمینه دایره همیشه خاکستری است */
  cursor: pointer;
  transition: transform 0.2s;
}

.add-to-favorites-btn:hover {
  transform: scale(1.1);
}

/* استایل آیکون قلب در حالت غیرفعال (سفید) */
.add-to-favorites-btn i {
  color: #fff; /* رنگ پیش‌فرض قلب (سفید) */
  transition: color 0.2s;
}

/* استایل آیکون قلب در حالت فعال (قرمز) */
.add-to-favorites-btn.active i {
  color: #e24b4b; /* رنگ قرمز برای آیکون قلب در حالت فعال */
}

/* برای اضافه کردن فاصله بین محصولات و pagination */
.shop-pagination-container {
  margin-top: 3rem; /* فاصله بالا از محصولات */
  display: flex;
  justify-content: center;
}

/* استایل کلی pagination */
.shop-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.shop-pagination .pagination-btn {
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  color: #333;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.shop-pagination .pagination-btn:hover {
  background-color: #f39c12;
  color: #fff;
  border-color: #f39c12;
}

.shop-pagination .pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f8f8f8;
  color: #333;
}

.shop-pagination span.page-number {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.shop-pagination span.page-number.active {
  background-color: #f39c12;
  color: #fff;
  border-color: #f39c12;
}

/* ================= Product Detail Page ================= */
.product-detail-page {
  margin-top: 2rem;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.product-info-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.product-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
}

.product-details {
  padding: 1rem;
}

.product-detail-title {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

.product-author {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1rem;
}

.product-detail-price {
  font-size: 1.8rem;
  font-weight: bold;
  color: #27ae60;
  margin-bottom: 1.5rem;
}

.product-description h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
}

.product-description p {
  font-size: 1rem;
  line-height: 1.8;
  color: #444;
}

.not-found-message h2 {
  color: #e74c3c;
  margin-bottom: 1rem;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  background-color: #f39c12;
  color: #fff;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.back-link:hover {
  background-color: #e67e22;
}

/* ================= Checkout Page ================= */
.checkout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.checkout-form-container,
.checkout-summary-container {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.checkout-form-container h2,
.checkout-summary-container h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #f39c12;
  padding-bottom: 0.5rem;
}

.checkout-summary-container h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.summary-box {
  background-color: #f7f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item span {
  font-size: 0.95rem;
}

.summary-item span:first-child {
  font-weight: bold;
  flex-shrink: 0;
  margin-right: 1rem;
}

.summary-item.total-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #27ae60;
  margin-top: 1rem;
  white-space: normal;
}

.summary-box hr {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 1rem 0;
}

.auth-form .btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  text-align: center;
  transition: background-color 0.3s;
}

.primary-btn {
  background-color: #3498db;
  color: #fff;
  border: none;
}

.primary-btn:hover {
  background-color: #2980b9;
}

.secondary-btn {
  background-color: #e0e0e0;
  color: #333;
  border: 1px solid #ccc;
  text-decoration: none;
  display: block;
}

.secondary-btn:hover {
  background-color: #d0d0d0;
}

.auth-form .form-group {
  margin-bottom: 1.2rem;
}

.auth-form label {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: bold;
}

.auth-form input[type="text"],
.auth-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

.auth-form textarea {
  min-height: 100px;
  resize: vertical;
}

.auth-form button.primary-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  text-align: center;
  transition: background-color 0.3s;
  background-color: #3498db;
  color: #fff;
  border: none;
}

.auth-form button.primary-btn:hover {
  background-color: #2980b9;
}

.auth-form a.secondary-btn {
  width: 100%;
  display: block;
  margin-top: 1rem;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  text-align: center;
  transition: background-color 0.3s;
  background-color: #e0e0e0;
  color: #333;
  border: 1px solid #ccc;
  text-decoration: none;
}

.auth-form a.secondary-btn:hover {
  background-color: #d0d0d0;
}

/* Shop bottom counter */
.pagination {
  text-align: center;
}

.pagination div {
  display: inline;
  justify-content: center;
  align-items: center;
  margin: 10px;
  padding: 10px 15px;
  border-radius: 10%;
  background: #f9f9f9;
  font-weight: 450;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pagination div:hover {
  background-color: #f39c12;
}
