/* ============================================================
   JG.Tentações e Sabores — Design System Oficial
   E-commerce Mobile-First Confeitaria & Salgados
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

:root {
  /* Paleta Oficial JG.Tentações e Sabores */
  --brand-primary: #C8104F;
  --brand-primary-dark: #970B3C;
  --brand-primary-light: #F4D5DF;
  --brand-subtle: #FDF2F5;
  --brand-dark: #970B3C; /* alias para compatibilidade */

  --bg-soft: #FFF2EE;
  --surface: #FFF9F5;
  --surface-white: #FFFFFF;
  --chocolate: #552719;
  --chocolate-light: #8E4E3B;

  --text-primary: #281715;
  --text-secondary: #6E5C57;
  --muted: #8E7A75;

  --border: #EADCD6;
  --border-strong: #D5C2B9;
  --border-brand: #F4D5DF;

  --success: #238A57;
  --success-bg: #E8F7EE;
  --error: #C62828;
  --error-bg: #FDEDEC;
  --danger: #C62828; /* alias para compatibilidade */
  --wa: #25D366;

  /* Tokens de Raio */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Sombras Suaves */
  --shadow-sm: 0 2px 8px rgba(40, 23, 21, 0.04);
  --shadow-md: 0 6px 20px rgba(40, 23, 21, 0.07);
  --shadow-lg: 0 12px 32px rgba(151, 11, 60, 0.12);
  --shadow-pill: 0 4px 14px rgba(200, 16, 79, 0.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-soft);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 70px;
}

/* Tipografias Especiais */
.font-script {
  font-family: 'Great Vibes', cursive;
}

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

a { color: var(--brand-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-primary-dark); }

/* ============================================================
   HEADER & NAVEGAÇÃO MOBILE / DESKTOP
   ============================================================ */
.shop-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}

.shop-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.shop-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.shop-brand img.logo {
  height: 44px;
  width: auto;
  max-width: 220px;
}

/* Menu Central em Pills */
.shop-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 900px) {
  .shop-nav { display: flex; }
}

.nav-pill {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.18s ease;
}

.nav-pill:hover {
  background: var(--brand-subtle);
  color: var(--brand-primary);
}

.nav-pill.active {
  background: var(--brand-primary);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(200, 16, 79, 0.3);
}

/* Ações Direitas: Busca, Conta, Carrinho */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-bar-inline {
  display: none;
  position: relative;
  width: 220px;
}

@media (min-width: 768px) {
  .search-bar-inline { display: block; }
}

.search-bar-inline input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar-inline input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 79, 0.1);
}

.search-bar-inline .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  text-decoration: none;
}

/* Botão "Instalar app": pílula de destaque, revelada por JS quando instalável.
   O [hidden] tem de vencer o display do .icon-btn, daí o !important. */
.pwa-install-btn {
  width: auto;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.pwa-install-btn:hover {
  filter: brightness(1.05);
  color: #fff;
}

.pwa-install-btn[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .pwa-install-label {
    display: none; /* em ecrãs pequenos fica só o ícone, para não competir com o resto do cabeçalho */
  }

  .pwa-install-btn {
    width: 40px;
    padding: 0;
    border-radius: 50%;
  }
}

.icon-btn:hover {
  background: var(--brand-subtle);
  border-color: var(--brand-primary-light);
  color: var(--brand-primary);
}

.icon-btn .badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

/* ============================================================
   HERO SECTION (Espelhado na referência da JG.Tentações)
   ============================================================ */
.hero-wrapper {
  position: relative;
  background: linear-gradient(135deg, #FFF9F5 0%, #FFF2EE 50%, #FDE4EB 100%);
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(151, 11, 60, 0.05);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 40px 20px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
}

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 50px 20px 60px 20px;
  }
}

.hero-text {
  text-align: center;
}

@media (min-width: 860px) {
  .hero-text { text-align: left; }
}

.hero-welcome {
  font-family: 'Great Vibes', cursive;
  font-size: 38px;
  color: var(--chocolate);
  margin: 0;
  line-height: 1;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-primary-dark);
  margin: 6px 0 12px 0;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .hero-welcome { font-size: 46px; }
  .hero-title { font-size: 44px; }
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--chocolate);
  margin: 0 0 10px 0;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px 0;
  max-width: 480px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 860px) {
  .hero-cta-group { justify-content: flex-start; }
}

.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-primary);
  color: #FFFFFF;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-hero-cta:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 6px 20px rgba(151, 11, 60, 0.35);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-white);
  color: var(--brand-primary);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: var(--brand-subtle);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.btn-hero-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #1ebe5d;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-hero-wa:hover {
  background: #1ebc59;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.hero-media {
  position: relative;
  text-align: center;
}

