/* Poeira de Letras — identidade editorial vintage: espresso, vinho, marfim e dourado discreto. */
:root {
  --paper: #f4eee4;
  --paper-2: #e7d9c5;
  --ink: #251b17;
  --muted: #6b5a50;
  --green: #2a1b18;
  --green-2: #563027;
  --wood: #6a382b;
  --gold: #b88a4a;
  --line: #cdbba4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.6;
  background-image: radial-gradient(rgba(91,58,36,.05) 1px, transparent 1px); background-size: 6px 6px;
}
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--wood); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; color: var(--green); margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); }
h2::after { content: ""; display: block; width: 3.5rem; height: 2px; background: var(--gold); margin-top: .35em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }

/* Cabeçalho e menu */
.site-header { background: var(--green); border-bottom: 3px solid var(--gold); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { font-size: 1.6rem; font-weight: 700; color: var(--paper); text-decoration: none; letter-spacing: .02em; font-variant: small-caps; }
.brand:hover { color: #fff; }
.brand-logo { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 1.2; font-size: 1.6rem; }
.brand-logo { white-space: nowrap; min-width: 0; }
.brand-name { display: inline-block; }
.main-nav { display: flex; align-items: center; gap: 1.25rem; }
.header-controls { display: flex; align-items: center; gap: .5rem; }
.header-controls .lang-switch { color: var(--paper); text-decoration: none; white-space: nowrap; }
.main-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: var(--paper); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
.lang-switch { border: 1px solid var(--gold); padding: .2rem .7rem !important; border-radius: 3px; }
.menu-toggle { display: none; background: transparent; color: var(--paper); border: 1px solid var(--gold); border-radius: 3px; padding: .45rem .9rem; font: inherit; cursor: pointer; }
@media (max-width: 52rem) {
  .brand { font-size: clamp(.62rem, 2.8vw, .95rem); letter-spacing: .015em; }
  .header-row { gap: .45rem; }
  .header-controls { gap: .3rem; }
  .menu-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding-bottom: .5rem; }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: .25rem; width: 100%; }
  .main-nav a { display: inline-block; padding: .6rem 0; }
}

/* Destaque */
.hero { margin: 1.5rem 0; padding: clamp(2rem, 8vw, 4.5rem) 1.5rem; text-align: center; color: var(--paper);
  background: linear-gradient(rgba(20,38,28,.80), rgba(20,38,28,.88)), var(--green);
  border: 2px solid var(--gold); outline: 1px solid var(--gold); outline-offset: -8px; border-radius: 4px; }
