@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-light: #2563eb22;
  --primary-cc: #2563ebcc;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-cc) 100%);
  color: white;
  text-align: center;
  padding: 2.5rem 2rem 2rem;
}
.cover h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.3rem; text-transform: uppercase; }
.cover .subtitle { font-size: 1rem; font-weight: 300; opacity: 0.9; margin-bottom: 1rem; }
.cover .company { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.3); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 2rem; }
.cover .company-name { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.1em; }
.cover .company-tagline { display: none; }
.cover .company-info { font-size: 0.75rem; opacity: 0.6; }
.cover .count-badge { display: inline-block; background: rgba(255,255,255,0.2); padding: 0.35rem 1.2rem; border-radius: 2rem; font-size: 0.9rem; font-weight: 500; margin-top: 0.5rem; }

.breadcrumb {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}
.breadcrumb-current {
  font-weight: 500;
  color: var(--text);
}

.toc { max-width: 800px; margin: 0 auto; padding: 2rem 2rem 1.5rem; page-break-after: always; }
.toc h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--primary); border-bottom: 3px solid var(--primary); padding-bottom: 0.5rem; }

.toc-item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.75rem 0; border-bottom: 1px dashed var(--border); font-size: 1.1rem;
}
.toc-item a {
  display: flex; justify-content: space-between; align-items: baseline; width: 100%;
  text-decoration: none; color: inherit; padding: 0.5rem 0.75rem; margin: -0.5rem -0.75rem;
  border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.toc-item a:hover { background: var(--primary-light); color: var(--primary); }
.toc-item .toc-name { font-weight: 500; }
.toc-item .toc-count { color: var(--text-muted); font-size: 0.9rem; }

.toc-subitem {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.4rem 0; padding-left: 2rem; border-bottom: 1px dotted var(--border); font-size: 0.95rem;
}
.toc-subitem a {
  display: flex; justify-content: space-between; align-items: baseline; width: 100%;
  text-decoration: none; color: inherit; padding: 0.35rem 0.75rem; margin: -0.35rem -0.75rem;
  border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.toc-subitem a:hover { background: var(--primary-light); color: var(--primary); }
.toc-subitem .toc-name { font-weight: 400; }
.toc-subitem .toc-count { color: var(--text-muted); font-size: 0.85rem; }

.sticky-nav {
  position: sticky; top: 0; z-index: 100; background: var(--card-bg);
  border-bottom: 1px solid var(--border); padding: 0.75rem 2rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sticky-nav a {
  display: inline-block; padding: 0.35rem 0.85rem; border-radius: 6px;
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
  color: var(--text); background: #f3f4f6; transition: background 0.15s, color 0.15s;
}
.sticky-nav a:hover { background: var(--primary); color: white; }
.sticky-nav .catalog-search-box {
  margin-left: auto;
  position: relative;
}
.sticky-nav .catalog-search-box input {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-family: inherit;
  width: 180px;
  outline: none;
  transition: border-color 0.15s, width 0.2s;
}
.sticky-nav .catalog-search-box input:focus {
  border-color: var(--primary);
  width: 240px;
}

.section-header {
  background: var(--primary); color: white; padding: 2rem 3rem;
  margin: 2rem 0 1.5rem 0; page-break-before: always; scroll-margin-top: 60px;
}
.section-header h2 { font-size: 2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.section-header .section-count { font-size: 0.9rem; opacity: 0.8; margin-top: 0.25rem; }

.subsection-header {
  border-left: 4px solid var(--primary); background: var(--primary-light);
  padding: 1rem 2rem; margin: 1.5rem 2rem 1rem 2rem;
  max-width: 1200px; margin-left: auto; margin-right: auto;
  border-radius: 0 8px 8px 0; scroll-margin-top: 60px;
}
.subsection-header h3 { font-size: 1.3rem; font-weight: 600; color: var(--primary); }
.subsection-header .subsection-count { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }

.items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem; padding: 1.5rem 2rem; max-width: 1200px; margin: 0 auto;
}

.item-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: box-shadow 0.2s; page-break-inside: avoid;
}
.item-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.item-card.hidden { display: none; }

.item-photo {
  width: 100%; height: 200px; background: #f3f4f6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #9ca3af; border-bottom: 1px solid var(--border); position: relative;
}
.item-photo img { cursor: pointer; }
.item-photo svg { width: 48px; height: 48px; stroke: #d1d5db; fill: none; stroke-width: 1.5; margin-bottom: 0.5rem; }
.item-photo span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }

.item-code {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: var(--primary); color: white; padding: 0.2rem 0.6rem;
  border-radius: 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em;
}

.item-info { padding: 1rem 1.25rem; }
.item-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; color: var(--text); }
.item-meta { font-size: 0.8rem; color: var(--text-muted); }

.footer {
  text-align: center; padding: 3rem 2rem; color: var(--text-muted);
  font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 3rem;
}
.footer .company-name { font-weight: 700; color: var(--text); font-size: 1rem; }

.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 200;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: white; border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #1a1a2e; }
.back-to-top svg { width: 24px; height: 24px; fill: none; stroke: white; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.hamburger {
  position: fixed; top: 1rem; right: 1rem; z-index: 300;
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(26,26,46,0.85); backdrop-filter: blur(8px);
  color: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
}
.hamburger:hover { background: var(--primary); transform: scale(1.05); }
.hamburger svg { width: 22px; height: 22px; fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; }

.catalog-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.catalog-overlay.open { opacity: 1; visibility: visible; }

.catalog-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 500;
  width: 300px; max-width: 85vw; background: #1a1a2e;
  color: white; transform: translateX(100%);
  transition: transform 0.3s ease; overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}
.catalog-sidebar.open { transform: translateX(0); }

.catalog-sidebar .sidebar-header {
  padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
}
.catalog-sidebar .sidebar-header h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; }
.catalog-sidebar .close-btn {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: rgba(255,255,255,0.1); color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: background 0.15s;
}
.catalog-sidebar .close-btn:hover { background: rgba(255,255,255,0.2); }

