/* EleganPt — loja online (estilo elegante, moda) */
:root {
  --ink: #1c1a16;
  --muted: #8c857a;
  --line: #ece7dd;
  --bg: #fffdf9;
  --sand: #f5f1e9;
  --sand-2: #efeae0;
  --accent: #9c7a4d;
  --accent-ink: #7d5f38;
  --ok: #2f7d4f;
  --shadow: 0 18px 50px rgba(28, 22, 12, 0.09);
  --shadow-sm: 0 6px 18px rgba(28, 22, 12, 0.06);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Cabeçalho ---------- */
.topbar {
  background: var(--ink);
  color: #f3efe7;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
}
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.brand {
  font-family: "Unbounded", var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand span { color: var(--accent); }
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--muted);
  font-weight: 500;
  margin-top: 5px;
  text-transform: uppercase;
}
.search {
  justify-self: center;
  width: min(420px, 90%);
  position: relative;
}
.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--sand);
  border-radius: 2px;
  padding: 12px 18px 12px 40px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search input::placeholder { color: #a89f92; letter-spacing: 0.02em; }
.search input:focus { border-color: var(--accent); background: var(--bg); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { justify-self: end; }
.cart-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 2px;
  padding: 11px 16px 11px 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.cart-btn:hover { border-color: var(--ink); }
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Navegação de categorias ---------- */
nav.cats {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.cats-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 2px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.2s;
}
.pill .n { color: #bdb6a9; font-weight: 400; }
.pill:hover { color: var(--ink); }
.pill.active { background: var(--ink); color: #fff; }
.pill.active .n { color: #a99f8d; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1240px;
  margin: 40px auto 8px;
  padding: 0 24px;
}
.hero-box {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.hero-box .eyebrow {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 500;
}
.hero-box h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 68px);
  margin: 0;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.hero-box .rule { width: 54px; height: 1px; background: var(--accent); margin: 6px 0; }
.hero-box p { margin: 0; color: var(--muted); max-width: 520px; font-weight: 300; font-size: 16px; }

/* ---------- Destaques (mais comprados) ---------- */
.destaques { background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 30px; }
.destaques-inner { max-width: 1240px; margin: 0 auto; padding: 34px 24px 40px; }
.destaques-head h2 {
  font-family: var(--serif); font-size: 38px; font-weight: 500; margin: 0;
  display: inline-flex; align-items: center; gap: 12px; letter-spacing: 0.01em;
}
.destaques-head h2::before { content: "★"; color: var(--accent); font-size: 24px; }
.destaques-head p { margin: 6px 0 26px; color: var(--muted); font-size: 15px; font-weight: 300; }
.destaques-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px;
}
.card .rank {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.sold {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--accent-ink); font-weight: 500; letter-spacing: 0.04em;
}
.sold::before { content: "🛒"; font-size: 11px; }

/* Promoções "2 por X" */
.promo-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 2px;
}
.card .thumb .tag { /* categoria passa para baixo quando há promo */ }
.card:has(.promo-tag) .tag { top: 38px; }
.promo {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 2px;
  align-self: flex-start;
}
.modal-card .m-price .promo { font-size: 12px; vertical-align: middle; margin-left: 8px; }
.citem-promo { font-size: 10px; color: var(--accent-ink); letter-spacing: 0.06em; text-transform: uppercase; margin: 2px 0; }

/* ---------- Barra de ferramentas ---------- */
.toolbar {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.toolbar .count { color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.toolbar label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.toolbar select {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  letter-spacing: 0.02em;
}

/* ---------- Grelha de produtos ---------- */
.grid {
  max-width: 1240px;
  margin: 18px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px 22px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card .thumb {
  aspect-ratio: 3 / 4;
  background: var(--sand);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card .thumb .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 42px; color: #cfc7b8;
}
.tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card .name { font-size: 15px; font-weight: 400; cursor: pointer; line-height: 1.35; }
.card .name:hover { color: var(--accent-ink); }
.card .row { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: 0.01em; }
.add {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 2px;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.22s, color 0.22s, transform 0.1s;
}
.add:hover { background: var(--ink); color: #fff; }
.add:active { transform: scale(0.96); }

.empty { max-width: 1240px; margin: 60px auto; padding: 0 24px; text-align: center; color: var(--muted); }

/* ---------- Carrinho (drawer) ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20,16,8,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 50;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background: #fff; z-index: 60; transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,0.12);
}
.drawer.open { transform: translateX(0); }
.drawer header {
  padding: 20px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer header h2 { font-family: var(--serif); margin: 0; font-size: 20px; }
.icon-btn { border: none; background: none; font-size: 22px; color: var(--muted); line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 22px; }
.citem { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.citem img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--sand); }
.citem .nm { font-size: 13px; font-weight: 600; }
.citem .ct { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 24px; height: 24px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-weight: 700; }
.citem .pr { text-align: right; font-weight: 700; font-family: var(--serif); }
.citem .rm { display: block; margin-top: 8px; font-size: 11px; color: #b04a3a; background: none; border: none; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.drawer footer { padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.totrow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.totrow .t { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.totrow .v { font-family: var(--serif); font-size: 26px; font-weight: 700; }
.checkout {
  width: 100%; border: none; background: var(--ink); color: #fff;
  padding: 16px; border-radius: 2px; font-weight: 500; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.2s;
}
.checkout:hover { background: var(--accent-ink); }
.checkout:disabled { background: #d6cfc2; cursor: not-allowed; }

/* ---------- Modal de produto ---------- */
.modal {
  position: fixed; inset: 0; z-index: 70; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(20,16,8,0.5);
}
.modal.open { display: flex; }
.modal-card {
  background: #fff; border-radius: 18px; overflow: hidden;
  width: min(880px, 100%); max-height: 88vh; display: grid;
  grid-template-columns: 1fr 1fr; box-shadow: var(--shadow);
}
.modal-card .m-img { background: var(--sand); }
.modal-card .m-img img { width: 100%; height: 100%; object-fit: cover; max-height: 88vh; }
.modal-card .m-body { padding: 30px 30px 26px; overflow-y: auto; position: relative; }
.modal-card .m-close { position: absolute; top: 14px; right: 16px; }
.modal-card .m-cat { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); font-weight: 500; }
.modal-card h3 { font-family: var(--serif); font-size: 36px; font-weight: 500; margin: 8px 0 4px; line-height: 1.05; }
.modal-card .m-price { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 12px 0 18px; }
.modal-card .m-desc { color: #57503f; font-size: 14px; line-height: 1.75; font-weight: 300; }
.modal-card .m-meta { margin-top: 16px; font-size: 12px; color: var(--muted); }
.modal-card .add { margin-top: 20px; padding: 14px 20px; font-size: 14px; }

/* ---------- Rodapé ---------- */
footer.site { border-top: 1px solid var(--line); background: var(--sand); margin-top: 60px; }
footer h4 { font-weight: 500; }
footer .foot-legal { letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px;
}
footer .brand { font-size: 19px; }
footer p, footer li { color: var(--muted); font-size: 13px; margin: 4px 0; }
footer h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 10px; }
footer ul { list-style: none; padding: 0; margin: 0; }
.foot-legal { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; border-top: 1px solid var(--line); }

/* ---------- Links legais no rodapé ---------- */
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: center; }
.foot-legal a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.foot-legal a:hover { color: var(--ink); border-color: var(--accent); }
.foot-legal .sep { color: #c9c1b3; }

/* ---------- Banner de consentimento de cookies (RGPD) ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: var(--ink); color: #f3efe7;
  display: none; gap: 20px; align-items: center; justify-content: space-between;
  padding: 18px 24px; box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
}
.cookie-banner.open { display: flex; }
.cb-text { max-width: 760px; }
.cb-text strong { font-family: var(--serif); font-size: 18px; font-weight: 600; display: block; margin-bottom: 4px; }
.cb-text p { margin: 0; font-size: 13px; color: #d8d2c6; font-weight: 300; line-height: 1.55; }
.cb-text a { color: #fff; text-decoration: underline; }
.cb-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.btn-ghost, .btn-solid {
  border-radius: 2px; padding: 11px 18px; font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; font-family: inherit; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-ghost { background: transparent; color: #f3efe7; border: 1px solid rgba(243,239,231,0.4); }
.btn-ghost:hover { border-color: #f3efe7; }
.btn-solid { background: #f3efe7; color: var(--ink); border: 1px solid #f3efe7; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Modal legal (privacidade / cookies) ---------- */
.legal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20,16,8,0.55); }
.legal.open { display: flex; }
.legal-card { background: var(--bg); border-radius: 4px; width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.legal-card header { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.legal-card header h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0; }
.legal-body { overflow-y: auto; padding: 24px 28px; }
.legal-body h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 20px 0 6px; }
.legal-body h3:first-child { margin-top: 0; }
.legal-body p, .legal-body li { font-size: 13.5px; line-height: 1.7; color: #4a453d; font-weight: 300; }
.legal-body ul { padding-left: 18px; margin: 6px 0; }
.legal-body strong { font-weight: 500; color: var(--ink); }
.legal-card footer { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Preferências de cookies (toggles) */
.pref { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pref:last-of-type { border-bottom: none; }
.pref .pref-txt h4 { margin: 0 0 3px; font-size: 14px; font-weight: 500; }
.pref .pref-txt p { margin: 0; font-size: 12.5px; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #cfc7b8; border-radius: 999px; transition: 0.2s; cursor: pointer; }
.slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { background: var(--ink); opacity: 0.5; cursor: not-allowed; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-dark:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .topbar { font-size: 10px; letter-spacing: 0.06em; padding: 6px 12px; }
  .header-inner { grid-template-columns: 1fr auto; padding: 10px 16px; gap: 10px; }
  .brand { font-size: 18px; }
  .brand small { font-size: 8px; letter-spacing: 0.24em; }
  .cart-btn { padding: 9px 12px; font-size: 11px; }
  .search { grid-column: 1 / -1; order: 3; width: 100%; }
  .search input { padding: 10px 16px 10px 38px; }
  .cats-inner { padding: 8px 16px; gap: 4px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .pill { padding: 7px 12px; white-space: nowrap; }
  .hero { margin: 20px auto 4px; padding: 0 16px; }
  .hero-box { padding: 40px 22px; }
  .destaques-inner, .toolbar, .grid { padding-left: 16px; padding-right: 16px; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-card .m-img { max-height: 34vh; }
  .footer-inner { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .cb-actions { justify-content: stretch; }
  .cb-actions button { flex: 1; }
}
@media (max-width: 520px) {
  .topbar { display: none; }
  .brand { font-size: 16px; }
  .header-inner { padding: 9px 14px; }
}
