
/* ================================================================
   GNIS Marketplace  v1.3.0
   Brand: Primary #244f37 (green) · Accent #efdb28 (yellow)
   All rules are scoped under .gnis-mkt-* to avoid theme conflicts.
   The two-column shop layout uses inline styles for the flex wrapper
   so themes cannot break it; this sheet adds visual polish only.
   ================================================================ */

/* ── CSS Custom Properties ───────────────────────────────────── */
.gnis-mkt-shop, .gnis-mkt-cart-page, .gnis-mkt-checkout,
.gnis-mkt-pay-instructions, .gnis-mkt-order-confirmed,
.gnis-mkt-config-page {
  --g-primary:        #244f37;
  --g-primary-dk:     #1a3a28;
  --g-primary-lt:     #2e6347;
  --g-primary-xlt:    #e8f5ee;
  --g-accent:         #efdb28;
  --g-text:           #1e293b;
  --g-muted:          #64748b;
  --g-border:         #e2e8f0;
  --g-bg:             #f8fafc;
  --g-white:          #ffffff;
  --g-danger:         #dc2626;
  --g-danger-bg:      #fef2f2;
  --g-danger-bdr:     #fecaca;
  --g-warn:           #d97706;
  --g-warn-bg:        #fef3c7;
  --g-warn-bdr:       #fde68a;
  --g-ok:             #059669;
  --g-ok-bg:          #d1fae5;
  --g-ok-bdr:         #86efac;
  --g-radius:         10px;
  --g-radius-lg:      14px;
  --g-shadow:         0 2px 12px rgba(0,0,0,.07);
  --g-shadow-lg:      0 8px 32px rgba(0,0,0,.14);
  --g-trans:          all .2s ease;
  --g-z-cart:         9100;
  --g-z-overlay:      9099;
  --g-z-fab:          9098;
  --g-z-filter:       8000;
  --g-z-toast:        9200;

  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--g-text);
  line-height: 1.5;
}
.gnis-mkt-shop *, .gnis-mkt-cart-page *, .gnis-mkt-checkout *,
.gnis-mkt-pay-instructions *, .gnis-mkt-order-confirmed *,
.gnis-mkt-config-page * { box-sizing: border-box; }

/* ── Reset inherited link styles inside our scope ────────────── */
.gnis-mkt-shop a, .gnis-mkt-cart-page a, .gnis-mkt-checkout a {
  color: var(--g-primary); text-decoration: none;
}

