/* Downloads — ported from design_104/downloads.html (manual finder + cards).
   Self-contained: page-downloads.css doesn't load page-products.css, so it
   carries its own hero + breadcrumb rules (incl. the header-clearing padding). */
.page-hero { position: relative; padding: calc(72px + 2.5rem) 0 4rem; background: var(--gradient-hero, var(--bg)); border-bottom: 1px solid var(--border); overflow: hidden; }
.page-hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(38,149,124,0.4), transparent); }
.page-hero .container { position: relative; z-index: 2; }

.page-content { padding: 3.5rem 0 6rem; background: var(--bg); }

.dl-finder { margin-top: 0.5rem; }
.dl-finder-head h2 { font-size: 1.5rem; font-weight: 600; margin: 0 0 .4rem; }
.dl-finder-head p { color: var(--text-muted); font-size: .9rem; line-height: 1.5; max-width: 640px; margin: 0 0 1.25rem; }
.dl-search { position: relative; max-width: 560px; margin-bottom: 1rem; }
.dl-search-ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--text-muted); pointer-events: none; }
.dl-search input { width: 100%; box-sizing: border-box; padding: .95rem 2.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; color: #fff; font-size: .95rem; transition: border-color .18s ease, box-shadow .18s ease; }
.dl-search input::placeholder { color: rgba(255,255,255,.32); }
.dl-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(38,149,124,.18); }
.dl-search input[type=search]::-webkit-search-decoration, .dl-search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.dl-clear { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.dl-clear:hover { background: var(--primary); color: #fff; }
.dl-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.dl-chip { padding: .5rem 1.1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; color: rgba(255,255,255,.7); cursor: pointer; transition: all .18s ease; }
.dl-chip:hover { border-color: rgba(38,149,124,.45); color: #fff; }
.dl-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.dl-resultbar { margin: 1.75rem 0 1rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.dl-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.15rem 1.25rem; transition: border-color .18s ease, transform .18s ease; }
.dl-card:hover { border-color: rgba(38,149,124,0.45); transform: translateY(-2px); }
.dl-ico { flex: 0 0 auto; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(38,149,124,0.12); color: var(--primary-light); }
.dl-ico svg { width: 22px; height: 22px; }
.dl-body { flex: 1; min-width: 0; }
.dl-body h3 { font-size: 0.98rem; font-weight: 600; margin: 0 0 0.25rem; line-height: 1.3; }
.dl-cover { display: flex; align-items: flex-start; gap: .5rem; flex-wrap: wrap; font-size: .82rem; color: var(--text-muted); margin: 0 0 .8rem; line-height: 1.5; }
.dl-badge { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.dl-badge.all { color: var(--primary-light); background: rgba(38,149,124,.14); border: 1px solid rgba(38,149,124,.3); }
.dl-badge.sku { color: #ffb27a; background: rgba(255,90,0,.12); border: 1px solid rgba(255,90,0,.3); font-family: 'Courier New', monospace; }
.dl-meta { font-size: 0.7rem; color: rgba(255,255,255,0.4); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.8rem; }
.dl-btn { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; font-weight: 500; color: var(--primary-light); background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem 0.85rem; text-decoration: none; transition: all .18s ease; }
.dl-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.dl-card.is-match { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(38,149,124,.35); }
.dl-empty { margin-top: 1.25rem; padding: 1.1rem 1.3rem; border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; background: rgba(255,255,255,.02); color: var(--text-muted); font-size: .88rem; line-height: 1.55; }
.dl-empty .dl-reset { background: none; border: none; color: var(--primary-light); text-decoration: underline; cursor: pointer; font-size: inherit; padding: 0; }
@media (max-width: 600px) { .dl-grid { grid-template-columns: 1fr; } .page-hero { padding: calc(72px + 2.5rem) 0 2.5rem; } }

/* Download/View actions + Publuu-style PDF flipbook viewer */
.dl-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dl-view { cursor: pointer; font-family: inherit; }
.pdfv { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1.5rem; }
.pdfv.open { display: flex; }
.pdfv-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(4px); }
.pdfv-dialog { position: relative; width: min(980px, 100%); max-height: 94vh; display: flex; flex-direction: column; align-items: center; }
.pdfv-close { position: absolute; top: -2.6rem; right: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 2; }
.pdfv-close:hover { border-color: var(--primary); color: var(--primary); }
.pdfv-title { color: #fff; font-weight: 600; margin-bottom: 0.85rem; text-align: center; max-width: 90%; }
.pdfv-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; width: 100%; }
.pdfv-loading { color: rgba(255,255,255,0.7); padding: 3rem; font-size: 0.92rem; }
.pdfv-book { margin: 0 auto; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.pdfv-frame { width: 100%; height: 88vh; border: 0; border-radius: 8px; background: #fff; }
.pdfv-nav { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; }
.pdfv-nav button { background: var(--bg-card); border: 1px solid var(--border); color: #fff; border-radius: 8px; padding: 0.45rem 1.1rem; cursor: pointer; font-size: 1rem; line-height: 1; }
.pdfv-nav button:hover { border-color: var(--primary); color: var(--primary); }
.pdfv-page { color: rgba(255,255,255,0.6); font-size: 0.85rem; min-width: 72px; text-align: center; }
.dl-card { cursor: pointer; }
