:root {
  --butter: #f5f0e8;
  --paper: #fbf8f2;
  --champagne: #dcc7a1;
  --olive: #7e8470;
  --coffee: #3f2c20;
  --ink: #2d2926;
  --blue: #2d3542;
  --line: rgba(63, 44, 32, 0.18);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Baskerville", Georgia, serif;
  --sans: "Raleway", "Avenir Next", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--butter);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }

button { color: inherit; }

img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(63, 44, 32, 0.11);
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  color: var(--coffee);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.wordmark span { font: 500 1.03rem/1.15 var(--serif); }
.wordmark small { margin-top: 4px; font-size: 0.62rem; letter-spacing: 0.3em; }

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.maison-back {
  color: var(--coffee);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.maison-back:hover,
.maison-back:focus-visible { color: var(--olive); }

.selection-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--coffee);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.selection-button span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 99px;
  background: var(--coffee);
  color: var(--butter);
  font-size: 0.72rem;
}

main { overflow: hidden; }

.intro {
  display: grid;
  grid-template-columns: minmax(160px, 0.65fr) minmax(430px, 1.6fr) minmax(150px, 0.55fr);
  gap: clamp(24px, 5vw, 76px);
  align-items: end;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 118px) clamp(20px, 5vw, 72px) clamp(42px, 6vw, 82px);
}

.eyebrow {
  margin: 0;
  color: var(--olive);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.intro-copy h1,
.section-heading h2,
.conditions h2,
.selection-drawer h2,
.product-dialog h2 {
  margin: 0;
  color: var(--coffee);
  font-family: var(--serif);
  font-weight: 400;
}

.intro-copy h1 {
  max-width: 760px;
  font-size: clamp(3.35rem, 7vw, 7.5rem);
  line-height: 0.83;
  letter-spacing: -0.045em;
}

.intro-copy > p {
  max-width: 680px;
  margin: 34px 0 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.edition-note {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--coffee);
  font-family: var(--serif);
  font-style: italic;
}

.filters {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px) 32px;
}

.filters label {
  flex: 0 0 auto;
  color: var(--coffee);
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.filters select {
  width: min(100%, 340px);
  min-height: 50px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--coffee);
  cursor: pointer;
  font-size: 1rem;
}

.filters select:focus-visible {
  outline: 2px solid var(--coffee);
  outline-offset: 3px;
}

.catalog-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px) clamp(82px, 10vw, 150px);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 76px) clamp(18px, 3vw, 42px);
}

.product-card { min-width: 0; }

.product-card:nth-child(3n + 2) { transform: translateY(42px); }

.product-image-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #eee7dc;
  cursor: pointer;
}

.product-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}

.product-image-button:hover img,
.product-image-button:focus-visible img { transform: scale(1.025); }

.product-image-button::after {
  content: "Ver peça";
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 13px;
  background: rgba(245, 240, 232, 0.92);
  color: var(--coffee);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.product-image-button:hover::after,
.product-image-button:focus-visible::after { opacity: 1; transform: translateY(0); }

.product-info { padding-top: 18px; }

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--olive);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-info h2 {
  margin: 8px 0 6px;
  color: var(--coffee);
  font: 400 clamp(1.42rem, 2vw, 1.9rem)/1.05 var(--serif);
}

.product-price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.product-price strong {
  display: block;
  color: var(--coffee);
  font: 500 1.06rem/1.2 var(--serif);
}

.product-price small { color: #655e59; font-size: 0.72rem; }

.add-button,
.composition-action button,
.whatsapp-button,
.copy-button,
.dialog-add {
  border: 0;
  background: transparent;
  color: var(--coffee);
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-transform: uppercase;
}

.add-button:hover,
.composition-action button:hover,
.dialog-add:hover { color: var(--olive); }

.empty-state { padding: 60px 0; text-align: center; }

.compositions {
  padding: clamp(78px, 10vw, 150px) clamp(20px, 5vw, 72px);
  background: var(--coffee);
  color: var(--butter);
}

.compositions > * { max-width: 1296px; margin-right: auto; margin-left: auto; }

.section-heading {
  display: grid;
  grid-template-columns: 0.7fr 1.5fr 0.8fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  margin-bottom: clamp(44px, 7vw, 92px);
}

.compositions .eyebrow { color: var(--champagne); }

.section-heading h2 {
  color: var(--butter);
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  line-height: 0.98;
}

.section-heading > p:last-child { margin: 0; color: rgba(245, 240, 232, 0.72); }

.composition-grid { border-top: 1px solid rgba(245, 240, 232, 0.28); }

.composition-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(150px, 0.38fr);
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid rgba(245, 240, 232, 0.28);
}

