:root {
  --bg: #f0f2f5;
  --bg-gradient: linear-gradient(145deg, #e8ecf1 0%, #f4f6f9 40%, #eaecf0 100%);
  --paper: #ffffff;
  --toolbar-bg: rgba(15, 20, 30, 0.88);
  --toolbar-border: rgba(255,255,255,0.10);
  --toolbar-text: #e8ecf1;
  --toolbar-hover: rgba(255,255,255,0.12);
  --toolbar-active: rgba(255,255,255,0.18);
  --muted: #8891a0;
  --line: #dfe3ea;
  --brand: #2dba5e;
  --brand-glow: rgba(45,186,94,0.25);
  --accent: #c9a44e;
  --shadow-book: 0 32px 80px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.10);
  --shadow-toolbar: 0 -4px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.06);
  --shadow-soft: 0 8px 32px rgba(0,0,0,0.08);
  --radius: 6px;
  --radius-lg: 14px;
  --transition-fast: 0.18s cubic-bezier(0.4,0,0.2,1);
  --transition-smooth: 0.4s cubic-bezier(0.22,1,0.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { overflow: hidden; overscroll-behavior-y: none; }

/* home button */
.home-btn {
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--toolbar-text);
  min-width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0; text-decoration: none;
}
.home-btn:hover { background: var(--toolbar-hover); border-color: rgba(255,255,255,0.14); }
.home-btn:active { background: var(--toolbar-active); }
.home-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.download-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1a1f2e;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y pinch-zoom;
}
button, input { font: inherit; }
button { touch-action: manipulation; cursor: pointer; }
img { user-select: none; -webkit-user-drag: none; }

/* ═══ APP SHELL ═══ */
.catalog-app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg-gradient);
  position: relative; overflow: hidden;
}

/* subtle texture overlay */
.catalog-app::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ═══ MAIN AREA ═══ */
.catalog-main {
  flex: 1; min-height: 0;
  position: relative; z-index: 1;
  padding: 20px 20px 78px;
  display: flex; align-items: center; justify-content: center;
  transition: margin-left var(--transition-smooth);
}
.catalog-app.thumbs-open .catalog-main { margin-left: 200px; }

/* ═══ BOOK ═══ */
.book-viewport {
  position: relative; width: 100%; height: 100%;
  touch-action: pan-y pinch-zoom;
  display: flex; align-items: center; justify-content: center;
}

.book-stage {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  perspective: 2200px;
}

.book-spread {
  position: relative;
  display: flex; align-items: stretch; justify-content: center;
  transform-origin: center center;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.14)) drop-shadow(0 6px 12px rgba(0,0,0,0.08));
}
.book-spread.single {
  width: min(90vw, 600px);
  aspect-ratio: 1191/1684;
}
.book-spread.double {
  width: min(94vw, 1180px);
  aspect-ratio: 2382/1684;
}
.catalog-app.thumbs-open .book-spread.double { width: min(calc(100vw - 250px), 1120px); }
.catalog-app.thumbs-open .book-spread.single { width: min(calc(100vw - 250px), 600px); }

/* spine shadow for double spread */
.book-spread.double::before {
  content: ""; position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 32px; transform: translateX(-50%);
  z-index: 5; pointer-events: none;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0.04) 20%,
    rgba(255,255,255,0.15) 48%,
    rgba(255,255,255,0.08) 52%,
    rgba(0,0,0,0.04) 80%,
    rgba(0,0,0,0.12) 100%
  );
}

/* ═══ PAGES ═══ */
.book-page {
  position: relative; background: var(--paper);
  height: 100%; overflow: hidden;
}
.book-page.single { width: 100%; border-radius: var(--radius); }
.book-page.left {
  width: 50%; border-radius: var(--radius) 0 0 var(--radius);
  box-shadow: -6px 0 20px rgba(0,0,0,0.06);
}
.book-page.right {
  width: 50%; border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 6px 0 20px rgba(0,0,0,0.06);
}

/* page lighting */
.book-page::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none; z-index: 3;
}
.book-page.left::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04));
}
.book-page.right::after {
  background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(255,255,255,0.03));
}
.book-page.single::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(0,0,0,0.03));
}

.page-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; background: #fff;
}

.page-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, #f5f6f8 8%, #eceef2 18%, #f5f6f8 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  z-index: 1;
}
@keyframes shimmer { to { background-position-x: -200%; } }