/* ── Shared button ───────────────────────────────────────────── */
.gnis-mkt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: 2px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: var(--g-trans); font-family: inherit; line-height: 1.4;
}
.gnis-mkt-btn:focus-visible { outline: 3px solid rgba(36,79,55,.3); outline-offset: 2px; }
.gnis-mkt-btn-primary  { background: var(--g-primary); color: var(--g-accent); border-color: var(--g-primary); }
.gnis-mkt-btn-primary:hover { background: var(--g-primary-dk); border-color: var(--g-primary-dk); color: var(--g-accent); text-decoration: none; }
.gnis-mkt-btn-outline  { background: transparent; border-color: var(--g-primary); color: var(--g-primary); }
.gnis-mkt-btn-outline:hover { background: var(--g-primary); color: var(--g-accent); text-decoration: none; }
.gnis-mkt-btn-danger   { background: var(--g-danger-bg); border-color: var(--g-danger-bdr); color: var(--g-danger); }
.gnis-mkt-btn-danger:hover { background: var(--g-danger-bdr); }
.gnis-mkt-btn-disabled { background: #e2e8f0; border-color: #e2e8f0; color: var(--g-muted); cursor: not-allowed; }
.gnis-mkt-btn-full { width: 100%; }
.gnis-mkt-btn-lg   { padding: 14px 28px; font-size: 16px; }

/* ── Shared input ────────────────────────────────────────────── */
.gnis-mkt-input {
  width: 100%; padding: 11px 14px; border: 2px solid var(--g-border);
  border-radius: 8px; font-size: 15px; font-family: inherit;
  color: var(--g-text); background: var(--g-white); transition: var(--g-trans);
}
.gnis-mkt-input:focus { outline: none; border-color: var(--g-primary); box-shadow: 0 0 0 3px rgba(36,79,55,.1); }
textarea.gnis-mkt-input { resize: vertical; }

/* ── Notices ─────────────────────────────────────────────────── */
.gnis-mkt-notice { padding: 14px 18px; border-radius: var(--g-radius); margin-bottom: 16px; font-weight: 500; }
.gnis-mkt-notice-success { background: var(--g-ok-bg);      border: 2px solid var(--g-ok-bdr);      color: #065f46; }
.gnis-mkt-notice-error   { background: var(--g-danger-bg);  border: 2px solid var(--g-danger-bdr);  color: #991b1b; }
.gnis-mkt-notice-warn    { background: var(--g-warn-bg);    border: 2px solid var(--g-warn-bdr);    color: #92400e; }

/* ================================================================
   SHOP HERO
   ================================================================ */
.gnis-mkt-shop-hero {
  background: linear-gradient(135deg, var(--g-primary) 0%, var(--g-primary-lt) 100%);
  padding: 48px 32px; border-radius: var(--g-radius-lg);
  margin-bottom: 20px; text-align: center;
}
.gnis-mkt-shop-title   { color: var(--g-accent); font-size: 32px; font-weight: 800; margin: 0 0 10px; }
.gnis-mkt-shop-tagline { color: rgba(255,255,255,.85); font-size: 16px; margin: 0 0 24px; }
.gnis-mkt-search-form  { max-width: 600px; margin: 0 auto; }
.gnis-mkt-search-wrap  {
  display: flex; gap: 8px; align-items: center;
  background: var(--g-white); border-radius: 10px; padding: 6px 6px 6px 14px;
  box-shadow: var(--g-shadow-lg);
}
.gnis-mkt-search-icon  { font-size: 18px; flex-shrink: 0; }
.gnis-mkt-search-input {
  flex: 1; border: none; font-size: 15px; padding: 8px 0;
  font-family: inherit; color: var(--g-text); background: transparent;
}
.gnis-mkt-search-input:focus { outline: none; }
.gnis-mkt-search-btn { flex-shrink: 0; }

/* ================================================================
   MOBILE FILTER BAR  (shown only on small screens)
   ================================================================ */
.gnis-mkt-mobile-bar {
  display: none;
  align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 16px;
}
.gnis-mkt-filter-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; background: var(--g-white);
  border: 2px solid var(--g-border); border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--g-text); transition: var(--g-trans); font-family: inherit;
}
.gnis-mkt-filter-toggle:hover, .gnis-mkt-filter-toggle.is-active {
  border-color: var(--g-primary); color: var(--g-primary); background: var(--g-primary-xlt);
}
.gnis-mkt-filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--g-primary); color: var(--g-accent); font-size: 11px; font-weight: 800;
}

/* ================================================================
   FILTER PANEL  (left sidebar)
   ================================================================ */
.gnis-mkt-filter-panel {
  background: var(--g-white);
  border: 2px solid var(--g-border);
  border-radius: var(--g-radius-lg);
  box-shadow: var(--g-shadow);
  overflow: hidden;  /* clip rounded corners */
}

