:root {
  --gilt: #c9a227;
  --soapstone: #8b8e86;
  --jacaranda: #3a2418;
  --jacaranda-mid: #4a3022;
  --jacaranda-deep: #26150e;
  --cream: #f4ead8;
  --cream-dim: #e6d8c0;
  --malachite: #2f5d50;
  --malachite-hover: #3a7263;
  --font-display: "Spectral", "Palatino Linotype", Palatino, serif;
  --font-body: "Bricolage Grotesque", system-ui, sans-serif;
  --panel-pad: 1.35rem;
  --radius-nicho: 46% 46% 5px 5px / 20% 20% 5px 5px;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% 0%, #4e3426 0%, var(--jacaranda) 52%, var(--jacaranda-deep) 100%);
  background-attachment: fixed;
}

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

a {
  color: var(--malachite-hover);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--cream);
}

h1,
h2,
h3,
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.18;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.15rem);
  margin: 0.35rem 0 0.8rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 0.7rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0.25rem 0 0.4rem;
}

p {
  margin: 0 0 0.9rem;
}

p:last-child {
  margin-bottom: 0;
}

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--cream);
  color: var(--jacaranda);
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--gilt);
}

.skip-link:focus {
  top: 0.7rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.altar-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gilt);
  margin: 0 0 0.55rem;
}

.stone-step {
  height: 9px;
  background: var(--soapstone);
  border-top: 1px solid var(--gilt);
  border-bottom: 1px solid var(--gilt);
  opacity: 0.45;
}

.wood-panel {
  background: linear-gradient(180deg, var(--jacaranda-mid) 0%, #3f291c 100%);
  border: 1px solid var(--gilt);
  box-shadow:
    inset 0 0 0 5px var(--jacaranda-mid),
    inset 0 0 0 6px rgba(201, 162, 39, 0.85);
  padding: var(--panel-pad);
}

.nicho {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-nicho);
  border: 1px solid var(--gilt);
  background: var(--jacaranda-deep);
  box-shadow:
    inset 0 0 0 6px var(--jacaranda),
    0 12px 28px rgba(0, 0, 0, 0.28);
  position: relative;
}

.nicho img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.nicho--wide img {
  aspect-ratio: 5 / 4;
}

.nicho .altar-num {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gilt);
  background: rgba(58, 36, 24, 0.86);
  border: 1px solid var(--gilt);
  padding: 0.2rem 0.55rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--malachite-hover);
  font-weight: 600;
}

.price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cream);
  margin: 0;
}

.hint {
  color: var(--soapstone);
  font-size: 0.88rem;
  margin: 0.4rem 0 0;
}

.meta {
  color: var(--soapstone);
  font-size: 0.9rem;
}

/* Header */

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--jacaranda-deep);
  border-bottom: 1px solid var(--gilt);
}

.mast-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  width: 2.1rem;
  height: 2.45rem;
  flex-shrink: 0;
  border: 1px solid var(--gilt);
  border-radius: 50% 50% 3px 3px / 38% 38% 3px 3px;
  background: var(--jacaranda);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  height: 1px;
  background: var(--gilt);
}

.brand-name {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
}

.brand-line {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--soapstone);
  text-transform: uppercase;
}

.nav {
  display: none;
  margin-left: auto;
  gap: 1.15rem;
}

.nav a {
  color: var(--cream-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.12rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--cream);
  border-bottom-color: var(--malachite);
}

.mast-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.cart-link {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--gilt);
  padding: 0.32rem 0.6rem;
}

.cart-count {
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  border: 1px solid var(--gilt);
  color: var(--gilt);
}

.menu-toggle {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--gilt);
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 1.05rem;
  height: 1px;
  background: var(--cream);
  content: "";
}

.menu-toggle span {
  width: 0.75rem;
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }

  .mast-tools {
    margin-left: 0;
  }

  .menu-toggle {
    display: none;
  }
}

.nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--jacaranda-deep);
  border-bottom: 1px solid var(--gilt);
  padding: 0.9rem 1.2rem 1.1rem;
  gap: 0.75rem;
}

/* Buttons & fields */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--jacaranda);
  background: var(--cream);
  border: 1px solid var(--gilt);
  padding: 0.62rem 1.1rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  color: var(--jacaranda-deep);
  background: var(--cream-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
}

.btn-ghost:hover {
  color: var(--cream);
  background: rgba(244, 234, 216, 0.08);
}

.btn-block {
  width: 100%;
}

.field {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: var(--jacaranda-deep);
  border: 1px solid var(--soapstone);
  padding: 0.62rem 0.7rem;
}

.field:focus {
  outline: none;
  border-color: var(--gilt);
}

textarea.field {
  resize: vertical;
  min-height: 8rem;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }

  .form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;
  margin: 0.75rem 0;
  color: var(--cream-dim);
}

.checkbox-line input {
  margin-top: 0.25rem;
  accent-color: var(--malachite);
  flex-shrink: 0;
}

.checkbox-line a {
  color: var(--malachite-hover);
}

