/* =========================================================
       SHOP PROTOTYPE (single-file)
       - All classes/ids are prefixed with shop- to avoid conflicts
       - Scoped under .shop-page for extra safety
       ========================================================= */

:root {
  --shop-ink: #0b1f17;
  --shop-muted: #6b7280;
  --shop-brand: #16a34a;
  --shop-brand-600: #15803d;
  --shop-accent: #ffd166;
  --shop-soft: #f3f4f6;
  --shop-border: #e5e7eb;
  --shop-card: rgba(255, 255, 255, 0.78);
  --shop-glass: rgba(255, 255, 255, 0.55);
  --shop-shadow: 0 18px 50px rgba(4, 24, 16, 0.18);
  --shop-shadow-2: 0 12px 28px rgba(4, 24, 16, 0.12);
  --shop-radius: 18px;
}

/* ===== Scoped base styles (Shop only) ===== */

.shop-page {
  min-height: 100vh;
  color: var(--shop-ink);
  font-family: Vazirmatn, IRANSans, "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(
      1200px 600px at 85% -20%,
      rgba(22, 163, 74, 0.18),
      transparent 55%
    ),
    radial-gradient(
      900px 520px at 10% 0%,
      rgba(255, 209, 102, 0.16),
      transparent 55%
    ),
    linear-gradient(180deg, #eefaf4 0%, #edf7f2 55%, #e8f7ef 100%);
}

.shop-page *,
.shop-page *::before,
.shop-page *::after {
  box-sizing: border-box;
}

.shop-page a {
  color: inherit;
  text-decoration: none;
}

/* container stays the same */
.shop-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Top area (SEO + chips) ===== */
.shop-hero {
  padding: 18px 0 10px;
}
.shop-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(11, 31, 23, 0.75);
  margin: 10px 0 6px;
}
.shop-breadcrumb a {
  color: rgba(11, 31, 23, 0.8);
  font-weight: 800;
}
.shop-breadcrumb .shop-sep {
  opacity: 0.6;
}
.shop-h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.7;
  letter-spacing: -0.2px;
}
.shop-sub {
  margin: 8px 0 0;
  color: rgba(11, 31, 23, 0.78);
  line-height: 2;
  max-width: 860px;
  font-size: 14px;
}

/* Chips row */
.shop-chipbar {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 80, 60, 0.12);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow-2);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: auto hidden;
  scrollbar-width: thin;
}
.shop-chipbar::-webkit-scrollbar {
  height: 8px;
}
.shop-chipbar::-webkit-scrollbar-thumb {
  background: rgba(11, 31, 23, 0.15);
  border-radius: 999px;
}
.shop-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--shop-border);
  background: #fff;
  box-shadow: 0 10px 18px rgba(4, 24, 16, 0.06);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
  user-select: none;
  font-weight: 900;
  font-size: 13px;
}
.shop-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(4, 24, 16, 0.1);
}
.shop-chip .shop-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(65% 65% at 35% 35%, #86efad, #22c55e);
  box-shadow: inset 0 0 0 1px rgba(6, 54, 31, 0.14);
}
.shop-chip.is-active {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
}

/* ===== Controls row ===== */
.shop-controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.shop-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.shop-pill {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(20, 80, 60, 0.12);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: 0 12px 24px rgba(4, 24, 16, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.shop-count {
  font-weight: 900;
  font-size: 13px;
  color: rgba(11, 31, 23, 0.85);
}
.shop-select {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 13px;
  outline: none;
  min-width: 190px;
}
.shop-btn {
  border: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  box-shadow: 0 12px 24px rgba(4, 24, 16, 0.1);
}
.shop-btn:hover {
  transform: translateY(-1px);
}
.shop-btn--primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0b1f17;
}
.shop-btn--ghost {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(20, 80, 60, 0.14);
  color: #0b1f17;
}
.shop-icon {
  width: 18px;
  height: 18px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 12px;
}

/* ===== Main layout (filters + grid) ===== */
.shop-main {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 24px;
}

/* Sidebar (desktop) */
.shop-sidebar {
  position: sticky;
  top: 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid rgba(20, 80, 60, 0.12);
  border-radius: 24px;
  box-shadow: var(--shop-shadow-2);
  overflow: hidden;
}
.shop-side-head {
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.09),
    rgba(255, 209, 102, 0.1)
  );
}
.shop-side-title {
  font-weight: 1000;
  font-size: 15px;
  letter-spacing: -0.2px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}