/* Thin custom scrollbar */
.gnis-mkt-filter-panel::-webkit-scrollbar { width: 4px; }
.gnis-mkt-filter-panel::-webkit-scrollbar-track { background: transparent; }
.gnis-mkt-filter-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Panel header bar */
.gnis-mkt-filter-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--g-primary);
  position: sticky; top: 0; z-index: 3;
}
.gnis-mkt-filter-hd-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--g-accent);
  letter-spacing: .3px;
}
.gnis-mkt-clear-all {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75);
  text-decoration: none; padding: 3px 8px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.3); transition: var(--g-trans);
}
.gnis-mkt-clear-all:hover { background: rgba(255,255,255,.15); color: #fff; }

.gnis-mkt-filter-form { margin: 0; padding: 0; }

/* ── Active filter tags ──────────────────────────────────────── */
.gnis-mkt-active-tags {
  display: flex; flex-direction: column; gap: 5px; padding: 10px 14px 6px;
  border-bottom: 1px solid var(--g-border);
}
.gnis-mkt-active-tag {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; background: var(--g-primary-xlt);
  border: 1px solid #b6d9c7; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--g-primary);
  text-decoration: none; transition: var(--g-trans); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.gnis-mkt-active-tag:hover { background: #ceeadb; border-color: #8fc5ac; }
.gnis-mkt-active-tag span { opacity: .6; margin-left: 6px; flex-shrink: 0; }

/* ── Filter group (collapsible section) ──────────────────────── */
.gnis-mkt-fgroup {
  border-bottom: 1px solid var(--g-border);
}
.gnis-mkt-fgroup:last-child { border-bottom: none; }

.gnis-mkt-fg-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: none; border: none; cursor: pointer;
  font-family: inherit; transition: background .15s; text-align: left;
}
.gnis-mkt-fg-toggle:hover { background: var(--g-bg); }
.gnis-mkt-fg-title {
  font-size: 12px; font-weight: 700; color: var(--g-text);
  text-transform: uppercase; letter-spacing: .6px;
}
.gnis-mkt-fg-arrow {
  font-size: 11px; color: var(--g-muted); transition: transform .2s;
  flex-shrink: 0;
}
.gnis-mkt-fg-toggle[aria-expanded="false"] .gnis-mkt-fg-arrow { transform: rotate(-90deg); }

.gnis-mkt-fg-body { padding: 4px 14px 12px; }
.gnis-mkt-fg-body.is-collapsed { display: none; }

/* ── Filter option (radio row) ───────────────────────────────── */
.gnis-mkt-foption {
  display: flex; align-items: center; gap: 0;
  padding: 6px 8px; border-radius: 6px;
  cursor: pointer; transition: background .15s; font-size: 13px;
  color: var(--g-text); user-select: none;
}
.gnis-mkt-foption:hover { background: var(--g-primary-xlt); }
.gnis-mkt-foption.is-active {
  background: var(--g-primary-xlt); color: var(--g-primary); font-weight: 600;
}
.gnis-mkt-foption input[type="radio"] {
  margin: 0 8px 0 0; width: 15px; height: 15px; flex-shrink: 0;
  accent-color: var(--g-primary); cursor: pointer;
}
.gnis-mkt-foption-label { flex: 1; line-height: 1.3; }
.gnis-mkt-foption-count {
  font-size: 11px; color: var(--g-muted); background: var(--g-bg);
  border: 1px solid var(--g-border); border-radius: 10px;
  padding: 1px 6px; min-width: 22px; text-align: center; flex-shrink: 0;
}
.gnis-mkt-outlet-sub {
  display: block; font-size: 11px; color: var(--g-muted); font-weight: 400;
}

/* ── Price range filter ──────────────────────────────────────── */
.gnis-mkt-price-display {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--g-primary);
  margin-bottom: 10px;
}
.gnis-mkt-price-dash { color: var(--g-muted); }

/* Slider injected by JS */
.gnis-mkt-slider-wrap {
  position: relative; height: 36px; margin: 4px 0 10px;
  /* JS adds the range inputs and track inside here */
}
.gnis-mkt-slider-track {
  position: absolute; top: 50%; left: 0; right: 0; height: 4px;
  background: var(--g-border); border-radius: 4px; transform: translateY(-50%); z-index: 0;
}
.gnis-mkt-slider-fill {
  position: absolute; height: 100%; background: var(--g-primary); border-radius: 4px;
}
.gnis-mkt-slider-input {
  position: absolute; width: 100%; top: 50%; transform: translateY(-50%);
  appearance: none; -webkit-appearance: none;
  background: transparent; pointer-events: none; margin: 0; z-index: 1;
}
.gnis-mkt-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: all;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--g-white); border: 3px solid var(--g-primary);
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .15s;
}
.gnis-mkt-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15); box-shadow: 0 2px 10px rgba(36,79,55,.35);
}
.gnis-mkt-slider-input::-webkit-slider-thumb:active { transform: scale(1.25); }
.gnis-mkt-slider-input::-moz-range-thumb {
  pointer-events: all; width: 20px; height: 20px; border-radius: 50%;
  background: var(--g-white); border: 3px solid var(--g-primary);
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* Number inputs (always present — submit the actual values) */
.gnis-mkt-price-inputs {
  display: flex; gap: 8px; align-items: flex-end;
}
.gnis-mkt-price-col { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.gnis-mkt-price-label { font-size: 11px; font-weight: 600; color: var(--g-muted); }
.gnis-mkt-price-number {
  width: 100%; padding: 7px 10px; border: 2px solid var(--g-border);
  border-radius: 7px; font-size: 13px; font-family: inherit;
  color: var(--g-text); background: var(--g-white); transition: border-color .15s;
}
.gnis-mkt-price-number:focus { outline: none; border-color: var(--g-primary); }
/* hide spinners */
.gnis-mkt-price-number::-webkit-inner-spin-button,
.gnis-mkt-price-number::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.gnis-mkt-price-number[type=number] { -moz-appearance: textfield; }

.gnis-mkt-price-apply {
  margin-top: 10px; width: 100%; padding: 8px; border-radius: 7px;
  background: var(--g-primary); color: var(--g-accent);
  border: none; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.gnis-mkt-price-apply:hover { background: var(--g-primary-dk); }

/* Apply button at bottom of panel */
.gnis-mkt-filter-apply { padding: 12px 14px; }

/* ── Sort select inline ──────────────────────────────────────── */
.gnis-mkt-sort-select {
  padding: 8px 12px; border: 2px solid var(--g-border); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--g-text);
  background: var(--g-white); cursor: pointer; transition: var(--g-trans);
}
.gnis-mkt-sort-select:focus { outline: none; border-color: var(--g-primary); }

/* ================================================================
   RESULTS BAR
   ================================================================ */
.gnis-mkt-results-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.gnis-mkt-results-count { font-size: 14px; color: var(--g-muted); }
.gnis-mkt-results-count strong { color: var(--g-text); }
.gnis-mkt-desktop-sort { display: flex; }
.gnis-mkt-page-ellipsis { padding: 0 6px; color: var(--g-muted); line-height: 40px; }

/* ================================================================
   PRODUCT GRID
   ================================================================ */
.gnis-mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

/* ── Card ────────────────────────────────────────────────────── */
.gnis-mkt-card {
  background: var(--g-white); border: 2px solid var(--g-border);
  border-radius: var(--g-radius-lg); box-shadow: var(--g-shadow);
  display: flex; flex-direction: column; transition: var(--g-trans); overflow: hidden;
}
.gnis-mkt-card:hover {
  border-color: var(--g-primary); box-shadow: var(--g-shadow-lg); transform: translateY(-3px);
}

.gnis-mkt-card-img-wrap {
  position: relative; width: 100%; height: 185px; overflow: hidden; background: #f1f5f9;
}
.gnis-mkt-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.gnis-mkt-card:hover .gnis-mkt-card-img { transform: scale(1.05); }
.gnis-mkt-card-placeholder {
  width: 100%; height: 185px; display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  background: linear-gradient(135deg, var(--g-primary) 0%, var(--g-primary-lt) 100%);
}

.gnis-mkt-card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; }
.gnis-mkt-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.gnis-mkt-badge-featured { background: var(--g-accent); color: var(--g-primary); }
.gnis-mkt-badge-low { background: var(--g-warn-bg); border: 1px solid var(--g-warn-bdr); color: var(--g-warn); }
.gnis-mkt-badge-out { background: var(--g-danger-bg); border: 1px solid var(--g-danger-bdr); color: var(--g-danger); }

.gnis-mkt-card-cat-tag {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.52); color: #fff; font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .5px;
  backdrop-filter: blur(3px);
}