/* ═══ HOTSPOTS ═══ */
.hotspot-layer { position: absolute; inset: 0; z-index: 6; }
.hotspot {
  position: absolute; display: block;
  border-radius: 6px; text-decoration: none; outline: none;
  background: transparent;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.hotspot:hover, .hotspot:focus-visible {
  background: rgba(15,20,30,0.10);
  box-shadow: inset 0 0 0 1px rgba(15,20,30,0.18);
}
.hotspot:active {
  background: rgba(0, 0, 0, 0.14);
}
.hotspot::after,
.hotspot:hover::after,
.hotspot:focus-visible::after,
.hotspot.sku-box::after,
.hotspot.product-card::after {
  content: none !important;
  display: none !important;
}

.catalog-app.debug-on .hotspot {
  background: rgba(239,57,76,0.06);
  box-shadow: inset 0 0 0 2px rgba(239,57,76,0.7);
}

/* ═══ REALISTIC PAGE FLIP ═══ */
.flip-container {
  position: absolute; top: 0; height: 100%;
  z-index: 14; pointer-events: none;
  perspective: 2200px;
}
.flip-container.next { right: 0; width: 50%; }
.flip-container.prev { left: 0; width: 50%; }
.flip-container.single-mode { width: 100%; }

.flip-page {
  position: absolute; top: 0;
  width: 100%; height: 100%;
  background: #fff;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.flip-container.next .flip-page {
  right: 0; transform-origin: left center;
}
.flip-container.prev .flip-page {
  left: 0; transform-origin: right center;
}

.flip-page img {
  width: 100%; height: 100%;
  object-fit: contain; background: #fff; display: block;
}

/* page curl shadow on the front */
.flip-page::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.flip-container.next .flip-page::after {
  background: linear-gradient(to left,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.03) 40%,
    rgba(0,0,0,0.15) 96%,
    rgba(0,0,0,0.25) 100%
  );
  opacity: 0;
}
.flip-container.prev .flip-page::after {
  background: linear-gradient(to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.03) 40%,
    rgba(0,0,0,0.15) 96%,
    rgba(0,0,0,0.25) 100%
  );
  opacity: 0;
}

