/* ════════════════════════════════════════════════════════
   SAVI SO.  —  shop.css
   Shop & Merch Page Styles (Matching Portfolio Filter System 1:1)
════════════════════════════════════════════════════════ */

/* ── SHOP HERO ── */
#shop-hero {
  background: var(--mint);
  color: #ffffff;
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
}

#shop-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg,  rgba(255,255,255,0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
    linear-gradient(45deg,  transparent 75%, rgba(255,255,255,0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.06) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  pointer-events: none;
}

.shop-eyebrow {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
}

.shop-title {
  font-family: 'Boldonse', 'SourceHanSansSC', sans-serif;
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 10px;
}

.shop-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════
   FILTER BAR (Matching Portfolio Tag System 1:1)
════════════════════════════════════════════════════════ */
#filter-bar {
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: var(--header-h, 54px);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  min-height: 50px;
  box-sizing: border-box;
}

.filter-left-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Filter toggle button */
.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.filter-toggle-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active {
  color: var(--mint);
  border-color: var(--mint);
  background: rgba(32, 186, 114, 0.08);
}

/* Active filter chips */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(32, 186, 114, 0.12);
  color: var(--mint);
  padding: 4px 10px;
  white-space: nowrap;
  border: 1px solid rgba(32, 186, 114, 0.3);
  box-shadow: none !important;
}

.filter-chip--tag {
  background: rgba(255, 214, 0, 0.18);
  border-color: rgba(255, 214, 0, 0.4);
  color: #8a7000;
}

[data-theme="dark"] .filter-chip--tag {
  color: var(--yellow);
}

.filter-chip--status {
  background: rgba(0, 200, 150, 0.15);
  border-color: rgba(0, 200, 150, 0.35);
  color: #008a65;
}

[data-theme="dark"] .filter-chip--status {
  color: #00e6a8;
}

.chip-remove {
  background: none;
  border: none;
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 4px;
  opacity: 0.7;
  font-family: sans-serif;
  transition: opacity 0.15s;
}

.chip-remove:hover {
  opacity: 1;
}

.piece-count {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
  font-family: monospace;
  margin-left: auto;
  flex-shrink: 0;
  border-left: 1.5px solid var(--border);
  padding-left: 14px;
}

#count {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.90rem;
  color: var(--mint);
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════
   FILTER BOX PANEL (3-Tab Header, Options Pane, Footer)
════════════════════════════════════════════════════════ */
.filter-panel {
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  position: sticky;
  top: calc(var(--header-h, 54px) + 50px);
  z-index: 99;
}

.filter-panel.open {
  max-height: 520px;
  padding: 18px 0 24px;
}

.filter-box-card {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
}

/* 3 Tabs: TYPE, TAG, STATUS */
.fb-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
}

.fb-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 12px 8px;
  background: none;
  border: none;
  border-right: 1.5px solid var(--border);
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.18s ease, color 0.18s ease;
  color: var(--text-muted);
}

.fb-tab:last-child {
  border-right: none;
}

.fb-tab:hover {
  background: rgba(32, 186, 114, 0.05);
}

.fb-tab.active {
  background: var(--bg-alt);
  color: var(--text);
  border-bottom: 3px solid var(--mint);
  margin-bottom: -1.5px;
  box-shadow: none !important;
}

.fb-tab-label {
  font-family: monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.6;
}

.fb-tab-val {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fb-tab.active .fb-tab-val {
  color: var(--mint);
}

/* Options Pane */
.fb-options-pane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  min-height: 60px;
  background: var(--bg-alt);
}

.fb-opt-btn {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0;
  transition: all 0.16s ease;
}

.fb-opt-btn:hover {
  color: var(--mint);
  border-color: var(--mint);
}

.fb-opt--type.active {
  background: var(--mint) !important;
  border-color: var(--mint) !important;
  color: #ffffff !important;
}

.fb-opt--tag.active {
  background: var(--yellow) !important;
  border-color: var(--yellow) !important;
  color: #0d0d0d !important;
}

.fb-opt--status.active {
  background: #00c896 !important;
  border-color: #00c896 !important;
  color: #0d0d0d !important;
}

/* Footer: RESET & DONE */
.fb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1.5px solid var(--border);
  background: var(--bg);
}

.fb-reset-btn {
  font-family: monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.18s;
}

.fb-reset-btn:hover {
  color: #ff4757;
}

.fb-done-btn {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--mint);
  border: 1.5px solid var(--mint);
  color: #fff;
  cursor: pointer;
  padding: 6px 18px;
  transition: all 0.18s ease;
}

.fb-done-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #0d0d0d;
}

/* ════════════════════════════════════════════════════════
   MOBILE BOTTOM-SHEET FILTER MODAL (1:1 with Portfolio)
════════════════════════════════════════════════════════ */
.filter-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
}

.filter-modal-overlay.open {
  display: flex;
}

.filter-modal-card {
  background: var(--bg);
  width: 100%;
  max-height: 85vh;
  border-top: 2px solid var(--border);
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  border-radius: 0 !important;
  overflow-y: auto;
  animation: filterSlideUp 0.25s ease both;
  box-shadow: none !important;
}

@keyframes filterSlideUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}

.filter-modal-handle {
  width: 36px;
  height: 3px;
  background: var(--yellow);
  margin: 12px auto 0;
}

.filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--border);
}

.filter-modal-title {
  font-family: 'BBHBartle', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.filter-modal-close {
  width: 32px;
  height: 32px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'BBHBartle', sans-serif;
}

.filter-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-modal-section-label {
  font-family: monospace;
  font-size: 0.70rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.filter-modal-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-modal-row .fp-btn {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
}

.filter-modal-row .fp-btn.active {
  background: var(--mint) !important;
  color: #ffffff !important;
  border-color: var(--mint) !important;
}

.filter-modal-done {
  margin: 10px 20px 24px;
  padding: 14px;
  background: var(--mint);
  border: none;
  color: #ffffff;
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  width: calc(100% - 40px);
  transition: background 0.2s;
}

.filter-modal-done:hover {
  background: var(--yellow);
  color: #0d0d0d;
}

/* ════════════════════════════════════════════════════════
   SHOP CONTENT & EMPTY STATE
════════════════════════════════════════════════════════ */
#shop-content {
  background: var(--bg);
  padding: 60px 0 100px;
  min-height: 520px;
  transition: background 0.3s;
}

.shop-empty-panel {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.empty-badge {
  display: inline-block;
  background: var(--yellow);
  color: #0d0d0d;
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  padding: 6px 16px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--mint);
}

.empty-title {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.empty-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 36px;
}

.empty-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.empty-actions .btn-primary,
.empty-actions .btn-ghost-dark {
  width: 250px;
  max-width: 100%;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  box-sizing: border-box;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.empty-actions .btn-primary {
  background: var(--mint);
  color: #ffffff;
  border: 2px solid var(--mint);
}

.empty-actions .btn-primary:hover {
  background: var(--yellow);
  color: #0d0d0d;
  border-color: var(--yellow);
}

.empty-actions .btn-ghost-dark {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.empty-actions .btn-ghost-dark:hover {
  border-color: var(--mint);
  color: var(--mint);
}

@media (max-width: 600px) {
  .empty-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin: 0 auto;
  }
  .empty-actions .btn-primary,
  .empty-actions .btn-ghost-dark {
    width: 100%;
  }
}