.hero-img-wrap {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--surface-white);
  max-width: 100%;
}

.hero-img-wrap img {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-img-wrap:hover img {
  transform: scale(1.02);
}

.hero-badge-floating {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-badge-floating span.script {
  font-family: 'Great Vibes', cursive;
  font-size: 22px;
  color: var(--brand-primary);
}

/* ============================================================
   FAIXA DE BENEFÍCIOS (4 CARDS)
   ============================================================ */
.benefits-container {
  max-width: 1200px;
  margin: -16px auto 30px auto;
  padding: 0 16px;
  position: relative;
  z-index: 5;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 860px) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.benefit-card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary-light);
}

.benefit-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.benefit-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px 0;
}

.benefit-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
}

/* ============================================================
   SECÇÃO NOSSOS PRODUTOS (DOIS BLOCOS: DOCES & SALGADOS)
   ============================================================ */
.section-nossos-produtos {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
}

.section-header-center {
  text-align: center;
  margin-bottom: 28px;
}

.section-header-center .title-script {
  font-family: 'Great Vibes', cursive;
  font-size: 42px;
  color: var(--chocolate);
  margin: 0;
  line-height: 1;
}

.section-header-center .heart-divider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-primary);
  margin-top: 4px;
}

.section-header-center .heart-divider::before,
.section-header-center .heart-divider::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--border-strong);
}

.category-blocks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 860px) {
  .category-blocks-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.category-highlight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cat-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cat-badge-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cat-avatar-icon.doces {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}

.cat-avatar-icon.salgados {
  background: #FFE8D6;
  color: var(--chocolate);
}

.cat-box-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}

.cat-box-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.btn-view-all-cat {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-white);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-view-all-cat:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.cat-mini-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cat-mini-item {
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.cat-mini-img-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-white);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.cat-mini-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cat-mini-item:hover .cat-mini-img-wrap img {
  transform: scale(1.06);
}

.cat-mini-label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: block;
  color: var(--text-primary);
}

/* ============================================================
   GRELHA DE PRODUTOS & PRODUCT CARDS
   ============================================================ */
.products-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
}

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

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

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

.product-card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary-light);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  overflow: hidden;
  display: block;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(200, 16, 79, 0.3);
}

.product-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.product-fav-btn:hover, .product-fav-btn.active {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background: #fff;
}

.product-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.product-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc-short {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-primary-dark);
}

.btn-add-cart {
  background: var(--brand-subtle);
  border: 1px solid var(--brand-primary-light);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-add-cart:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
}

/* ============================================================
   BANNER DE ENCOMENDAS PERSONALIZADAS
   ============================================================ */
.custom-order-banner {
  background: linear-gradient(135deg, #970B3C 0%, #C8104F 100%);
  border-radius: var(--radius-xl);
  color: #FFFFFF;
  padding: 36px 24px;
  margin: 50px 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 860px) {
  .custom-order-banner {
    grid-template-columns: 1.3fr 0.7fr;
    padding: 44px 40px;
  }
}

.custom-order-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.custom-order-subtitle {
  font-size: 15px;
  color: #FDE4EB;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.btn-custom-order {
  background: #FFFFFF;
  color: var(--brand-primary-dark);
  font-weight: 800;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.btn-custom-order:hover {
  background: var(--surface);
  transform: translateY(-2px);
  color: var(--brand-primary);
}

/* ============================================================
   RODAPÉ OFICIAL FRAMBOESA (Espelhado na referência)
   ============================================================ */
.shop-footer {
  background: var(--brand-primary-dark);
  color: #FFFFFF;
  padding: 50px 20px 30px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}

.footer-col .footer-logo img {
  height: 48px;
  width: auto;
  margin-bottom: 12px;
}

.footer-phrase-script {
  font-family: 'Great Vibes', cursive;
  font-size: 26px;
  color: #FDE4EB;
  margin: 8px 0;
  line-height: 1.2;
}

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: #F9E5EC;
  line-height: 1.5;
}

.footer-info-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #F4D5DF;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-social-links {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.social-link-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-link-btn:hover {
  background: #FFFFFF;
  color: var(--brand-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 12.5px;
  color: #F4D5DF;
}

/* ============================================================
   BARRA INFERIOR MOBILE FIXA (BOTTOM NAVIGATION BAR)
   ============================================================ */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

/* ============================================================
   MENU DE CATEGORIAS (alimentado pela base de dados)
   Mesmo conteúdo em dois sítios: dropdown no topo (desktop) e folha
   que sobe por cima da barra inferior (telemóvel). Sem JavaScript:
   <details>/<summary> abre e fecha com teclado e leitor de ecrã.
   ============================================================ */
.cat-menu {
  position: relative;
}

.cat-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  border: 0;
  background: none;
}