/* shadow cast onto the page beneath */
.flip-shadow {
  position: absolute; top: 0; height: 100%;
  z-index: 13; pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.flip-shadow.next {
  right: 0; width: 50%;
  background: linear-gradient(to left, rgba(0,0,0,0.22) 0%, transparent 60%);
}
.flip-shadow.prev {
  left: 0; width: 50%;
  background: linear-gradient(to right, rgba(0,0,0,0.22) 0%, transparent 60%);
}
.flip-shadow.single-mode { width: 100%; }

/* ═══ NAV ARROWS ═══ */
.nav-arrow {
  position: absolute; z-index: 10;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 72px;
  border: none; border-radius: var(--radius-lg);
  background: rgba(15,20,30,0.5);
  backdrop-filter: blur(8px);
  color: #fff; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all var(--transition-fast);
  opacity: 0.7;
}
.nav-arrow:hover { background: rgba(15,20,30,0.72); opacity: 1; transform: translateY(-50%) scale(1.04); }
.nav-arrow:active { transform: translateY(-50%) scale(0.97); }
.nav-arrow:disabled { opacity: 0.15; cursor: not-allowed; transform: translateY(-50%); }
.nav-prev { left: 12px; }
.nav-next { right: 12px; }
.nav-arrow svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ═══ BOTTOM TOOLBAR ═══ */
.bottom-toolbar {
  position: absolute; left: 50%; bottom: 14px; z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  width: auto; max-width: calc(100vw - 24px);
  padding: 6px 8px;
  background: var(--toolbar-bg);
  border: 1px solid var(--toolbar-border);
  border-radius: 16px;
  box-shadow: var(--shadow-toolbar);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

.toolbar-btn, .icon-btn {
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--toolbar-text);
  min-width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-size: 14px;
}
.toolbar-btn:hover, .icon-btn:hover {
  background: var(--toolbar-hover);
  border-color: rgba(255,255,255,0.14);
}
.toolbar-btn:active, .icon-btn:active { background: var(--toolbar-active); }
.toolbar-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.toolbar-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.toolbar-separator {
  width: 1px; height: 24px;
  background: rgba(255,255,255,0.12);
  margin: 0 4px; flex-shrink: 0;
}

.page-control {
  display: flex; align-items: center; gap: 6px;
  color: var(--toolbar-text);
  height: 36px; border-radius: 10px;
  padding: 0 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; font-weight: 500;
  flex-shrink: 0;
}
.page-control input {
  width: 44px; text-align: center;
  border: none; border-radius: 6px;
  padding: 4px 2px;
  background: rgba(255,255,255,0.95);
  color: #1a1f2e; font-weight: 600;
  font-size: 13px;
  -moz-appearance: textfield;
}
.page-control input::-webkit-inner-spin-button,
.page-control input::-webkit-outer-spin-button { -webkit-appearance: none; }
.page-control span { font-size: 12px; opacity: 0.7; }

.zoom-label {
  min-width: 44px; text-align: center;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
}

.debug-btn { display: none; }
.catalog-app.tools-on .debug-btn { display: inline-flex; }

/* ═══ THUMBS DRAWER ═══ */
.thumbs-drawer {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 36;
  width: 200px;
  background: rgba(255,255,255,0.97);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 32px rgba(0,0,0,0.08);
  transform: translateX(-100%);
  transition: transform var(--transition-smooth);
  display: flex; flex-direction: column;
  backdrop-filter: blur(12px);
}
.catalog-app.thumbs-open .thumbs-drawer { transform: translateX(0); }

.drawer-head {
  height: 56px; display: flex;
  align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head strong {
  font-size: 14px; font-weight: 600; color: #1a1f2e;
  letter-spacing: -0.01em;
}
.drawer-close {
  color: #1a1f2e; background: #f2f4f7;
  border: 1px solid #dfe3ea;
  min-width: 30px; height: 30px; border-radius: 8px;
}

.thumbs-panel { overflow-y: auto; padding: 12px; flex: 1; }
.thumb-btn {
  width: 100%; border: 2px solid transparent;
  background: #fff; border-radius: 12px;
  margin: 0 0 10px; padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all var(--transition-fast);
}
.thumb-btn:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(45,186,94,0.12);
  transform: translateY(-1px);
}
.thumb-btn.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.thumb-btn img {
  width: 100%; height: auto; display: block;
  border-radius: 8px; background: #f5f6f8;
}
.thumb-num {
  display: block; margin-top: 4px;
  font-size: 11px; font-weight: 500; color: var(--muted);
  text-align: center;
}

/* ═══ LOADER ═══ */
.catalog-loader {
  position: absolute; z-index: 20;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 999px;
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow-soft);
  font-size: 14px; font-weight: 500; color: #374151;
}
.catalog-app.loaded .catalog-loader { display: none; }
.loader-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand);
  animation: pulse 0.75s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: 0.4; transform: scale(0.8); } to { opacity: 1; transform: scale(1.2); } }

