@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Karla:wght@300;400;500;600;700&display=swap");

:root {
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;

  --bg-app: #F3EEE6;
  --bg-card: #FDFBF7;
  --bg-elevated: #ECE4D3;
  --bg-muted: #E7DECB;
  --thumb-bg: #EBE2CF;

  --text: #2C271F;
  --muted: #7A7160;

  --accent: #5B6E52;
  --accent-hover: #48583F;
  --accent-soft: rgba(91, 110, 82, 0.13);
  --on-accent: #FBF9F3;

  --border: rgba(44, 39, 31, 0.14);
  --border-strong: rgba(44, 39, 31, 0.30);

  --danger: #8C3F3F;

  --radius: 6px;
  --radius-sm: 3px;
  --shadow-card: 0 1px 2px rgba(44, 39, 31, 0.05);
}

[data-theme="dark"] {
  --bg-app: #22201B;
  --bg-card: #2A2721;
  --bg-elevated: #322E26;
  --bg-muted: #383329;
  --thumb-bg: #322E26;
  --text: #F2EDE1;
  --muted: #B4AA96;
  --border: rgba(242, 237, 225, 0.14);
  --border-strong: rgba(242, 237, 225, 0.28);
  --on-accent: #FBF9F3;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-app);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.22;
  color: var(--text);
  letter-spacing: 0.005em;
}

a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- buttons / inputs (shared contract) ---------- */

button { font-family: inherit; }

.btn, .btn-primary, .btn-outline, .btn-secondary,
button.btn-wa, a.btn-wa, .btn-cart, .btn-add-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.btn-primary, a.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline, .btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover, .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-wa {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
  padding: 11px 20px;
}
.btn-wa:hover { border-color: var(--accent); color: var(--accent); }

.btn-cart {
  background: var(--text);
  color: var(--bg-app);
  border-color: var(--text);
  position: relative;
  padding: 11px 20px;
}
.btn-cart:hover { background: var(--accent); border-color: var(--accent); }
.btn-cart .badge, .cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon svg { width: 19px; height: 19px; }

.inp, .input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
}
.inp::placeholder, .input::placeholder { color: var(--muted); }
.inp:focus, .input:focus { outline: none; border-color: var(--accent); }

.field { display: block; }
.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---------- header ---------- */

