*{box-sizing:border-box}body{margin:0;background:#f8f6f2;color:#292d32;font:15px system-ui,sans-serif}header{text-align:center;background:white;padding:24px}header img{width:min(340px,90%);height:auto}h1,h2,h3{font-family:Georgia,serif;font-weight:normal}h1{font-size:36px;margin:0}small,.muted{color:#746661}main{max-width:1050px;margin:auto;padding:16px 16px 110px}.tools{position:sticky;top:0;background:#f8f6f2;padding:12px 0;z-index:2;display:flex;flex-wrap:wrap;gap:8px}input,select,button{font:inherit;padding:10px;border:1px solid #c9bdb5;border-radius:6px;background:white;color:inherit}button{cursor:pointer}button.primary{background:#292d32;color:white}input[type=search]{flex:1;min-width:180px}.region{border-top:2px solid #92817e;margin-top:28px;padding-top:14px}.region h2{font-size:32px;margin:0}.spot{background:#eee8e2;padding:16px;margin:14px 0;border-left:3px solid #92817e}.spot h3{margin:0 0 8px}.wine{display:grid;grid-template-columns:1fr auto;gap:10px;background:white;border-bottom:1px solid #e7e0d9;padding:14px}.wine strong{display:block}.qty{display:flex;align-items:center;gap:5px}.qty input{width:65px;text-align:center;padding:8px}.qty button{padding:8px 12px}.price{text-align:right;font-weight:600}.bar{position:fixed;bottom:0;left:0;right:0;background:#292d32;color:white;padding:12px;display:flex;justify-content:center;align-items:center;gap:18px;z-index:3}.bar button{background:#fff;color:#292d32}dialog{width:min(720px,95vw);max-height:90vh;border:1px solid #92817e;border-radius:10px;padding:20px}dialog::backdrop{background:#0008}.actions{display:flex;flex-wrap:wrap;gap:8px}footer{padding:25px 0;line-height:1.6}a{color:inherit}@media(max-width:520px){.wine{padding:12px 8px}.qty{gap:2px}.qty button{padding:8px}.qty input{width:48px}.price{font-size:14px}h1{font-size:28px}}@media print{body.printing header,body.printing main,body.printing .bar,body.printing .actions{display:none}body.printing dialog{position:static;width:100%;max-height:none;border:0} }
@media(max-width:520px){.wine{grid-template-columns:1fr}.wine>div:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:space-between}.qty button{min-width:44px;min-height:44px}.qty input{width:65px;min-height:44px}.wine>div:last-child>small{width:100%;text-align:right}}
[hidden]{display:none!important}button:disabled,input:disabled,select:disabled{opacity:.55;cursor:not-allowed}.packaging{display:flex;align-items:center;gap:.5rem;margin:16px 0}.packaging input{width:18px;height:18px;accent-color:#292d32}#status[data-state="error"]{color:#862b29}#retry{margin-bottom:12px}
.checkout{margin:16px 0;padding:14px;border:1px solid #c9bdb5;border-radius:6px;background:#f8f6f2}.checkout summary{cursor:pointer;font-weight:600}.checkout form{display:grid;gap:10px;margin-top:10px}.checkout form label:not(.checkout-check){display:grid;gap:4px}.checkout-check{display:flex;align-items:baseline;gap:8px}.checkout [role=status]{margin:0;overflow-wrap:anywhere}
.logistics-editor{min-width:0;margin:0;padding:12px;border:1px solid #d9ccd0}.logistics-editor legend{color:#642c40;font:20px Georgia,serif}.logistics-editor p{margin:0 0 10px}.logistics-editor #logistics-status{margin:12px 0}.logistics-row{display:grid;grid-template-columns:minmax(120px,1.1fr) minmax(120px,1fr) minmax(95px,.7fr);align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid #e7e0d9}.logistics-row input,.logistics-row select{width:100%;min-width:0}.logistics-row small{display:block}@media(max-width:520px){.logistics-row{grid-template-columns:1fr 1fr}.logistics-row>div{grid-column:1/-1}}
.approval-status{margin:0}.approval-status:not(:empty){margin:.6rem 0;padding:.65rem .8rem;border-left:3px solid #642c40;background:#f4edf0;color:#542338}
.packaging{flex-wrap:wrap}.price small{font-weight:normal;white-space:nowrap}.bar #total{min-width:0}.bar #review{flex-shrink:0}@media(max-width:520px){.bar{gap:8px}.bar #review{max-width:55%}}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --viewport-height: 100vh;
}
@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}
.producer-name { font-size: 110%; }
header {
  padding-top: calc(24px + var(--safe-top));
  padding-inline: max(24px, var(--safe-left)) max(24px, var(--safe-right));
}
main {
  padding-inline: max(16px, var(--safe-left)) max(16px, var(--safe-right));
  padding-bottom: calc(110px + var(--safe-bottom));
}
.tools { top: var(--safe-top); }
.bar {
  bottom: var(--visible-bottom, 0px);
  padding-inline: max(12px, var(--safe-left)) max(12px, var(--safe-right));
  padding-bottom: calc(12px + var(--safe-bottom));
}
#order {
  --modal-top: calc(8px + var(--safe-top));
  --modal-bottom: calc(8px + var(--safe-bottom));
  --modal-height: calc(var(--visible-height, var(--viewport-height)) - var(--modal-top) - var(--modal-bottom));
  position: fixed;
  inset: auto calc(8px + var(--safe-right)) auto calc(8px + var(--safe-left));
  top: calc(var(--visible-top, 0px) + var(--modal-top) + var(--modal-height) / 2);
  width: min(720px, calc(100% - 16px - var(--safe-left) - var(--safe-right)));
  max-width: none;
  max-height: max(0px, var(--modal-height));
  margin: 0 auto;
  transform: translateY(-50%);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 12px;
}
#order .request-actions {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
#order .request-actions button { font-weight: 600; }
#order #whatsapp { background: #176b49; }
#order .actions button { min-height: 44px; }
@media (max-width: 520px) {
  .tools { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .85fr); }
  .tools input[type=search] { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .tools select { width: 100%; min-width: 0; padding-inline: 5px; }
  .tools input[type=search], #order #customer { font-size: 16px; }
  .bar #review { min-height: 44px; }
  #order { padding: 16px; }
}
@media (max-width: 360px) {
  #order .request-actions { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  body.printing #order { position: static; transform: none; width: 100%; max-height: none; overflow: visible; }
}

.catalogue-footer { border-top: 1px solid #e7e0d9; margin-top: 28px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px 20px; padding-block: 12px; border-top: 1px solid #e7e0d9; }
.legal-links a, .quote-privacy a { text-underline-offset: .18em; }
.quote-privacy { margin-block: 0 12px; font-size: .9em; }
#business-fields:not([hidden]) { display: grid; gap: 6px; margin-block: 12px; }
#business-fields .checkout-check { margin: 0; }
.consumer-price { display: block; margin-top: 3px; }
.legal-page h1 span { display: block; }
.legal-document { max-width: 780px; line-height: 1.65; overflow-wrap: anywhere; }
.legal-document > section { border-top: 1px solid #e7e0d9; padding-block: 16px; scroll-margin-top: calc(12px + var(--safe-top)); }
.legal-document h2 { color: #642c40; }
.legal-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-bottom: 12px; }
.legal-draft { color: #642c40; }
.legal-document dt { font-weight: 600; }
.legal-document dd { margin: 0 0 12px; }
.form-lines { list-style: none; padding: 0; }
.form-line, .form-lines li { border-bottom: 1px solid #92817e; min-height: 2.5em; padding-top: .4em; }
@media print {
  .legal-page { background: white; }
  .legal-page header, .legal-page .legal-links, .legal-toolbar, .legal-document [data-print] { display: none; }
  .legal-document { padding: 0; }
  .legal-page[data-print="withdrawal"] .legal-document > :not(#withdrawal-form) { display: none; }
  .legal-page[data-print="withdrawal"] #withdrawal-form { border: 0; }
}