/* ═══ HINT ═══ */
.catalog-hint {
  position: absolute; right: 20px; bottom: 78px; z-index: 35;
  max-width: 340px;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(45,186,94,0.2);
  color: #1a1f2e;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.catalog-hint strong { display: block; margin-bottom: 3px; font-size: 13px; font-weight: 600; }
.catalog-hint span { display: block; font-size: 12px; line-height: 1.45; color: #5b6570; }
.catalog-hint button {
  border: none; background: #f0f2f5; color: #1a1f2e;
  border-radius: 999px; width: 24px; height: 24px;
  flex: 0 0 auto; font-size: 14px;
}
.catalog-hint.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* ═══ SWIPE INDICATOR (mobile) ═══ */
.swipe-indicator {
  position: absolute; top: 50%; z-index: 15;
  transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(45,186,94,0.15);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.swipe-indicator.left { left: 8px; }
.swipe-indicator.right { right: 8px; }
.swipe-indicator.visible { opacity: 1; }
.swipe-indicator svg { width: 24px; height: 24px; stroke: var(--brand); fill: none; stroke-width: 2.5; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══ MOBILE ═══ */
@media (max-width: 900px) {
  body { overflow: auto; overscroll-behavior-y: auto; }
  .catalog-app { min-height: 100vh; min-height: 100dvh; height: auto; overflow: visible; }
  .catalog-main {
    min-height: calc(100vh - 68px);
    min-height: calc(100dvh - 68px);
    padding: 10px 6px 72px;
  }
  .catalog-app.thumbs-open .catalog-main { margin-left: 0; }
  .thumbs-drawer { width: 160px; z-index: 42; }

  .book-spread.double, .book-spread.single {
    width: min(100%, 620px);
    aspect-ratio: 1191/1684;
    max-height: none;
  }
  .book-page.left, .book-page.right, .book-page.single {
    width: 100%; border-radius: var(--radius);
  }
  .book-spread.double::before { display: none; }
  .nav-arrow { display: none; }

  /* ─── MOBILE TOOLBAR ─── */
  .bottom-toolbar {
    bottom: 8px;
    left: 8px; right: 8px;
    transform: none;
    width: auto; max-width: none;
    padding: 5px 6px;
    gap: 3px;
    justify-content: center;
    border-radius: 14px;
  }
  .toolbar-btn, .icon-btn, .home-btn {
    min-width: 34px; height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }
  .toolbar-btn svg, .home-btn svg { width: 16px; height: 16px; }
  .page-control {
    height: 34px; padding: 0 6px;
    font-size: 12px; gap: 4px;
  }
  .page-control input { width: 36px; padding: 3px; font-size: 12px; }
  .zoom-label { min-width: 36px; font-size: 11px; }
  .toolbar-separator { height: 20px; margin: 0 2px; }

  .catalog-hint { left: 8px; right: 8px; bottom: 56px; max-width: none; }

  .catalog-app.tools-on .debug-btn { display: none; }
}

@media (max-width: 400px) {
  .bottom-toolbar { gap: 2px; padding: 4px 5px; }
  .toolbar-btn, .icon-btn, .home-btn { min-width: 30px; height: 32px; }
  .page-control { padding: 0 4px; }
  .page-control input { width: 30px; }
  .zoom-label { min-width: 30px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
      scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .flip-container, .flip-shadow { display: none !important; }
}
@media print {
  .bottom-toolbar, .thumbs-drawer, .catalog-hint, .hotspot-layer, .nav-arrow,
  .swipe-indicator { display: none !important; }
  .catalog-main { padding: 0; }
  .book-spread { box-shadow: none; filter: none; width: 100%; max-height: none; }
}
  

/* ═══ V8: STPAGEFLIP INTEGRATION ═══ */
.book-stage { overflow: visible; }

.book-spread.pageflip-book {
  position: relative;
  width: min(94vw, 1180px);
  height: min(calc((94vw) * 1684 / 2382), calc(100vh - 130px), 842px);
  max-width: 1180px;
  max-height: calc(100vh - 130px);
  display: block;
  overflow: visible;
  transform-origin: center center;
  filter: drop-shadow(0 30px 54px rgba(0,0,0,0.18)) drop-shadow(0 8px 18px rgba(0,0,0,0.10));
}

.catalog-app.thumbs-open .book-spread.pageflip-book {
  width: min(calc(100vw - 250px), 1120px);
  height: min(calc((100vw - 250px) * 1684 / 2382), calc(100vh - 130px), 842px);
}

.book-spread.pageflip-book .stf__parent,
.book-spread.pageflip-book .stf__wrapper,
.book-spread.pageflip-book .stf__block {
  border-radius: var(--radius);
  overflow: visible;
}

.pf-page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.pf-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(90deg, rgba(255,255,255,0.025), rgba(0,0,0,0.035));
}

.pf-page[data-density="hard"]::after { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(0,0,0,0.06)); }

.pf-page .page-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  z-index: 2;
}

.pf-page .page-placeholder { z-index: 1; }
.pf-page .hotspot-layer { position: absolute; inset: 0; z-index: 10; }
.pf-page .hotspot { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.stf__block { will-change: transform; }

@media (max-width: 900px) {
  .book-spread.pageflip-book,
  .catalog-app.thumbs-open .book-spread.pageflip-book {
    width: min(100%, 620px);
    height: min(calc(100vw * 1684 / 1191), calc(100dvh - 98px), 842px);
    max-height: calc(100dvh - 98px);
  }
}

@media (max-width: 400px) {
  .book-spread.pageflip-book,
  .catalog-app.thumbs-open .book-spread.pageflip-book {
    height: min(calc(100vw * 1684 / 1191), calc(100dvh - 94px));
  }
}


/* ═══ V10: FINAL UX - RIGID PAGE TURN + CLICK CUES ═══ */
.catalog-app.mobile-stable .book-spread.pageflip-book {
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.catalog-app.mobile-stable .stf__wrapper,
.catalog-app.mobile-stable .stf__block {
  will-change: auto;
}

.download-btn[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 900px) {
  .zoom-control,
  .zoom-separator {
    display: none !important;
  }

  .bottom-toolbar {
    gap: 4px;
  }

  .book-viewport {
    touch-action: pan-y pinch-zoom;
  }

  .catalog-app.mobile-stable .hotspot:active {
    background: rgba(0,0,0,0.10);
  }
}

@media (max-width: 400px) {
  .bottom-toolbar {
    gap: 3px;
  }

  .toolbar-btn, .icon-btn, .home-btn {
    min-width: 31px;
  }

  .page-control input {
    width: 32px;
  }
}


/* ═══ V10 FINAL UX: RIGID PAGE TURN, STATIC CORNERS, PRODUCT CLICK CUES ═══ */
/* StPageFlip'in hassas hover/köşe hissini görsel olarak devre dışı bırakıp, kontrollü click-zone kullanıyoruz. */
.stf__outerShadow,
.stf__innerShadow,
.stf__hardShadow,
.stf__hardInnerShadow {
  pointer-events: none !important;
}

.book-stage {
  isolation: isolate;
}

/* Sayfa çevrilebilirliğini anlatan sabit, çok hafif kağıt-köşe izi. */
@media (min-width: 901px) {
  .pf-page::before {
    content: "";
    position: absolute;
    top: 0;
    width: 42px;
    height: 42px;
    z-index: 9;
    pointer-events: none;
    opacity: .42;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.12));
    transition: opacity .18s ease, transform .18s ease;
  }

  .pf-page.page-odd::before,
  .pf-page.cover-front::before {
    right: 0;
    background: linear-gradient(135deg,
      rgba(255,255,255,.0) 0%,
      rgba(255,255,255,.0) 48%,
      rgba(223,227,234,.95) 49%,
      rgba(255,255,255,.98) 52%,
      rgba(203,210,219,.68) 100%);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
  }

  .pf-page.page-even::before,
  .pf-page.cover-back::before {
    left: 0;
    background: linear-gradient(225deg,
      rgba(255,255,255,.0) 0%,
      rgba(255,255,255,.0) 48%,
      rgba(223,227,234,.95) 49%,
      rgba(255,255,255,.98) 52%,
      rgba(203,210,219,.68) 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
  }

  .catalog-app.turn-edge-hover-next .pf-page.page-odd::before,
  .catalog-app.turn-edge-hover-next .pf-page.cover-front::before,
  .catalog-app.turn-edge-hover-prev .pf-page.page-even::before,
  .catalog-app.turn-edge-hover-prev .pf-page.cover-back::before {
    opacity: .72;
  }
}

/* Sayfa kenarına tıkla: net, rijit, hover kıvırması yok. */
.page-turn-zone {
  position: absolute;
  top: 8%;
  bottom: 8%;
  z-index: 18;
  width: clamp(46px, 5.2vw, 78px);
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255,255,255,.96);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .52;
  transition: opacity .18s ease, transform .18s ease;
}
.page-turn-zone span {
  width: 34px;
  height: 58px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,20,30,.42);
  box-shadow: 0 8px 24px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 30px;
  line-height: 1;
}
.page-turn-zone:hover,
.page-turn-zone:focus-visible {
  opacity: .94;
  transform: translateY(-1px);
}
.page-turn-zone:active { transform: translateY(0) scale(.98); }
.page-turn-zone:disabled { opacity: .08; cursor: not-allowed; pointer-events: none; }
.page-turn-prev { left: max(8px, calc(50% - min(94vw, 1180px) / 2 - 6px)); }
.page-turn-next { right: max(8px, calc(50% - min(94vw, 1180px) / 2 - 6px)); }
.catalog-app.thumbs-open .page-turn-prev { left: max(8px, calc(50% - min(calc(100vw - 250px), 1120px) / 2 + 92px)); }
.catalog-app.thumbs-open .page-turn-next { right: max(8px, calc(50% - min(calc(100vw - 250px), 1120px) / 2 - 6px)); }

/* Ürün linkleri: title yok; sadece sabit küçük click ikonu + hafif gri kararma. */
.hotspot::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  z-index: 2;
  border-radius: 999px;
  opacity: .46;
  pointer-events: none;
  background-color: rgba(255,255,255,.86);
  border: 1px solid rgba(15,20,30,.18);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17L17 7M9 7h8v8' fill='none' stroke='%23151a22' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: scale(.96);
  transition: opacity .18s ease, transform .18s ease, background-color .18s ease;
}
.hotspot.sku-box::before {
  right: 3px;
  top: 3px;
  width: 13px;
  height: 13px;
  background-size: 8px 8px;
  opacity: .34;
}
.hotspot.product-card::before {
  right: 8px;
  top: 8px;
  width: 20px;
  height: 20px;
  background-size: 12px 12px;
  opacity: .54;
}
.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(15,20,30,0.105);
  box-shadow: inset 0 0 0 1px rgba(15,20,30,0.16);
}
.hotspot:hover::before,
.hotspot:focus-visible::before,
.hotspot:active::before {
  opacity: .88;
  transform: scale(1);
  background-color: rgba(255,255,255,.96);
}
.catalog-app.debug-on .hotspot::before {
  opacity: .9;
}