.composition-number { margin: 0; color: var(--champagne); font: italic 1.25rem var(--serif); }

.composition-card h3 { margin: 0; font: 400 1.8rem/1.1 var(--serif); }
.composition-card p { margin-top: 7px; margin-bottom: 0; color: rgba(245, 240, 232, 0.7); }

.composition-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.composition-action strong { font: 400 1.35rem var(--serif); }
.composition-action button { color: var(--champagne); }

.conditions {
  display: grid;
  grid-template-columns: 0.7fr 1.5fr;
  gap: clamp(48px, 8vw, 140px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(78px, 10vw, 150px) clamp(20px, 5vw, 72px);
}

.conditions h2 { margin-top: 18px; font-size: clamp(2.5rem, 4.6vw, 4.7rem); line-height: 0.95; }
.conditions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 42px; }

.conditions-grid p {
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.17rem;
}

.conditions-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--olive);
  font: 600 0.68rem var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.condition-footnote { grid-column: 2; margin: 0; color: #6b625c; font-size: 0.82rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--coffee);
  font-family: var(--serif);
}

footer p { margin: 0; }
footer span { color: var(--olive); font-style: italic; }

.product-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.product-dialog::backdrop { background: rgba(45, 41, 38, 0.68); backdrop-filter: blur(5px); }

.dialog-close {
  position: fixed;
  z-index: 2;
  top: max(26px, calc((100vh - min(760px, calc(100vh - 32px))) / 2 + 10px));
  right: max(26px, calc((100vw - min(980px, calc(100vw - 32px))) / 2 + 10px));
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--coffee);
  cursor: pointer;
  font: 300 1.8rem/1 var(--sans);
}

.dialog-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 680px; }
.dialog-layout img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #eee7dc;
}

.dialog-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 6vw, 76px); }
.dialog-copy h2 { margin-top: 18px; font-size: clamp(2.4rem, 4.2vw, 4.3rem); line-height: 0.92; }
.dialog-description { margin: 28px 0; font-family: var(--serif); font-size: 1.2rem; }
.dialog-facts { margin: 0 0 28px; }
.dialog-facts div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.dialog-facts dt { color: var(--olive); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; }
.dialog-facts dd { margin: 0; text-align: right; }
.dialog-price { color: var(--coffee); font: 500 1.6rem var(--serif); }
.variant-field { display: grid; gap: 8px; margin-top: 18px; }
.variant-field span { color: var(--olive); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; }
.variant-field select { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--coffee); cursor: pointer; }
.variant-field select:focus-visible { outline: 2px solid var(--coffee); outline-offset: 3px; }
.dialog-add { align-self: flex-start; margin-top: 18px; padding: 12px 0; }

.selection-panel { position: fixed; z-index: 40; inset: 0; pointer-events: none; visibility: hidden; }
.selection-panel.is-open { pointer-events: auto; visibility: visible; }

.selection-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 41, 38, 0.52);
  opacity: 0;
  transition: opacity 240ms ease;
}

.selection-panel.is-open .selection-backdrop { opacity: 1; }

.selection-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 30px;
  background: var(--paper);
  box-shadow: -18px 0 50px rgba(45, 41, 38, 0.18);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
}

.selection-panel.is-open .selection-drawer { transform: translateX(0); }

.selection-drawer > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.selection-drawer h2 { margin-top: 9px; font-size: 2.2rem; line-height: 1; }
.selection-drawer > header button { border: 0; background: transparent; cursor: pointer; font-size: 2rem; font-weight: 300; }

