:root {
  --bg: #f8fff4;
  --bg-soft: #e8f8ff;
  --surface: #ffffff;
  --surface-2: #efffe8;
  --text: #21092d;
  --muted: #587169;
  --primary: #6f1d8f;
  --primary-dark: #4d0f68;
  --secondary: #5fd3ff;
  --accent: #8bd34b;
  --danger: #d71920;
  --border: rgba(111, 29, 143, 0.18);
  --shadow: 0 24px 70px rgba(64, 18, 113, 0.18);
  --radius: 24px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 244, 223, 0.90);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 15px;
  box-shadow: 0 10px 26px rgba(227, 39, 47, 0.30);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.navbar a {
  transition: 0.25s ease;
}

.navbar a:hover {
  color: var(--primary-dark);
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--border);
}

.hero {
  min-height: 680px;
  position: relative;
  display: flex;
  align-items: center;
  background: url("https://images.unsplash.com/photo-1501443762994-82bd5dace89a?auto=format&fit=crop&w=1400&q=85") center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(33, 9, 45, 0.90), rgba(111, 29, 143, 0.58), rgba(95, 211, 255, 0.16));
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - var(--container)) / 2));
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(227, 39, 47, 0.18);
  border: 1px solid rgba(227, 39, 47, 0.34);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  max-width: 820px;
}

.hero p {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #6f1d8f, #5fd3ff);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(227, 39, 47, 0.30);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-whatsapp {
  background: var(--accent);
  color: #062a13;
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.22);
}

.btn-full {
  width: 100%;
}

.section {
  padding: 96px 0;
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 34px;
}

.section-heading .eyebrow {
  color: #6f1d8f;
  background: rgba(255, 178, 46, 0.22);
}

.section-heading h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  letter-spacing: -0.06em;
}

.section-heading p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1.02rem;
}

.promo-section {
  padding-bottom: 48px;
}

.promo-banner {
  overflow: hidden;
  min-height: 86px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #6f1d8f, #5fd3ff);
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 187, 51, 0.28);
}

.promo-loading,
.no-promos {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.promo-track {
  display: flex;
  width: max-content;
  animation: promoMove 24s linear infinite;
}

.promo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 0 46px;
  font-size: 1.1rem;
  font-weight: 900;
  white-space: nowrap;
}

.promo-item i {
  color: var(--primary);
}

@keyframes promoMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 900;
  transition: 0.22s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, #6f1d8f, #5fd3ff);
  color: #ffffff;
  border-color: var(--secondary);
}

.status-message {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  margin: 14px 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(191, 35, 25, 0.10);
  transition: 0.25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.product-image {
  height: 220px;
  width: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #e8f8ff, #8bd34b);
}

.product-content {
  padding: 20px;
}

.product-category {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #6f1d8f;
  background: rgba(255, 178, 46, 0.24);
  font-weight: 900;
  text-transform: uppercase;
}

.product-content h3 {
  margin-top: 12px;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.product-content p {
  color: var(--muted);
  margin-top: 8px;
  min-height: 46px;
  line-height: 1.5;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.price {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--secondary);
}

.add-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  transition: 0.22s ease;
}

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

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100dvh;
  z-index: 100;
  background: var(--surface);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: 0.32s ease;
  display: flex;
  flex-direction: column;
}

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

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(33, 18, 5, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-header,
.cart-footer {
  padding: 22px;
  border-bottom: 1px solid var(--border);
}

.cart-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  margin-top: auto;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cart-header h2 {
  letter-spacing: -0.05em;
}

.cart-header p {
  color: var(--muted);
  margin-top: 4px;
}

.cart-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--secondary);
}

.cart-items {
  flex: 1;
  padding: 16px 22px;
  overflow: auto;
}

.empty-cart {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  gap: 10px;
}