/* Mobilde karmaşık kağıt köşesi yok; stabil swipe/nav. Ürün ikonları çok hafif kalır. */
@media (max-width: 900px) {
  .pf-page::before,
  .page-turn-zone {
    display: none !important;
  }
  .hotspot::before {
    width: 12px;
    height: 12px;
    right: 3px;
    top: 3px;
    background-size: 7px 7px;
    opacity: .30;
  }
  .hotspot.product-card::before {
    width: 16px;
    height: 16px;
    right: 5px;
    top: 5px;
    background-size: 9px 9px;
    opacity: .42;
  }
}

/* ═══ V11: FINAL INTERACTION POLISH ═══ */
/* Eski sabit üçgen/kıvrık köşe ipucunu kaldırıyoruz. Sayfa çevrilebilirliği artık oklar + gerçek drag ile anlatılır. */
@media (min-width: 901px) {
  .pf-page::before,
  .pf-page.page-odd::before,
  .pf-page.page-even::before,
  .pf-page.cover-front::before,
  .pf-page.cover-back::before {
    content: none !important;
    display: none !important;
  }
}

/* Eski click-zone butonları varsa bile görünmesin; tek sayfa oku sistemi kullanılacak. */
.page-turn-zone { display: none !important; }

/* Sayfa okları tek set: kağıdın hemen yanında, beyaz boş alanda. */
@media (min-width: 901px) {
  .nav-arrow {
    width: 48px;
    height: 70px;
    border-radius: 18px;
    border: 1px solid rgba(15,20,30,.10);
    background: rgba(255,255,255,.86);
    color: rgba(31,41,55,.74);
    box-shadow: 0 14px 34px rgba(15,20,30,.12), inset 0 0 0 1px rgba(255,255,255,.65);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    opacity: .88;
  }
  .nav-arrow:hover,
  .nav-arrow:focus-visible {
    background: rgba(255,255,255,.96);
    color: rgba(17,24,39,.92);
    opacity: 1;
    transform: translateY(-50%) scale(1.03);
  }
  .nav-arrow:active { transform: translateY(-50%) scale(.98); }
  .nav-prev { left: var(--catalog-nav-left, 12px); }
  .nav-next { right: var(--catalog-nav-right, 12px); }
  .nav-arrow svg { width: 22px; height: 22px; }
}