.form-feedback {
  display: none;
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--gilt);
  background: var(--jacaranda-deep);
  color: var(--cream);
}

.form-feedback.show {
  display: block;
}

.pay-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border: 1px solid var(--soapstone);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
  cursor: pointer;
  font-weight: 400;
}

.pay-option:has(input:checked) {
  border-color: var(--gilt);
}

.pay-option span span {
  display: block;
  color: var(--soapstone);
  font-size: 0.88rem;
  font-weight: 400;
}

.pay-option input {
  margin-top: 0.3rem;
  accent-color: var(--malachite);
}

/* Hero & home */

.hero {
  padding: 2rem 0 2.4rem;
}

.hero-grid {
  display: grid;
  gap: 1.6rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.4rem;
  }
}

.hero-copy p {
  color: var(--cream-dim);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.section {
  padding: 2.4rem 0;
}

.section-tight {
  padding-top: 1.8rem;
}

.sec-head {
  max-width: 40rem;
  margin-bottom: 1.4rem;
}

.sec-head p {
  color: var(--cream-dim);
}

.prod-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .prod-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .prod-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.relic {
  background: var(--jacaranda-mid);
  border: 1px solid var(--gilt);
  box-shadow: inset 0 0 0 5px var(--jacaranda-mid), inset 0 0 0 6px rgba(201, 162, 39, 0.7);
  padding: 0.7rem 0.7rem 1rem;
}

.relic-body {
  padding: 0.75rem 0.35rem 0.15rem;
}

.relic-body a {
  color: var(--cream);
  text-decoration: none;
}

.relic-body a:hover {
  color: var(--cream-dim);
}

.split {
  display: grid;
  gap: 0;
}

.split .nicho {
  margin: 0 1rem;
}

.split-copy {
  padding: 1.8rem 1rem 2.2rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
    align-items: center;
    gap: 2rem;
    padding: 2.2rem 0;
  }

  .split .nicho {
    margin: 0;
  }

  .split-copy {
    padding: 0;
  }
}

.rule-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

@media (min-width: 760px) {
  .rule-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rule-card strong {
  font-family: var(--font-display);
  color: var(--gilt);
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.45rem;
}

.rule-card p {
  color: var(--cream-dim);
}

/* Catalog */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.3rem;
}

.filter-chip,
.size-chip {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream-dim);
  background: transparent;
  border: 1px solid var(--soapstone);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.filter-chip[aria-pressed="true"],
.size-chip.is-on {
  border-color: var(--gilt);
  color: var(--cream);
}

.size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 1rem;
}

.empty-note {
  color: var(--soapstone);
  padding: 1.2rem 0;
}

.crumbs {
  font-size: 0.88rem;
  color: var(--soapstone);
  margin-bottom: 1.1rem;
}

.crumbs a {
  color: var(--malachite-hover);
  text-decoration: none;
}

.product-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .product-layout {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2.2rem;
    align-items: start;
  }
}

.product-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Cart & checkout */

.two-col {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 860px) {
  .two-col {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.cart-row {
  display: grid;
  grid-template-columns: 5.2rem 1fr auto;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.cart-row img {
  width: 5.2rem;
  height: 6.4rem;
  object-fit: cover;
  border-radius: 40% 40% 3px 3px / 18% 18% 3px 3px;
  border: 1px solid var(--gilt);
}

.cart-row p {
  margin: 0.15rem 0;
  color: var(--cream-dim);
  font-size: 0.9rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0;
}

.qty button {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--gilt);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--malachite-hover);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.resumo-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  color: var(--cream-dim);
  border-bottom: 1px solid rgba(139, 142, 134, 0.25);
}

.resumo-line.total {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.15rem;
  border-bottom: 0;
  margin-top: 0.3rem;
}

.contact-grid {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.aside-box + .aside-box {
  margin-top: 1rem;
}

.aside-box h2 {
  font-size: 1.15rem;
}

.aside-box p,
.legal p,
.legal li {
  color: var(--cream-dim);
}

.legal {
  max-width: 46rem;
}

.legal h2 {
  margin-top: 1.6rem;
}

.legal ul {
  padding-left: 1.15rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.id-box {
  margin: 1rem 0 1.3rem;
}

.id-box p {
  margin-bottom: 0.25rem;
}

/* Footer */

#site-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--gilt);
  background: var(--jacaranda-deep);
  padding: 2rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1.15fr;
  }
}

#site-footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}

#site-footer p,
.footer-links a {
  color: var(--cream-dim);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin: 0.28rem 0;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cream);
}

.news-form form {
  display: grid;
  gap: 0.45rem;
}

.footer-legal {
  margin-top: 1.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--soapstone);
  font-size: 0.88rem;
}

/* Toast */

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: grid;
  gap: 0.5rem;
}

.toast {
  background: var(--jacaranda-mid);
  color: var(--cream);
  border: 1px solid var(--gilt);
  padding: 0.7rem 0.9rem;
  max-width: 18rem;
  box-shadow: inset 0 0 0 4px var(--jacaranda-mid), inset 0 0 0 5px var(--gilt);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
