/* ============================================================
   WoodTurningz Slab Inventory — Frontend / Public Gallery
   White-background, light theme, responsive card grid
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Tokens ── */
:root,
.wtz-gallery-wrapper,
.wtz-modal-overlay {
  --wtz-amber:      #b8862a;
  --wtz-amber-dk:   #9a6f1e;
  --wtz-amber-bg:   #fdf6e8;
  --wtz-text:       #1a1a1a;
  --wtz-muted:      #6b6b6b;
  --wtz-border:     #e0dbd3;
  --wtz-surface:    #ffffff;
  --wtz-bg:         #f7f5f2;
  --wtz-green:      #2e7d55;
  --wtz-radius:     10px;
  --wtz-card-shadow: 0 2px 12px rgba(0,0,0,0.07);
  --wtz-card-hover:  0 6px 28px rgba(0,0,0,0.13);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtz-gallery-wrapper {
  color: var(--wtz-text);
  background: var(--wtz-bg);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 60vh;
}
.wtz-gallery-wrapper.alignfull {
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -50vw !important;
  box-sizing: border-box !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════ */
.wtz-sidebar {
  background: var(--wtz-surface);
  border-right: 1px solid var(--wtz-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.admin-bar .wtz-sidebar {
  top: 32px;
  height: calc(100vh - 32px);
}
@media (max-width: 782px) {
  .admin-bar .wtz-sidebar {
    top: 46px;
    height: calc(100vh - 46px);
  }
}
.wtz-sidebar-inner { padding: 20px 16px 40px; }

.wtz-sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--wtz-border);
}
.wtz-sidebar-icon { color: var(--wtz-amber); flex-shrink: 0; }
.wtz-sidebar-title { font-weight: 700; font-size: 0.9rem; color: var(--wtz-text); flex: 1; letter-spacing: 0.02em; }
.wtz-clear-btn {
  font-size: 0.7rem;
  color: var(--wtz-muted);
  background: none;
  border: 1px solid var(--wtz-border);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.wtz-clear-btn:hover { color: var(--wtz-amber); border-color: var(--wtz-amber); }

/* ── Type tabs ── */
.wtz-filter-section { margin-bottom: 18px; }
.wtz-type-tabs {
  display: flex;
  border: 1px solid var(--wtz-border);
  border-radius: 6px;
  overflow: hidden;
}
.wtz-type-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 7px 4px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--wtz-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  border-right: 1px solid var(--wtz-border);
}
.wtz-type-tab:last-child { border-right: none; }
.wtz-type-tab:hover { background: var(--wtz-amber-bg); color: var(--wtz-amber); }
.wtz-type-tab.active {
  background: var(--wtz-amber);
  color: #fff;
  font-weight: 600;
}

/* ── Filter labels ── */
.wtz-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--wtz-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Expand button ── */
.wtz-expand-btn {
  background: none;
  border: none;
  color: var(--wtz-muted);
  cursor: pointer;
  font-size: 0.65rem;
  padding: 0 2px;
  transition: transform 0.2s;
}
.wtz-expand-btn.collapsed { transform: rotate(180deg); }

/* ── Species header controls (All / None + expand) ── */
.wtz-species-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wtz-species-ctrl-btn {
  background: none;
  border: none;
  color: var(--wtz-amber);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}
.wtz-species-ctrl-btn:hover { opacity: 0.7; }
.wtz-species-ctrl-sep {
  font-size: 0.68rem;
  color: var(--wtz-border);
}

/* ── Checkbox list ── */
.wtz-check-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--wtz-border) transparent;
}
.wtz-check-list.collapsed { display: none; }
.wtz-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--wtz-text);
  transition: background 0.1s;
  user-select: none;
}
.wtz-check-item:hover { background: var(--wtz-amber-bg); }
.wtz-check-item input[type="checkbox"] { display: none; }
.wtz-checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--wtz-border);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.wtz-check-item input:checked + .wtz-checkmark,
.wtz-check-item.checked .wtz-checkmark {
  background: var(--wtz-amber);
  border-color: var(--wtz-amber);
}
.wtz-check-item input:checked + .wtz-checkmark::after,
.wtz-check-item.checked .wtz-checkmark::after {
  content: '';
  width: 4px;
  height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}