.shop-side-title .shop-badge {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: radial-gradient(
    60% 60% at 45% 35%,
    #a7f3d0 0%,
    #34d399 55%,
    #16a34a 100%
  );
  color: #06361f;
  font-weight: 1000;
  box-shadow: inset 0 0 0 1px rgba(6, 54, 31, 0.12);
}
.shop-side-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shop-field {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 10px 18px rgba(4, 24, 16, 0.06);
}
.shop-field h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(11, 31, 23, 0.9);
}
.shop-field .shop-muted {
  color: rgba(11, 31, 23, 0.62);
  font-weight: 800;
  font-size: 12px;
}


/* ===== Fix RTL alignment in category filter ===== */
/* ===== Category filter: checkbox LEFT, text RIGHT ===== */

.shop-pricegrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}


.shop-input {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

/* ================================
   Unified Filter System
   ================================ */

.shop-filter-item{
  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 48px;
  padding: 12px 14px;

  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,0.06);

  cursor: pointer;
  user-select: none;

  transition:
    background 0.12s ease,
    transform 0.12s ease,
    border-color 0.12s ease;
}

.shop-filter-item:hover{
  background: #f3f4f6;
  transform: translateY(-1px);
}

.shop-filter-text{
  flex: 1 1 auto;
  text-align: right;

  font-size: 13px;
  font-weight: 900;
  color: rgba(11,31,23,0.92);
}

.shop-filter-item input[type="checkbox"]{
  margin: 0;
  accent-color: var(--shop-brand);
  transform: scale(1.05);
  flex-shrink: 0;
}

.shop-filter-item--input{
  padding: 0;
  background: transparent;
  border: 0;
  cursor: default;
}

.shop-filter-item--input .shop-input{
  width: 100%;
  min-height: 48px;

  padding: 12px 14px;
  border-radius: 16px;

  background: #f9fafb;
  border: 1px solid rgba(0,0,0,0.06);

  font-size: 13px;
  font-weight: 800;
}
.shop-checks,
.shop-toggles{
  display: grid;
  gap: 10px;
}


/* ===== Options: checkbox LEFT like categories, icon next to text ===== */
.shop-toggle{
  padding: 0;
  background: transparent;
  border: 0;
}

.shop-side-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.shop-side-actions .shop-btn {
  flex: 1 1 auto;
  justify-content: center;
  box-shadow: none;
}
.shop-btn--reset {
  background: #fff;
  border: 1px dashed rgba(22, 163, 74, 0.45);
  color: rgba(11, 31, 23, 0.95);
}

/* ===== Grid ===== */
.shop-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
@media (max-width: 1200px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .shop-main {
    grid-template-columns: 1fr;
  }
  .shop-sidebar {
    display: none;
  }
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-h1 {
    font-size: 22px;
  }
}

.shop-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid rgba(20, 80, 60, 0.12);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(4, 24, 16, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(4, 24, 16, 0.14);
}
.shop-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.14),
    rgba(255, 209, 102, 0.16)
  );
  overflow: hidden;
}
.shop-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}
.shop-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 2;
}
.shop-badge-pill {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  color: rgba(11, 31, 23, 0.92);
}
.shop-badge-pill.is-sale {
  background: linear-gradient(135deg, #ffd166, #fdd24f);
  border-color: rgba(255, 255, 255, 0.35);
  color: #0b1f17;
}
.shop-badge-pill.is-hot {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
}

.shop-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.shop-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 1000;
  line-height: 1.8;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.shop-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 1100;
}
.shop-price b {
  font-size: 15px;
}
.shop-price span {
  font-size: 11px;
  color: rgba(11, 31, 23, 0.62);
  font-weight: 900;
}
.shop-old {
  font-size: 12px;
  color: rgba(11, 31, 23, 0.45);
  text-decoration: line-through;
  font-weight: 900;
}
.shop-stock {
  font-size: 12px;
  font-weight: 1000;
  color: rgba(11, 31, 23, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}
.shop-stock .shop-dot2 {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}
.shop-stock.is-out .shop-dot2 {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}
.shop-card-foot {
  padding: 12px;
  padding-top: 0;
  display: flex;
  gap: 10px;
}
.shop-cta {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 1100;
  cursor: pointer;
  background: linear-gradient(135deg, #34d399, #22c55e);
  color: #0b1f17;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  box-shadow: 0 12px 22px rgba(34, 197, 94, 0.2);
}
.shop-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(34, 197, 94, 0.25);
}
.shop-cta .shop-arrow {
  font-weight: 1200;
}

/* ===== Loader + empty state ===== */
.shop-status {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 80, 60, 0.12);
  border-radius: 20px;
  box-shadow: var(--shop-shadow-2);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.shop-status .shop-status-txt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 1000;
}
.shop-loader {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.22);
  display: grid;
  place-items: center;
}
.shop-spin {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid rgba(11, 31, 23, 0.2);
  border-top-color: rgba(22, 163, 74, 0.92);
  animation: shop-spin 0.8s linear infinite;
}
@keyframes shop-spin {
  to {
    transform: rotate(360deg);
  }
}
.shop-empty {
  padding: 22px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 80, 60, 0.12);
  box-shadow: var(--shop-shadow-2);
}
.shop-empty h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.shop-empty p {
  margin: 0;
  color: rgba(11, 31, 23, 0.7);
  line-height: 2;
}

