/* Thessara - tema da marca sobre o Bootstrap 5.
   Cores oficiais extraidas dos arquivos da marca (11/10/2026):
   azul #20386A, dourado #C9AA6A, bege #E7D5C3, off white #F5F1EA.
   O nome "Thessara" na tipografia correta e usado via wordmark oficial em
   imagem (assets/brand/); para textos do tema usamos a serifa de exibicao
   Cormorant Garamond (silhueta serifada). */

:root {
  --thessara-gold: #c9aa6a;
  --thessara-gold-dark: #a8874a;
  --thessara-gold-light: #e3cba1;
  --thessara-blue: #20386a;
  --thessara-blue-dark: #16264b;
  --thessara-cream: #f5f1ea;
  --thessara-bege: #e7d5c3;
  --thessara-ink: #26221e;
  --thessara-muted: #7a726a;

  --bs-primary: #20386a;
  --bs-primary-rgb: 32, 56, 106;
  --bs-body-color: #26221e;
  --bs-body-bg: #ffffff;
  --bs-link-color: #20386a;
  --bs-link-hover-color: #a8874a;
  --bs-headings-color: #20386a;
  --bs-border-color: #e8e2d9;
  --bs-border-radius: 0.25rem;
  --bs-body-font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  --bs-headings-font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --bs-headings-font-weight: 500;
}

/* `overflow-x` nos dois: no body sozinho o html ainda rola e sobra uma faixa
   branca a direita em telas estreitas (galeria/CTA passam da largura). */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--bs-body-font-family);
  color: var(--thessara-ink);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}
/* O CTA fixo do rodape (produto) precisa de espaco para nao cobrir o rodape.
   Esse espaco fica DENTRO do rodape (mesma cor), nao como padding do body --
   era ele que virava uma faixa branca embaixo do rodape. */
body.has-mobile-cta { padding-bottom: 0; }
body.has-mobile-cta .footer { padding-bottom: calc(2rem + 86px); }
@media (min-width: 992px) {
  body.has-mobile-cta .footer { padding-bottom: 2rem; }
}

button, a, .btn, input, select, textarea { touch-action: manipulation; }

h1, h2, h3, h4, h5, .display-font {
  font-family: var(--bs-headings-font-family);
  color: var(--thessara-blue);
  font-weight: 500;
  letter-spacing: 0.02em;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ topo */
.announcement-bar {
  background: var(--thessara-blue);
  color: var(--thessara-cream);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  min-height: 38px;
  line-height: 1.45;
}
.announcement-bar a { color: var(--thessara-gold-light); }

.navbar-thessara {
  background: rgba(245, 241, 234, 0.96);
  border-bottom: 1px solid var(--bs-border-color);
  padding: 1rem 0;
}
.navbar-thessara .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  margin-right: 0.5rem;
}
.navbar-thessara .navbar-brand .brand-symbol { height: 36px; width: auto; display: block; }
.navbar-thessara .navbar-brand .brand-wordmark { height: 32px; width: auto; display: block; }
.navbar-thessara .navbar-brand:hover { opacity: 0.8; text-decoration: none; }
.navbar-thessara .nav-link {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--thessara-ink);
  margin: 0 0.55rem;
}
.navbar-thessara .nav-link:hover,
.navbar-thessara .nav-link.active { color: var(--thessara-blue); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--thessara-gold);
  color: #fff;
  border-radius: 50%;
  min-width: 19px;
  height: 19px;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; }
/* Os slides ficam empilhados na MESMA celula do grid: o hero assume a altura
   do maior slide (sem pulo de layout) e a troca e um cross-fade de opacidade. */
#hero-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.hero-slide {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, var(--thessara-cream), var(--thessara-bege));
  position: relative;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* visibility entra com atraso na saida para o fade ser visto */
  transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.8s ease, visibility 0s;
}
.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
}
/* Ate 767px vale a imagem do celular; sem ela o slide cai na do desktop. */
.hero-slide > img.hero-img-mobile { display: none; }
/* Slide so com imagem: a foto aparece inteira (sem veu) e define a altura do
   banner, dentro de limites -- as proporcoes reais chegam em --hero-ratio-*
   pelo index.html (min/max impedem faixa fina ou banner gigante). */
