/* ═══════════════════════════════════════════════════════
   MOMENTA BOX — Shop Page
   ═══════════════════════════════════════════════════════ */

/* ── Hero ───────────────────────────────────────────── */
.shop-hero {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.shop-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?w=1920&q=80&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}
.shop-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 46, 0.9) 0%,
    rgba(44, 44, 44, 0.5) 60%,
    rgba(194, 149, 107, 0.2) 100%
  );
}
.shop-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--space-10) var(--space-4) var(--space-8);
}
.shop-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}
.shop-hero .breadcrumb {
  margin-bottom: 0;
}
.shop-hero .breadcrumb__item,
.shop-hero .breadcrumb__item a {
  color: rgba(255, 255, 255, 0.75);
}
.shop-hero .breadcrumb__item.active {
  color: var(--color-gold-light);
}
.shop-hero .breadcrumb__sep {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Layout ─────────────────────────────────────────── */
.shop-page {
  background: var(--color-cream);
  padding: var(--space-8) 0 var(--space-16);
}
.shop-layout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: flex-start;
}
@media (min-width: 1024px) {
  .shop-layout {
    flex-wrap: nowrap;
    gap: var(--space-8);
  }
}

/* ── Sidebar ────────────────────────────────────────── */
.shop-sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
@media (min-width: 1024px) {
  .shop-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height, 80px) + var(--space-6));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* تحسين شكل شريط التمرير للوحة الجانبية */
    scrollbar-width: thin;
    scrollbar-color: rgba(211, 175, 55, 0.5) transparent;
  }
  .shop-sidebar::-webkit-scrollbar {
    width: 4px;
  }
  .shop-sidebar::-webkit-scrollbar-thumb {
    background: rgba(211, 175, 55, 0.5);
    border-radius: 4px;
  }
}

.shop-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.shop-filter-box {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(234, 219, 198, 0.8);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.shop-filter-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(234, 219, 198, 0.6);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(255, 248, 220, 0.5);
}
.shop-filter-head svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Category list */
.sfb-list {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) 0;
  margin: 0;
  list-style: none;
}
.sfb-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  border-inline-end: 3px solid transparent;
}
.sfb-all:hover { color: var(--color-gold-dark); background: rgba(211, 175, 55, 0.06); }
.sfb-all.is-active {
  color: var(--color-gold-dark);
  font-weight: 700;
  background: rgba(211, 175, 55, 0.1);
  border-inline-end-color: var(--color-gold);
}
.sfb-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  padding: 1px 8px;
  border-radius: var(--radius-full);
}
.sfb-all.is-active .sfb-badge {
  background: rgba(211, 175, 55, 0.15);
  border-color: rgba(211, 175, 55, 0.3);
  color: var(--color-gold-dark);
}
.sfb-list > li:nth-child(2) {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-1);
  padding-top: var(--space-1);
}
.sfb-item { position: relative; }
.sfb-main {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  border-inline-end: 3px solid transparent;
  transition: all 0.2s ease;
}
.sfb-main:hover { color: var(--color-gold-dark); background: rgba(211, 175, 55, 0.06); }
.sfb-main.is-active {
  color: var(--color-gold-dark);
  background: rgba(211, 175, 55, 0.1);
  border-inline-end-color: var(--color-gold);
}
.sfb-icon { font-size: 0.9rem; flex-shrink: 0; }
.sfb-main__label { flex: 1; }
.sfb-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: rgba(211, 175, 55, 0.1);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.sfb-chevron svg {
  width: 10px;
  height: 10px;
  stroke: var(--color-gold);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.sfb-item--open > .sfb-main .sfb-chevron,
.sfb-item:hover > .sfb-main .sfb-chevron { transform: rotate(180deg); }
.sfb-subs {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 0;
  background: rgba(211, 175, 55, 0.03);
}
.sfb-item--open > .sfb-subs,
.sfb-item:hover > .sfb-subs {
  max-height: 300px;
  opacity: 1;
}
.sfb-sub {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5) var(--space-2) var(--space-8);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-inline-end: 2px solid transparent;
  transition: all 0.2s ease;
}
.sfb-sub:hover { color: var(--color-gold-dark); background: rgba(211, 175, 55, 0.07); }
.sfb-sub.is-active {
  color: var(--color-gold-dark);
  background: rgba(211, 175, 55, 0.1);
  border-inline-end-color: var(--color-gold);
  font-weight: 700;
}

/* Price filter */
.price-filter-body { padding: var(--space-4) var(--space-5); }
.price-filter-inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.price-filter-inputs input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-family: var(--font-primary);
  background: var(--color-white);
  text-align: center;
}
.price-filter-inputs span {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
.price-filter-apply {
  width: 100%;
  margin-top: var(--space-2);
}

/* Build CTA */
.shop-build-cta {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d2d 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(211, 175, 55, 0.2);
}
.shop-build-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(211, 175, 55, 0.2) 0%, transparent 70%);
}
.shop-build-cta__inner {
  position: relative;
  padding: var(--space-6);
  text-align: center;
}
.shop-build-cta__inner h4 {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  color: var(--color-gold-light);
  margin-bottom: var(--space-2);
}
.shop-build-cta__inner p {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

/* Mobile filter toggle */
.shop-mobile-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}
.shop-mobile-filter-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-gold);
  fill: none;
  stroke-width: 2;
}
@media (min-width: 1024px) {
  .shop-mobile-filter-btn { display: none; }
  .shop-sidebar .shop-filter-panel { display: flex !important; }
}
@media (max-width: 1023px) {
  .shop-sidebar .shop-filter-panel {
    display: none;
    flex-direction: column;
    gap: var(--space-4);
  }
  .shop-sidebar .shop-filter-panel.is-open { display: flex; }
}

