/*
Theme Name: Dêvi Doces
Theme URI: https://instagram.com/devi.doces
Author: Notoriety Ads
Author URI: https://instagram.com/notorietyads
Description: Tema one-page para a Dêvi Doces — doceria artesanal de Jundiaí/SP. Design premium em rubi e dourado, com animações sutis e totalmente responsivo. Informações de contato editáveis em Aparência > Personalizar.
Version: 1.0
Requires at least: 5.0
Requires PHP: 7.0
License: GNU General Public License v2 or later
Text Domain: devi-doces
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --rubi: #7B0D26;
  --rubi-dark: #5A0919;
  --rubi-deep: #3D0610;
  --marsala: #6B2737;
  --cereja: #9B1535;
  --gold: #C9A84C;
  --gold-light: #E2C97E;
  --gold-pale: #F5E9C8;
  --cream: #FDF6EC;
  --white: #FFFFFF;
  --text-dark: #1A0008;
}
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background: var(--cream); color: var(--text-dark); overflow-x: hidden; }

/* NAV */
nav.devi-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--rubi-deep);
  border-bottom: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 60px;
}
body.admin-bar nav.devi-nav { top: 32px; }
.nav-logo { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.nav-logo img { height: 50px; width: auto; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-pale); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important; color: var(--rubi-deep) !important;
  padding: 0.45rem 1.1rem !important; border-radius: 2px; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

/* HERO */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--rubi-deep) 0%, var(--rubi) 55%, var(--marsala) 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 70px 2rem 5rem; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(201,168,76,0.09) 0%, transparent 60%),
                    radial-gradient(circle at 80% 20%, rgba(201,168,76,0.07) 0%, transparent 50%);
}
.hero-inner { position: relative; max-width: 720px; }
.hero-logo { height: 520px; width: auto; margin-bottom: 1.8rem; filter: drop-shadow(0 4px 24px rgba(201,168,76,0.25)); }
.hero-eyebrow { font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem; }
.hero-sub {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic; color: var(--gold-pale); opacity: 0.85; margin-bottom: 2.5rem; letter-spacing: 0.06em;
}
.hero-divider { width: 60px; height: 1px; background: var(--gold); margin: 0 auto 2.5rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold); color: var(--rubi-deep); padding: 0.85rem 2.2rem;
  font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  border-radius: 2px; transition: background 0.2s, transform 0.15s; display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline {
  border: 1px solid var(--gold); color: var(--gold-light); padding: 0.85rem 2.2rem;
  font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  border-radius: 2px; transition: background 0.2s; display: inline-block;
}
.btn-outline:hover { background: rgba(201,168,76,0.1); }

/* SECTIONS */
section { padding: 5.5rem 2rem; }
.section-eyebrow { font-size: 0.6rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem; text-align: center; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; color: var(--rubi); text-align: center; margin-bottom: 0.5rem; }
.section-divider { width: 48px; height: 1px; background: var(--gold); margin: 1rem auto 3rem; }

/* CARDÁPIO - GRID COM FOTOS */
#cardapio { background: var(--cream); }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem; max-width: 1100px; margin: 0 auto;
}
.cat-card {
  background: var(--white); border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
  transition: transform 0.25s, box-shadow 0.25s; cursor: default;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(123,13,38,0.12); }
.cat-img {
  width: 100%; height: 210px; object-fit: cover;
  display: block; transition: transform 0.4s;
}
.cat-card:hover .cat-img { transform: scale(1.04); }
.cat-img-wrap { overflow: hidden; position: relative; }
.cat-body { padding: 1.4rem 1.5rem 1.6rem; }
.cat-name { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; color: var(--rubi); margin-bottom: 0.4rem; }
.cat-desc { font-size: 0.72rem; color: #7A4050; line-height: 1.7; letter-spacing: 0.02em; }

/* SOBRE */
#sobre { background: var(--rubi-deep); color: var(--gold-pale); text-align: center; }
#sobre .section-title { color: var(--gold-light); }
.sobre-text { max-width: 680px; margin: 0 auto; font-size: 0.9rem; line-height: 1.9; color: rgba(245,233,200,0.82); font-weight: 300; }
.sobre-stats { display: flex; justify-content: center; gap: 4rem; margin-top: 3rem; flex-wrap: wrap; }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 2.8rem; font-weight: 600; color: var(--gold); display: block; }
.stat-label { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-pale); opacity: 0.7; }