/* Ürün link ipucu: yazısız, özel el ikonu; küçük stok satırlarının içeriğini kapatmaz. */
.hotspot::before {
  content: "" !important;
  position: absolute;
  z-index: 2;
  pointer-events: auto;
  display: block !important;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent url("../assets/click-hand-v11.png") center / contain no-repeat;
  opacity: .48;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.18));
  transition: opacity .18s ease, transform .18s ease, filter .18s ease;
}

.hotspot.sku-box::before {
  left: -20px;
  right: auto;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  opacity: .42;
}

.hotspot.product-card::before,
.hotspot.link::before {
  right: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  opacity: .50;
}

.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(15,20,30,.10);
  box-shadow: inset 0 0 0 1px rgba(15,20,30,.14);
}
.hotspot:hover::before,
.hotspot:focus-visible::before,
.hotspot:active::before {
  opacity: .82;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.22));
}
.hotspot.sku-box:hover::before,
.hotspot.sku-box:focus-visible::before,
.hotspot.sku-box:active::before {
  transform: translateY(-50%) scale(1.04);
}
.hotspot.product-card:hover::before,
.hotspot.product-card:focus-visible::before,
.hotspot.product-card:active::before,
.hotspot.link:hover::before,
.hotspot.link:focus-visible::before,
.hotspot.link:active::before {
  transform: scale(1.04);
}