.cat-menu-toggle::-webkit-details-marker { display: none; }
.cat-menu-toggle::marker { content: ''; }

.cat-menu-chevron {
  transition: transform 0.18s ease;
}

.cat-menu[open] .cat-menu-chevron {
  transform: rotate(180deg);
}

.cat-menu[data-current="true"] > .cat-menu-toggle {
  background: var(--brand-primary);
  color: #FFFFFF;
}

.cat-menu-panel {
  display: flex;
  flex-direction: column;
  min-width: 232px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.cat-menu-header .cat-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
}

.cat-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.cat-menu-link:hover {
  background: var(--brand-subtle);
  color: var(--brand-primary);
}

.cat-menu-link.active {
  background: var(--brand-subtle);
  color: var(--brand-primary);
}

.cat-menu-all {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  color: var(--brand-primary);
}

.cat-menu-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Variante móvel: folha acima da barra inferior */
.cat-menu-mobile {
  display: contents;
}

.cat-menu-mobile .cat-menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.cat-menu-mobile .cat-menu-panel {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(62px + 8px);
  z-index: 100;
  max-height: 60vh;
  overflow-y: auto;
  animation: cat-sheet-up 0.18s ease;
}

@keyframes cat-sheet-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .cat-menu-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-menu-mobile .cat-menu-panel { animation: none; }
  .cat-menu-chevron { transition: none; }
}

/* ============================================================
   PESQUISA: sugestões enquanto se escreve + acesso no telemóvel
   ============================================================ */
.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.suggest-group + .suggest-group {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

.suggest-group-title {
  display: block;
  padding: 6px 10px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
}

.suggest-item:hover,
.suggest-item:focus-visible {
  background: var(--brand-subtle);
  color: var(--brand-primary);
  outline: none;
}

.suggest-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.suggest-name {
  flex: 1;
  font-weight: 600;
  line-height: 1.3;
}

.suggest-meta,
.suggest-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.suggest-empty {
  padding: 12px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.suggest-all {
  display: block;
  padding: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}

/* Acessível a leitores de ecrã, fora do ecrã */
.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Pesquisa no telemóvel (a barra inline só existe a partir de 768px) */
.mobile-search {
  position: relative;
}

.mobile-search > summary {
  cursor: pointer;
  list-style: none;
}

.mobile-search > summary::-webkit-details-marker { display: none; }
.mobile-search > summary::marker { content: ''; }

.mobile-search-panel {
  position: fixed;
  top: 64px;
  left: 12px;
  right: 12px;
  z-index: 120;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.mobile-search-form {
  position: relative;
  display: flex;
  gap: 8px;
}

.mobile-search-form input {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 14.5px;
}

@media (min-width: 768px) {
  .mobile-search { display: none; }
}

/* Categorias sugeridas na página de resultados */
.search-category-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.search-category-hint a {
  padding: 5px 12px;
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-pill);
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.search-category-hint a:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
}

@media (min-width: 900px) {
  .mobile-bottom-bar { display: none; }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  gap: 3px;
  position: relative;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--brand-primary);
}

.bottom-nav-item .cart-badge-pill {
  position: absolute;
  top: 2px;
  right: 14px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

/* ============================================================
   ESTILOS GERAIS DE FORMULÁRIO E CARRINHO
   ============================================================ */
.cart-card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.field-group {
  margin-bottom: 16px;
}

.field-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 79, 0.12);
  background: #fff;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-pill);
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(151, 11, 60, 0.35);
}

/* Alertas & Notificações */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-info {
  background: #EBF5FF;
  border: 1px solid #C3D9FF;
  color: #1E429F;
}

.alert-ok {
  background: var(--success-bg);
  border: 1px solid #A7F3D0;
  color: var(--success);
}

.alert-err {
  background: var(--error-bg);
  border: 1px solid #FECACA;
  color: var(--error);
}

/* ============================================================
   CAMPANHAS ATIVAS NA VITRINE
   Faixa compacta com o benefício e o código do cupão; sem campanhas
   ativas não existe, em vez de deixar um espaço vazio.
   ============================================================ */
.promo-strip {
  margin: 0 auto;
  padding: 0 16px;
  max-width: var(--container-max, 1200px);
}

.promo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--brand-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.promo-info {
  min-width: 0;
}

.promo-title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-dark, var(--text-primary));
}

.promo-benefit {
  margin: 2px 0 0 0;
  font-size: 14px;
  color: var(--text-primary);
}

