/* ==========================================================
   Fontes (hospedadas localmente — subconjunto latin, cobre pt-BR)
   ========================================================== */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../assets/fonts/caveat-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2");
}

/* ==========================================================
   DaiMe Cookies — Design Tokens (identidade visual da marca)
   ========================================================== */
:root {
  --color-creme: #F7ECDD;
  --color-marrom-quase-preto: #231513;
  --color-marrom-escuro: #722817;
  --color-terracota: #C67440;
  --color-vermelho-queimado: #B84D4A;
  --color-bege-dourado: #DBA865;
  --color-amarelo-baunilha: #F4DBB3;

  --font-display: "Fraunces", serif;
  --font-script: "Caveat", cursive;
  --font-body: "DM Sans", sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-creme);
  color: var(--color-marrom-quase-preto);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 3vw;
  background: var(--color-creme);
  border-bottom: 1px solid rgba(35, 21, 19, 0.1);
}

.navbar__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--color-marrom-quase-preto);
  text-decoration: none;
  white-space: nowrap;
}

.navbar__nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.navbar__nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-marrom-quase-preto);
  text-decoration: none;
}

.navbar__nav a:hover {
  color: var(--color-vermelho-queimado);
}

.navbar__cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-creme);
  background: var(--color-marrom-escuro);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
}

.navbar__cart:hover {
  background: var(--color-marrom-quase-preto);
}

.navbar__cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-vermelho-queimado);
  color: var(--color-creme);
  font-size: 0.7rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.navbar__cart-badge--visible {
  display: flex;
}

.navbar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--color-marrom-quase-preto);
  cursor: pointer;
}

@media (max-width: 700px) {
  .navbar__toggle {
    display: flex;
  }

  .navbar__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-creme);
    border-bottom: 1px solid rgba(35, 21, 19, 0.1);
    box-shadow: 0 12px 20px rgba(35, 21, 19, 0.08);
  }

  .navbar__nav--open {
    display: flex;
  }

  .navbar__nav a {
    padding: 1rem 6vw;
    border-top: 1px solid rgba(35, 21, 19, 0.08);
  }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(85vh, 720px);
}

.hero__panel {
  position: relative;
  overflow: hidden;
}

/* ---------- Coluna esquerda ---------- */
.hero__panel--content {
  background: var(--color-marrom-escuro);
  color: var(--color-creme);
  display: flex;
  align-items: center;
  padding: 6vw 5vw;
}

.hero__content {
  max-width: 620px;
}

.hero__trademark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  opacity: 0.6;
  margin-bottom: 1.5rem;
}

.hero__trademark span {
  vertical-align: super;
  font-size: 0.6rem;
}

.hero__logo-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.hero__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  line-height: 0.82;
  letter-spacing: -0.01em;
}

.hero__logo-badge {
  width: clamp(85px, 9vw, 130px);
  height: auto;
  flex-shrink: 0;
  margin-top: clamp(0.75rem, 3.5vw, 1.75rem);
}

.hero__logo-line {
  display: block;
}

.hero__logo-line--1,
.hero__logo-line--2 {
  font-size: clamp(4.5rem, 9vw, 8rem);
  color: var(--color-creme);
}

.hero__logo-line--2 {
  margin-top: -0.08em;
  margin-left: 0.35em;
}

.hero__logo-line--3 {
  font-family: var(--font-script);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--color-terracota);
  margin-top: 0.1em;
  margin-left: 0.6em;
  transform: rotate(-4deg);
}

.hero__tagline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero__description {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  line-height: 1.6;
  color: var(--color-amarelo-baunilha);
  max-width: 480px;
  margin-bottom: 2.25rem;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--color-creme);
  border: 1.5px solid var(--color-creme);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  white-space: nowrap;
}