.selection-list { flex: 0 0 auto; max-height: 34vh; overflow-y: auto; }
.selection-empty { margin: auto 0; text-align: center; }
.selection-empty p { margin: 0; color: var(--coffee); font: 400 1.65rem var(--serif); }
.selection-empty span { display: block; max-width: 340px; margin: 10px auto 0; color: #6b625c; }

.selection-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.selection-item h3 { margin: 0; color: var(--coffee); font: 400 1.3rem var(--serif); }
.selection-item p { margin: 5px 0 0; color: #6b625c; font-size: 0.8rem; }
.selection-item strong { align-self: start; font: 500 1rem var(--serif); }
.quantity-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.quantity-row > span { color: var(--coffee); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.quantity-row > small { color: #6b625c; font-size: 0.72rem; }
.quantity-control { display: inline-grid; grid-template-columns: 36px 48px 36px; min-height: 38px; border: 1px solid var(--line); background: var(--butter); }
.quantity-control button,
.quantity-control input { min-width: 0; border: 0; border-radius: 0; background: transparent; color: var(--coffee); font: 500 0.9rem var(--sans); text-align: center; }
.quantity-control button { cursor: pointer; font-size: 1rem; }
.quantity-control button:hover:not(:disabled) { background: rgba(126, 132, 112, 0.12); }
.quantity-control button:disabled { cursor: not-allowed; opacity: 0.32; }
.quantity-control input { width: 48px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.selection-fixed { grid-column: 1 / -1; }
.selection-remove { grid-column: 1 / -1; justify-self: start; padding: 0; border: 0; background: transparent; color: var(--olive); cursor: pointer; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.selection-remove:hover { color: var(--coffee); }

.quote-form { padding: 24px 0; border-bottom: 1px solid var(--line); }
.quote-form-heading > p:last-child { margin: 8px 0 18px; color: #6b625c; font-size: 0.82rem; line-height: 1.5; }
.quote-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
.quote-field { display: grid; gap: 7px; min-width: 0; }
.quote-field-full { grid-column: 1 / -1; }
.quote-field > span { color: var(--coffee); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.quote-field input,
.quote-field select,
.quote-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--butter);
  color: var(--ink);
  font-size: 0.9rem;
}
.quote-field textarea { min-height: 84px; resize: vertical; }
.quote-field input:focus,
.quote-field select:focus,
.quote-field textarea:focus { border-color: var(--olive); box-shadow: 0 0 0 2px rgba(126, 132, 112, 0.13); }
.quote-field[hidden] { display: none; }

.selection-footer { display: block; padding: 22px 0 0; border: 0; }
.selection-footer > div { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.selection-footer > div span { color: var(--ink); font: 400 1rem var(--sans); }
.selection-footer strong { color: var(--coffee); font: 500 1.7rem var(--serif); }
.selection-footer > p { color: #6b625c; font: 400 0.76rem/1.5 var(--sans); }
.whatsapp-button,
.copy-button { width: 100%; margin-top: 12px; padding: 15px; border: 1px solid var(--coffee); text-decoration: none; }
.whatsapp-button { background: var(--coffee); color: var(--butter); }
.copy-button { background: transparent; color: var(--coffee); }
.whatsapp-button:disabled,
.copy-button:disabled { cursor: not-allowed; opacity: 0.48; }
.copy-status { min-height: 18px; margin-bottom: 0; text-align: center; }

@media (max-width: 980px) {
  .intro { grid-template-columns: 1fr; align-items: start; }
  .intro > .eyebrow { order: 0; }
  .intro-copy { order: 1; }
  .edition-note { order: 2; width: min(340px, 100%); }
  .intro-copy > p { margin-left: 0; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card:nth-child(3n + 2) { transform: none; }
  .product-card:nth-child(even) { transform: translateY(32px); }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading > p:last-child { max-width: 600px; }
  .conditions { grid-template-columns: 1fr; }
  .condition-footnote { grid-column: 1; }
  .dialog-layout { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .filters { align-items: stretch; flex-direction: column; gap: 10px; }
  .filters select { width: 100%; }
  .site-header { min-height: 70px; }
  .wordmark span { font-size: 0.88rem; }
  .maison-back { display: none; }
  .header-actions { gap: 12px; }
  .selection-button { font-size: 0.67rem; }
  .intro { padding-top: 50px; }
  .intro-copy h1 { font-size: clamp(3.1rem, 17vw, 5rem); }
  .intro-copy > p { margin-top: 26px; font-size: 1.16rem; }
  .catalog-grid { grid-template-columns: 1fr; gap: 48px; }
  .product-card:nth-child(even) { transform: none; }
  .product-image-button::after { opacity: 1; transform: none; }
  .composition-card { grid-template-columns: 46px 1fr; }
  .composition-action { grid-column: 2; }
  .conditions-grid { grid-template-columns: 1fr; }
  .conditions-grid p:nth-child(even) { border-top: 0; padding-top: 0; }
  footer { flex-direction: column; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-layout img { aspect-ratio: 4 / 4.6; }
  .dialog-copy { padding: 36px 26px 44px; }
  .dialog-close { position: absolute; top: 10px; right: 10px; }
  .selection-drawer { padding: 24px 20px; }
  .quote-form-grid { grid-template-columns: 1fr; }
  .quote-field-full { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
