/* =========================================
 فروشگاه گیاهان — لیست محصولات پریمیوم
 👨‍💻 Developer Information
 company: Rahe Roshd
 Instagram: @raheroshd55
 Tel: 09011267602 , 09030428445
 ========================================= */

:root {
  --green: #a82ee0;
  --green-dark: #6d189c;
  --green-deeper: #5c1489;
  --green-light: #f0e6ff;
  --green-mist: #f5f0ff;
  --bg: #fff;
  --text: #20251F;
  --text-secondary: #727872;
  --border: #E5EAE5;
  --card-border: #ede0ff;
  --discount-red: #FF3B4A;
  --old-price: #A4A8A4;
  --shadow-sm: 0 2px 8px rgba(32, 37, 31, 0.05);
  --shadow-md: 0 10px 26px rgba(32, 37, 31, 0.09);
  --shadow-green: 0 8px 18px rgba(152, 35, 207, 0.32);
  --radius-xl: 22px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

.shop-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px 28px 70px;
  background: var(--bg);
  font-family: "Dana", sans-serif;
  box-sizing: border-box;
}

/* =============================================
   ۱) کارت معرفی فروشگاه
   ============================================= */
.store-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  margin-bottom: 30px;
  background: linear-gradient(120deg, #ffffff 0%, #f3faf3 55%, #edf6ed 100%);
  border: 1px solid #E1EBE1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.store-icon {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 32px;
  border: 1px solid #DFF0DF;
}

.store-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.store-subtitle {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #46504a;
}

.store-note {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* =============================================
   چیدمان کلی: فیلتر (راست) + محصولات (چپ)
   ============================================= */
.shop-layout {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

/* دکمه باز کردن فیلتر (فقط موبایل) */
.filter-toggle-btn {
  display: none;
  width: 100%;
  height: 46px;
  margin-bottom: 18px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #DCEDDC;
  border-radius: 14px;
  background: #ffffff;
  color: var(--green-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.filter-toggle-btn i {
  font-size: 18px;
}

.filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23, 29, 23, 0.45);
  backdrop-filter: blur(2px);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.filter-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* =============================================
   ۲) پنل فیلتر
   ============================================= */
.filter-panel {
  width: 284px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #E6ECE6;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 22px 24px;
  box-sizing: border-box;
}

.filter-close-btn {
  display: none;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 1px solid #F3D7D9;
  border-radius: 10px;
  background: #FFF5F5;
  color: #D63A47;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-header-icon {
  font-size: 22px;
  color: var(--green);
}

.filter-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.filter-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
}

.filter-panel form {
  display: flex;
  flex-direction: column;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ورودی‌های فرم */
.field-select,
.field-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 11px 13px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 36px;
  cursor: pointer;
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(152, 35, 207, 0.13);
}

.field-input::placeholder {
  color: #a9afa9;
}

/* فلش سفارشی سلیکت */
.select-wrap {
  position: relative;
}

.select-arrow {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

/* فیلد قیمت با واحد ریال */
.field {
  position: relative;
}

.field .field-input {
  padding-left: 52px;
}

.field-currency {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

/* دکمه اعمال فیلتر */
.apply-btn {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 13px;
  background: var(--green);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.apply-btn i {
  font-size: 17px;
}

.apply-btn:hover {
  background: var(--green-deeper);
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}

/* دکمه پاک کردن فیلترها */
.clear-btn {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #DCEDDC;
  border-radius: 13px;
  background: var(--green-light);
  color: var(--green-dark);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.25s ease;
}

.clear-btn i {
  font-size: 16px;
}

.clear-btn:hover {
  background: #a21fe9;
  color: #fff;
}

/* =============================================
   ۳) آرشیو محصولات
   ============================================= */
.product-area {
  flex: 1;
  min-width: 0;
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 0 4px;
}

.products-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.products-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 24px;
}

/* کارت محصول */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-media {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #F1F5F1;
}

.plant-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.product-card:hover .plant-img {
  transform: scale(1.02);
}

/* نشان تخفیف */
.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--discount-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(255, 59, 74, 0.28);
  line-height: 1;
}

/* نشان پیش‌فروش */
.preorder-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
  line-height: 1;
}

/* نشان ناموجود */
.outofstock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
  line-height: 1;
}

