/* ============================================================
   Bècla Cookies — identidade da marca
   Dourado caramelo #B69351 · Branco marfim #FFFFF3 · Preto
   Paleta monocromática (sem cores saturadas)
   ============================================================ */

:root {
  --gold: #b69351;         /* dourado caramelo — cor-assinatura */
  --gold-dark: #9a7a3e;    /* variação escura (hover/profundidade) */
  --ivory: #fffff3;        /* branco marfim */
  --cream: #f6efdd;        /* marfim quente pra fundos */
  --cream-deep: #eee3cc;   /* marfim um tom abaixo */
  --ink: #1c150c;          /* quase preto quente */
  --ink-soft: #5c4f3c;     /* texto secundário */
  --muted: #a08a63;        /* dourado apagado pra detalhes */
  --line: #e2d5b8;         /* linhas/divisórias */

  --maxw: 1180px;          /* largura máxima do conteúdo (alinha todas as seções) */
  --pad-x: 64px;           /* respiro horizontal padrão das seções */
  --radius: 28px;          /* raio padrão das seções */
  --gap: 18px;             /* espaçamento entre seções */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* respiro pra âncoras não ficarem escondidas atrás da navbar fixa */
[id] {
  scroll-margin-top: 110px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  padding: 18px;
}

/* ==================== NAVBAR ==================== */

.navbar {
  position: sticky;
  top: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 34px;
  border-radius: 22px;
  margin-bottom: var(--gap);
  background: var(--ivory);
  box-shadow: 0 6px 20px rgba(60, 45, 20, 0.08);
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.navbar__brand img {
  height: 34px;
  width: auto;
  display: block;
}

.navbar__links {
  display: flex;
  gap: 34px;
  margin: 0 auto;
}

.navbar__links a {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.navbar__links a:hover {
  color: var(--gold);
}

.navbar__cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 11px 24px;
  background: var(--gold);
  color: var(--ivory);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(182, 147, 81, 0.35);
  transition: background 0.2s;
}

.navbar__cart:hover {
  background: var(--gold-dark);
}

.navbar__cart-icon {
  font-size: 16px;
}

.navbar__cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 243, 0.3);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==================== HERO ==================== */

.hero {
  display: flex;
  min-height: calc(100vh - 36px);
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- Left: image ---------- */

.hero__image {
  position: relative;
  flex: 1 1 48%;
  background: var(--ink);
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8a7c63;
  font-size: 14px;
  letter-spacing: 0.05em;
  border: 2px dashed #4a4131;
}

/* ---------- Right: content ---------- */

.hero__content {
  position: relative;
  flex: 1 1 52%;
  background: var(--gold);
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 72px;
}

.hero__logo {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.hero__logo-img {
  width: 300px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fallback em texto — mostrado só se img/logo.png não existir */
.hero__logo-fallback {
  display: none;
}

.hero__logo-name {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 100px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.hero__logo-sub {
  display: block;
  margin-top: 6px;
  padding-left: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 243, 0.85);
}

.hero__tagline {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
}

.hero__description {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 243, 0.82);
  max-width: 430px;
  margin-bottom: 34px;
}

.hero__cta {
  margin-bottom: 30px;
}

.hero__btn {
  display: inline-block;
  background: var(--ivory);
  color: var(--gold-dark);
  text-decoration: none;
  border-radius: 999px;
  padding: 15px 38px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.badge {
  border: 1px solid rgba(255, 255, 243, 0.7);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ivory);
}

/* ==================== PROMO ==================== */

.promo {
  background: var(--cream);
  padding: 96px var(--pad-x) 120px;
  border-radius: var(--radius);
  margin-top: var(--gap);
}

.promo__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 72px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.promo__text {
  flex: 1 1 400px;
  max-width: 430px;
}

.promo__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.promo__line {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--muted);
}

.promo__heading {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 46px;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 22px;
}

.promo__desc {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 34px;
}

.promo__btn {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 15px 34px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.promo__btn:hover {
  background: var(--gold);
  color: var(--ivory);
}

.promo__image {
  position: relative;
  flex: 1 1 470px;
  max-width: 500px;
  aspect-ratio: 4 / 3;
}

.promo__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
  z-index: 1;
}

.promo__image-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  border: 2px dashed var(--line);
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ---------- Feature columns ---------- */

.features {
  display: flex;
  gap: 48px;
  max-width: var(--maxw);
  margin: 64px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.feature-card {
  flex: 1;
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 12px;
}

.feature-card p {
  font-weight: 300;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ==================== PRODUCTS ==================== */

.products {
  background: var(--ivory);
  border-radius: var(--radius);
  margin-top: var(--gap);
  padding: 96px var(--pad-x) 100px;
}

.products__title {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin-bottom: 56px;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 26px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.product-card {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(60, 45, 20, 0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* dobra de papel no canto inferior direito */
.product-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, transparent 50%, var(--cream-deep) 50%);
  border-top-left-radius: 8px;
}

.product-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cream-deep);
  overflow: hidden;
}

.product-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.product-card__image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  border: 2px dashed var(--line);
}

.product-card__body {
  padding: 20px 20px 26px;
}

.product-card__name {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 6px;
}

.product-card__desc {
  font-weight: 300;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 16px;
}

.product-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card__price {
  font-weight: 600;
  font-size: 15px;
  color: var(--gold-dark);
}

.product-card__add {
  background: transparent;
  color: var(--gold-dark);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.product-card__add:hover {
  background: var(--gold);
  color: var(--ivory);
  border-color: var(--gold);
}

/* ==================== FOOTER ==================== */

.footer {
  background: var(--ink);
  color: var(--ivory);
  border-radius: var(--radius);
  margin-top: var(--gap);
  padding: 40px var(--pad-x);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 243, 0.14);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__brand img {
  height: 38px;
  width: auto;
  display: block;
}

.footer__addr {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 243, 0.6);
}

.footer__links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 243, 0.78);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--gold);
}

