/* ============================================================
   SARAMAD — SHOP PAGE (shop.php)
   Page-specific styles on top of base.css tokens.
   ============================================================ */

/* ---------- Page banner ---------- */
.shop-banner {
  background: var(--color-surface-dark);
  color: #fff;
  padding-block: var(--space-xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}
.shop-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 220px at 88% -30%, rgba(222, 132, 53, 0.28), transparent 70%),
    radial-gradient(420px 200px at 8% 130%, rgba(189, 214, 230, 0.14), transparent 70%);
  pointer-events: none;
}
.shop-banner .container { position: relative; }
.shop-banner__title {
  margin: 10px 0 0;
  font-size: var(--text-display-md);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}
.shop-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--text-caption);
}
.shop-crumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.shop-crumb a:hover { color: var(--color-primary); }
.shop-crumb__sep { color: rgba(255, 255, 255, 0.35); font-size: 12px; }

/* ---------- Shop media (category slider image) ---------- */
.shop-media { margin: var(--space-lg) 0 var(--space-xl); }
.shop-media__img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ---------- Sub-category cards ---------- */
.shop-subcats { margin-bottom: var(--space-xl); }
.sub-cat-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: var(--space-base);
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--color-hairline-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.sub-cat-card a:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}
.sub-cat-card__img {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-full);
  background: var(--color-accent-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.sub-cat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.sub-cat-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
  text-align: center;
  line-height: 1.5;
}

/* ---------- Main layout ---------- */
.shop-main { padding-bottom: var(--space-section); }
.shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-top: var(--space-lg);
}
@media (min-width: 1128px) {
  .shop-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .shop-layout--no-sidebar { grid-template-columns: 1fr; }
}

/* ---------- Toolbar ---------- */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  background: #fff;
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-base);
}
.shop-toolbar__search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.shop-toolbar__search > i {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted-soft);
  font-size: 13px;
  pointer-events: none;
}
.shop-toolbar__search input {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--color-hairline);
  border-radius: var(--radius-full);
  padding: 0 18px 0 44px;
  font: inherit;
  font-size: var(--text-body-sm);
  color: var(--color-body);
  background: #fff;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.shop-toolbar__search input::placeholder { color: var(--color-muted-soft); }
.shop-toolbar__search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(222, 132, 53, 0.16);
}
.shop-select {
  min-height: 44px;
  border: 1.5px solid var(--color-hairline);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font: inherit;
  font-size: var(--text-body-sm);
  color: var(--color-body);
  background: #fff;
  max-width: 220px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.shop-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(222, 132, 53, 0.16);
}
.shop-toolbar__btn {
  border-radius: var(--radius-full);
  padding: 0 22px;
}
.shop-mob-filter {
  border-radius: var(--radius-full);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 1128px) {
  .shop-mob-filter { display: none !important; }
}
.shop-mob-filter i { margin-inline-end: 6px; }
@media (max-width: 743.98px) {
  .shop-toolbar { padding: var(--space-sm); gap: 6px; }
  .shop-toolbar__search { flex-basis: 100%; }
  .shop-select { flex: 1 1 auto; max-width: none; min-width: 0; }
  .shop-toolbar__btn, .shop-mob-filter { flex-shrink: 0; }
}

/* ---------- Filter card (desktop sidebar) ---------- */
.shop-sidebar { min-width: 0; }
.filter-card {
  background: #fff;
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.filter-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-ink);
  padding: var(--space-base);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface-soft);
  border-bottom: 1px solid var(--color-hairline-soft);
}
.filter-card__title i { color: var(--color-primary); font-size: 14px; }
.filter-group { border-bottom: 1px solid var(--color-hairline-soft); }
.filter-group:last-child { border-bottom: 0; }
.filter-group__head { margin: 0; }
.filter-group__btn {
  width: 100%;
  background: none;
  border: 0;
  padding: 12px var(--space-base);
  min-height: 48px;
  font: inherit;
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.filter-group__btn:hover { color: var(--color-primary); }
.filter-group__btn .bi { color: var(--color-muted-soft); font-size: 14px; transition: transform 0.25s var(--ease); }
.filter-group__btn[aria-expanded="true"] .bi { transform: rotate(180deg); color: var(--color-primary); }
.filter-accordion .collapse { display: none; padding: 0 var(--space-base) var(--space-base); }
.filter-accordion .collapse.show { display: block; }
.filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--color-body);
  min-height: 36px;
}
.filter-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.filter-check span { line-height: 1.5; }
.filter-check:hover { color: var(--color-primary); }

/* ---------- Product grid ---------- */
.shop-content { min-width: 0; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-base);
}
@media (min-width: 744px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
}
@media (min-width: 1440px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.product-grid .product-item { min-width: 0; }
.product-grid .product-card { height: 100%; }

/* ---------- Empty state ---------- */
.notif { min-height: 20px; }
.notif .empty-state {
  text-align: center;
  padding: var(--space-xxl) var(--space-base);
  background: #fff;
  border: 1.5px dashed var(--color-hairline);
  border-radius: var(--radius-md);
}
.notif .empty-state > i {
  font-size: 42px;
  color: var(--color-muted-soft);
  display: block;
  margin-bottom: var(--space-base);
}
.notif .empty-state h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--color-ink); }
.notif .empty-state p { color: var(--color-muted); font-size: 14px; margin: 0 0 var(--space-base); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination .page-item { display: inline-flex; }
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-body);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.pagination .page-link:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .page-link-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
  cursor: default;
}
.pagination .page-link-active:hover { color: #fff; }
.pagination .page-dots {
  min-width: 30px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted-soft);
}

/* ---------- Mobile offcanvas (Bootstrap Offcanvas JS, our CSS) ---------- */
.offcanvas {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: min(360px, 92vw);
  background: #fff;
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0.3s;
  box-shadow: var(--shadow-pop);
}
[dir="rtl"] .offcanvas { transform: translateX(-100%); }
.offcanvas.show { transform: translateX(0) !important; visibility: visible; }
.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-base);
  background: var(--color-surface-soft);
  border-bottom: 1px solid var(--color-hairline-soft);
}
.offcanvas-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--color-ink); }
.offcanvas-close {
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 18px;
  color: var(--color-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.offcanvas-close:hover { background: var(--color-primary); color: #fff; }
.offcanvas-body { padding: var(--space-base); overflow-y: auto; flex: 1; }
.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 32, 0.55);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: calc(var(--z-modal) + 5);
}
.offcanvas-backdrop.show { opacity: 1; }
@media (min-width: 1128px) {
  .offcanvas, .offcanvas-backdrop { display: none !important; }
}