.wtz-species-link {
  text-decoration: none;
  color: inherit;
}

/* Species name takes remaining space */
.wtz-species-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "Only" button — appears on hover */
.wtz-only-btn {
  display: none;
  background: none;
  border: none;
  color: var(--wtz-amber);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 3px;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.wtz-check-item:hover .wtz-only-btn { display: block; }
.wtz-only-btn:hover { opacity: 0.7; }

/* ── Dual range slider ── */
.wtz-range-display {
  font-size: 0.8rem;
  color: var(--wtz-amber);
  font-weight: 600;
  margin-bottom: 8px;
}
.wtz-range-track-wrap {
  position: relative;
  height: 6px;
  background: var(--wtz-border);
  border-radius: 3px;
  margin: 0 0 4px;
}
.wtz-range-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--wtz-amber);
  border-radius: 3px;
  left: 0%; width: 100%;
  transition: left 0.05s, width 0.05s;
}
.wtz-range-input {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  height: 20px;
  margin: 0;
}
.wtz-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--wtz-amber);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.1s;
}
.wtz-range-input::-webkit-slider-thumb:hover { transform: scale(1.15); }
.wtz-range-input::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--wtz-amber);
  border: 2px solid #fff;
  cursor: pointer;
  pointer-events: all;
}

/* ═══════════════════════════════════════════════════════
   MAIN GALLERY
   ═══════════════════════════════════════════════════════ */
.wtz-gallery-main {
  min-width: 0;
  padding: 24px 24px 40px;
  position: relative;
  background: var(--wtz-bg);
}

.wtz-gallery-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  background: var(--wtz-bg);
  z-index: 100;
  padding: 14px 24px;
  margin: -24px -24px 20px -24px;
  border-bottom: 1px solid var(--wtz-border);
}
.admin-bar .wtz-gallery-topbar {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .wtz-gallery-topbar {
    top: 46px;
  }
}
.wtz-result-count { font-size: 0.85rem; color: var(--wtz-muted); margin: 0; }
.wtz-result-count strong { color: var(--wtz-text); font-weight: 600; }

/* Mobile filter toggle — hidden on desktop */
.wtz-mobile-filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--wtz-surface);
  border: 1px solid var(--wtz-border);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--wtz-text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.wtz-mobile-filter-toggle:hover { border-color: var(--wtz-amber); color: var(--wtz-amber); }

/* ── Loading overlay ── */
.wtz-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(247,245,242,0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(1px);
}
.wtz-loading-overlay.active { display: flex; }
.wtz-spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid rgba(184,134,42,0.2);
  border-top-color: var(--wtz-amber);
  border-radius: 50%;
  animation: wtz-spin 0.75s linear infinite;
}
@keyframes wtz-spin { to { transform: rotate(360deg); } }

/* ── Gallery grid — MULTIPLE CARDS WIDE ── */
.wtz-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* ── Card ── */
.wtz-card {
  background: var(--wtz-surface);
  border: 1px solid var(--wtz-border);
  border-radius: var(--wtz-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--wtz-card-shadow);
  display: flex;
  flex-direction: column;
  outline: none;
}
.wtz-card:hover,
.wtz-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--wtz-card-hover);
  border-color: var(--wtz-amber);
}

/* Card image */
.wtz-card-image {
  position: relative;
  background: #f0ebe3;
  aspect-ratio: 2/3; /* 2:3 vertical ratio */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}
.wtz-card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* force to fit within box without cropping */
  display: block;
  transition: transform 0.3s ease;
}
.wtz-card:hover .wtz-card-image img { transform: scale(1.04); }

.wtz-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0b8ae;
}
.wtz-card-placeholder svg { width: 42px; height: 42px; }