/* PRAZO + PAGAMENTO */
#info { background: var(--white); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 860px; margin: 0 auto; }
.info-card { border: 1px solid rgba(201,168,76,0.3); border-radius: 6px; padding: 2rem; }
.info-icon { font-size: 1.8rem; margin-bottom: 0.8rem; display: block; }
.info-title { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; color: var(--rubi); margin-bottom: 0.8rem; }
.info-text { font-size: 0.78rem; color: #5A2030; line-height: 1.8; }
.info-badge {
  display: inline-block; background: var(--gold-pale); border: 1px solid var(--gold);
  color: var(--rubi-deep); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.3rem 0.8rem; border-radius: 20px; margin: 0.2rem 0.2rem 0 0;
}

/* HORÁRIO */
#horario { background: var(--cream); }
.horario-wrap { max-width: 500px; margin: 0 auto; }
.horario-card {
  border: 1px solid rgba(201,168,76,0.3); border-radius: 6px;
  padding: 1.8rem; text-align: center; background: var(--white); margin-bottom: 1rem;
}
.horario-day { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem; }
.horario-time { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600; color: var(--rubi); }
.delivery-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--gold-pale); border: 1px solid var(--gold);
  color: var(--rubi-deep); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; padding: 0.4rem 1rem;
  border-radius: 20px; margin-top: 1.5rem;
}

/* CONTATO */
#contato { background: linear-gradient(135deg, var(--rubi-deep), var(--marsala)); text-align: center; }
#contato .section-title { color: var(--gold-light); }
.contato-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.contato-item {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(201,168,76,0.3);
  border-radius: 6px; padding: 1.5rem 2rem; min-width: 220px; text-align: center;
}
.contato-label { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.contato-value { color: var(--gold-pale); font-size: 0.88rem; line-height: 1.6; }
.contato-value a { color: inherit; text-decoration: none; }
.contato-value a:hover { color: var(--gold-light); }
.whats-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: #25D366; color: #fff; padding: 0.9rem 2.2rem;
  border-radius: 2px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  margin-top: 2.5rem; transition: opacity 0.2s;
}
.whats-btn:hover { opacity: 0.88; }