.hero-slide--image-only > img {
  object-fit: contain;
  opacity: 1;
}
.hero-slide--image-only {
  min-height: 420px;
  aspect-ratio: var(--hero-ratio-desktop, 2.4);
  /* teto de altura: banner grande sem empurrar o resto da home para fora da tela */
  max-height: min(640px, 60vh);
}
.hero-content { position: relative; z-index: 2; padding: 4rem 0; }
.hero-title { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; color: var(--thessara-blue); }
.hero-subtitle { color: var(--thessara-muted); font-size: 1.05rem; max-width: 34rem; }
.hero-brand { display: block; height: 46px; width: auto; margin-bottom: 1.3rem; }

@media (max-width: 767.98px) {
  .hero-slide > img.hero-img-desktop { display: none; }
  .hero-slide > img.hero-img-mobile { display: block; }
  /* Sem imagem mobile cadastrada, a proporcao da desktop e reaproveitada. */
  .hero-slide--image-only {
    min-height: 320px;
    aspect-ratio: var(--hero-ratio-mobile, var(--hero-ratio-desktop, 1));
    max-height: min(560px, 65vh);
  }
}

/* ------------------------------------------------------------------ botoes */
.btn {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
}
.btn-gold {
  background: var(--thessara-gold);
  border-color: var(--thessara-gold);
  color: #fff;
}
.btn-gold:hover, .btn-gold:focus {
  background: var(--thessara-gold-dark);
  border-color: var(--thessara-gold-dark);
  color: #fff;
}
/* icones inline do UI.icon(): alinhados com o texto e sem encolher */
.btn svg, .input-group-text svg { vertical-align: -0.15em; flex-shrink: 0; }
.btn-outline-gold {
  border-color: var(--thessara-gold);
  color: var(--thessara-gold-dark);
}
.btn-outline-gold:hover { background: var(--thessara-gold); border-color: var(--thessara-gold); color: #fff; }

/* ------------------------------------------------------------------ produtos */
.product-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 0.75rem 1.75rem rgba(0,0,0,0.10) !important; }
.product-card .card-title { letter-spacing: 0.08em; font-size: 0.7rem; }
.card-img-top-wrapper { overflow: hidden; aspect-ratio: 1; }
.card-img-top { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .card-img-top { transform: scale(1.04); }

.badge-promo { background: var(--thessara-gold); }
.price-from { font-size: 0.72rem; color: var(--thessara-muted); }

/* ------------------------------------------------------------------ produto */
.gallery-main {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: 0.25rem;
  background: var(--thessara-cream);
}
.gallery-thumb {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.2rem;
  cursor: pointer;
  opacity: 0.7;
}
.gallery-thumb.active { border-color: var(--thessara-gold); opacity: 1; }

.variant-option { border: 1px solid var(--bs-border-color); cursor: pointer; }
.variant-option.active { border-color: var(--thessara-gold); background: var(--thessara-cream); }
.variant-option:has(input:disabled) { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

.stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stock-ok { background: #4c9a6a; }
.stock-low { background: #d9a441; }
.stock-out { background: #c1554e; }

/* ------------------------------------------------------------------ checkout */
.checkout-step {
  border-left: 3px solid var(--bs-border-color);
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
}
.checkout-step.active { border-left-color: var(--thessara-gold); }

.summary-line { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 0.3rem 0; }
.summary-total {
  border-top: 1px solid var(--bs-border-color);
  margin-top: 0.6rem;
  padding-top: 0.8rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.pix-box { background: var(--thessara-cream); border: 1px dashed var(--thessara-gold); }
.pix-copy {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  word-break: break-all;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  padding: 0.6rem;
  border-radius: 0.2rem;
}

.order-item-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 0.2rem; }

/* ------------------------------------------------------------------ secoes */
.section-title { position: relative; padding-bottom: 0.9rem; margin-bottom: 2.2rem; }
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 46px;
  height: 2px;
  background: var(--thessara-gold);
}
.text-center .section-title::after { left: 50%; transform: translateX(-50%); }

.testimonial-card { background: var(--thessara-cream); border: 0; }
.stars { color: var(--thessara-gold); letter-spacing: 2px; }

.footer {
  background: var(--thessara-blue-dark);
  color: #cfc8bd;
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}
.footer .footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.footer .footer-brand .footer-symbol { height: 54px; width: auto; }
.footer .footer-brand .footer-wordmark { height: 30px; width: auto; }
.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfc8bd;
  max-width: 100%;
}
.pay-chip svg { flex-shrink: 0; }
.footer h6 { color: var(--thessara-gold-light); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; }
.footer a { color: #cfc8bd; }
.footer a:hover { color: var(--thessara-gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.5rem; padding-top: 1.4rem; font-size: 0.8rem; }

/* ---------------------------------------- compartilhado entre loja e admin */
.stat-value { font-family: var(--bs-headings-font-family); font-size: 2rem; line-height: 1; }
.badge-status { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ------------------------------------------------ boas-vindas (conta) */
.welcome-card { border-radius: 0.5rem; }
.welcome-mark {
  width: 54px; height: 54px; margin-inline: auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--thessara-cream); color: var(--thessara-gold-dark);
}
.welcome-video { position: relative; background: #000; }
/* contain, e nao cover: o admin pode mandar video quadrado ou 16:9, e nenhum
   dos dois pode ser cortado. O fundo preto segura as barras de letterbox. */
.welcome-video video { display: block; width: 100%; max-height: 45vh; object-fit: contain; }
.welcome-video-sound {
  position: absolute; right: .6rem; bottom: .6rem;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); color: #fff;
}
.welcome-video-sound:hover { background: rgba(0, 0, 0, .75); }
.welcome-video-sound .ico-off { display: none; }
.welcome-video-sound[data-on="off"] { background: rgba(0, 0, 0, .4); opacity: .75; }
.welcome-video-sound[data-on="off"] .ico-on { display: none; }
.welcome-video-sound[data-on="off"] .ico-off { display: block; }

/* ------------------------------------------------------------------ util */
.text-muted-2 { color: var(--thessara-muted) !important; }
.bg-cream { background: var(--thessara-cream) !important; }
.min-w-120 { min-width: 120px; }
.cursor-pointer { cursor: pointer; }
.qr-image { max-width: 260px; width: 100%; image-rendering: pixelated; }
.min-w-0 { min-width: 0; }

/* CTA fixo no rodape so vale em telas pequenas (produto) */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border-top: 1px solid var(--bs-border-color);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.10);
}
.mobile-cta .mobile-cta-price { line-height: 1.15; white-space: nowrap; }
.mobile-cta .btn { flex-grow: 1; margin: 0; padding: 0.9rem 1rem; font-size: 0.85rem; }
@media (min-width: 992px) { .mobile-cta { display: none; } }

@media (hover: none) {
  .product-card:hover { transform: none; box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08) !important; }
  .product-card:hover .card-img-top { transform: none; }
}

@media (max-width: 575.98px) {
  .announcement-bar { font-size: 0.68rem; letter-spacing: 0.04em; }
  #toast-host { left: 1rem; right: 1rem; top: 0.75rem; transform: none; }
  #toast-host .toast { width: 100%; }
  .navbar-thessara .navbar-brand .brand-symbol { height: 30px; }
  .navbar-thessara .navbar-brand .brand-wordmark { height: 26px; }
  .hero-brand { height: 30px; }
  .navbar-thessara { padding: 0.7rem 0; }
  .navbar-toggler { padding: 0.45rem 0.6rem; margin-right: -0.3rem; }
  .navbar-thessara .nav-link { padding: 0.75rem 0; margin: 0; border-bottom: 1px solid #f1ede6; }
  .navbar-thessara .navbar-nav:last-child .nav-link { border-bottom: 0; }
}

@media (max-width: 768px) {
  .hero-slide { min-height: 400px; }
  .hero-slide--image-only { min-height: 320px; }
  .hero-title { font-size: 2rem; }
  .hero-content { padding: 2.5rem 0; }
  .hero-subtitle { font-size: 0.98rem; }
  .hero-brand { height: 34px; }
  .gallery-thumb { width: 64px; height: 64px; }
  .footer { padding: 2.5rem 0 1.5rem; margin-top: 3rem; }
}