.footer__copy {
  max-width: var(--maxw);
  margin: 18px auto 0;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 243, 0.5);
}

/* ==================== CART FAB ==================== */

.cart-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--ivory);
  font-size: 24px;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 8px 22px rgba(182, 147, 81, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes cart-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.cart-fab.bump,
.navbar__cart.bump {
  animation: cart-bump 0.32s ease;
}

.cart-fab__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== CART DRAWER ==================== */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 21, 12, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
  z-index: 50;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: var(--cream);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
}

.cart.open {
  transform: translateX(0);
}

.cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.cart__header h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}

.cart__close {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--ink-soft);
  cursor: pointer;
}

.cart__items {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
}

.cart__empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item__thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--cream-deep);
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.cart-item__price {
  font-size: 13px;
  color: var(--ink-soft);
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-item__qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: #fff;
  color: var(--gold-dark);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.cart-item__qty span {
  font-size: 14px;
  min-width: 18px;
  text-align: center;
}

.cart-item__remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: underline;
}

.cart__footer {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--line);
}

.cart__total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 16px;
}

.cart__checkout {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s;
}

.cart__checkout:disabled {
  background: #c9bda2;
  cursor: not-allowed;
}

.cart__checkout:not(:disabled):hover {
  background: var(--gold-dark);
}

/* ==================== RESPONSIVE ==================== */

/* ---------- Tablet ( ≤ 980px ) ---------- */
@media (max-width: 980px) {
  :root {
    --pad-x: 40px;
  }

  /* Hero empilha: imagem em cima, conteúdo embaixo */
  .hero {
    flex-direction: column;
    min-height: 0;
  }

  .hero__image {
    min-height: 44vh;
  }

  .hero__content {
    padding: 56px 48px 60px;
  }

  .hero__logo-name {
    font-size: clamp(66px, 11vw, 92px);
  }

  /* Promo empilha e centraliza */
  .promo {
    padding: 72px var(--pad-x) 90px;
    text-align: center;
  }

  .promo__inner {
    flex-direction: column;
    gap: 44px;
  }

  .promo__text {
    max-width: 560px;
  }

  .promo__eyebrow {
    justify-content: center;
  }

  .promo__image {
    width: 100%;
    max-width: 560px;
  }

  /* Produtos em 2 colunas */
  .products {
    padding: 76px var(--pad-x) 84px;
  }

  .products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 24px;
  }
}

/* ---------- Features empilham ( ≤ 760px ) ---------- */
@media (max-width: 760px) {
  .features {
    flex-direction: column;
    gap: 28px;
    text-align: center;
  }
}

/* ---------- Celular ( ≤ 620px ) ---------- */
@media (max-width: 620px) {
  :root {
    --pad-x: 22px;
    --radius: 20px;
    --gap: 12px;
  }

  body {
    padding: 12px;
  }

  /* Navbar: marca + carrinho na 1ª linha, links centralizados embaixo */
  .navbar {
    flex-wrap: wrap;
    row-gap: 14px;
    padding: 16px 20px;
    top: 12px;
  }

  .navbar__brand {
    font-size: 19px;
  }

  .navbar__cart {
    padding: 10px 18px;
    font-size: 13px;
  }

  /* Atalhos escondidos no mobile — sobra só marca + carrinho */
  .navbar__links {
    display: none;
  }

  /* Hero */
  .hero__image {
    min-height: 300px;
  }

  .hero__content {
    padding: 44px 26px 48px;
  }

  .hero__logo-name {
    font-size: clamp(56px, 17vw, 78px);
  }

  .hero__logo-img {
    max-width: 210px;
  }

  .hero__tagline {
    font-size: 13px;
  }

  .hero__badges {
    gap: 10px;
  }

  .badge {
    padding: 9px 16px;
    font-size: 11px;
  }

  /* Promo */
  .promo {
    padding: 56px var(--pad-x) 64px;
  }

  .promo__heading {
    font-size: clamp(30px, 8vw, 38px);
  }

  .promo__image {
    aspect-ratio: 4 / 3;
  }

  /* Produtos: 1 coluna, cards grandes e bonitos */
  .products {
    padding: 60px var(--pad-x) 68px;
  }

  .products__title {
    font-size: 19px;
    letter-spacing: 0.18em;
    margin-bottom: 40px;
  }

  .products__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 420px;
  }

  /* Footer empilha e centraliza */
  .footer {
    padding: 40px var(--pad-x);
    text-align: center;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
  }

  .footer__col {
    align-items: center;
    gap: 12px;
  }

  .footer__brand img {
    height: 42px;
    margin: 0 auto;
  }

  .footer__addr {
    line-height: 1.6;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 24px;
  }

  .footer__copy {
    margin-top: 20px;
    line-height: 1.6;
  }

  /* Carrinho ocupa quase a tela toda */
  .cart {
    width: 100%;
    max-width: 100%;
  }

  .cart-fab {
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
    font-size: 22px;
  }
}