/* ── Main Content ───────────────────────────────────── */
.shop-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(234, 219, 198, 0.8);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
@media (min-width: 900px) {
  .shop-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.shop-results-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.shop-results-count strong { color: var(--color-text-primary); }
.shop-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}
@media (min-width: 900px) {
  .shop-toolbar__actions {
    width: auto;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 100%;
  }
}

.shop-search-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 900px) {
  .shop-search-wrap {
    max-width: 280px;
  }
}
.shop-search-wrap svg {
  position: absolute;
  inset-inline-start: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--color-text-muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
.shop-search-input {
  width: 100%;
  padding: var(--space-2) var(--space-4);
  padding-inline-start: calc(var(--space-3) + 24px);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-family: var(--font-primary);
  background: var(--color-white);
  transition: border-color 0.2s ease;
}
.shop-search-input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.shop-main {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.shop-sort-form {
  flex-shrink: 0;
}
.shop-sort-form select {
  min-width: 140px;
}

.budget-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 10px;
  padding: 3px 10px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-gold-dark);
  background: rgba(211, 175, 55, 0.12);
  border: 1px solid rgba(211, 175, 55, 0.3);
  border-radius: var(--radius-full);
}
.budget-filter-clear {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  opacity: 0.7;
}
.budget-filter-clear:hover { opacity: 1; }

.view-toggle { display: flex; gap: var(--space-1); }
.view-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: all 0.2s ease;
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
}
.view-btn.active,
.view-btn:hover {
  color: var(--color-gold);
  border-color: var(--color-gold);
  background: var(--color-gold-pale);
}
.view-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ── Product Grid ───────────────────────────────────── */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-5);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
@media (min-width: 768px) {
  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .shop-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1400px) {
  .shop-product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.shop-product-grid.list-view .shop-product-card__body {
  flex: 1;
}
.shop-product-grid.list-view {
  grid-template-columns: 1fr;
}
.shop-product-grid.list-view .shop-product-card {
  flex-direction: row;
  align-items: stretch;
}
.shop-product-grid.list-view .shop-product-card__img-wrap {
  width: 180px;
  min-width: 180px;
}
.shop-product-grid.list-view .shop-product-card__footer { display: none; }

.shop-product-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(234, 219, 198, 0.8);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.shop-product-card:hover {
  border-color: var(--color-gold-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(211, 175, 55, 0.15);
}
.shop-product-card.is-hidden { display: none; }
.shop-product-card.search-hidden { display: none !important; }

.shop-product-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-white);
}
.shop-product-card__img-wrap a { display: block; height: 100%; }
.shop-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.shop-product-card:hover .shop-product-card__img { transform: scale(1.06); }

.shop-product-card__badges {
  position: absolute;
  top: var(--space-3);
  inset-inline-start: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  z-index: 2;
}

.shop-product-card__hover-actions {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}
.shop-product-card:hover .shop-product-card__hover-actions { opacity: 1; }

.shop-product-card__body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.shop-product-card__category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-gold-dark);
}
.shop-product-card__name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
.shop-product-card__name a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.shop-product-card__name a:hover { color: var(--color-gold-dark); }
.shop-product-card__price-wrap {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
}
.shop-product-card__price {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--color-gold-dark);
}
.shop-product-card__compare {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.shop-product-card__footer {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
}
.shop-product-card__footer .btn { flex: 1; font-size: var(--font-size-xs); }

/* Load more */
.shop-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-8);
}
.shop-load-more-wrap.is-hidden { display: none; }

/* Empty state */
.shop-empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-xl);
}
.shop-empty-state__icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--color-border-dark);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto var(--space-4);
}
.shop-empty-state__title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}
.shop-empty-state__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* Subcats notice */
.subcats-notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: rgba(211, 175, 55, 0.08);
  border: 1px solid rgba(211, 175, 55, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}
.subcats-notice svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-gold);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.subcats-notice a {
  color: var(--color-gold-dark);
  font-weight: 600;
  text-decoration: none;
}
.subcats-notice a:hover { text-decoration: underline; }

/* Dark mode */
[data-theme="dark"] .shop-page { background: var(--color-dark, #1a1a2e); }
[data-theme="dark"] .shop-filter-box,
[data-theme="dark"] .shop-toolbar,
[data-theme="dark"] .shop-product-card {
  background: rgba(30, 30, 50, 0.8);
  border-color: rgba(211, 175, 55, 0.15);
}