/* Pleno Móveis — página provisória do catálogo */
:root {
  --night: #1d2420;
  --night-2: #283029;
  --on-night: #ece8df;
  --on-night-2: #b9b6ad;
  --green: #3c5a46;
  --sage: #6b8669;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 18px; line-height: 1.5; color: var(--on-night); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }

.aviso { flex: none; background: var(--green); color: #fff; text-align: center; padding: 14px var(--gutter); }
.aviso p { margin: 0; font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.45rem); line-height: 1.3; }

/* Catálogo folheável */
body { height: 100vh; height: 100dvh; min-height: 620px; display: flex; flex-direction: column; background: var(--night); }

.viewer { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--night); color: var(--on-night); }
.viewer:fullscreen { height: 100vh; }

.vbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gutter); background: var(--night-2); border-bottom: 1px solid rgba(236,232,223,.1);
}
.vbar__group { display: flex; align-items: center; gap: 6px; }
.vbar__count { min-width: 150px; text-align: center; font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.vbtn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border: 1.5px solid rgba(236,232,223,.22); border-radius: var(--radius); background: transparent;
  color: var(--on-night); font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none;
}
.vbtn:hover { background: rgba(236,232,223,.1); border-color: rgba(236,232,223,.5); }
.vbtn:disabled { opacity: .35; cursor: default; background: transparent; }
.vbtn svg { width: 20px; height: 20px; }
.vbtn[aria-expanded="true"] { background: var(--on-night); color: var(--night); }
.vbtn--icon { padding: 0; width: 48px; justify-content: center; font-size: 1.5rem; }

.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.book-wrap { position: absolute; inset: 28px var(--gutter) 44px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .5s; }
#book { width: 100%; }
.book-wrap.ready { opacity: 1; }
#book .page { background: #fff; }
#book .page img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
#book .page:not(.loaded) { background: #f1efea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='14' fill='none' stroke='%23c9c3b8' stroke-width='3' stroke-dasharray='60 30'/%3E%3C/svg%3E") center no-repeat; }
.stf__parent { margin-inline: auto; }

.hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: .95rem; color: var(--on-night-2); transition: opacity .6s; }
.hint.gone { opacity: 0; }

.loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 16px; text-align: center; color: var(--on-night-2); }
.loading.done { display: none; }
.loading__bar { width: min(320px, 70vw); height: 4px; background: rgba(236,232,223,.15); border-radius: 4px; overflow: hidden; }
.loading__bar span { display: block; height: 100%; width: 0; background: #a9bfa6; transition: width .3s; }
.loading a { color: var(--on-night); }

.thumbs {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(360px, 92vw); z-index: 5;
  background: var(--night-2); border-right: 1px solid rgba(236,232,223,.12);
  display: flex; flex-direction: column; box-shadow: 20px 0 40px -20px rgba(0,0,0,.5);
}
.thumbs[hidden] { display: none; }
.thumbs__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(236,232,223,.12); }
.thumbs__grid { overflow-y: auto; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.thumb { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; color: var(--on-night-2); font-size: .9rem; display: grid; gap: 6px; border-radius: var(--radius); }
.thumb img, .thumb .ph { width: 100%; aspect-ratio: var(--ratio, 0.707); object-fit: cover; background: #3a423b; border-radius: 2px; }
.thumb:hover { color: var(--on-night); }
.thumb.current { border-color: #a9bfa6; color: var(--on-night); }

.zoom { position: fixed; inset: 0; z-index: 95; background: #101411; display: flex; flex-direction: column; }
.zoom[hidden] { display: none; }
.zoom__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px var(--gutter); border-bottom: 1px solid rgba(236,232,223,.12); color: var(--on-night); font-weight: 600; }
.zoom__bar > div { display: flex; gap: 6px; }
.zoom__bar .vbtn { font-size: 1.3rem; }
.zoom__bar #zoom-close { font-size: 1rem; }
.zoom__scroll { flex: 1; overflow: auto; padding: 24px; cursor: grab; }
.zoom__scroll img { margin-inline: auto; width: var(--zw, 100%); max-width: none; background: #fff; }

@media (max-width: 760px) {
  .vbtn span { display: none; }
  .vbtn { padding: 0 12px; }
  .vbar__count { min-width: 110px; font-size: .98rem; }
  .vbar { justify-content: center; }
  .book-wrap { inset: 16px 8px 40px; }
}