/* Debug modda ikonlar karışıklık yapmasın; alan sınırını görmek önceliklidir. */
.catalog-app.debug-on .hotspot::before { opacity: .28; }

@media (max-width: 900px) {
  .hotspot.sku-box::before {
    left: -15px;
    width: 13px;
    height: 13px;
    opacity: .32;
  }
  .hotspot.product-card::before,
  .hotspot.link::before {
    width: 17px;
    height: 17px;
    right: 6px;
    top: 6px;
    opacity: .36;
  }
}

/* ═══ V12 FINAL: ürün link ikonları tamamen kaldırıldı ═══ */
.hotspot::before,
.hotspot::after {
  content: none !important;
  display: none !important;
}

/* Ürün linkleri sadece premium, hafif gri feedback verir. */
.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(15,20,30,.10);
  box-shadow: inset 0 0 0 1px rgba(15,20,30,.14);
}

.hotspot:active {
  background: rgba(15,20,30,.14);
}

/* İsteğe bağlı grup/kategori CTA alanı.
   hotspots.json içinde type: "group-cta" kullanılırsa görünür buton olarak çalışır. */
.hotspot.group-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,20,30,.14);
  color: rgba(17,24,39,.86);
  box-shadow: 0 8px 22px rgba(15,20,30,.10), inset 0 0 0 1px rgba(255,255,255,.50);
  font-size: clamp(9px, 0.75vw, 12px);
  font-weight: 700;
  letter-spacing: .01em;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hotspot.group-cta::after {
  content: attr(data-label) !important;
  display: inline !important;
  position: static !important;
  opacity: 1 !important;
  transform: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}
.hotspot.group-cta:hover,
.hotspot.group-cta:focus-visible {
  background: rgba(255,255,255,.96);
  border-color: rgba(45,186,94,.45);
  box-shadow: 0 10px 24px rgba(15,20,30,.14), 0 0 0 2px rgba(45,186,94,.12);
  color: rgba(17,24,39,.96);
}

@media (max-width: 900px) {
  .hotspot.group-cta {
    font-size: 10px;
    padding: 0 8px;
  }
}


/* ═══ V14 HI-RES + LINK FEEDBACK FINAL POLISH ═══ */
/* Mobilde butonlu zoom yok; native pinch-zoom destekleyen tarayıcılarda doğal yakınlaştırma serbest. */
body,
.book-viewport {
  touch-action: pan-y pinch-zoom;
}

/* Katalog ürün linkleri: ikon/title yok; sadece hafif gri feedback. */
.hotspot::before,
.hotspot::after {
  content: none !important;
  display: none !important;
}
.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(15,20,30,.10);
  box-shadow: inset 0 0 0 1px rgba(15,20,30,.14);
}
.hotspot:active,
.hotspot.is-opening {
  background: rgba(15,20,30,.16);
  box-shadow: inset 0 0 0 1px rgba(15,20,30,.20);
}
.catalog-app.link-opening .hotspot {
  pointer-events: none;
}

.catalog-link-feedback {
  position: absolute;
  left: 50%;
  bottom: 78px;
  z-index: 45;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 28px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(15,20,30,.90);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 14px 40px rgba(15,20,30,.26), inset 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  transition: opacity .18s ease, transform .18s ease;
}
.catalog-app.link-opening .catalog-link-feedback,
.catalog-link-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.link-feedback-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2dba5e;
  box-shadow: 0 0 0 0 rgba(45,186,94,.55);
  animation: linkFeedbackPulse 1s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes linkFeedbackPulse {
  0% { transform: scale(.86); box-shadow: 0 0 0 0 rgba(45,186,94,.55); opacity: .65; }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(45,186,94,0); opacity: 1; }
  100% { transform: scale(.86); box-shadow: 0 0 0 0 rgba(45,186,94,0); opacity: .72; }
}
.page-image[data-quality="hires"] {
  image-rendering: auto;
}

@media (max-width: 900px) {
  .catalog-link-feedback {
    bottom: 62px;
    padding: 11px 14px;
    font-size: 12px;
  }
}
