/* =========================================================
   RedemptionArc — Shop (products) styles
   Loaded globally like platform.css; only new selectors.
   ========================================================= */

/* ---- Vitrine header ------------------------------------ */
.shop-note {
  color: var(--text-secondary);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* The vitrine uses .page-header (same as the other listing pages) so the
   motion layer draws its canvas band behind the heading. The generic
   .page-header rules center text; these centre the flex/eyebrow children too. */
.page-header .hero-eyebrow { margin-bottom: 0.7rem; }
.page-header .shop-note { justify-content: center; }

/* ---- Type filter pills ---------------------------------- */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}
.shop-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  min-width: 0;
}
/* آیکون نوع داخل پیل: سایز پایه 20px برای این متن ریز بزرگ است */
.filter-pill .ico { width: 14px; height: 14px; flex-shrink: 0; }
.cat-pill .ico { width: 13px; height: 13px; flex-shrink: 0; }
.page-header .term-tag .ico { width: 15px; height: 15px; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border-line);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
  flex: 0 0 auto;
}
.filter-pill:hover { color: var(--accent-green); border-color: var(--accent-green); }
.filter-pill.active {
  color: #04120a;
  background: var(--gradient-signal);
  border-color: transparent;
  font-weight: 700;
}
.filter-count {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
}
.filter-pill.active .filter-count { background: rgba(0, 0, 0, 0.18); }

.shop-search {
  display: flex;
  gap: 0.5rem;
  margin-inline-start: auto;
}
.shop-search .form-control {
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 200px;
}

.shop-resultline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: -0.8rem 0 1.2rem;
}

/* ---- Product cards -------------------------------------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-green);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.product-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-panel-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-thumb .term-tag { font-size: 0.85rem; }
.product-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.product-body h3 {
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0;
}
.product-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 0;
  flex: 1;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-line);
}
.product-price {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.95rem;
}
.product-price.price-negotiable { color: var(--accent-warn); }
.price-old {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
  margin-inline-start: 0.35rem;
}
.price-off {
  position: absolute;
  top: 0.6rem;
  inset-inline-start: 0.6rem;
  background: var(--accent-danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.product-order {
  color: var(--accent-blue);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---- Product detail ------------------------------------- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem;
  align-items: start;
}
.product-main-image {
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel-alt);
  min-height: 240px;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-main-image img {
  width: 100%;
  height: auto;
  max-height: 478px;
  object-fit: contain;
  display: block;
}
.product-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}
.product-thumbs img {
  width: 74px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-line);
  cursor: pointer;
}

.product-detail-info h1 { margin: 0.6rem 0 0.4rem; font-size: 1.55rem; }
.product-detail-info .lead { color: var(--text-secondary); }

.order-box {
  margin-top: 1.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.order-price {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.price-now {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-green);
}
.order-stock { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.order-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  padding: 0.8rem 1.4rem;
}

.feature-list { margin-top: 1.4rem; }
.feature-list h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-green);
}
.feature-list ul {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.45rem 1.2rem;
}
.feature-list li {
  position: relative;
  padding-inline-start: 1.3rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.feature-list li::before {
  content: "▸";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent-green);
}

.attr-section, .product-description { margin-top: 2.2rem; }
.attr-section h2, .product-description h2 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}
.attr-table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.attr-table th, .attr-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-line);
  text-align: start;
  font-size: 0.92rem;
}
.attr-table tr:last-child th, .attr-table tr:last-child td { border-bottom: 0; }
.attr-table th {
  background: var(--bg-panel-alt);
  color: var(--text-secondary);
  font-weight: 600;
  width: 200px;
}

.prose { color: var(--text-secondary); max-width: 820px; }
.prose p { margin-bottom: 0.9rem; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 1.2rem;
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent-green); }
.bc-sep { color: var(--text-muted); opacity: 0.6; }
.bc-current { color: var(--text-primary); }

/* ---- Pagination ----------------------------------------- */
.pagination {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-link {
  min-width: 38px;
  padding: 0.45rem 0.7rem;
  text-align: center;
  border: 1px solid var(--border-line);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.page-link:hover { color: var(--accent-green); border-color: var(--accent-green); }
.page-link.active {
  background: var(--gradient-signal);
  color: #04120a;
  font-weight: 700;
  border-color: transparent;
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; }
  .shop-search { margin-inline-start: 0; width: 100%; }
  .shop-search .form-control { flex: 1; min-width: 0; }
  .product-thumbs img { width: 60px; height: 42px; }
  /* روی موبایل، پیل ها چند ردیفی می شوند ولی مرتب و بدون سرریز */
  .shop-filters { flex-direction: column; align-items: stretch; }
  .shop-filters-row { gap: 0.5rem; }
}