/* ---------- Coluna direita (imagem reservada) ---------- */
.hero__panel--media {
  background: var(--color-amarelo-baunilha);
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__photo--missing {
  display: none;
}

.hero__panel--media .img-placeholder--bg {
  display: none;
}

.hero__panel--media .img-placeholder--bg.img-placeholder--visible {
  display: flex;
}

.img-placeholder {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(
    45deg,
    rgba(35, 21, 19, 0.06),
    rgba(35, 21, 19, 0.06) 10px,
    rgba(35, 21, 19, 0.02) 10px,
    rgba(35, 21, 19, 0.02) 20px
  );
  border: 2px dashed rgba(35, 21, 19, 0.35);
  color: var(--color-marrom-quase-preto);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 1rem;
}

.img-placeholder::before {
  content: attr(data-label);
  max-width: 80%;
}

.img-placeholder--bg {
  inset: 0;
}

/* ==========================================================
   Responsivo
   ========================================================== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__panel--content {
    padding: 12vw 7vw;
  }

  .hero__panel--media {
    aspect-ratio: 1305 / 1205;
  }

  .hero__logo-line--2 {
    margin-left: 0.15em;
  }

  .hero__logo-line--3 {
    margin-left: 0.2em;
  }
}

/* ==========================================================
   FEATURE (seção "Cookies Artesanais Fresquinhos Todo Dia")
   ========================================================== */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4vw;
  background: var(--color-creme);
  padding: 7vw 6vw;
}

.feature__content {
  max-width: 480px;
}

.feature__eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-vermelho-queimado);
  margin-bottom: 1rem;
}

.feature__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.15;
  color: var(--color-marrom-quase-preto);
  margin-bottom: 1.5rem;
}

.feature__text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-marrom-escuro);
  margin-bottom: 2rem;
}

.pill-button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-marrom-quase-preto);
  background: transparent;
  border: 1.5px solid var(--color-marrom-quase-preto);
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pill-button:hover {
  background: var(--color-marrom-quase-preto);
  color: var(--color-creme);
}

.feature__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature__video {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(35, 21, 19, 0.22);
}

.feature__video--missing {
  display: none;
}

.feature__media .img-placeholder--rounded {
  display: none;
}

.feature__media .img-placeholder--rounded.img-placeholder--visible {
  display: flex;
}

.img-placeholder--rounded {
  position: static;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature__media {
    order: -1;
  }
}

/* ==========================================================
   CATÁLOGO DE PRODUTOS
   ========================================================== */
.catalog {
  background: var(--color-amarelo-baunilha);
  padding: 6vw;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

.product-card {
  background: var(--color-creme);
  border-radius: 20px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
}

.product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 1rem;
}

.product-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.product-card__photo--missing {
  display: none;
}

.product-card__media .img-placeholder--product {
  display: none;
}

.product-card__media .img-placeholder--product.img-placeholder--visible {
  display: flex;
}

.img-placeholder--product {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  font-size: 0.65rem;
}

.product-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--color-marrom-quase-preto);
  margin-bottom: 0.25rem;
}

.product-card__subtitle {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(35, 21, 19, 0.55);
  margin-bottom: 0.5rem;
}

.product-card__description {
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(35, 21, 19, 0.7);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-card__price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.product-card__price-original {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: rgba(35, 21, 19, 0.45);
  text-decoration: line-through;
}

.product-card__price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-creme);
  background: var(--color-vermelho-queimado);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

.product-card__add {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--color-marrom-escuro);
  color: var(--color-creme);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.product-card__add:hover {
  background: var(--color-marrom-quase-preto);
  transform: scale(1.08);
}

.product-card__add:disabled {
  background: rgba(35, 21, 19, 0.25);
  cursor: not-allowed;
}

.product-card--pending {
  opacity: 0.6;
}