/* Type badge */
.wtz-type-badge {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wtz-type-Slab   { background: rgba(184,134,42,0.85);  color: #fff; }
.wtz-type-Board-Beam,
.wtz-type-Board\/Beam { background: rgba(60,120,200,0.80); color: #fff; }
.wtz-type-Cookie { background: rgba(70,160,90,0.80);   color: #fff; }

/* Card body */
.wtz-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wtz-card-species {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wtz-text);
  margin: 0;
  line-height: 1.2;
}
.wtz-card-number {
  font-size: 0.72rem;
  color: var(--wtz-muted);
  margin: 0;
  font-family: 'Inter', monospace;
}
.wtz-card-dims {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.77rem;
  color: var(--wtz-muted);
  margin-top: 2px;
}
.wtz-card-dims span::after { content: ' '; }
.wtz-card-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}
.wtz-char-tag {
  background: #fdf0d8;
  color: var(--wtz-amber-dk);
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.wtz-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wtz-amber);
  margin-top: auto;
  padding-top: 6px;
}

/* ── Empty state ── */
.wtz-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--wtz-muted);
  text-align: center;
}
.wtz-empty-state svg { opacity: 0.3; }
.wtz-empty-state p { font-size: 0.9rem; margin: 0; }
.wtz-btn-clear {
  background: var(--wtz-amber);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.wtz-btn-clear:hover { background: var(--wtz-amber-dk); }

/* ── Pagination ── */
.wtz-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.wtz-page-btn {
  background: var(--wtz-surface);
  border: 1px solid var(--wtz-border);
  color: var(--wtz-muted);
  width: 36px; height: 36px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.wtz-page-btn:hover,
.wtz-page-btn.active {
  background: var(--wtz-amber);
  border-color: var(--wtz-amber);
  color: #fff;
}
.wtz-page-btn.wtz-prev-btn,
.wtz-page-btn.wtz-next-btn {
  width: auto;
  padding: 0 14px;
}
.wtz-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   DETAIL MODAL
   ═══════════════════════════════════════════════════════ */
.wtz-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(10px);
  touch-action: manipulation !important;
}
.wtz-modal-overlay * {
  touch-action: manipulation !important;
}
.wtz-modal-inner {
  background: var(--wtz-surface);
  border: 1px solid var(--wtz-border);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}
.wtz-modal-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  background: #ffffff !important;
  color: #1a1a1a !important;
  border: none !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 100000 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
  transition: background 0.15s, transform 0.1s !important;
  text-indent: 0 !important;
  line-height: 1 !important;
}
.wtz-modal-close:hover {
  background: #f2ede4 !important;
  transform: scale(1.08) !important;
}
.wtz-modal-close svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
  fill: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Carousel */
.wtz-modal-media {
  width: 52%;
  background: #f0ebe3;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.wtz-carousel {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.wtz-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
}
.wtz-carousel-img-wrap {
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f0ebe3 !important;
}
.wtz-zoomable-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transition: transform 0.22s ease-out, transform-origin 0.12s ease-out;
  cursor: zoom-in;
  display: block !important;
}
.wtz-carousel-img-wrap.wtz-zoomed .wtz-zoomable-img {
  transform: scale(2.2) !important;
  cursor: zoom-out;
}
.wtz-carousel-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(255,255,255,0.85) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--wtz-text) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
  transition: background 0.15s !important;
  z-index: 10 !important;
  text-indent: 0 !important;
  line-height: 1 !important;
}
.wtz-carousel-btn:hover { background: #fff !important; }
.wtz-carousel-btn:disabled { opacity: 0.3 !important; cursor: default !important; }
.wtz-carousel-prev { left: 10px !important; }
.wtz-carousel-next { right: 10px !important; }
.wtz-carousel-btn svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
  fill: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.wtz-carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 10px;
  background: rgba(255,255,255,0.6);
  flex-shrink: 0;
}
.wtz-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(184,134,42,0.3);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  padding: 0;
}
.wtz-dot.active { background: var(--wtz-amber); transform: scale(1.2); }

/* Modal detail panel */
.wtz-modal-detail {
  flex: 1;
  padding: 32px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.wtz-modal-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
}
.wtz-modal-meta-info {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.wtz-modal-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wtz-modal-item-number { font-size: 0.78rem; color: var(--wtz-muted); font-weight: 500; }
.wtz-modal-species {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wtz-text);
  margin: 0;
  line-height: 1.2;
}

/* Specs grid */
.wtz-spec-grid { margin: 0; }
.wtz-spec-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  padding: 8px 0;
  border-bottom: 1px solid var(--wtz-border);
  font-size: 0.85rem;
  gap: 8px;
}
.wtz-spec-row:last-child { border-bottom: none; }
.wtz-spec-row dt { color: var(--wtz-muted); font-weight: 500; }
.wtz-spec-row dd { color: var(--wtz-text); font-weight: 600; margin: 0; }

