/* ============================================================
   Katalog HPL Taco — DESKTOP  ( >= 769px )
   ============================================================ */
@media (min-width: 769px) {

  :root {
    --brand: #24a2fb;
    --bg: #1a1a1a;
    --surface: #FFFFFF;
    --border: #E7E2D9;
    --ink: #0C0A09;
    --ink-2: #44403C;
    --ink-muted: #78716C;
    --r-md: 12px;
    --r-lg: 16px;
    --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.18);
    --font: "Aiva", system-ui, sans-serif;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100vh; overflow: hidden; }
  body {
    font-family: var(--font); font-size: 16px; line-height: 1.5; color: #fff;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column;
  }
  button, input { font-family: inherit; font-size: inherit; color: inherit; }
  button { cursor: pointer; border: 0; background: none; }
  a { color: var(--brand); text-decoration: none; }
  a:hover { text-decoration: underline; }

  /* --- HIDE MOBILE --- */
  .mobile-bottom-bar,
  .mobile-side-panel,
  .mobile-side-panel-overlay,
  .swipe-hint { display: none !important; }

  /* --- DESKTOP HEADER --- */
  .desktop-header {
    display: flex; justify-content: flex-start; align-items: center;
    width: 100%; height: 55px; min-height: 55px; flex-shrink: 0;
    z-index: 1000;
    background: linear-gradient(120deg, #9d00ff, #5076ff, #61e3ff, #cceeff);
    border-bottom: 1px solid #e0e0e0; padding: 0 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05); gap: 12px;
  }
  .header-left { display: flex; align-items: center; gap: 20px; }
  .logo-aiva { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.1rem; color: #fff; }
  .header-menu { display: flex; }
  .menu-dropdown { position: relative; }
  .menu-btn {
    background: transparent; border: none; color: #fff;
    padding: 8px 16px; font-size: 16px; border-radius: 25px; transition: background 0.2s;
  }
  .menu-btn:hover { background: rgba(255,255,255,0.15); }
  .dropdown-content {
    display: none; position: absolute; top: 43px; left: 0;
    background: #fff; min-width: 180px;
    box-shadow: 0 0 4px rgb(0 0 0 / 40%); border-radius: 4px; z-index: 2000;
  }
  .dropdown-content.show { display: block; }
  .submenu-item {
    position: relative; display: flex; justify-content: space-between; align-items: center;
    padding: 8px 15px; cursor: pointer; color: #333; font-size: 14px;
    transition: background 0.2s; border-bottom: 1px solid #dbdada;
  }
  .submenu-item:hover { background: #f0f0f0; }
  .submenu-dropdown {
    display: none; position: absolute; left: 100%; top: 0;
    background: #fff; min-width: 200px;
    box-shadow: 0 0 4px rgb(0 0 0 / 40%); border-radius: 4px; z-index: 2001;
  }
  .submenu-dropdown.show { display: block; }
  .submenu-dropdown button {
    width: 100%; padding: 10px 15px; border: none; background: transparent;
    text-align: left; font-size: 14px; color: #333;
    transition: background 0.2s; border-bottom: 1px solid #dbdada;
  }
  .submenu-dropdown button:hover { background: #e8f4ff; }

  /* --- MAIN --- */
  .katalog-main {
    background: #fff; flex: 1; display: flex; flex-direction: column; overflow: hidden;
  }

  /* --- KATEGORI TABS --- */
  .kategori-tabs-wrap {
    padding: 0px 20px; flex-shrink: 0; display: flex; justify-content: center;
  }
  .kategori-tabs { display: flex; gap: 1px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
  .kategori-tabs::-webkit-scrollbar { display: none; }
  .kategori-tab {
    flex-shrink: 0; padding: 5px 30px; background: #aec3e2;font-size: 0.85rem; font-weight: 400; color: #ffffff;
    cursor: pointer; transition: all 0.2s; white-space: nowrap; display: flex;gap: 8px;align-items: center;
  }
  .kategori-tab:hover { border-color: var(--brand); color: var(--brand); }
  .kategori-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

  /* --- PAGE VIEWER --- */
  .viewer-wrap {
    flex: 1; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; min-height: 0;
    padding: 0 80px;
  }
  .nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.15);
    color: #343434; display: flex; align-items: center; justify-content: center;
    z-index: 50; transition: all 0.2s;
  }
  .nav-arrow:hover { background: rgba(255,255,255,0.18); color: #fff; border-color: rgba(255,255,255,0.35); }
  .nav-arrow:active { transform: translateY(-50%) scale(0.93); }
  .nav-arrow:disabled { opacity: 0.2; cursor: not-allowed; }
  .nav-arrow:disabled:hover { background: rgba(255,255,255,0.08); color: #ccc; }
  .nav-prev { left: 16px; }
  .nav-next { right: 16px; }

.page-container {
    width: 100%; height: 100%; display: flex; flex-direction: row;
    align-items: center; justify-content: center;
    gap: 4px; padding: 10px;
    transform-origin: center center;
  }
.page-img {
    max-width: 48%; max-height: 100%; object-fit: contain;
    border-radius: 6px; box-shadow: 0 0 10px 0px #00000057;
    user-select: none; cursor: zoom-in;
    transform-origin: center center;
    transition: box-shadow 0.2s;
  }
  .page-img:hover { box-shadow: 0 12px 50px rgba(0,0,0,0.6); }

  /* --- PAGE FLIP ANIMATIONS --- */
 .flip-out-left  { animation: flipOutL 0.25s ease-in forwards; }
  .flip-in-right  { animation: flipInR  0.25s ease-out forwards; }
  .flip-out-right { animation: flipOutR 0.25s ease-in forwards; }
  .flip-in-left   { animation: flipInL  0.25s ease-out forwards; }

  @keyframes flipOutL {
    0%   { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-50%); opacity: 0; }
  }
  @keyframes flipInR {
    0%   { transform: translateX(50%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }
  @keyframes flipOutR {
    0%   { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(50%); opacity: 0; }
  }
  @keyframes flipInL {
    0%   { transform: translateX(-50%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }

  /* --- PAGE INFO --- */
  .page-info {
    flex-shrink: 0; text-align: center; padding: 8px 0 12px;
    font-size: 0.85rem; color: #777; letter-spacing: 0.5px;
  }

  /* --- FULLSCREEN ZOOM --- */
  .fullscreen-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .fullscreen-close {
    position: absolute; top: 16px; right: 16px; width: 48px; height: 48px;
    background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; z-index: 10;
    transition: background 0.15s;
  }
  .fullscreen-close:hover { background: rgba(255,255,255,0.25); }
.fullscreen-img {
    max-width: 95%; max-height: 95%; object-fit: contain;
    cursor: grab; touch-action: none;
    transform-origin: center center;
    will-change: transform;
  }

  /* --- TOAST --- */
  .toast-katalog {
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: #333; color: #fff; padding: 10px 28px; border-radius: 50px;
    font-size: 0.88rem; z-index: 99999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s; white-space: nowrap;
  }
  .toast-katalog.show { opacity: 1; transform: translateX(-50%) translateY(0); }

}
