/* Shop home ("/"), styled like the app's shop screens (Roz/lib/features/shop_home). */
.shop-home {
  --shop-primary: #1E88E5;
  --shop-primary-dark: #1565C0;
  --shop-secondary: #42A5F5;
  --shop-soft: #E3F2FD;
  --shop-bg: #F3F8FE;
  --shop-card: #FFFFFF;
  --shop-border: #E2E8F0;
  --shop-text: #0F172A;
  --shop-muted: #475569;
  --shop-sale: #E53935;
  --shop-success: #198754;
  --shop-radius: 16px;
  --shop-radius-btn: 12px;
  --shop-shadow: 0 4px 18px rgba(21, 101, 192, 0.08);
  background: var(--shop-bg);
  color: var(--shop-text);
  padding: 24px 0 48px;
  min-height: 60vh;
}

[dir="rtl"] .shop-home,
[dir="rtl"] .shop-home input,
[dir="rtl"] .shop-home select,
[dir="rtl"] .shop-home button {
  font-family: 'Vazirmatn', system-ui, sans-serif;
}

.shop-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Buttons */
.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--shop-radius-btn);
  padding: 10px 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.shop-btn--primary { background: var(--shop-primary); color: #fff; }
.shop-btn--primary:hover { background: var(--shop-primary-dark); color: #fff; }
.shop-btn--ghost { background: var(--shop-card); color: var(--shop-primary-dark); border: 1px solid var(--shop-border); }
.shop-btn--ghost:hover { background: var(--shop-soft); }
.shop-btn--light { background: #fff; color: var(--shop-primary-dark); }

/* Banners */
.shop-banners .carousel,
.shop-banner {
  border-radius: 20px;
  overflow: hidden;
}
.shop-banner {
  position: relative;
  display: block;
  height: 340px;
  background: #1E88E5;
  color: #fff;
  text-decoration: none;
}
.shop-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-banner__text {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  padding: 32px 40px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0));
}
[dir="rtl"] .shop-banner__text { background: linear-gradient(270deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0)); }
.shop-banner--default .shop-banner__text { background: none; }
.shop-banner__text h1,
.shop-banner__text h2 { color: #fff; font-size: 2rem; font-weight: 800; margin: 0; }
.shop-banner__text p { color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; margin: 0; }
.shop-banners .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }

/* Filter bar */
.shop-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  padding: 16px;
  box-shadow: var(--shop-shadow);
}
.shop-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.shop-field span { font-size: 0.82rem; font-weight: 700; color: var(--shop-muted); }
.shop-field .form-select,
.shop-field .form-control { border-radius: var(--shop-radius-btn); border-color: var(--shop-border); }
.shop-filters__actions { display: flex; gap: 8px; }

/* Search */
.shop-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shop-shadow);
}
[dir="rtl"] .shop-search { padding: 8px 18px 8px 8px; }
.shop-search > i { color: var(--shop-muted); }
.shop-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--shop-text); min-width: 0; }

/* Categories */
.shop-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.shop-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  text-decoration: none;
  color: var(--shop-text);
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.shop-category:hover,
.shop-category.is-active { border-color: var(--shop-primary); box-shadow: var(--shop-shadow); color: var(--shop-text); }
.shop-category__image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--shop-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--shop-primary);
  font-size: 1.6rem;
}
.shop-category__image img { width: 100%; height: 100%; object-fit: cover; }
.shop-category__name { font-weight: 700; font-size: 0.95rem; }
.shop-category__count { font-size: 0.8rem; color: var(--shop-muted); }

/* Section headers */
.shop-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.shop-section-header h2 { font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--shop-text); }
.shop-section-header h2 i { color: var(--shop-primary); }
.shop-section-header p { margin: 4px 0 0; color: var(--shop-muted); }
.shop-view-all { font-weight: 700; color: var(--shop-primary); text-decoration: none; white-space: nowrap; }
.shop-view-all:hover { color: var(--shop-primary-dark); }

/* Discounted products strip */
.shop-deals {
  background: #E8F2FD;
  border-radius: 20px;
  padding: 20px;
}
.shop-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.shop-strip .shop-card { scroll-snap-align: start; }

/* Products grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* Product card */
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.shop-card:hover { box-shadow: var(--shop-shadow); transform: translateY(-2px); }
.shop-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #F8FAFC;
}
.shop-card__media img { width: 100%; height: 100%; object-fit: cover; }
.shop-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #CBD5E1;
  font-size: 2.4rem;
}
.shop-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}
.shop-badge--sale { background: var(--shop-sale); }
.shop-badge--new { background: var(--shop-success); }
.shop-card__heart {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--shop-sale);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
.shop-card__heart.is-on i { font-weight: 900; }
.shop-card__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.shop-card__name {
  color: var(--shop-text);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.shop-card__name:hover { color: var(--shop-primary-dark); }
.shop-card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.shop-card__current { color: var(--shop-primary-dark); font-weight: 800; font-size: 1.05rem; }
.shop-card__original { color: var(--shop-muted); text-decoration: line-through; font-size: 0.85rem; }
.shop-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.shop-card__stock { font-size: 0.8rem; font-weight: 700; }
.shop-card__stock.is-in { color: var(--shop-success); }
.shop-card__stock.is-out { color: var(--shop-sale); }
.shop-card__cart {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--shop-radius-btn);
  background: var(--shop-primary);
  color: #fff;
}
.shop-card__cart:disabled { background: #CBD5E1; cursor: not-allowed; }

/* Empty state and pages */
.shop-empty {
  text-align: center;
  padding: 48px 16px;
  background: var(--shop-card);
  border: 1px dashed var(--shop-border);
  border-radius: var(--shop-radius);
  color: var(--shop-muted);
}
.shop-empty i { font-size: 2.4rem; color: #CBD5E1; margin-bottom: 10px; }
.shop-empty h3 { font-size: 1.1rem; font-weight: 800; color: var(--shop-text); }
.shop-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.shop-pages a {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: var(--shop-radius-btn);
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  color: var(--shop-text);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}
.shop-pages a.is-current { background: var(--shop-primary); border-color: var(--shop-primary); color: #fff; }

/* Toast */
.shop-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--shop-text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--shop-radius-btn);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 2000;
}
.shop-toast.is-visible { opacity: 1; }

/* Products results page */
.shop-results__header { margin-bottom: 0; }
.shop-results__header h1 { font-size: 1.6rem; font-weight: 800; margin: 0; color: var(--shop-text); }
.shop-results__banner { height: 220px; }
.shop-results__count { color: var(--shop-muted); font-weight: 600; margin: 0 0 12px; }

/* Smaller windows */
@media (max-width: 1100px) {
  .shop-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-filters__actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .shop-filters { grid-template-columns: 1fr 1fr; }
  .shop-banner { height: 220px; }
  .shop-banner__text { max-width: 100%; padding: 20px; }
  .shop-banner__text h1,
  .shop-banner__text h2 { font-size: 1.35rem; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shop-strip { grid-auto-columns: 170px; }
  .shop-search .shop-btn { padding: 10px 14px; }
}