.product-card--pending .product-card__price {
  background: rgba(35, 21, 19, 0.25);
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   CARRINHO
   ========================================================== */
.pill-button--solid {
  width: 100%;
  background: var(--color-marrom-escuro);
  color: var(--color-creme);
  border-color: var(--color-marrom-escuro);
}

.pill-button--solid:hover {
  background: var(--color-marrom-quase-preto);
  border-color: var(--color-marrom-quase-preto);
}

.pill-button--solid:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pill-button--solid:disabled:hover {
  background: var(--color-marrom-escuro);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 21, 19, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}

.cart-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100vw);
  background: var(--color-creme);
  box-shadow: -8px 0 30px rgba(35, 21, 19, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
}

.cart-drawer--open {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.cart-drawer__header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-marrom-quase-preto);
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-marrom-quase-preto);
  cursor: pointer;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer__empty {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(35, 21, 19, 0.55);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(35, 21, 19, 0.1);
}

.cart-item__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-marrom-quase-preto);
}

.cart-item__price {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(35, 21, 19, 0.55);
  margin-top: 0.15rem;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-marrom-quase-preto);
  background: transparent;
  color: var(--color-marrom-quase-preto);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__qty {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 1rem;
  text-align: center;
}

.cart-item__remove {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--color-vermelho-queimado);
  cursor: pointer;
  line-height: 1;
}

.cart-drawer__footer {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(35, 21, 19, 0.1);
}

.cart-drawer__subtotal {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-marrom-quase-preto);
  margin-bottom: 1rem;
}

/* ==========================================================
   Área de entrega
   ========================================================== */
.delivery {
  background: var(--color-creme);
  text-align: center;
  padding: 5rem 6vw;
  border-top: 1px solid rgba(35, 21, 19, 0.08);
}

.delivery__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-marrom-escuro);
  color: var(--color-creme);
  margin-bottom: 1.25rem;
}

.delivery__eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-vermelho-queimado);
  margin-bottom: 0.6rem;
}

.delivery__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  color: var(--color-marrom-escuro);
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.delivery__text {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
}

.cart-drawer--open ~ .cart-fab {
  display: none;
}

.cart-drawer__note {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0.65;
}

.site-footer {
  background: var(--color-marrom-quase-preto);
  color: var(--color-creme);
  text-align: center;
  padding: 4vw 6vw;
}

.site-footer__eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.site-footer__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-creme);
  text-decoration: none;
  border: 1.5px solid var(--color-creme);
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-footer__whatsapp:hover {
  background: var(--color-creme);
  color: var(--color-marrom-quase-preto);
}

.site-footer__legal {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-creme);
  opacity: 0.7;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__legal:hover {
  opacity: 1;
}

/* ==========================================================
   Página de privacidade
   ========================================================== */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 6vw 5rem;
  line-height: 1.7;
}

.legal__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-marrom-escuro);
  text-decoration: none;
}

.legal__back:hover {
  text-decoration: underline;
}

.legal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  color: var(--color-marrom-escuro);
}

.legal__updated {
  margin: 0.5rem 0 2rem;
  font-size: 0.85rem;
  opacity: 0.65;
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 2rem 0 0.5rem;
}

.legal p + p {
  margin-top: 0.75rem;
}

.legal a:not(.legal__back) {
  color: var(--color-marrom-escuro);
  font-weight: 600;
}

/* ==========================================================
   CARRINHO FLUTUANTE (sincronizado com o carrinho da navbar)
   ========================================================== */
.cart-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--color-marrom-escuro);
  color: var(--color-creme);
  box-shadow: 0 10px 26px rgba(35, 21, 19, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  transition: transform 0.15s ease, background 0.2s ease;
}

.cart-fab:hover {
  background: var(--color-marrom-quase-preto);
  transform: scale(1.06);
}

.cart-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-vermelho-queimado);
  color: var(--color-creme);
  border: 2px solid var(--color-creme);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.cart-fab__badge--visible {
  display: flex;
}

@media (max-width: 700px) {
  .cart-fab {
    bottom: 1.1rem;
    right: 1.1rem;
    width: 52px;
    height: 52px;
  }
}