.wtz-modal-price {
  font-size: 1.6rem !important;
  font-weight: 750 !important;
  color: var(--wtz-amber) !important;
  margin-top: -4px !important;
  margin-bottom: 6px !important;
}
.wtz-modal-actions {
  margin-top: auto;
  position: sticky !important;
  bottom: -32px !important;
  margin: 0 -28px -32px -28px !important;
  padding: 16px 28px 24px 28px !important;
  background: var(--wtz-surface) !important;
  border-top: 1px solid var(--wtz-border) !important;
  z-index: 100 !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05) !important;
}
.wtz-btn-inquire {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wtz-amber);
  color: #fff;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}
.wtz-btn-inquire:hover { background: var(--wtz-amber-dk); transform: translateY(-1px); color: #fff; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media ( max-width: 1100px ) {
  .wtz-gallery-wrapper { grid-template-columns: 210px 1fr; }
  .wtz-gallery-grid    { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

@media ( max-width: 900px ) {
  .wtz-gallery-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .wtz-sidebar {
    position: fixed;
    top: 0; left: -260px;
    width: 260px;
    height: 100%;
    z-index: 9000;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .wtz-sidebar.open { left: 0; }
  .wtz-gallery-main { padding: 16px; }
  .wtz-gallery-topbar {
    margin: -16px -16px 20px -16px;
    padding: 10px 16px;
  }
  .wtz-mobile-filter-toggle { display: flex; }
  .wtz-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .wtz-modal-inner { flex-direction: column; max-height: 95vh; }
  .wtz-modal-media { width: 100%; max-height: 40vh; }
  .wtz-carousel { min-height: 180px !important; }
  .wtz-modal-detail {
    padding: 20px !important;
    gap: 10px !important;
  }
  .wtz-spec-row {
    padding: 6px 0 !important;
  }
  .wtz-modal-close {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    z-index: 100000 !important;
  }
}

@media ( max-width: 540px ) {
  .wtz-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .wtz-card-species { font-size: 0.85rem; }
  .wtz-card-price   { font-size: 0.95rem; }
}

@media ( max-width: 360px ) {
  .wtz-gallery-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   SHOPPING CART & CHECKOUT FORM
   ═══════════════════════════════════════════════════════ */

/* Background blur when modal/cart is active */
body.wtz-modal-active > :not(.wtz-modal-overlay):not(#wpadminbar) {
  filter: blur(8px);
  pointer-events: none;
  transition: filter 0.25s ease;
}

.wtz-topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wtz-cart-btn-trigger {
  display: inline-flex;
  align-items: center;
  background: var(--wtz-amber-bg);
  color: var(--wtz-amber);
  border: 1px solid var(--wtz-border);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 38px;
  box-sizing: border-box;
}
.wtz-cart-btn-trigger:hover {
  background: var(--wtz-amber);
  border-color: var(--wtz-amber);
  color: #fff;
}

/* Detail modal Add to Cart buttons */
.wtz-btn-add-to-cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.15s, transform 0.1s, opacity 0.15s !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

/* Mobile Add to Cart button styling */
.wtz-mobile-only-cart {
  background: var(--wtz-amber) !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  width: auto !important;
}

/* Desktop Add to Cart button styling */
.wtz-desktop-only-cart {
  background: var(--wtz-amber) !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-size: 0.88rem !important;
  width: fit-content !important;
  margin-bottom: 12px !important;
}

/* States */
.wtz-btn-add-to-cart:not(.in-cart):hover {
  background: var(--wtz-amber-dk) !important;
  transform: translateY(-1px) !important;
}
.wtz-btn-add-to-cart.in-cart {
  background: var(--wtz-green) !important;
  cursor: default !important;
  transform: none !important;
}

/* Responsive Visibility and Layout Positions */
@media (min-width: 901px) {
  .wtz-mobile-only-cart {
    display: none !important;
  }
  .wtz-desktop-only-cart {
    display: inline-flex !important;
  }
}

@media (max-width: 900px) {
  .wtz-mobile-only-cart {
    display: inline-flex !important;
  }
  .wtz-desktop-only-cart {
    display: none !important;
  }
}

/* Sliding Cart Drawer Overlay */
.wtz-cart-overlay {
  justify-content: flex-end;
  padding: 0;
}
.wtz-cart-drawer {
  background: var(--wtz-surface);
  width: 100%;
  max-width: 460px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  animation: slideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border-left: 1px solid var(--wtz-border);
  box-sizing: border-box;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.wtz-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--wtz-border);
  flex-shrink: 0;
}
.wtz-cart-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--wtz-text);
}
.wtz-cart-close {
  background: none !important;
  border: none !important;
  font-size: 1.8rem !important;
  cursor: pointer !important;
  color: var(--wtz-muted) !important;
  line-height: 1 !important;
  padding: 4px !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}
.wtz-cart-close:hover {
  color: var(--wtz-text) !important;
}

.wtz-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 120px !important;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.wtz-cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wtz-cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--wtz-border);
}
.wtz-cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  flex-shrink: 0;
}
.wtz-cart-item-info {
  flex: 1;
  min-width: 0;
}
.wtz-cart-item-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--wtz-text);
}
.wtz-cart-item-meta {
  font-size: 0.72rem;
  color: var(--wtz-muted);
  margin-bottom: 3px;
}
.wtz-cart-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wtz-amber);
}
.wtz-cart-item-remove {
  background: none;
  border: none;
  color: #c93b3b;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 4px;
  font-weight: 600;
}
.wtz-cart-item-remove:hover {
  text-decoration: underline;
}