.gnis-mkt-card-body { padding: 14px 16px; flex: 1; }
.gnis-mkt-card-title { font-size: 15px; font-weight: 700; color: var(--g-text); margin: 0 0 6px; line-height: 1.3; }
.gnis-mkt-card-desc  { font-size: 12px; color: var(--g-muted); margin: 0 0 10px; line-height: 1.5; }

.gnis-mkt-card-meta  { display: flex; flex-direction: column; gap: 4px; }
.gnis-mkt-meta-row   { display: flex; gap: 6px; font-size: 12px; align-items: baseline; }
.gnis-mkt-meta-label { color: var(--g-muted); font-weight: 600; white-space: nowrap; min-width: 78px; flex-shrink: 0; }
.gnis-mkt-meta-value { color: var(--g-text); }
.gnis-mkt-stock-num  { font-weight: 700; color: var(--g-ok); }
.gnis-mkt-stock-low  { color: var(--g-warn) !important; }

.gnis-mkt-card-footer { padding: 12px 16px; border-top: 1px solid var(--g-border); display: flex; flex-direction: column; gap: 10px; }
.gnis-mkt-card-price  { font-size: 19px; font-weight: 800; color: var(--g-primary); }

.gnis-mkt-qty-wrap  { display: flex; align-items: center; gap: 8px; }
.gnis-mkt-qty-ctrl  {
  width: 30px; height: 30px; border: 2px solid var(--g-border);
  background: var(--g-bg); border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: var(--g-trans); font-family: inherit; color: var(--g-text);
}
.gnis-mkt-qty-ctrl:hover { background: var(--g-primary); color: var(--g-accent); border-color: var(--g-primary); }
.gnis-mkt-qty-input {
  width: 50px; text-align: center; border: 2px solid var(--g-border);
  border-radius: 6px; font-size: 15px; font-weight: 700; padding: 4px 0;
  font-family: inherit; color: var(--g-text);
}
.gnis-mkt-qty-input:focus { outline: none; border-color: var(--g-primary); }
.gnis-mkt-qty-input::-webkit-inner-spin-button,
.gnis-mkt-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.gnis-mkt-qty-input[type=number] { -moz-appearance: textfield; }
.gnis-mkt-add-to-cart { width: 100%; }

