/* E-commerce upgrades — filters, cart, mobile nav, search */
.catalog-bar {
  margin-bottom: 1.25rem;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.catalog-bar-top {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.catalog-count { margin: 0; font-size: .9rem; color: var(--text-muted); flex: 1; }
.catalog-sort { display: flex; align-items: center; gap: .5rem; margin: 0; }
.catalog-sort select {
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 8px;
  padding: .4rem .6rem;
  font: inherit;
}
.catalog-filter-toggle { display: none; }
.catalog-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: end;
}
.filter-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .35rem; }
.filter-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  padding: .35rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border, #e8e0d4);
  font-size: .85rem;
  text-decoration: none;
  color: inherit;
}
.chip.active, .chip:hover { background: var(--gold, #b8860b); color: #fff; border-color: var(--gold, #b8860b); }
.filter-row { display: flex; align-items: center; gap: .35rem; }
.filter-row input, .catalog-filters select {
  width: 100%;
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 8px;
  padding: .45rem .5rem;
  font: inherit;
}
.filter-check { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.filter-actions { display: flex; gap: .5rem; }

.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}
.page-num, .page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border, #e8e0d4);
  text-decoration: none;
  color: inherit;
  padding: 0 .6rem;
}
.page-num.active { background: var(--gold, #b8860b); color: #fff; border-color: var(--gold, #b8860b); }

.breadcrumbs {
  padding: .75rem 0 0;
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold, #b8860b); }
.bc-sep { margin: 0 .35rem; opacity: .5; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  margin: 1rem 0 1.25rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  padding: .6rem .75rem;
  background: rgba(255,255,255,.7);
  border-radius: 10px;
  border: 1px solid var(--border, #e8e0d4);
}
.trust-item svg,
.trust-item [class^="ri-"] { flex-shrink: 0; color: var(--gold, #b8860b); }
.trust-item [class^="ri-"] { font-size: 1.125rem; line-height: 1; }
.header-search [class^="ri-"] { font-size: 1.125rem; line-height: 1; }

.header-search-wrap { position: relative; flex: 1; max-width: 420px; margin: 0 1rem; }
.header-search {
  display: flex;
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.header-search input {
  flex: 1;
  border: 0;
  padding: .5rem 1rem;
  font: inherit;
  min-width: 0;
}
.header-search button {
  border: 0;
  background: var(--gold, #b8860b);
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
}
.search-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  z-index: 200;
  max-height: 360px;
  overflow-y: auto;
}
.search-suggest a {
  display: flex;
  gap: .75rem;
  padding: .6rem .85rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
  border-bottom: 1px solid #f0ebe3;
}
.search-suggest a:hover { background: #faf7f2; }
.search-suggest img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.search-suggest small { color: var(--text-muted); display: block; }

.cart-qty-row { display: flex; align-items: center; gap: .35rem; margin: .5rem 0; }
.qty-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.cart-qty-val { min-width: 1.5rem; text-align: center; font-weight: 600; }

.checkout-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 12px;
}
.checkout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.checkout-grid label { display: block; font-size: .8rem; margin-bottom: .25rem; color: var(--text-muted); }
.checkout-grid input, .checkout-grid textarea {
  width: 100%;
  border: 1px solid var(--border, #e8e0d4);
  border-radius: 8px;
  padding: .55rem .65rem;
  font: inherit;
}
.checkout-grid .full { grid-column: 1 / -1; }

.review-form-box { margin-top: 1.5rem; padding: 1rem; border: 1px solid var(--border, #e8e0d4); border-radius: 12px; }
.review-form-box .stars-input { display: flex; gap: .25rem; margin: .5rem 0; }
.review-form-box .stars-input label { cursor: pointer; font-size: 1.25rem; }

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--border, #e8e0d4);
  padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  justify-content: space-around;
  box-shadow: 0 -4px 24px rgba(0,0,0,.06);
}
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  font-size: .65rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: .25rem;
  position: relative;
}
.mobile-bottom-nav a.active { color: var(--gold, #b8860b); }
.mobile-bottom-nav [class^="ri-"] { font-size: 1.375rem; line-height: 1; }
.mobile-nav-badge {
  position: absolute;
  top: 0;
  right: .15rem;
  background: var(--gold, #b8860b);
  color: #fff;
  font-size: .6rem;
  font-style: normal;
  min-width: 1rem;
  height: 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .2rem;
}

.mgv-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: #fff;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  font-size: .9rem;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.mgv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.admin-order-items { margin: 0; padding-left: 1.1rem; font-size: .85rem; }
.badge-new { background: #e3f2fd; color: #1565c0; }
.badge-paid { background: #e8f5e9; color: #2e7d32; }
.badge-shipped { background: #fff3e0; color: #ef6c00; }
.badge-done { background: #f3e5f5; color: #6a1b9a; }
.badge-cancelled { background: #ffebee; color: #c62828; }

@media (max-width: 900px) {
  .header-search-wrap { display: none; }
  .catalog-filter-toggle { display: inline-flex; }
  .catalog-filters { display: none; }
  .catalog-filters.open { display: grid; }
  .mobile-bottom-nav { display: flex; }
}

@media (min-width: 901px) {
  .header-inner { flex-wrap: nowrap; }
}