.empty-cart i {
  font-size: 2.4rem;
  color: var(--primary);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item h4 {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.cart-item p {
  color: var(--muted);
  margin-top: 5px;
  font-size: 0.9rem;
}

.remove-item {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--danger);
  background: rgba(229, 72, 77, 0.11);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 1.15rem;
}

.cart-total strong {
  font-size: 1.45rem;
  color: var(--secondary);
}

.floating-cart {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  background: linear-gradient(135deg, #6f1d8f, #5fd3ff);
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
}

.floating-cart span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
}

.footer {
  background: #21092d;
  color: #fff;
  padding-top: 62px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

.footer h3 {
  margin-bottom: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-bottom {
  margin-top: 46px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 13px 18px;
  border-radius: 14px;
  background: #21092d;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
  transition: 0.25s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: grid;
    place-items: center;
  }

  .navbar {
    position: absolute;
    top: 78px;
    left: 16px;
    right: 16px;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  .navbar.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hero {
    min-height: 600px;
  }

  .products-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 70px 0;
  }

  .hero-content {
    width: min(100% - 32px, 760px);
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

.gallery-section {
  background: var(--surface-2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-grid img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(191, 35, 25, 0.14);
}

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

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

  .gallery-grid img {
    height: 360px;
  }
}

/* Logo do Palácio do Sorvete */
.brand-logo {
  width: 64px;
  height: 50px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border: 1px solid rgba(111, 29, 143, 0.22);
  box-shadow: 0 10px 28px rgba(111, 29, 143, 0.14);
}
.footer-brand .brand-logo {
  width: 64px;
  height: 50px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border: 1px solid rgba(111, 29, 143, 0.22);
  box-shadow: 0 10px 28px rgba(111, 29, 143, 0.14);
}

/* Alternância de tema claro/escuro */
:root[data-theme="dark"] {
  --bg: #15081f;
  --bg-soft: #241033;
  --surface: #1d0d2a;
  --surface-2: #27143a;
  --text: #fbf6ff;
  --muted: #d9c9e8;
  --primary: #a855f7;
  --primary-dark: #c084fc;
  --secondary: #5fd3ff;
  --accent: #8bd34b;
  --border: rgba(168, 85, 247, 0.26);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .site-header {
  background: rgba(18, 13, 9, 0.9);
}

:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .cart-drawer,
:root[data-theme="dark"] .navbar {
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .footer {
  background: #0b0503;
}

:root[data-theme="dark"] .price,
:root[data-theme="dark"] .cart-total strong,
:root[data-theme="dark"] .cart-close,
:root[data-theme="dark"] .mobile-menu-btn {
  color: var(--primary);
}

.theme-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 900;
}

.theme-toggle i {
  color: var(--primary);
}

@media (max-width: 900px) {
  .theme-toggle span {
    display: none;
  }
}

/* Botão de tema dentro do menu, ao lado de Contato */
.navbar .theme-toggle {
  margin-left: 4px;
}

@media (max-width: 900px) {
  .navbar .theme-toggle {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .theme-toggle span {
    display: inline;
  }
}


.menu-hero {
  min-height: 420px;
  display: flex;
  align-items: center;
  position: relative;
  background: url("https://images.unsplash.com/photo-1563805042-7684c019e1cb?auto=format&fit=crop&w=1400&q=85") center/cover no-repeat;
}
.menu-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(33, 9, 45, 0.86), rgba(111, 29, 143, 0.58), rgba(139, 211, 75, 0.18));
}
.menu-hero .container { position: relative; color: #fff; }
.menu-hero h1 { margin-top: 16px; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .95; letter-spacing: -0.07em; }
.menu-hero p { margin-top: 16px; max-width: 640px; color: rgba(255,255,255,.86); font-size: 1.12rem; }
.visit-card { margin-top: 26px; display: inline-flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(14px); font-weight: 800; }
.menu-page .product-card { position: relative; }
.menu-page .add-btn { display: none; }
.menu-page .product-content p { min-height: auto; }
.menu-page .product-bottom { margin-top: 14px; }
.menu-page .price { font-size: 1.45rem; color: var(--primary); }