.gnis-mkt-no-products {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--g-muted);
}
.gnis-mkt-no-products-icon { font-size: 52px; margin-bottom: 14px; }

/* ── Pagination ──────────────────────────────────────────────── */
.gnis-mkt-pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.gnis-mkt-page-btn {
  min-width: 40px; height: 40px; padding: 0 12px; border: 2px solid var(--g-border);
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 600; font-size: 13px; color: var(--g-text);
  transition: var(--g-trans);
}
.gnis-mkt-page-btn:hover, .gnis-mkt-page-btn.active {
  background: var(--g-primary); border-color: var(--g-primary); color: var(--g-accent);
}

/* ================================================================
   FLOATING CART FAB + SLIDE PANEL
   ================================================================ */
.gnis-mkt-cart-fab {
  position: fixed; bottom: 28px; right: 28px; width: 64px; height: 64px;
  background: var(--g-primary); color: var(--g-accent); border: none; border-radius: 50%;
  cursor: pointer; box-shadow: var(--g-shadow-lg); z-index: var(--g-z-fab);
  transition: var(--g-trans); font-size: 26px; display: flex; align-items: center; justify-content: center;
}
.gnis-mkt-cart-fab:hover { transform: scale(1.08); background: var(--g-primary-dk); }
.gnis-mkt-cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 4px;
  background: var(--g-accent); color: var(--g-primary); font-size: 11px; font-weight: 800;
  border-radius: 11px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--g-white);
}

