@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');
:root {
    --ink: #173229; --muted: #53635a; --paper: #f9f7f0; --card: #fffdf7;
    --green: #183c31; --line: #dedfd4; --accent: #f0ca79;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--ink); background: var(--paper); line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
img { display: block; width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; line-height: .99; }
h1 { font-size: clamp(2.7rem, 5.7vw, 5.9rem); margin-bottom: .35em; }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: .35em; }
p { overflow-wrap: anywhere; }
button, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    border-radius: .65rem; border: 1px solid transparent; padding: .73rem 1rem; min-height: 44px;
    font: 700 .94rem/1.2 'DM Sans', system-ui, sans-serif; cursor: pointer;
    color: #fffdf7; background: var(--green); text-decoration: none; text-align: center;
}
button:hover, .button:hover { filter: brightness(1.12); }
:focus-visible { outline: 3px solid #a76a19; outline-offset: 3px; }
small { display: block; color: var(--muted); }
[hidden] { display: none !important; }
.shell { width: min(1220px, 100% - 3rem); margin-inline: auto; }
.store-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.head-inner, .admin-head { display: flex; align-items: center; gap: 1.35rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; margin-right: auto; text-decoration: none; font-weight: 700; font-size: 1.17rem; line-height: 1.2; overflow-wrap: anywhere; }
.brand small { font-size: .72rem; margin-top: .24rem; font-weight: 500; }
.brand-mark { background: var(--green); color: var(--accent); font-size: 1.4rem; display: grid; place-items: center; border-radius: 50%; width: 39px; height: 39px; flex: 0 0 auto; }
.head-inner nav { display: flex; gap: 1.3rem; }
.head-inner a:not(.brand), .admin-head a:not(.brand) { text-decoration: none; font-weight: 600; font-size: .91rem; }
.head-inner a:hover, .admin-head a:hover { text-decoration: underline; }
.head-cart span { border-radius: 20px; padding: .15rem .43rem; background: var(--accent); color: var(--ink); }
.hero { display: grid; grid-template-columns: 1fr 1fr; margin-top: 2rem; min-height: 460px; background: var(--green); color: #fffaf0; border-radius: 1.15rem; overflow: hidden; }
.hero-copy { align-self: center; padding: clamp(1.65rem, 4.5vw, 4.7rem); }
.hero-copy > p:not(.eyebrow) { color: #e2e9dc; max-width: 40ch; margin: 0 0 1.6rem; white-space: pre-line; }
.hero img { height: 100%; object-fit: cover; min-height: 0; }
.eyebrow { letter-spacing: .09em; text-transform: uppercase; font-size: .7rem; font-weight: 700; }
.hero .eyebrow { color: var(--accent); }
.accent { background: var(--accent); color: var(--ink); }
.catalog { padding: 4.2rem 0; }
.catalog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.catalog-head h2 { margin-bottom: 0; }
.search { width: min(100%, 320px); }
input, textarea, select {
    width: 100%; border: 1px solid #a8b5a9; background: #fffefa; color: var(--ink);
    font: inherit; min-height: 44px; padding: .55rem .7rem; border-radius: .55rem;
}
textarea { resize: vertical; }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.25rem 0; }
.chip { background: transparent; color: var(--ink); border-color: #b6c1b4; border-radius: 2rem; font-weight: 600; }
.chip[aria-pressed=true] { background: var(--green); color: white; }
.category-description { color: var(--muted); white-space: pre-line; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; background: var(--card); }
.card-image { display: block; overflow: hidden; background: #e5e0d4; }
.card-image img { aspect-ratio: 6/5; object-fit: cover; transition: transform .25s; }
.card-image:hover img { transform: scale(1.04); }
.card-copy { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.card-copy h3 { font-size: 1.15rem; line-height: 1.2; margin-bottom: .35rem; overflow-wrap: anywhere; }
.card-copy h3 a { text-decoration: none; }
.card-copy .eyebrow, .minimum { color: var(--muted); }
.minimum { font-size: .86rem; }
.outline { margin-top: auto; background: transparent; color: var(--ink); border-color: #a8b5a9; justify-content: space-between; }
.about { background: #e7ebde; border-radius: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: clamp(1.3rem, 4vw, 3.4rem); }
.about p, .copy { max-width: 65ch; margin-bottom: 0; color: var(--muted); white-space: pre-line; }
.footer { display: flex; gap: 1rem 2rem; flex-wrap: wrap; align-items: baseline; padding-block: 2.5rem; font-size: .9rem; }
.footer div { margin-right: auto; }
.footer p { margin: .25rem 0 0; color: var(--muted); }
.footer a { overflow-wrap: anywhere; }
.back { margin-top: 1.5rem; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.detail-image { aspect-ratio: 6/5; border-radius: 1rem; object-fit: cover; }
.detail-copy h1 { font-size: clamp(2.5rem, 4.5vw, 4.6rem); }
.detail-copy .copy { margin-bottom: 1.1rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(1rem, 3.5vw, 2.2rem); min-width: 0; }
.empty { padding: 1.3rem; margin-top: 1.5rem; }
.fields { display: grid; gap: .85rem; }
.fields > button { justify-self: start; }
.fields label, .cart-row label { display: grid; gap: .24rem; font-weight: 600; min-width: 0; }
.fields .check { display: flex; align-items: center; gap: .55rem; }
.check input { width: 1.15rem; min-height: auto; accent-color: var(--green); }
.quiet { color: var(--ink); background: transparent; border-color: var(--line); }
dialog { width: min(100% - 1.5rem, 615px); max-height: calc(100% - 1.5rem); overflow-y: auto; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: .9rem; padding: 1.2rem; }
dialog::backdrop { background: #12251fc0; }
.dialog-head { display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 105px auto; align-items: end; gap: .55rem; padding: .8rem 0; border-bottom: 1px solid var(--line); margin-bottom: .65rem; }
.cart-row strong { overflow-wrap: anywhere; }
.cart-row label { font-size: .8rem; }
.admin-head { padding: 0 max(1.4rem, calc((100% - 1100px) / 2)); border-bottom: 1px solid var(--line); }
.admin-wrap { width: min(1100px, 100% - 2rem); margin: 1.6rem auto 3rem; }
.narrow { max-width: 520px; }
.admin-wrap h1 { font-size: clamp(2.4rem, 4.5vw, 3.7rem); }
.admin-wrap h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
.admin-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.admin-nav a { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .55rem; font-weight: 700; text-decoration: none; }
.admin-nav a[aria-current=page] { background: var(--green); color: white; }
.admin-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; align-items: start; }
.admin-thumb { width: min(100%, 310px); max-height: 160px; object-fit: contain; object-position: left; }
.row { display: flex; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); padding: .65rem 0; overflow-wrap: anywhere; }
.danger { margin-top: 1.4rem; border-top: 1px solid var(--line); padding-top: .85rem; }
.danger summary { cursor: pointer; color: #83281d; font-weight: 700; }
.danger button, .alert { background: #8b3024; color: white; }
.alert, .notice { padding: .6rem .8rem; border-radius: .5rem; }
.notice { background: #e3edda; }
.sr-only, .skip:not(:focus) { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip:focus { position: absolute; z-index: 2; background: white; padding: .65rem; }
@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { min-height: 380px; }
}
@media (max-width: 650px) {
    .shell { width: calc(100% - 1.5rem); }
    .head-inner { min-height: 66px; flex-wrap: wrap; gap: .6rem; padding-block: .55rem; }
    .head-inner nav, .head-inner .contact { display: none; }
    .brand { font-size: 1rem; }
    .brand-mark { width: 32px; height: 32px; font-size: 1.1rem; }
    .head-cart { font-size: .8rem; padding-inline: .55rem; }
    .hero, .detail, .admin-grid { grid-template-columns: 1fr; }
    .hero { margin-top: .8rem; min-height: 0; }
    .hero img { height: clamp(180px, 53vw, 300px); }
    .catalog { padding-block: 2.6rem; }
    .catalog-head, .about { align-items: flex-start; flex-direction: column; }
    .cards { gap: .55rem; }
    .card-copy { padding: .65rem; }
    .card-copy h3 { font-size: 1rem; }
    .card-copy .eyebrow { font-size: .63rem; }
    .card-copy .button { font-size: .8rem; padding-inline: .49rem; }
    .cart-row { grid-template-columns: minmax(0, 1fr) auto; }
    .cart-row > div { grid-column: 1 / -1; }
    .cart-row input { max-width: 115px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.brand-logo { width: auto; max-width: 88px; height: 42px; object-fit: contain; }
.account-email { margin-top: 1rem; }
.theme-azul { --green: #173c54; --ink: #183547; --muted: #485f71; --accent: #f1d2a1; }
.theme-vinho { --green: #56293a; --ink: #452832; --muted: #6c515d; --accent: #f0c7bc; }
.theme-azul .about { background: #e4ecee; }
.theme-vinho .about { background: #f1e4e5; }