/* FOOTER */
footer.devi-footer {
  background: var(--rubi-deep); border-top: 0.5px solid rgba(201,168,76,0.2);
  text-align: center; padding: 2.5rem 2rem;
}
.footer-logo-img { height: 140px; width: auto; margin-bottom: 0.8rem; }
.footer-slogan { font-family: 'Cormorant Garamond', serif; font-style: italic; color: rgba(245,233,200,0.55); font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer-copy { font-size: 0.62rem; color: rgba(245,233,200,0.35); letter-spacing: 0.1em; }

/* MOBILE */
@media (max-width: 640px) {
  nav.devi-nav { padding: 0 1.2rem; }
  .nav-links { display: none; }
  .info-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .hero-logo { height: 300px; }
}

/* enquadramento individual por categoria */
.categories-grid .cat-card:nth-child(1) .cat-img { object-position: center 35%; } /* Bolos */
.categories-grid .cat-card:nth-child(2) .cat-img { object-position: center 55%; } /* Brigadeiros */
.categories-grid .cat-card:nth-child(3) .cat-img { object-position: center 40%; } /* Doces Finos */
.categories-grid .cat-card:nth-child(4) .cat-img { object-position: center 45%; } /* Lembrancinhas */
.categories-grid .cat-card:nth-child(5) .cat-img { object-position: center 65%; } /* Finger Food */
.categories-grid .cat-card:nth-child(6) .cat-img { object-position: center 65%; } /* Cesta de Café */
.categories-grid .cat-card:nth-child(7) .cat-img { object-position: center 65%; } /* Personalizados */
.categories-grid .cat-card:nth-child(8) .cat-img { object-fit: contain; background: #fdf0e0; padding: 0.5rem; object-position: center center; } /* Delivery */

/* Botão flutuante WhatsApp */
.whats-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background: #25D366;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.whats-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}
.whats-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}
/* Tooltip */
.whats-float::before {
  content: 'Fazer pedido';
  position: absolute;
  right: 70px;
  background: #1a1a1a;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.whats-float:hover::before {
  opacity: 1;
}
@media (max-width: 640px) {
  .whats-float { bottom: 1.2rem; right: 1.2rem; width: 54px; height: 54px; }
  .whats-float::before { display: none; }
}

/* ============================================================
   ANIMAÇÕES SUTIS — UI/UX
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* --- Entrada do hero (carregamento da página) --- */
  @keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes heroLogoIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
  @keyframes heroLineGrow {
    from { transform: scaleX(0); opacity: 0; }
    to   { transform: scaleX(1); opacity: 1; }
  }
  .hero-logo    { animation: heroLogoIn 1.1s cubic-bezier(.22,1,.36,1) both; }
  .hero-eyebrow { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .35s both; }
  .hero-sub     { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .5s both; }
  .hero-divider { animation: heroLineGrow .9s cubic-bezier(.22,1,.36,1) .7s both; }
  .hero-btns    { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .85s both; }

  /* --- Brilho dourado respirando no fundo do hero --- */
  @keyframes heroGlow {
    0%, 100% { opacity: .65; }
    50%      { opacity: 1; }
  }
  .hero::before { animation: heroGlow 9s ease-in-out infinite; }

  /* --- Reveal ao rolar (classes aplicadas via JS) --- */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
  }
  .reveal.in-view { opacity: 1; transform: translateY(0); }

  /* Divisores das seções crescem do centro */
  .section-divider.reveal { transform: scaleX(0); transform-origin: center; }
  .section-divider.reveal.in-view { transform: scaleX(1); }

  /* --- Coração pulsando na seção Sobre --- */
  @keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    12%      { transform: scale(1.14); }
    24%      { transform: scale(1); }
    36%      { transform: scale(1.08); }
    48%      { transform: scale(1); }
  }
  .stat-heart { display: inline-block; animation: heartBeat 2.8s ease-in-out infinite; }

  /* --- Pulso suave no botão flutuante do WhatsApp --- */
  @keyframes whatsPulse {
    0%   { box-shadow: 0 4px 20px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,.4); }
    70%  { box-shadow: 0 4px 20px rgba(37,211,102,.4), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 20px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,0); }
  }
  .whats-float { animation: whatsPulse 3.2s ease-out infinite; }

  /* --- Brilho deslizante nos botões principais (hover) --- */
  .btn-primary, .whats-btn { position: relative; overflow: hidden; }
  .btn-primary::after, .whats-btn::after {
    content: ''; position: absolute; top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg); pointer-events: none;
    transition: left .6s ease;
  }
  .btn-primary:hover::after, .whats-btn:hover::after { left: 140%; }

  /* --- Micro-interações nos cards --- */
  .cat-name { transition: color .3s; }
  .cat-card:hover .cat-name { color: var(--cereja); }
  .info-card, .horario-card, .contato-item {
    transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s, border-color .3s;
  }
  .info-card:hover, .horario-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 10px 28px rgba(123,13,38,.10);
  }
  .contato-item:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    background: rgba(255,255,255,.09);
  }

  /* --- Nav: sombra sutil ao rolar + underline animado --- */
  nav.devi-nav { transition: box-shadow .3s ease; }
  nav.devi-nav.nav-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.35); }
  .nav-links a:not(.nav-cta) { position: relative; }
  .nav-links a:not(.nav-cta)::after {
    content: ''; position: absolute; left: 0; bottom: -4px;
    width: 100%; height: 1px; background: var(--gold);
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
  }
  .nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
}

/* ============================================================
   REFINOS DE RESPONSIVIDADE MOBILE
   ============================================================ */
@media (max-width: 640px) {
  section { padding: 4rem 1.25rem; }
  .hero { padding: 80px 1.5rem 4rem; }
  .hero-btns { gap: .8rem; }
  .btn-primary, .btn-outline { width: 100%; max-width: 300px; text-align: center; }
  .sobre-stats { gap: 2.2rem; }
  .info-card { padding: 1.6rem 1.4rem; }
  .contato-item { width: 100%; min-width: 0; }
  .whats-btn { width: 100%; max-width: 340px; justify-content: center; }
  .footer-logo-img { height: 110px; }
  /* No mobile os links do menu ficam ocultos — mantém visível apenas o CTA "Fazer pedido" */
  .nav-links { display: flex !important; }
  .nav-links li { display: none; }
  .nav-links li:last-child { display: block; }
  body.admin-bar nav.devi-nav { top: 46px; }
}
@media (max-width: 380px) {
  .hero-logo { height: 240px; }
  .sobre-stats { gap: 1.6rem; }
}