/* Ilustração vintage local: livros antigos, papel e luz quente. */
.hero {
  background-color: var(--green);
  background-image: linear-gradient(rgba(22,13,11,.48), rgba(22,13,11,.76)), url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=2200&q=90");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero h1 { text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.hero p { text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.brand { letter-spacing: .045em; }
.card a { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card a:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .card a { transition: none; }
  .card a:hover { transform: none; }
}
.hero h1 { color: var(--paper); font-size: clamp(2.2rem, 8vw, 3.8rem); font-variant: small-caps; letter-spacing: .03em; margin-bottom: .3em; }
.hero p { max-width: 38rem; margin: 0 auto; font-size: 1.2rem; }

/* Formulários */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem 1rem; padding: 1rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field-wide { grid-column: 1 / -1; }
label { font-size: .95rem; color: var(--muted); font-weight: 700; }
input, select { font: inherit; padding: .6rem .7rem; border: 1px solid var(--wood); border-radius: 3px; background: #fffaf0; color: var(--ink); min-height: 2.75rem; }
.actions { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; grid-column: 1 / -1; }
.btn { display: inline-block; font: inherit; font-weight: 700; padding: .65rem 1.3rem; background: var(--green); color: var(--paper); border: 2px solid var(--green); border-radius: 3px; text-decoration: none; cursor: pointer; min-height: 2.75rem; }
.btn:hover { background: var(--green-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--paper-2); color: var(--green); }

/* Catálogo */
.results-count { color: var(--muted); margin: 1.2rem 0 .8rem; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1.25rem; }
.card a { display: block; color: inherit; text-decoration: none; height: 100%; padding: .6rem; background: #fffaf0; border: 1px solid var(--line); border-radius: 4px; }
.card a:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(42,32,24,.15); }
.card h3 { font-size: 1.05rem; margin: .6rem 0 .15rem; }
.card-img { position: relative; aspect-ratio: 3 / 4; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; border-radius: 2px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.no-photo { color: var(--muted); font-size: .9rem; }
.card-author, .card-meta { margin: 0; color: var(--muted); font-size: .95rem; }
.price { margin: .4rem 0 0; font-weight: 700; color: var(--wood); font-size: 1.15rem; }
.price-big { font-size: 1.6rem; }
.ship { font-weight: 400; font-size: .85rem; color: var(--muted); }
.badge { position: absolute; top: .4rem; left: .4rem; background: var(--wood); color: var(--paper); padding: .1rem .6rem; font-size: .85rem; border-radius: 2px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 1.5rem 0; }
.empty { padding: 2rem 1rem; text-align: center; background: var(--paper-2); border: 1px dashed var(--line); }

/* Ficha do livro */
.crumbs { margin: 1rem 0; }
.book { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 52rem) { .book { grid-template-columns: 1fr 1fr; } }
.gallery { display: grid; gap: .75rem; align-content: start; }
.gallery img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--paper-2); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 1rem 0; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.notice { padding: .8rem 1rem; background: var(--paper-2); border-left: 4px solid var(--gold); margin: 1rem 0; }
.notice-sold { border-left-color: var(--wood); font-weight: 700; }

/* Páginas e secções */
.page { max-width: 46rem; padding: 1.5rem 0 2.5rem; }
.steps li { margin-bottom: .6rem; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.lots { margin: 3rem 0; padding: 1.5rem; background: var(--paper-2); border: 1px solid var(--gold); border-radius: 4px; text-align: center; }
.lots h2::after { margin-inline: auto; }

/* Rodapé */
.site-footer { background: var(--wood); color: var(--paper); margin-top: 3rem; padding: 2rem 0 1rem; border-top: 3px solid var(--gold); }
.site-footer a { color: var(--paper); }
.site-footer h2 { color: var(--paper); font-size: 1.1rem; }
.site-footer h2::after { background: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; }
.copyright { margin-top: 1.5rem; font-size: .9rem; opacity: .85; }

/* Formulários de conta */
.form-page { max-width: 38rem; }
.form { display: grid; gap: 1rem; margin: 1rem 0; }
.hint { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.field-error { margin: .2rem 0 0; color: #8a1c1c; font-weight: 700; font-size: .95rem; }
input[aria-invalid="true"] { border-color: #8a1c1c; border-width: 2px; }
.form-error { padding: .8rem 1rem; background: #f6dcdc; border-left: 4px solid #8a1c1c; color: #5a1010; font-weight: 700; }
.msg-ok { padding: .8rem 1rem; background: #e2edd8; border-left: 4px solid var(--green-2); }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 3.2rem; }
.pw-toggle { position: absolute; right: 0; top: 0; bottom: 0; width: 3rem; background: transparent; border: 0; color: var(--wood); cursor: pointer; display: grid; place-items: center; }
.pw-toggle[aria-pressed="true"] { color: var(--green); }
.account-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0; margin: 0 0 1.5rem; align-items: center; }
.account-nav a[aria-current="page"] { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--gold); }
.account-nav form { margin: 0; }
.order { padding: 1rem; margin: 1rem 0; background: #fffaf0; border: 1px solid var(--line); border-radius: 4px; }
.order h2 { font-size: 1.2rem; }
.order h2::after { display: none; }
.muted { color: var(--muted); }
.account-link { border-bottom: 2px solid transparent; }

/* Carrinho */
.cart-link { display: inline-flex; align-items: center; gap: .4rem; }
.cart-btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--green); color: var(--paper); border: 2px solid var(--green); border-radius: 3px; padding: .5rem .9rem; font: inherit; font-weight: 700; cursor: pointer; min-height: 2.75rem; }
.cart-btn:hover { background: var(--green-2); }
.card .cart-form { margin-top: .5rem; }
.card .cart-btn { width: 100%; justify-content: center; padding: .4rem .6rem; font-size: .95rem; }
.cart-form-big { margin: 1rem 0; }
.cart-list { list-style: none; padding: 0; margin: 1rem 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item form { margin: 0; }
.cart-total { font-size: 1.3rem; font-weight: 700; color: var(--wood); margin: 1rem 0; }
.wa-btn { display: inline-block; background: #6a382b; color: #fff; padding: .8rem 1.4rem; border-radius: 3px; font-weight: 700; text-decoration: none; margin: 1rem 0; }
.wa-btn:hover { background: #51291f; color: #fff; }

/* Administração */
textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--wood); border-radius: 3px; background: #fffaf0; color: var(--ink); width: 100%; }
.admin-page { max-width: 72rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fffaf0; }
.table th, .table td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--paper-2); }
.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.stats a { display: block; padding: 1rem; background: #fffaf0; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.stats strong { display: block; font-size: 2rem; color: var(--green); }
.photo-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.photo-item { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: .8rem; background: #fffaf0; border: 1px solid var(--line); border-radius: 4px; }
.photo-item img { width: 120px; height: auto; border: 1px solid var(--line); }
.inline-form { display: inline-block; margin: 0 .5rem .5rem 0; }
.field-check label { display: flex; align-items: center; gap: .5rem; font-weight: 400; color: var(--ink); }
.field-check input { min-height: auto; width: 1.2rem; height: 1.2rem; }
.cat-list { list-style: none; padding: 0; }

/* Como funcionam as encomendas */
.orders-intro { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 1.5rem; padding: 1rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; }
.orders-intro p { margin: 0; }
.orders-icon { display: grid; place-items: center; flex: 0 0 4rem; width: 4rem; height: 4rem; border-radius: 50%; background: #e1d0bb; font-size: 2rem; }
.orders-section { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.orders-section h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); margin-bottom: .7rem; }
.orders-section h2::after { display: none; }
.orders-section h3 { font-size: 1.08rem; margin: 0 0 .2rem; color: var(--ink); }
.orders-section p { margin: .35rem 0 .8rem; }
.orders-section ul { margin-bottom: 0; }
.orders-detail { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .7rem; align-items: start; margin: 1rem 0; }
.orders-detail p { margin: 0; }
.orders-symbol { font-size: 1.7rem; line-height: 1.3; text-align: center; }
.orders-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.orders-bottom .orders-section { border-bottom: 0; }
.orders-quote { margin: 1.5rem 0 0; padding: 1rem; text-align: center; color: var(--green); font-style: italic; border-top: 1px solid var(--line); }
@media (max-width: 38rem) {
  .orders-intro { align-items: flex-start; }
  .orders-icon { flex-basis: 3rem; width: 3rem; height: 3rem; font-size: 1.5rem; }
  .orders-bottom { grid-template-columns: 1fr; gap: 0; }
}

/* Hierarquia visual da página de apresentação */
.page .about-heading { margin: 1.35rem 0 .65rem; font-size: clamp(1.35rem, 3.5vw, 1.8rem); }
.page .about-heading::after { content: ""; display: block; width: 3rem; height: 2px; background: var(--gold); margin-top: .35em; }
.page .about-quote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--gold); background: var(--paper-2); color: var(--green); font-style: italic; }
.page .about-quote p { margin: 0; }
.page p strong { color: var(--green); }

/* Acesso discreto à administração junto ao copyright */
.site-footer .copyright { display: flex; align-items: center; gap: .45rem; }
.site-footer .admin-access {
  display: inline-block;
  color: inherit;
  opacity: .42;
  font-size: .82rem;
  line-height: 1;
  text-decoration: none;
  padding: .1rem .2rem;
  border-radius: 2px;
}
.site-footer .admin-access:hover,
.site-footer .admin-access:focus-visible { opacity: 1; color: var(--gold); }


/* Redesign editorial — alinhado com a pré-visualização vintage */
.site-header { background: #2b120d; border-bottom: 2px solid #b88a4a; }
.header-row { min-height: 5.4rem; padding-block: .8rem; }
.brand { color: #f6e8d0; letter-spacing: .09em; font-size: clamp(1.05rem, 2vw, 1.55rem); }
.main-nav { gap: 1.35rem; }
.main-nav ul { gap: clamp(.65rem, 2vw, 1.8rem); }
.main-nav a, .header-controls .lang-switch { color: #f6e8d0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: #c18c4d; }
body { background-color: #f4ead8; background-image: radial-gradient(rgba(91,58,36,.055) .7px, transparent .7px); background-size: 5px 5px; }
main.wrap { width: 100%; max-width: none; margin: 0; padding: 0; }
.hero {
  position: relative; display: flex; align-items: center; min-height: clamp(27rem, 44vw, 34rem);
  margin: 0; padding: clamp(2.5rem, 7.2vw, 6rem) max(7.2%, calc((100% - 72rem)/2));
  text-align: left; border: 0; outline: 0; border-radius: 0; overflow: hidden;
  background-color: #24110c;
  background-image: linear-gradient(90deg, rgba(22,10,7,.82) 0%, rgba(22,10,7,.57) 43%, rgba(22,10,7,.12) 100%), linear-gradient(0deg, rgba(22,10,7,.22), transparent 55%), url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=2200&q=90");
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.hero-copy { width: min(38rem, 100%); position: relative; z-index: 1; }
.hero .hero-ornament { display: block; color: #e5c18c; letter-spacing: .18em; margin-bottom: .65rem; }
.hero h1 { color: #fff4e3; font-size: clamp(2.4rem, 5vw, 3.8rem); font-variant: normal; letter-spacing: -.015em; line-height: 1.12; max-width: 37rem; margin-bottom: 1rem; text-shadow: 0 2px 15px #160a07; }
.hero p { margin: 0 0 1.6rem; font-size: clamp(1.05rem, 2vw, 1.35rem); color: #fff1df; text-shadow: 0 2px 9px #160a07; }
.hero .hero-button { background: transparent; color: #f8e6c8; border: 1px solid #c18c4d; font-size: 1rem; font-weight: 400; padding: .75rem 1.5rem; }
.hero .hero-button:hover { background: rgba(40,18,12,.75); color: white; }
.hero-button span { padding-left: .55rem; }
.gallery-empty { min-height: 27rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.5rem 3.5rem; color: #573323; position: relative; overflow: hidden; }
.gallery-empty::before, .gallery-empty::after { content: "❧"; position: absolute; color: rgba(153,111,63,.22); font-size: 8rem; font-family: Georgia, serif; pointer-events: none; }
.gallery-empty::before { right: -1rem; top: -.6rem; transform: rotate(-35deg); }
.gallery-empty::after { left: -.5rem; bottom: -.7rem; transform: rotate(145deg); }
.section-ornament { color: #93643c; letter-spacing: .18em; margin-bottom: .65rem; }
.gallery-empty h2 { color: #351a12; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 400; margin-bottom: 1rem; }
.gallery-empty h2::after { display: none; }
.gallery-lead { font-size: 1.2rem; margin: 0 0 1.2rem; }
.camera-mark { display: block; color: #8b5c36; font-size: 3rem; line-height: 1; margin: .4rem 0 1.2rem; }
.gallery-note { max-width: 23rem; margin: 0; font-size: 1rem; color: #75543e; }
.catalog-section, .lots, .page { width: min(72rem, 100% - 2rem); margin: 2.5rem auto; }
.site-footer { background: #2b120d; color: #f3e3cd; border-top: 2px solid #b88a4a; padding-top: 2.2rem; }
.site-footer h2 { color: #f3e3cd; }
.site-footer a { color: #f3e3cd; }
.site-footer .copyright { border-top: 1px solid rgba(193,140,77,.4); padding-top: 1rem; padding-bottom: 1rem; color: #d9c4a9; }
@media (max-width: 52rem) {
  .hero { min-height: 29rem; padding: 3.25rem 1.5rem; background-position: 58% center; }
  .hero h1 { font-size: clamp(2.25rem, 10vw, 3.25rem); }
  .gallery-empty { min-height: 24rem; }
}


/* Cinzel em toda a interface. */
*, *::before, *::after { font-family: "Cinzel", serif !important; }


/* Pesquisa rápida do catálogo */
.catalog-search {
  max-width: 52rem;
  margin: 1.5rem auto 2rem;
  padding: 1rem 1.2rem;
  background: var(--paper-2);
  border: 1px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(42,32,24,.08);
}
.catalog-search label { display: block; margin-bottom: .4rem; }
.catalog-search-row { display: flex; gap: .6rem; }
.catalog-search-row input { flex: 1; min-width: 0; }
.catalog-search-row .btn { white-space: nowrap; }
@media (max-width: 34rem) {
  .catalog-search-row { flex-direction: column; }
  .catalog-search-row .btn { width: 100%; }
}


.catalog-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1rem;
  margin-top: 1rem;
}
.catalog-filters .field { min-width: 0; }
.catalog-filters input, .catalog-filters select { width: 100%; min-width: 0; }
.catalog-filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1rem; }
@media (max-width: 34rem) {
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-filter-actions { flex-direction: column; align-items: stretch; }
  .catalog-filter-actions .btn { width: 100%; text-align: center; }
}

/* Pré-visualização das fotografias no formulário de administração */
#a-book-photo-preview { display: flex; flex-wrap: wrap; gap: .75rem; }
#a-book-photo-preview .photo-preview-item { width: min(9rem, 42%); margin: 0; }
#a-book-photo-preview img { display: block; width: 100%; height: 9rem; object-fit: contain; background: #fffaf1; border: 1px solid #b88a4a; border-radius: 4px; }
#a-book-photo-preview p { margin: .35rem 0 0; font-size: .78rem; overflow-wrap: anywhere; }


/* Correcao: os cartoes do catalogo devem ocupar apenas a altura do seu conteudo.
   O botao do carrinho fica no fluxo normal e nunca sobrepoe a secao seguinte. */
.grid {
  align-items: stretch;
}
.card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: auto;
  position: relative;
}
.card > a {
  display: block;
  flex: 1 0 auto;
  height: auto;
  min-width: 0;
}
.card .cart-form {
  position: static;
  flex: 0 0 auto;
  width: auto;
  margin: .5rem 0 0;
  padding: 0;
}
.card .cart-btn {
  display: flex;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.lots {
  position: relative;
  clear: both;
  isolation: isolate;
}


/* Instalação da aplicação: ícone de telemóvel com seta, sem texto visível. */
.pwa-install { display: inline-grid; place-items: center; width: 2.75rem; min-width: 2.75rem; height: 2.75rem; padding: .35rem; }
.pwa-install svg { display: block; width: 1.45rem; height: 1.45rem; }
.pwa-install[hidden] { display: none !important; }


/* Cabeçalho móvel: menu à esquerda; idioma e instalação à direita. */
@media (max-width: 52rem) {
  .header-row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    flex-wrap: nowrap;
  }
  .header-row > .menu-toggle {
    display: inline-grid;
    place-items: center;
    grid-column: 1;
    grid-row: 1;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: .35rem .55rem;
    font-size: 1.35rem;
    line-height: 1;
  }
  .header-row > .brand-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .header-row > .header-controls {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    gap: .35rem;
  }
  .header-row > .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  .header-controls .lang-switch {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: .2rem !important;
  }
  .pwa-install {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
  }
}




/* Notificações: controlos destacados e estados imediatamente reconhecíveis */
.push-settings { margin-top: 1.25rem; padding: 1.15rem; border: 1px solid var(--gold); border-left: 5px solid var(--gold); border-radius: 8px; background: rgba(255,255,255,.48); }
.push-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin:.9rem 0; }
.push-actions .btn { display:inline-flex; align-items:center; justify-content:center; gap:.65rem; min-height:3.25rem; padding:.75rem 1.15rem; font-weight:700; font-size:1rem; box-shadow:0 2px 7px rgba(37,27,23,.14); }
.push-actions .push-enable { background:#6a382b; color:#fff; border:2px solid var(--gold); }
.push-actions .push-enable:hover { background:#4f281f; transform:translateY(-1px); }
.push-actions .push-disable { border:2px solid #8a3b32; color:#762d26; background:#fff7f3; }
.push-icon { font-family:system-ui,sans-serif; font-size:1.45rem; line-height:1; }
.push-status { display:flex; align-items:flex-start; gap:.7rem; margin:.85rem 0 0; padding:.9rem 1rem; border:2px solid; border-radius:8px; font-weight:700; line-height:1.45; }
.push-status-icon { flex:0 0 1.5rem; display:grid; place-items:center; width:1.5rem; height:1.5rem; border-radius:50%; font-family:system-ui,sans-serif; font-weight:900; }
.push-status-success { color:#174b32; background:#e7f4eb; border-color:#3e8a5e; }
.push-status-success .push-status-icon { color:#fff; background:#267347; }
.push-status-warning { color:#68430c; background:#fff3d8; border-color:#c58b28; }
.push-status-warning .push-status-icon { color:#fff; background:#9a6817; }
.push-status-error { color:#792d27; background:#fff0ed; border-color:#b9574d; }
.push-status-error .push-status-icon { color:#fff; background:#a33c32; }
.push-status-neutral { color:#46382e; background:#f3eee7; border-color:#bca98f; }
@media(max-width:38rem){ .push-actions { display:grid; grid-template-columns:1fr; } .push-actions .btn { width:100%; } }