.product-media-link {
  display: block;
  width: 100%;
  height: 100%;
}

.product-wishlist {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 50%;
  color: #555555;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.product-wishlist:hover,
.product-wishlist.active,
.product-wishlist.is-active {
  color: #9823cf;
  border-color: #9823cf;
  background: #ffffff;
}

.product-wishlist.active i,
.product-wishlist.is-active i {
  color: #9823cf;
}

/* نام محصول */
.product-name {
  margin: 13px 4px 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.55;
}

.product-name a {
  color: inherit;
  text-decoration: none;
}

.product-name a:hover {
  color: var(--green-dark);
}

/* قیمت */
.price-block {
  margin: 4px 0 13px;
  text-align: center;
}

.old-price,
.current-price {
  display: block;
}

.old-price {
  color: var(--old-price);
  font-size: 12px;
  font-weight: 500;
  text-decoration: line-through;
  margin-bottom: 3px;
}

.current-price {
  color: var(--green);
  font-size: 16px;
  font-weight: 800;
}

/* دکمه خرید */
.buy-btn {
  width: 100%;
  height: 42px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.buy-btn i {
  font-size: 17px;
}

.buy-btn:hover {
  background: var(--green-deeper);
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}

/* دکمه پیش‌خرید */
.buy-btn--preorder {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.buy-btn--preorder:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* دکمه ناموجود */
.buy-btn--outofstock {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  cursor: pointer;
}

.buy-btn--outofstock:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* حالت خالی */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 50px 0;
}

/* حذف اسپینر input عددی */
.field-input::-webkit-outer-spin-button,
.field-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* =============================================
   واکنش‌گرایی
   ============================================= */
@media (max-width: 1240px) {
  .shop-page {
    padding: 28px 20px 60px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
  }
}

/* تبلت: فیلتر بالای محصولات (افقی) */
@media (max-width: 1100px) {
  .shop-layout {
    flex-direction: column;
    gap: 22px;
  }

  .filter-panel {
    width: 100%;
    position: static;
    order: -1;
  }

  .filter-panel form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  .filter-panel form .filter-group {
    margin-bottom: 14px;
  }

  .filter-panel form .apply-btn,
  .filter-panel form .clear-btn {
    grid-column: 1 / -1;
  }

  .filter-panel form .clear-btn {
    margin-bottom: 2px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  }
}

/* موبایل: فیلتر به صورت کشویی */
@media (max-width: 768px) {
  .shop-page {
    padding: 20px 14px 50px;
  }

  .filter-toggle-btn {
    display: inline-flex;
  }

  .filter-overlay {
    display: block;
  }

  .filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86%, 380px);
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 999;
    border-radius: 0 22px 22px 0;
    padding: 24px 20px;
    transform: translateX(-108%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.35s ease;
  }

  .filter-panel.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .filter-close-btn {
    display: inline-flex;
  }

  .filter-panel form {
    display: flex;
    flex-direction: column;
  }

  .filter-panel form .filter-group {
    margin-bottom: 18px;
  }

  .filter-panel form .apply-btn {
    grid-column: auto;
    margin-top: 0;
  }

  .filter-panel form .clear-btn {
    grid-column: auto;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .store-card {
    padding: 18px 16px;
    gap: 16px;
  }

  .store-title {
    font-size: 19px;
  }
}

/* موبایل کوچک */
@media (max-width: 430px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .store-card {
    flex-direction: column;
    text-align: center;
  }

  .products-title {
    font-size: 19px;
  }

  .store-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
}

/* دکمه علاقه‌مندی */
.product-wishlist {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #727872;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(32, 37, 31, 0.12);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.product-wishlist:hover {
  transform: scale(1.08);
  color: #e53935;
}

.product-wishlist.active {
  color: #e53935;
  background: #ffffff;
}

.product-wishlist.active i {
  font-weight: 900;
}

.product-wishlist i {
  pointer-events: none;
}

/* =========================================
 👨‍💻 Developer Information
 company: Rahe Roshd
 website : es-rahroshd.ir
 Instagram: @raheroshd55
 Tel: 09011267602 , 09030428445
 ========================================= */