.catalog-sidebar a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.5rem; color: rgba(255,255,255,0.8);
  text-decoration: none; font-size: 0.9rem; font-weight: 400;
  border-right: 3px solid transparent; transition: all 0.15s;
}
.catalog-sidebar a:hover { background: rgba(255,255,255,0.06); color: white; border-right-color: rgba(255,255,255,0.3); }
.catalog-sidebar a.active { background: rgba(255,255,255,0.1); color: white; font-weight: 600; border-right-color: var(--primary); }
.catalog-sidebar a .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.catalog-sidebar a .cat-count { margin-left: auto; font-size: 0.75rem; opacity: 0.5; }

.catalog-sidebar .sidebar-home {
  margin: 0.5rem 1rem; padding: 0.7rem 1rem; border-radius: 8px;
  background: rgba(255,255,255,0.06); text-align: center;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  border-left: none;
}
.catalog-sidebar .sidebar-home:hover { background: rgba(255,255,255,0.12); color: white; border-left: none; }

.no-results {
  text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.95rem;
}

/* Language switcher */
.lang-switcher {
  position: fixed;
  top: 1rem;
  right: 4rem;
  z-index: 300;
  display: flex;
  gap: 0.25rem;
  background: rgba(26,26,46,0.85);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 0.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.lang-btn {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  color: rgba(255,255,255,0.6);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.lang-btn:hover { color: white; background: rgba(255,255,255,0.1); }
.lang-active {
  background: rgba(255,255,255,0.15);
  color: white;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }

.lightbox-content {
  position: fixed; inset: 0; z-index: 700;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
}
.lightbox-overlay.open .lightbox-content { pointer-events: auto; }

.lightbox-close {
  position: fixed; top: 1rem; right: 1rem; z-index: 710;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: white;
  border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-img {
  max-width: 90vw; max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  background: white;
}

.lightbox-info {
  margin-top: 1rem;
  text-align: center;
}
.lightbox-name {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

.lightbox-actions {
  margin-top: 1rem;
  display: flex; gap: 0.75rem;
}
.lightbox-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.lightbox-download {
  background: white; color: #1a1a2e;
  border: none;
}
.lightbox-download:hover { background: #e5e7eb; }
.lightbox-share {
  background: rgba(255,255,255,0.15); color: white;
  border: 1px solid rgba(255,255,255,0.25);
}
.lightbox-share:hover { background: rgba(255,255,255,0.25); }

@media print {
  .cover { page-break-after: always; }
  .section-header { page-break-before: always; }
  .item-card { break-inside: avoid; }
  .items-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .back-to-top, .hamburger, .catalog-overlay, .catalog-sidebar, .breadcrumb, .catalog-search-box, .lightbox-overlay, .lang-switcher { display: none; }
}