/* ===== Mobile off-canvas filters ===== */
.shop-dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 80;
}
.shop-dim.is-open {
  opacity: 1;
  pointer-events: auto;
}
.shop-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(92vw, 360px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px) saturate(130%);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.18);
  transform: translateX(110%);
  transition: transform 0.18s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}
.shop-drawer.is-open {
  transform: translateX(0);
}
.shop-drawer .shop-side-head {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.shop-drawer .shop-side-body {
  overflow: auto;
}
@media (min-width: 901px) {
  .shop-btn--mobilefilter {
    display: none;
  }
  .shop-drawer,
  .shop-dim {
    display: none;
  }
}

/* ===== Mini How It Works (Shop) ===== */
.shop-mini-how {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 80, 60, 0.12);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow-2);
  padding: 12px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.shop-mini-how__item {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1 1 180px;
  min-width: 180px;
}

.shop-mini-how__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.18);
  box-shadow: 0 10px 18px rgba(4, 24, 16, 0.06);
  font-size: 14px;
}

.shop-mini-how__txt b {
  display: block;
  font-weight: 1000;
  line-height: 1.25;
  font-size: 13px;
  color: rgba(11, 31, 23, 0.9);
}

.shop-mini-how__txt .shop-muted {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(11, 31, 23, 0.62);
}

.shop-mini-how__sep {
  width: 1px;
  height: 26px;
  background: rgba(0, 0, 0, 0.07);
}

@media (max-width: 820px) {
  .shop-mini-how__sep {
    display: none;
  }
  .shop-mini-how__item {
    min-width: 45%;
  }
}

@media (max-width: 520px) {
  .shop-mini-how__item {
    min-width: 100%;
  }
}
.shop-flow{
  margin-top: 24px;
  padding: 24px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(20,80,60,0.12);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(4,24,16,0.12);
}

/* ---------- Header ---------- */

.shop-flow__head{
  text-align: center;
  margin-bottom: 26px;
}

.shop-flow__head h2{
  margin: 0;
  font-size: 19px;
  font-weight: 1000;
}

.shop-flow__head p{
  margin-top: 6px;
  font-size: 14px;
  color: rgba(11,31,23,0.65);
  font-weight: 800;
}

/* ---------- Steps Grid ---------- */

.shop-flow__steps{
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}

/* ---------- Step Card ---------- */

.shop-flow__step{
  background: #fff;
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 12px 24px rgba(4,24,16,0.08);

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Number Badge ---------- */

.shop-flow__badge{
  width: 44px;
  height: 44px;
  margin-bottom: 14px;

  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(34,197,94,0.25),
    rgba(22,163,74,0.18)
  );

  border: 1px solid rgba(22,163,74,0.35);

  display: grid;
  place-items: center;

  font-size: 18px;
  font-weight: 1100;
  color: #0b1f17;

  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
}

/* ---------- Text ---------- */

.shop-flow__content h3{
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 1000;
}

.shop-flow__content p{
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 2;
  color: rgba(11,31,23,0.7);
  font-weight: 800;
}

/* ---------- Icon (Bottom) ---------- */

.shop-flow__icon{
  width: 46px;
  height: 46px;
  margin-top: auto;

  border-radius: 16px;
  display: grid;
  place-items: center;

  background: linear-gradient(
    135deg,
    rgba(34,197,94,0.18),
    rgba(22,163,74,0.12)
  );

  border: 1px solid rgba(22,163,74,0.25);
  font-size: 18px;
}

/* ---------- Responsive ---------- */

@media (max-width:900px){
  .shop-flow__steps{
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:520px){
  .shop-flow__steps{
    grid-template-columns: 1fr;
  }
}
