/* =====================================================
   COOKIES UAI — style.css
   Stack: HTML5 + CSS3 puro (sem frameworks)
   ===================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Paleta — Tema Escuro */
  --cream:        #2c2416;
  --cream-dark:   #1e1609;
  --brown-deep:   #f0e6d3;
  --brown-mid:    #c8a882;
  --brown-light:  #8a6040;
  --orange-accent:#e07a30;
  --white-soft:   #3a2d1a;
  --shadow-color: rgba(0,0,0,.35);

  /* Tipografia */
  --font-display: 'Baloo 2', cursive;
  --font-body:    'Nunito', sans-serif;

  /* Espaçamentos */
  --gap: 1.5rem;
  --radius-card: 20px;
  --radius-img:  14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: #2c2416;
  color: var(--brown-deep);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  min-height: 100vh;
}

/* ---------- HERO ---------- */
.hero {
  background: #1e1609;
  border-bottom: 3px solid #6b4820;
  padding: 2.5rem 1.25rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.logo-wrap {
    width: 220px;
    height: 220px;

    background: #5A3000;
    border: 4px solid #AE7844;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  animation: slideUp .5s ease .15s both;
}

.brand-cookies { color: var(--brown-deep); }
.brand-uai      { color: var(--orange-accent); }

.hero__tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  color: #b09070;
  animation: slideUp .5s ease .3s both;
}

.hero__deco { position: absolute; inset: 0; pointer-events: none; }

.deco-dot {
  position: absolute;
  border-radius: 50%;
  opacity: .18;
  background: #6b4820;
}
.d1 { width:80px; height:80px;  top:-20px; left:-20px; }
.d2 { width:50px; height:50px;  bottom:10px; right:40px; }
.d3 { width:30px; height:30px;  top:30px; right:10px; }
.d4 { width:20px; height:20px;  bottom:30px; left:80px; }
.d5 { width:60px; height:60px;  bottom:-15px; left:-15px; }

/* ---------- MENU WRAPPER ---------- */
.menu-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* ---------- CATEGORIA ---------- */
.category-section {
  margin-bottom: 3.5rem;
  animation: fadeUp .5s ease both;
}

.category-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.category-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.category-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: #f0e6d3;
  position: relative;
}

.category-title::after {
  content: '';
  display: block;
  height: 4px;
  border-radius: 99px;
  background: var(--orange-accent);
  width: 50%;
  margin-top: 4px;
}

/* ---------- GRID DE PRODUTOS ---------- */
.products-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

/* ---------- CARD DE PRODUTO ---------- */
.product-card {
  background: #3a2a16;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 18px var(--shadow-color);
  border: 1px solid #5a3e22;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 12px 32px rgba(61,31,10,.18);
}

.product-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1e1609;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-img) var(--radius-img) 0 0;
  display: block;
  transition: transform .35s ease;
}

.product-card:hover .product-img {
  transform: scale(1.07);
}

.product-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0e6d3;
  line-height: 1.2;
}

.product-desc {
  font-size: .88rem;
  color: #b09070;
  line-height: 1.55;
  flex: 1;
}

.product-price {
  display: inline-block;
  align-self: flex-start;
  background: var(--orange-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: .25rem .75rem;
  border-radius: 99px;
  letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(224,122,48,.35);
}

/* ---------- FOOTER ---------- */
.footer {
  background: #0f0a04;
  color: #f0e6d3;
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
}

.footer__inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer__text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #d4b896;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  padding: .9rem 2.2rem;
  border-radius: 99px;
  width: 100%;
  max-width: 360px;
  justify-content: center;
  letter-spacing: .3px;
  box-shadow: 0 6px 22px rgba(220,39,67,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cta-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 32px rgba(220,39,67,.5);
}

.cta-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer__copy {
  font-size: .8rem;
  color: #6b4820;
  margin-top: .5rem;
}

/* ---------- ANIMAÇÕES ---------- */
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.6); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- MEDIA QUERIES ---------- */
@media (min-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .logo-wrap {
    width: 200px;
    height: 200px;
  }

  .hero__inner {
    flex-direction: row;
    text-align: left;
    gap: 1.75rem;
    align-items: center;
  }

  .hero__text {
    flex: 1;
  }

  .hero__tagline {
    text-align: left;
  }
}

