:root {
  color-scheme: light;
  --red: #9d2634;
  --red-dark: #7e1e2a;
  --ink: #352e29;
  --muted: #615447;
  --paper: #e3d5bd;
  --surface: #eee3d0;
  --cover: #d8c7ad;
  --header: #dbcbb0;
  --footer: #ccbb9b;
  --line: #b9a68b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background-color: var(--paper); background-image: radial-gradient(#6b4c2710 .6px, transparent .6px); background-size: 4px 4px; color: var(--ink); font: 16px/1.65 Georgia, serif; }
button, input { font: inherit; }
button:disabled { cursor: default; opacity: .45; }
button, a, input { outline-offset: 5px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, .cover-wrap:focus-visible { outline: 3px solid var(--red); }
button { cursor: pointer; }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 27px max(6%, calc((100vw - 1160px)/2));
  background: var(--header); border-top: 3px solid var(--red); border-bottom: 1px solid var(--line);
}
.brand { color: var(--red); font: bold 45px/1 Georgia, serif; letter-spacing: -1.8px; }
.brand small { display: block; margin-top: 10px; color: var(--muted); font: 14px/1.4 Arial, sans-serif; letter-spacing: 5px; }
nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; font-weight: 600; }
nav a { padding: 12px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
nav a:hover { color: var(--red); border-color: var(--red); }
.main-nav { gap: 8px 20px; }
.main-nav a[aria-current="page"] { color: var(--red); border-color: var(--red); }
.catalog-types { gap: 10px; margin-bottom: 22px; font-size: 16px; }
.catalog-types a { min-height: 46px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.catalog-types a:hover { border-color: var(--red); }
.catalog-types a[aria-current="page"] { color: #fff; background: var(--red); border-color: var(--red); }
.collection-heading { margin: 0; font-size: clamp(34px, 4.8vw, 52px); }
.filters[hidden] { display: none; }
.edition-note { font-size: 14px; color: var(--muted); }
main { max-width: 1320px; margin: auto; padding: 0 6%; }
.intro {
  display: grid; grid-template-columns: 1.6fr 1fr; align-items: end; gap: 45px;
  margin: 32px 0 0; padding: 38px 0; background: transparent; color: var(--ink);
  border-radius: 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.eyebrow { font-size: 14px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: bold; color: var(--red); }
.intro .eyebrow { color: var(--red); }
h1 { font: 400 clamp(38px, 4.9vw, 65px)/1.08 Georgia, serif; letter-spacing: -1.5px; margin: 18px 0 0; }
h1 em { color: var(--red); font-weight: normal; }
.intro p { max-width: 360px; margin: 0; color: var(--muted); font-size: 17px; }
#catalogo, #loja { scroll-margin-top: 25px; }
.catalog-top { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin: 40px 0 22px; }
h2 { font: 400 34px/1.2 Georgia, serif; margin: 0; }
.search { width: 330px; display: flex; align-items: center; gap: 12px; padding: 11px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.search span { font-size: 25px; line-height: 1; color: var(--red); }
.search input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); }
.search input::placeholder { color: var(--muted); opacity: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.filter { min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: var(--surface); font-size: 14px; transition: border-color .2s, color .2s, background .2s; }
.filter:hover { border-color: var(--red); color: var(--red); }
.filter.active { background: var(--red); border-color: var(--red); color: #fff; }
.count { margin: 0 0 23px; font-size: 14px; color: var(--muted); }
.catalog-total { display: block; color: var(--red); font-size: 15px; margin-top: 9px; }
.ranking-note { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.ranking-note a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 40px 0 18px; }
.pagination[hidden] { display: none; }
.pagination button { min-height: 44px; padding: 10px 17px; border: 1px solid var(--red); border-radius: 3px; background: var(--surface); color: var(--red); }
.pagination button:not(:disabled):hover { background: var(--red); color: #fff; }
.pagination span { font-size: 14px; color: var(--muted); text-align: center; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
.book { display: flex; flex-direction: column; min-width: 0; position: relative; animation: card-in .45s both; animation-delay: calc(var(--order, 0)*20ms); }
.cover-wrap {
  height: 290px; padding: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--cover); border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; perspective: 800px; cursor: pointer; transition: border-color .3s, background .3s;
}
.book button.cover-wrap { width: 100%; height: 290px; margin: 0; padding: 20px; position: relative; border-color: var(--line); background: var(--cover); }
.book button.cover-wrap:hover { color: inherit; transform: none; }
.bestseller-badge { position: absolute; bottom: 9px; left: 9px; padding: 4px 8px; background: var(--red); color: #fff; font: 14px/1.4 Arial, sans-serif; border-radius: 2px; box-shadow: 0 1px 4px #0002; }
.bestseller-detail { color: var(--red) !important; font-size: 14px; }
.cover-wrap img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; box-shadow: 5px 8px 13px #29232928; transition: transform .4s; }
.book-info { display: flex; flex-direction: column; flex: 1; padding: 18px 1px 0; }
.number { display: none; }
.book .category { font-size: 14px; line-height: 1.45; letter-spacing: .5px; text-transform: uppercase; color: var(--red); font-weight: 600; }
.book h3 { margin: 9px 0 7px; font: 400 23px/1.2 Georgia, serif; overflow-wrap: anywhere; }
.author { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.book .desc { margin: 0 0 16px; font-size: 16px; line-height: 1.6; color: #544e53; }
.book .desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.price-block { display: flex; flex-direction: column; gap: 3px; margin: auto 0 14px; padding-top: 16px; }
.price-block span { color: var(--muted); font-size: 14px; }
.price-block strong { font: bold 27px/1.2 Georgia, serif; color: var(--red); }
.price-consult strong { font-size: 19px; }
.book button { min-height: 44px; width: 100%; margin-top: auto; padding: 10px 12px; background: var(--surface); border: 1px solid var(--red); border-radius: 3px; color: var(--red); font-size: 14px; font-weight: 600; transition: color .2s, background .2s, transform .2s; }
.book button:hover { background: var(--red); color: #fff; transform: translateY(-2px); }
.empty { padding: 40px 25px; text-align: center; grid-column: 1/-1; border: 1px solid var(--line); }
.note { margin: 32px 0 48px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.about { display: none; }
.store-section { display: grid; grid-template-columns: 1.2fr 1fr; margin: 20px 0 60px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.store-photo { display: block; width: 100%; height: 100%; min-height: 340px; object-fit: cover; transition: transform .6s; }
.store-copy { padding: 38px; align-self: center; }
.store-copy h2 { margin: 15px 0; font-size: 36px; color: var(--red); }
.store-copy p { color: var(--muted); }
.store-copy address { font-style: normal; font-size: 16px; line-height: 1.9; }
.contact-pair { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 24px 0 0; }
.whatsapp-link { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 66px; padding: 10px 11px; border: 1px solid var(--red); border-radius: 3px; color: var(--red); background: var(--paper); font: 14px/1.5 Arial, sans-serif; }
.whatsapp-link span { display: block; }
.whatsapp-link strong { font-weight: 600; white-space: nowrap; }
.whatsapp-link:hover { background: var(--red); color: #fff; }
.availability-note { font-size: 14px; }
.purchase-cta { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.purchase-cta h3 { margin: 0 0 12px; color: var(--red); font: bold 24px/1.35 Georgia, serif; }
.purchase-cta .contact-pair { grid-template-columns: 1fr; margin-top: 18px; }
.purchase-cta .whatsapp-link { align-items: center; min-height: 74px; text-align: center; background: var(--red); color: #fff; }
.purchase-cta .whatsapp-link:hover { background: var(--red-dark); }
.purchase-cta .whatsapp-link:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.map-link { display: inline-block; margin-top: 24px; padding: 12px 18px; background: var(--red); border-radius: 3px; color: #fff; font-size: 15px; transition: background .2s; }
.map-link:hover { background: var(--red-dark); }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 29px max(6%, calc((100vw - 1160px)/2)); background: var(--footer); color: var(--ink); border-top: 1px solid var(--line); font-size: 14px; }
dialog { width: min(580px, 92vw); max-height: 90dvh; overflow: auto; padding: 36px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #2b1019b8; }
#detail[open] { animation: dialog-in .25s ease; }
#detail h2 { margin: 18px 0 8px; }
#detail p { color: #544e53; }
#detail .note { margin: 20px 0; }
.detail-cover { display: block; height: 290px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto 25px; }
.source-link { display: inline-block; padding: 8px 0; text-decoration: underline; font-size: 14px; color: var(--red); }
.close { float: right; min-height: 44px; padding: 8px 14px; margin-bottom: 20px; border: 1px solid var(--red); border-radius: 3px; background: var(--surface); color: var(--red); }
.entry-active { overflow: hidden; }
.entry-modal { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: auto; }
.entry-modal::backdrop { background: transparent; }
.entry-inner { position: relative; isolation: isolate; min-height: 100%; display: grid; place-items: center; padding: 32px; overflow: hidden; }
.entry-door { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; pointer-events: none; transition: transform .8s cubic-bezier(.65, 0, .25, 1); }
.entry-door--left { left: 0; border-right: 1px solid #ffffff60; }
.entry-door--right { right: 0; }
.entry-door img { display: block; width: 100vw; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.entry-door--right img { margin-left: -50vw; }
.entry-door::after { content: ''; position: absolute; inset: 0; background: #3d101532; }
.entry-card { position: relative; z-index: 1; width: min(100%, 540px); padding: 48px 42px 36px; border: 1px solid #ffffffa0; border-top: 6px solid var(--red); border-radius: 3px; background: #fffffff5; color: var(--ink); box-shadow: 0 24px 80px #35101745; text-align: center; animation: dialog-in .5s ease both; transition: opacity .25s, transform .45s; }
.entry-card .eyebrow { display: block; font-size: 14px; letter-spacing: 2.5px; }
.entry-wordmark { margin: 21px 0 6px; font: bold clamp(3.5rem, 8vw, 6.4rem)/1.05 Georgia, serif; letter-spacing: -.055em; color: var(--red); }
.entry-label { display: block; color: var(--red); font-size: 14px; letter-spacing: 6px; }
.entry-message { margin: 27px 0 28px; color: #51494e; font-size: 17px; }
.entry-button { min-height: 52px; width: 100%; padding: 13px 20px; border: 1px solid var(--red); border-radius: 3px; background: var(--red); color: #fff; font-weight: 600; transition: background .2s, transform .2s; }
.entry-button:hover { background: var(--red-dark); transform: translateY(-2px); }
.entry-button:focus-visible { outline-color: var(--red-dark); }
.entry-location { margin: 21px 0 0; font-size: 14px; color: var(--muted); }
.entry-modal.is-opening .entry-door--left { transform: translateX(-100%); }
.entry-modal.is-opening .entry-door--right { transform: translateX(100%); }
.entry-modal.is-opening .entry-card { opacity: 0; transform: translateY(-8px) scale(.96); pointer-events: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) {
  .book:hover .cover-wrap { border-color: var(--red); background: #d2bea0; }
  .book:hover .cover-wrap img { transform: rotateY(-12deg) rotateZ(-2deg) translateY(-8px) scale(1.04); }
  .store-section:hover .store-photo { transform: scale(1.025); }
}
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cover-wrap { height: 260px; }
  .book button.cover-wrap { height: 260px; }
  .store-section { grid-template-columns: 1fr; }
  .intro { gap: 28px; padding: 36px; }
}
@media (max-width: 750px) {
  header { padding: 22px 6%; gap: 20px; }
  .brand { font-size: 38px; }
  nav { gap: 16px; }
  .intro { grid-template-columns: 1fr; gap: 23px; padding: 30px; }
  .intro p { max-width: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
  .cover-wrap { height: 250px; padding: 17px; }
  .book button.cover-wrap { height: 250px; padding: 17px; }
  .book h3 { font-size: 22px; }
  .store-section { grid-template-columns: 1fr; }
  .store-photo { min-height: 0; height: auto; }
  .store-copy { padding: 30px; }
  footer { flex-direction: column; gap: 6px; }
}
@media (max-width: 580px) {
  header { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .brand { font-size: 38px; }
  .brand small { font-size: 14px; letter-spacing: 3px; }
  nav { gap: 18px; }
  .intro { margin-top: 22px; padding: 27px 24px; }
  h1 { font-size: clamp(34px, 8.5vw, 45px); letter-spacing: -1px; }
  .catalog-top { display: block; margin-top: 32px; }
  .search { width: 100%; margin-top: 19px; }
  .cover-wrap { height: 220px; padding: 12px; }
  .book button.cover-wrap { height: 220px; padding: 12px; }
  .store-copy { padding: 22px 16px; }
  .whatsapp-link { padding: 10px 7px; font-size: 14px; }
  .whatsapp-link strong { white-space: normal; }
  .book h3 { font-size: 21px; }
  .book .category { font-size: 14px; letter-spacing: 0; text-transform: none; }
  .price-block strong { font-size: 25px; }
  .entry-inner { padding: 22px; }
  .entry-card { padding: 35px 24px 28px; }
  .entry-message { margin: 24px 0; }
  #detail { padding: 25px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .cover-wrap { height: 290px; padding: 20px; }
  .book button.cover-wrap { height: 290px; padding: 20px; }
  .entry-inner { padding: 16px; }
  .entry-wordmark { font-size: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .book:hover .cover-wrap img, .store-section:hover .store-photo, .book button:hover, .entry-button:hover { transform: none; }
}