.gnis-mkt-slide-cart {
  position: fixed; top: 0; right: 0; width: 400px; max-width: 100vw; height: 100vh;
  background: var(--g-white); z-index: var(--g-z-cart);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; box-shadow: -6px 0 32px rgba(0,0,0,.18);
}
.gnis-mkt-slide-cart.is-open { transform: translateX(0); }
.gnis-mkt-slide-hd {
  background: var(--g-primary); padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.gnis-mkt-slide-hd h3 { margin: 0; color: var(--g-accent); font-size: 17px; }
.gnis-mkt-slide-close {
  background: none; border: none; color: rgba(255,255,255,.75); font-size: 22px;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: color .15s; line-height: 1;
}
.gnis-mkt-slide-close:hover { color: var(--g-accent); }
.gnis-mkt-slide-body { flex: 1; overflow-y: auto; padding: 14px; }
.gnis-mkt-slide-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--g-border); border-radius: 8px; margin-bottom: 10px;
  background: var(--g-bg); transition: border-color .15s;
}
.gnis-mkt-slide-item:hover { border-color: var(--g-primary); }
.gnis-mkt-slide-item-img {
  width: 52px; height: 52px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
  background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.gnis-mkt-slide-item-img img { width: 100%; height: 100%; object-fit: cover; }
.gnis-mkt-slide-item-info { flex: 1; min-width: 0; }
.gnis-mkt-slide-item-name  { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gnis-mkt-slide-item-meta  { font-size: 12px; color: var(--g-muted); margin-top: 2px; }
.gnis-mkt-slide-item-price { font-size: 13px; font-weight: 700; color: var(--g-primary); margin-top: 3px; }
.gnis-mkt-slide-remove {
  background: none; border: none; color: var(--g-muted); font-size: 16px;
  cursor: pointer; padding: 2px; flex-shrink: 0; transition: color .15s; line-height: 1;
}
.gnis-mkt-slide-remove:hover { color: var(--g-danger); }
.gnis-mkt-slide-ft { padding: 14px 18px; border-top: 2px solid var(--g-border); background: var(--g-bg); flex-shrink: 0; }
.gnis-mkt-slide-total { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.gnis-mkt-empty-msg { text-align: center; color: var(--g-muted); padding: 30px 0; font-style: italic; }

/* ── Overlay ─────────────────────────────────────────────────── */
.gnis-mkt-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: var(--g-z-overlay); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.gnis-mkt-overlay.is-visible { opacity: 1; pointer-events: auto; }

/* Mobile filter drawer backdrop */
.gnis-mkt-filter-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: calc(var(--g-z-filter) - 1);
}
.gnis-mkt-filter-backdrop.is-visible { display: block; }

/* ================================================================
   CART PAGE
   ================================================================ */
.gnis-mkt-cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.gnis-mkt-cart-row {
  display: grid; grid-template-columns: 72px 1fr auto auto auto;
  gap: 16px; align-items: center; padding: 16px;
  border: 2px solid var(--g-border); border-radius: var(--g-radius); margin-bottom: 12px;
  background: var(--g-white); transition: border-color .15s;
}
.gnis-mkt-cart-row:hover { border-color: var(--g-primary); }
.gnis-mkt-cart-row-img { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.gnis-mkt-cart-row-img img { width: 100%; height: 100%; object-fit: cover; }
.gnis-mkt-img-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 28px; }
.gnis-mkt-cart-row-name   { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.gnis-mkt-cart-row-meta   { font-size: 12px; color: var(--g-muted); }
.gnis-mkt-cart-row-unit   { font-size: 13px; color: var(--g-primary); font-weight: 600; margin-top: 3px; }
.gnis-mkt-cart-row-subtotal { font-weight: 700; font-size: 16px; }
.gnis-mkt-cart-row-remove { background: none; border: none; color: var(--g-muted); font-size: 18px; cursor: pointer; transition: color .15s; }
.gnis-mkt-cart-row-remove:hover { color: var(--g-danger); }
.gnis-mkt-qty-ctrl-group { display: flex; align-items: center; gap: 6px; }
.gnis-mkt-qty-display { font-weight: 700; font-size: 15px; min-width: 28px; text-align: center; }
.gnis-mkt-cart-summary-box { background: var(--g-white); border: 2px solid var(--g-border); border-radius: var(--g-radius-lg); padding: 22px; box-shadow: var(--g-shadow); position: sticky; top: 20px; }
.gnis-mkt-cart-summary-box h3 { margin: 0 0 16px; color: var(--g-primary); font-size: 18px; }
.gnis-mkt-summary-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--g-border); font-size: 15px; }
.gnis-mkt-summary-grand { font-size: 18px; font-weight: 800; border-bottom: none; padding-top: 12px; color: var(--g-primary); }
.gnis-mkt-cart-empty-state { text-align: center; padding: 60px 20px; }
.gnis-mkt-empty-icon { font-size: 60px; margin-bottom: 14px; }

/* ================================================================
   CHECKOUT
   ================================================================ */
.gnis-mkt-checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.gnis-mkt-checkout-section { background: var(--g-white); border: 2px solid var(--g-border); border-radius: var(--g-radius-lg); padding: 24px; box-shadow: var(--g-shadow); }
.gnis-mkt-checkout-section h3 { margin: 0 0 18px; color: var(--g-primary); font-size: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--g-accent); }
.gnis-mkt-form-group { margin-bottom: 18px; }
.gnis-mkt-form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.gnis-mkt-form-group small { display: block; margin-top: 4px; font-size: 12px; color: var(--g-muted); }
.gnis-mkt-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gnis-mkt-location-status { display: inline-block; font-size: 13px; margin-left: 10px; font-weight: 600; }
.gnis-mkt-checkout-pay-preview { display: flex; gap: 14px; align-items: flex-start; background: var(--g-ok-bg); border: 2px solid var(--g-ok-bdr); border-radius: var(--g-radius); padding: 16px; margin-bottom: 20px; }
.gnis-mkt-pay-preview-icon { font-size: 28px; flex-shrink: 0; }
.gnis-mkt-pay-number-inline { font-weight: 800; font-size: 18px; color: var(--g-primary); }
.gnis-mkt-summary-item { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--g-border); }
.gnis-mkt-summary-item:last-of-type { border-bottom: none; }
.gnis-mkt-summary-item-img { width: 54px; height: 54px; border-radius: 6px; overflow: hidden; background: #e2e8f0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.gnis-mkt-summary-item-img img { width: 100%; height: 100%; object-fit: cover; }
.gnis-mkt-img-fallback-sm { font-size: 22px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gnis-mkt-summary-item-info { flex: 1; }
.gnis-mkt-summary-item-name  { font-weight: 700; font-size: 14px; }
.gnis-mkt-summary-item-meta  { font-size: 12px; color: var(--g-muted); margin-top: 2px; }
.gnis-mkt-summary-item-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.gnis-mkt-checkout-totals { border-top: 2px solid var(--g-border); padding-top: 14px; margin-top: 8px; }
.req { color: var(--g-danger); }

/* ================================================================
   PAYMENT INSTRUCTIONS
   ================================================================ */
.gnis-mkt-pay-instructions { max-width: 620px; margin: 0 auto; background: var(--g-white); border: 2px solid var(--g-border); border-radius: var(--g-radius-lg); padding: 36px; box-shadow: var(--g-shadow); }
.gnis-mkt-pay-hero { text-align: center; margin-bottom: 28px; }
.gnis-mkt-pay-hero-icon { font-size: 64px; line-height: 1; margin-bottom: 14px; }
.gnis-mkt-pay-hero h2 { margin: 0 0 8px; color: var(--g-primary); font-size: 26px; }
.gnis-mkt-pay-amount-banner { background: var(--g-primary); color: var(--g-white); border-radius: var(--g-radius); padding: 18px; text-align: center; font-size: 18px; font-weight: 600; margin-bottom: 28px; }
.gnis-mkt-pay-amount-banner span { font-size: 28px; font-weight: 800; color: var(--g-accent); display: block; margin-top: 4px; }
.gnis-mkt-pay-steps { display: flex; flex-direction: column; gap: 22px; margin-bottom: 24px; }
.gnis-mkt-pay-step  { display: flex; gap: 18px; align-items: flex-start; }
.gnis-mkt-step-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--g-primary); color: var(--g-accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.gnis-mkt-step-content p { margin: 6px 0 0; font-size: 14px; color: var(--g-muted); }
.gnis-mkt-pay-number-box { font-size: 28px; font-weight: 900; color: var(--g-primary); background: var(--g-bg); border: 3px solid var(--g-accent); border-radius: 10px; padding: 10px 18px; display: inline-block; margin: 10px 0; letter-spacing: 3px; }
.gnis-mkt-pay-ref-note { font-size: 13px; color: var(--g-muted); }
.gnis-mkt-pay-ref-note strong { color: var(--g-primary); font-size: 15px; }
.gnis-mkt-pay-alert { background: var(--g-warn-bg); border: 2px solid var(--g-warn-bdr); border-radius: var(--g-radius); padding: 14px; font-size: 14px; color: #92400e; margin-bottom: 20px; text-align: center; }
.gnis-mkt-pay-check-wrap { text-align: center; }
#gnis-mkt-check-result { display: inline-block; margin-left: 12px; font-weight: 600; font-size: 14px; }
.gnis-mkt-order-confirmed { max-width: 520px; margin: 0 auto; text-align: center; background: var(--g-white); border: 2px solid var(--g-ok-bdr); border-radius: var(--g-radius-lg); padding: 48px; box-shadow: var(--g-shadow); }
.gnis-mkt-confirmed-icon { font-size: 72px; margin-bottom: 20px; }
.gnis-mkt-order-confirmed h2 { color: var(--g-ok); margin: 0 0 14px; font-size: 26px; }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */
.gnis-mkt-config-page { max-width: 900px; margin: 0 auto; padding: 20px 0; }
.gnis-mkt-settings-section { background: var(--g-white); border: 2px solid var(--g-border); border-radius: var(--g-radius-lg); padding: 28px; margin-bottom: 24px; box-shadow: var(--g-shadow); }
.gnis-mkt-settings-section-title { font-size: 18px; font-weight: 700; color: var(--g-primary); margin: 0 0 20px; padding-bottom: 14px; border-bottom: 3px solid var(--g-accent); }
.gnis-mkt-settings-section-desc { color: var(--g-muted); font-size: 14px; margin: -8px 0 16px; }
.gnis-mkt-settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gnis-mkt-settings-field { display: flex; flex-direction: column; gap: 6px; }
.gnis-mkt-settings-field label { font-weight: 600; font-size: 13px; }
.gnis-mkt-settings-field small { font-size: 12px; color: var(--g-muted); }
.gnis-mkt-settings-field small a { color: var(--g-primary); }
.gnis-mkt-settings-field small code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.gnis-mkt-settings-field-highlight { background: #fefce8; border: 2px solid var(--g-accent); border-radius: var(--g-radius); padding: 16px; grid-column: span 2; }
.gnis-mkt-input-reveal-wrap { display: flex; gap: 8px; }
.gnis-mkt-input-reveal-wrap .gnis-mkt-input { flex: 1; }
.gnis-mkt-reveal-btn { width: 42px; flex-shrink: 0; border: 2px solid var(--g-border); background: var(--g-bg); border-radius: 8px; cursor: pointer; font-size: 16px; transition: var(--g-trans); }
.gnis-mkt-reveal-btn:hover { background: var(--g-primary); color: var(--g-accent); border-color: var(--g-primary); }
.gnis-mkt-settings-info-box { margin-top: 20px; padding: 16px; background: #eff6ff; border: 2px solid #bfdbfe; border-radius: var(--g-radius); }
.gnis-mkt-settings-info-box strong { display: block; margin-bottom: 10px; color: #1d4ed8; }
.gnis-mkt-webhook-url { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.gnis-mkt-webhook-url code { background: var(--g-white); padding: 8px 12px; border-radius: 6px; border: 1px solid #bfdbfe; font-size: 12px; word-break: break-all; flex: 1; }
.gnis-mkt-settings-shortcode-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 20px; }
.gnis-mkt-sc-row { background: var(--g-bg); border: 1px solid var(--g-border); border-radius: 6px; padding: 10px 14px; font-size: 13px; }
.gnis-mkt-sc-row code { background: #e0e7ff; color: #4338ca; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.gnis-mkt-settings-submit { display: flex; align-items: center; gap: 20px; padding-top: 8px; }
.gnis-mkt-settings-version { font-size: 12px; color: var(--g-muted); }

/* ================================================================
   TOAST
   ================================================================ */
.gnis-mkt-toast { position: fixed; top: 20px; right: 20px; padding: 14px 22px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--g-shadow-lg); z-index: var(--g-z-toast); animation: gnisToastIn .3s ease; max-width: 360px; display: flex; align-items: center; gap: 10px; }
.gnis-mkt-toast-success { background: var(--g-primary); color: var(--g-accent); }
.gnis-mkt-toast-error   { background: var(--g-danger); color: #fff; }
.gnis-mkt-toast-info    { background: #1d4ed8; color: #fff; }
@keyframes gnisToastIn { from { opacity: 0; transform: translateX(120px); } to { opacity: 1; transform: translateX(0); } }

/* ================================================================
   PAGE HEADING SHARED
   ================================================================ */
.gnis-mkt-page-heading { font-size: 26px; font-weight: 700; color: var(--g-primary); margin: 0 0 24px; padding-bottom: 16px; border-bottom: 3px solid var(--g-accent); display: inline-block; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .gnis-mkt-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* At 860px the sidebar becomes a fixed drawer */
@media (max-width: 860px) {
  .gnis-mkt-mobile-bar { display: flex !important; }
  .gnis-mkt-desktop-sort { display: none !important; }

  /* Override the inline flex so the sidebar is hidden */
  .gnis-mkt-shop-body { display: block !important; }

  .gnis-mkt-filter-panel {
    position: fixed !important; top: 0 !important; left: -320px !important;
    width: 300px !important; height: 100vh !important;
    z-index: var(--g-z-filter) !important;
    transition: left .3s ease !important;
    border-radius: 0 !important; max-height: 100vh !important;
    border-left: none !important;
  }
  .gnis-mkt-filter-panel.is-open { left: 0 !important; }

  .gnis-mkt-checkout-grid { grid-template-columns: 1fr; }
  .gnis-mkt-cart-layout   { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .gnis-mkt-grid { grid-template-columns: 1fr 1fr; }
  .gnis-mkt-slide-cart { width: 100%; }
  .gnis-mkt-shop-hero { padding: 28px 16px; }
  .gnis-mkt-shop-title { font-size: 24px; }
  .gnis-mkt-cart-row { grid-template-columns: 54px 1fr; }
  .gnis-mkt-cart-row-qty,
  .gnis-mkt-cart-row-subtotal,
  .gnis-mkt-cart-row-remove { grid-column: 2; }
  .gnis-mkt-form-row-2 { grid-template-columns: 1fr; }
  .gnis-mkt-settings-field-highlight { grid-column: span 1; }
}

@media (max-width: 380px) {
  .gnis-mkt-grid { grid-template-columns: 1fr; }
}