@media (min-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .products-grid.grid-wide {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =====================================================
   CARRINHO DE COMPRAS
   ===================================================== */

/* ── Botão "Adicionar" nos cards ── */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: flex-start;
  background: transparent;
  border: 1.5px solid var(--orange-accent);
  color: var(--orange-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  padding: .3rem .85rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}

.btn-add:hover {
  background: var(--orange-accent);
  color: #fff;
}

.btn-add.added {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}

.product-card-footer {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}

/* ── Botão flutuante ── */
.cart-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 900;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--orange-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(224,122,48,.5);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cart-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(224,122,48,.65);
}

.cart-fab__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #dc2743;
  color: #fff;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transform: scale(0);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}

.cart-fab__badge.visible {
  transform: scale(1);
}

/* ── Overlay + Modal ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-modal {
  background: var(--cream);
  border: 1px solid var(--brown-light);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,1,.57,1);
  overflow: hidden;
}

.cart-overlay.open .cart-modal {
  transform: translateY(0);
}

.cart-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--brown-light);
  flex-shrink: 0;
}

.cart-modal__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #f0e6d3;
}

.cart-modal__close {
  background: var(--white-soft);
  border: 1px solid var(--brown-light);
  color: #b09070;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.cart-modal__close:hover { background: var(--brown-light); }

.cart-modal__body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Lista de itens ── */
.cart-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: var(--white-soft);
  border: 1px solid var(--brown-light);
  border-radius: 14px;
  padding: .75rem 1rem;
}

.cart-item__info {
  flex: 1;
}

.cart-item__name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: #f0e6d3;
  line-height: 1.2;
}

.cart-item__price {
  font-size: .82rem;
  color: #b09070;
  margin-top: 2px;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}

.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--brown-light);
  background: var(--white-soft);
  color: #f0e6d3;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  line-height: 1;
  padding: 0;
}

.cart-item__qty-btn:hover {
  background: var(--orange-accent);
  border-color: var(--orange-accent);
}

.cart-item__qty {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #f0e6d3;
  min-width: 20px;
  text-align: center;
}

/* ── Estado vazio ── */
.cart-empty {
  text-align: center;
  color: #6b4820;
  font-style: italic;
  padding: 1.5rem 0;
  display: none;
}

.cart-empty.visible { display: block; }

/* ── Total ── */
.cart-total {
  display: none;
  justify-content: space-between;
  align-items: center;
  background: var(--white-soft);
  border: 1px solid var(--brown-light);
  border-radius: 12px;
  padding: .85rem 1.1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #d4b896;
}

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

.cart-total strong {
  font-size: 1.25rem;
  color: var(--orange-accent);
}

/* ── Formulário de checkout ── */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  border-top: 1px solid #3a2d1a;
  padding-top: 1rem;
}

.cf-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.cf-group > label {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: #b09070;
  letter-spacing: .3px;
}

.cf-group input[type="text"],
.cf-group input[type="time"],
.cf-group select,
.cf-group textarea {
  background: var(--white-soft);
  border: 1px solid var(--brown-light);
  border-radius: 10px;
  color: #f0e6d3;
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .65rem .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}

.cf-group input[type="text"]:focus,
.cf-group input[type="time"]:focus,
.cf-group select:focus,
.cf-group textarea:focus {
  border-color: var(--orange-accent);
}

.cf-group select option {
  background: #2c2416;
  color: #f0e6d3;
}

.cf-group textarea {
  resize: vertical;
}

.cf-radio-group {
  display: flex;
  gap: .75rem;
}

.cf-radio {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--white-soft);
  border: 1px solid var(--brown-light);
  border-radius: 10px;
  padding: .6rem 1rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: .9rem;
  color: #d4b896;
  flex: 1;
  justify-content: center;
  transition: border-color .2s, background .2s, color .2s;
  user-select: none;
}

.cf-radio input[type="radio"] {
  display: none;
}

.cf-radio.selected {
  border-color: var(--orange-accent);
  background: rgba(224,122,48,.12);
  color: var(--orange-accent);
}

/* ── Botão WhatsApp ── */
.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 1rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s;
  margin-top: .25rem;
  width: 100%;
}

.whatsapp-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37,211,102,.5);
}

.whatsapp-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ── Desktop: modal centralizado ── */
@media (min-width: 600px) {
  .cart-overlay {
    align-items: center;
  }
  .cart-modal {
    border-radius: 24px;
    max-height: 85vh;
  }
}

/* ── Centralizar/Zoom em cada produtos ── */

.img-chocolate {
    object-position: 50% 45%;
    transform: scale(1.0);
}

.img-tradicional {
    object-position: 50% 46%;
    transform: scale(1.0);
}

.img-redvelvet {
    object-position: 50% 53%;
    transform: scale(1.0);
}

.img-raffaello {
    object-position: 50% 55%;
    transform: scale(1.0);
}

.img-browniechocolate {
    object-position: 50% 40%;
}

.img-browniemaracuja {
    object-position: 50% 45%;
}

.img-browniedoceleite {
    object-position: 50% 42%;
}

.img-brownieninho {
    object-position: 60% 45%;
}

.img-minicookies {
    object-position: 50% 60%;
    transform: scale(1.0);
}
