@font-face {
  font-family: 'Portal Inter';
  src: url('/cliente/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
html[data-design-system='quatrama-v1'] {
  --font: 'Portal Inter', Inter, system-ui, sans-serif;
  --bg: var(--background, #f3f5f8);
  --text: var(--text-primary, #181818);
  font-family: var(--font);
  background: var(--background, #f3f5f8);
  color: var(--text-primary, #181818);
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
}
main:has(#commerce:not([hidden])) { width: min(100%, 68rem); }
header {
  border-top: .25rem solid var(--quatrama-primary);
  padding: 1.25rem 0;
}
.portal-brand { display: grid; justify-items: center; width: max-content; gap: 4px; }
.portal-brand img { display: block; object-fit: contain; }
.portal-brand span {
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
h1 { margin: .55rem 0 0; font-size: clamp(1.65rem, 5vw, 2.15rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin: 0 0 .65rem; font-size: 1.25rem; letter-spacing: -.02em; }
p { overflow-wrap: anywhere; }
section {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ds-radius-card);
  padding: clamp(1rem, 4vw, 1.5rem);
  box-shadow: var(--ds-shadow-card);
}
form, fieldset { display: grid; gap: .9rem; }
fieldset { min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--ds-radius-control); }
legend, label { font-weight: 600; }
label { display: grid; gap: .3rem; }
small { color: var(--text-secondary); font-weight: 400; }
input, button, select { font: inherit; }
input:not([type="checkbox"]), button, select {
  min-height: 2.75rem;
  border-radius: var(--ds-radius-control);
  padding: .55rem .75rem;
}
input:not([type="checkbox"]), select {
  width: 100%;
  min-width: 0;
  color: inherit;
  background: var(--surface);
  border: 1px solid #758295;
}
button {
  background: #0069bd;
  color: white;
  border: 1px solid #0069bd;
  font-weight: 650;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #005ca5; }
button:disabled { opacity: .65; cursor: not-allowed; }
button.secondary {
  width: 100%;
  margin-top: .65rem;
  background: var(--surface);
  color: #005ca5;
  border-color: var(--border);
}
button.secondary:hover:not(:disabled), nav a:hover { background: var(--ds-primary-soft); }
a { color: #005ca5; }
:focus-visible { outline: .18rem solid var(--ds-focus-ring); outline-offset: .14rem; }
.consent-panel, #checkout, #unconfirmed {
  padding: 1rem;
  background: var(--background);
  border-radius: var(--ds-radius-control);
}
.consent { display: flex; align-items: center; min-height: 2.75rem; gap: .65rem; }
.consent input { flex: 0 0 1.25rem; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--quatrama-primary); }
.consent-panel a { display: inline-flex; align-items: center; min-height: 2.75rem; }
#message:not(:empty), #commerce-status:not(:empty) {
  padding: .75rem;
  border-radius: var(--ds-radius-control);
  background: var(--ds-info-soft);
  color: #17456a;
}
#message:empty, #commerce-status:empty, #freight:empty, #cart-items:empty { display: none; }
.account-header { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.account-header p { margin: 0; color: var(--text-secondary); }
.account-header #logout, #install-portal { width: auto; margin-top: 0; }
#install-portal { margin-top: .75rem; }
#commerce { margin-top: 1.25rem; }
#commerce h2 { margin-top: 1.5rem; }
nav { display: flex; flex-wrap: wrap; gap: .25rem .65rem; margin-top: .75rem; }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .5rem; font-weight: 600; }
.portal-products {
  --offset: var(--background);
  --muted: var(--text-secondary);
  --text: var(--text-primary);
  --surface2: var(--surface);
  --primary: var(--quatrama-primary);
  --r: var(--ds-radius-control);
}
/* Keep the seller photo placeholder behind the loaded portal thumbnail. */
html[data-design-system='quatrama-v1'] #app .seller90-product-photo img {
  position: relative;
  z-index: 1;
}
.portal-products button:focus-visible,
.portal-products input:focus-visible { outline-offset: -.2rem; z-index: 1; }
.portal-products input[type="number"] { appearance: textfield; }
.portal-products input::-webkit-inner-spin-button { appearance: none; }
#checkout, #unconfirmed { margin-top: .75rem; }
#checkout p, .portal-orders p { margin: 0; }
#cart-total { font-weight: 700; }
#freight { border-left: .2rem solid var(--quatrama-primary); padding-left: .65rem; }
#cart-items, .portal-orders { margin: 0; padding-left: 0; list-style: none; }
#cart-items li, .portal-orders li { border-bottom: 1px solid var(--border); padding: .6rem 0; }
#cart-items li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
#cart-items .cart-remove { width: auto; margin: 0; }

/* Identidade Doce Neci nas telas públicas de entrada. */
html:has(#access:not([hidden]), #signup-section:not([hidden])),
body:has(#access:not([hidden]), #signup-section:not([hidden])) {
  background: #fff8e4;
}
main:has(#access:not([hidden]), #signup-section:not([hidden])) {
  --entry-yellow: #ffc400;
  --entry-brown: #662e0c;
  --entry-red: #e03028;
  color: var(--entry-brown);
}
main:has(#access:not([hidden]), #signup-section:not([hidden])) header {
  border-color: var(--entry-red);
  background: var(--entry-yellow);
  border-radius: var(--ds-radius-card);
  padding: 1rem;
  margin-bottom: 1rem;
}
main:has(#access:not([hidden]), #signup-section:not([hidden])) .portal-brand span {
  color: var(--entry-brown);
  font-size: .6875rem;
  font-weight: 700;
}
:is(#access, #signup-section) button {
  background: var(--entry-brown);
  border-color: var(--entry-brown);
  color: #fff;
}
:is(#access, #signup-section) button:hover:not(:disabled) { background: #502308; }
:is(#access, #signup-section) button.secondary {
  background: var(--entry-yellow);
  color: var(--entry-brown);
}
:is(#access, #signup-section) button.secondary:hover:not(:disabled) { background: #ffda54; }
:is(#access, #signup-section) a { color: var(--entry-brown); }
#signup-section .consent input { accent-color: var(--entry-brown); }
:is(#access, #signup-section) :focus-visible { outline-color: var(--entry-brown); }

[data-portal-whatsapp]:not([hidden]) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
}

.portal-whatsapp-floating {
  position: fixed;
  z-index: 2;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  padding: 0 .875rem;
  border-radius: 999px;
  background: #116446;
  color: white;
  box-shadow: 0 2px 8px #0003;
}

main:has(.portal-whatsapp-floating:not([hidden])) { padding-bottom: 5rem; }
#close-order { scroll-margin-bottom: 4.5rem; }