.wtz-cart-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--wtz-muted);
}

.wtz-cart-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wtz-cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--wtz-muted);
}
.wtz-cart-grand-total {
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 1px solid var(--wtz-border);
  padding-top: 12px;
  color: var(--wtz-text);
}
.wtz-cart-grand-total span:last-child {
  color: var(--wtz-amber);
}

/* Checkout Form */
.wtz-checkout-form {
  border-top: 2px solid var(--wtz-border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wtz-checkout-form h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--wtz-text);
}
.wtz-checkout-form-desc {
  font-size: 0.75rem;
  color: var(--wtz-muted);
  margin: 0;
  line-height: 1.4;
}
.wtz-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wtz-form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wtz-text);
}
.wtz-form-group input,
.wtz-form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--wtz-border);
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}
.wtz-form-group input:focus,
.wtz-form-group textarea:focus {
  outline: none;
  border-color: var(--wtz-amber);
  box-shadow: 0 0 0 2px var(--wtz-amber-bg);
}
.wtz-btn-submit-checkout {
  background: var(--wtz-amber);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.wtz-btn-submit-checkout:hover {
  background: var(--wtz-amber-dk);
}

.wtz-checkout-success {
  text-align: center;
  padding: 30px 10px;
}
.wtz-success-icon {
  font-size: 2.8rem;
  color: var(--wtz-green);
  margin-bottom: 12px;
}
.wtz-success-icon + h4 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 700;
}
.wtz-checkout-success p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--wtz-muted);
  margin-bottom: 20px;
}
.wtz-checkout-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--wtz-muted);
  padding: 10px 0;
}

/* Global Floating Cart Trigger Button */
.wtz-global-cart-trigger {
  position: fixed !important;
  z-index: 99999 !important;
  background: var(--wtz-amber) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50% !important;
  width: 56px !important;
  height: 56px !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
  padding: 0 !important;
  outline: none !important;
}
.wtz-global-cart-trigger:hover {
  background: var(--wtz-amber-dk) !important;
  transform: scale(1.08) !important;
}
.wtz-global-cart-trigger:active {
  transform: scale(0.95) !important;
}
.wtz-global-cart-icon-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.wtz-global-cart-badge {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  background: #c93b3b !important;
  color: #fff !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 2px 6px !important;
  min-width: 10px !important;
  text-align: center !important;
  line-height: 1 !important;
  border: 2px solid var(--wtz-amber) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Position for Desktop */
@media (min-width: 901px) {
  .wtz-global-cart-trigger {
    top: 120px !important;
    right: 24px !important;
  }
}

/* Position for Mobile */
@media (max-width: 900px) {
  .wtz-global-cart-trigger {
    bottom: 24px !important;
    right: 24px !important;
  }
}