.promo-benefit strong {
  font-weight: 800;
  color: var(--brand-primary);
}

.promo-deadline {
  color: var(--text-secondary);
}

.promo-code {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.promo-code-value {
  padding: 8px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-dark, var(--text-primary));
  background: #fff;
  border: 1px dashed var(--brand-primary);
  border-radius: var(--radius-sm);
}

.promo-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
}

.promo-copy:hover {
  background: var(--brand-primary-dark, var(--brand-primary));
}

.promo-copy[data-copied="true"] {
  background: #166534;
  border-color: #166534;
}

.promo-note {
  margin: 8px 2px 0 2px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

@media (max-width: 560px) {
  .promo-item {
    align-items: flex-start;
  }

  .promo-code {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   INSTRUÇÕES DE PAGAMENTO NO CHECKOUT
   Mostra o IBAN ou o número Express que a loja configurou, para o
   cliente não ter de os pedir por mensagem.
   ============================================================ */
.payment-instructions {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--brand-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.payment-instruction {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.payment-instruction svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--brand-primary);
}

.payment-instruction[hidden] {
  display: none;
}

.payment-instruction-note {
  margin: 8px 0 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVIDADE E ACESSIBILIDADE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   UTILITÁRIOS GLOBAIS
   ============================================================ */
.meta {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Checkout: botão de submissão sticky no mobile
   (quando a coluna lateral de resumo não está visível) */
.checkout-mobile-cta {
  display: block;
  position: sticky;
  bottom: 70px; /* acima da barra de navegação mobile */
  z-index: 50;
  padding: 12px 16px;
  background: linear-gradient(to top, var(--bg-soft) 80%, transparent);
}

@media (min-width: 900px) {
  .checkout-mobile-cta { display: none !important; }
}

/* ============================================================
   BOTÃO FLUTUANTE WHATSAPP (SEGUE A ROLAGEM / SCROLL)
   ============================================================ */
.floating-whatsapp-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.floating-whatsapp-wrap > * {
  pointer-events: auto;
}

.floating-whatsapp-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.42), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  text-decoration: none;
  user-select: none;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 28px rgba(18, 140, 126, 0.55), 0 4px 10px rgba(0, 0, 0, 0.16);
  color: #fff;
}

.floating-whatsapp-btn:active {
  transform: scale(0.96);
}

.floating-whatsapp-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.8;
  animation: waPulseRing 2.6s infinite cubic-bezier(0.24, 0, 0.38, 1);
  pointer-events: none;
}

@keyframes waPulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.floating-whatsapp-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #C8104F;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Balão interativo */
.floating-whatsapp-tooltip {
  margin-bottom: 12px;
  width: 240px;
  background: #ffffff;
  border-radius: var(--radius-md, 14px);
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(40, 23, 21, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(37, 211, 102, 0.25);
  animation: waSlideUp 0.3s ease-out;
  transform-origin: bottom right;
}

@keyframes waSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wa-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.wa-tooltip-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
}

.wa-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.wa-tooltip-close {
  background: none;
  border: none;
  font-size: 13px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.wa-tooltip-close:hover {
  color: #374151;
}

.wa-tooltip-body {
  font-size: 12.5px;
  color: var(--text-primary, #281715);
  line-height: 1.4;
  margin-bottom: 8px;
}

.wa-tooltip-body strong {
  display: block;
  font-size: 13px;
  color: #111827;
  margin-bottom: 2px;
}

.wa-tooltip-body p {
  margin: 0;
  color: var(--text-secondary, #6E5C57);
}

.wa-tooltip-cta {
  display: block;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.wa-tooltip-cta:hover {
  background: #d1fae5;
  color: #047857;
}

/* Responsividade Mobile: Fica acima da barra inferior mobile (height ~60px) */
@media (max-width: 768px) {
  .floating-whatsapp-wrap {
    bottom: 82px;
    right: 16px;
  }

  .floating-whatsapp-btn {
    width: 52px;
    height: 52px;
  }

  .floating-whatsapp-btn svg {
    width: 28px;
    height: 28px;
  }

  /* O painel de captação é agora aberto sob pedido (toque no botão), por isso não
     se sobrepõe de forma persistente; em ecrãs pequenos limita-se a largura. */
  .floating-whatsapp-tooltip {
    width: min(78vw, 240px);
  }
}

/* Painel oculto por omissão: só abre ao tocar no botão flutuante. */
.floating-whatsapp-tooltip[hidden] {
  display: none;
}

.wa-lead-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
}

.wa-lead-input:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}

.wa-lead-error {
  margin: 0;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.35;
}