.app-header, .site-header {
  background: var(--bg-app);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(6px);
}
.header-flex, .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-logo { height: 36px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.b-name, #brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.b-tag, .brand-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links, .nav {
  display: flex;
  gap: 28px;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav-links a, .nav a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color .18s ease, color .18s ease;
}
.nav-links a:hover, .nav a:hover { color: var(--accent); border-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(24, 22, 18, 0.08) 0%, rgba(24, 22, 18, 0.78) 100%),
    radial-gradient(120% 90% at 12% 8%, #7C8B70 0%, transparent 55%),
    radial-gradient(110% 90% at 88% 0%, #B9AC8D 0%, transparent 60%),
    linear-gradient(155deg, #6E7C60 0%, #40473A 45%, #26241E 100%);
}
.hero-inner {
  position: relative;
  padding: 96px 0 72px;
  max-width: 720px;
  color: #F7F3E9;
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #D8CDA8;
  margin-bottom: 18px;
}
.hero-inner h1 {
  color: #FBF9F3;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-style: italic;
  font-weight: 500;
  max-width: 16ch;
  margin-bottom: 20px;
}
.hero-inner p#hero-sub {
  color: rgba(251, 249, 243, 0.86);
  font-size: 1.02rem;
  max-width: 46ch;
  margin-bottom: 32px;
  line-height: 1.75;
}
.hero-inner .btn-primary { background: #FBF9F3; color: #2C271F; border-color: #FBF9F3; }
.hero-inner .btn-primary:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.hero-stats {
  margin-top: 26px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(251, 249, 243, 0.75);
  text-transform: uppercase;
}
.hero-stats span { color: #FBF9F3; font-weight: 700; }

/* ---------- section heads ---------- */

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.sec-head h2 { font-size: 1.7rem; font-weight: 500; }
.sec-sub { color: var(--muted); font-size: 0.92rem; max-width: 36ch; }
.badge-count, .badge {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- editorial rooms ---------- */

.editorial-section { padding: 80px 0 40px; }
.room-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.room-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--border);
}
.room-card-img {
  position: absolute;
  inset: 0;
  transition: transform .5s ease;
}
.room-card:hover .room-card-img { transform: scale(1.05); }
.room-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 22, 18, 0) 45%, rgba(24, 22, 18, 0.72) 100%);
}
.room-card-sala { background: linear-gradient(150deg, #8B9A7C 0%, #5B6E52 55%, #33392A 100%); }
.room-card-quarto { background: linear-gradient(150deg, #D9CDB2 0%, #B7A886 55%, #6F644A 100%); }
.room-card-cozinha { background: linear-gradient(150deg, #C7BBA1 0%, #93876B 55%, #4E4534 100%); }
.room-card-decor { background: linear-gradient(150deg, #A9AE94 0%, #5B6E52 55%, #2C3524 100%); }
.room-card-caption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  color: #FBF9F3;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ---------- filters ---------- */

.filters-section {
  padding: 26px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.filters-section .container { display: flex; flex-direction: column; gap: 16px; }
.inp-search { max-width: 420px; }
.cat-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip:hover:not(.is-active) { border-color: var(--accent); color: var(--accent); }

/* ---------- products ---------- */

.products-section { padding: 72px 0 96px; }
.products-grouped, .products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 24px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--thumb-bg);
  overflow: hidden;
}
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.card:hover .card-thumb { transform: scale(1.04); }
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-app);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}
.card-cat {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-body h3 {
  font-size: 1.02rem;
  font-weight: 500;
  margin: 2px 0 2px;
}
.card-price {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
  padding-top: 8px;
}
.card-price small { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 0.72rem; }
.card-var { font-size: 0.76rem; color: var(--muted); }
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.card-actions .btn, .card-actions a, .card-actions button { flex: 1; padding: 11px 14px; font-size: 0.72rem; }

/* ---------- footer ---------- */

.app-footer, .site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer-about, .footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-brand, #footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
}
.footer-brand-row { display: flex; align-items: center; gap: 10px; }
.footer-brand-row img { border-radius: 999px; }
.footer-quote { color: var(--muted); max-width: 40ch; line-height: 1.7; }
.footer-meta-line { font-size: 0.85rem; color: var(--muted); }
.footer-meta-line span:empty { display: none; }
.footer-ig-link {
  display: inline-block;
  width: fit-content;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}
.footer-ig-link:hover { color: var(--accent); border-color: var(--accent); }
.footer-col h4 {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.footer-col nav, .footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col nav a { text-decoration: none; font-size: 0.9rem; color: var(--text); }
.footer-col nav a:hover { color: var(--accent); }
.footer-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-note { font-size: 0.78rem; color: var(--muted); max-width: 32ch; }
.footer-meta .btn-primary { width: 100%; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------- cart panel ---------- */

.cart-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 22, 18, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.cart-backdrop.is-open, .modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: var(--bg-app);
  border-left: 1px solid var(--border);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s ease;
}
.cart-panel.is-open { transform: translateX(0); }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-head h2 { font-size: 1.15rem; }
.cart-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart-coupon-form { display: flex; gap: 8px; margin-bottom: 6px; }
.cart-coupon-form .inp, .cart-coupon-form .input { flex: 1; }
.cart-coupon-section { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px dashed var(--border-strong); }
.cart-coupon-title {
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.cart-coupon-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cart-coupon-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 10px 5px 12px;
  font-size: 0.76rem;
  cursor: pointer;
}
.cart-coupon-feedback { margin-top: 10px; font-size: 0.78rem; }
.cart-coupon-feedback.is-error { color: var(--danger); }
.cart-coupon-feedback.is-success { color: var(--accent); }
.cart-coupon-feedback.is-info { color: var(--muted); }
.cart-discount-box { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.cart-discount-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--accent);
}

.cart-line {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--thumb-bg);
  border: 1px solid var(--border);
}
.line-title { font-weight: 600; font-size: 0.92rem; }
.line-meta { font-size: 0.78rem; color: var(--muted); }
.line-price { font-weight: 700; font-size: 0.88rem; margin-top: 4px; color: var(--accent); }
.qty-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-val { font-size: 0.86rem; min-width: 16px; text-align: center; }
.line-remove {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.74rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
}
.line-remove:hover { color: var(--danger); }

.cart-foot { padding: 18px 24px 24px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 4px 0; }
.cart-total-row-discount { color: var(--accent); }
.cart-total-row strong { font-family: var(--font-display); font-size: 1.05rem; }
.cart-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cart-foot-empty { padding: 24px; }
.cart-empty { color: var(--muted); font-size: 0.9rem; }

/* ---------- modals ---------- */

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  z-index: 1001;
}
.btn-close, .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.btn-close:hover, .modal-close:hover { color: var(--text); }
.modal h3 { font-size: 1.2rem; margin-bottom: 6px; padding-right: 24px; }
.modal .desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; line-height: 1.6; }
.modal .inp, .modal .input { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

#modal-product-img, .modal-product-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--thumb-bg);
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
#modal-product-title { font-size: 1.25rem; margin-bottom: 6px; }
#modal-product-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; line-height: 1.6; }
.price-big { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); margin: 6px 0 16px; }
#modal-attrs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
#modal-var-wrap { margin: 18px 0; }
#modal-var-label { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
#modal-var-grid, .var-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.var-opt {
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}
.var-opt.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.var-opt.is-disabled { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }
#modal-add { width: 100%; margin-top: 6px; }
#modal-cancel { width: 100%; margin-top: 10px; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .nav-links, .nav { display: none; }
  .room-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grouped, .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { min-height: 60vh; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .header-flex { gap: 8px; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-text { min-width: 0; }
  .b-name, #brand-name, .b-tag, .brand-tagline {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; display: block;
  }
  .brand-logo { height: 28px; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .btn-wa, .btn-cart { padding: 8px 12px; font-size: 0.7rem; white-space: nowrap; }
  .room-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .products-grouped, .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .hero-inner { padding: 64px 0 48px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card-body { padding: 14px; }
  .btn, .btn-primary, .btn-outline, .btn-secondary { padding: 12px 16px; font-size: 0.76rem; }
}
