/* =========================
  🌎 GLOBAL.CSS
  Padronização do E-commerce
  ========================= */
    
/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

/* Conteúdo Principal */
main {
  flex: 1;
}

html {  
  scroll-behavior: smooth;
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 120vh;
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  background: linear-gradient(120deg, #f8f8f8, #eaeaea);
  transition: background-color 0.8, color 0.8s;
}

.logo {
  cursor: pointer;
}

/* Tema CLARO */
body.tema-claro {
  --primary-color: #800000;
  --primary-color-dark: #b30000;
  --secondary-color: #1a1a1a;
  --light-bg: #fff;
  --light-gray: #f0f0f0;
  --border-gray: #e0e0e0;
  --text-color: #1a1a1a;
  --title-color: #1a1a1a;
  /*--hero-section-background-color: #1a1a1a;*/
  --darkest-color: #1a1a1a;

  /*  Variáveis novas */
  /*Index*/
  --header-background: #fff;
  --sobre-nos-background: #fff;

  /* Páginas produtos */

  /**/

  background: linear-gradient(120deg, #f8f8f8, #eaeaea);
  font-family: var(--font-family);
}

/* Tema ESCURO */
body.tema-escuro {
  --primary-color: #860f0f;
  --primary-color-dark: #e63946;
  --secondary-color: #000000;
  --light-bg: #000000;
  --light-gray: #860f0f;
  --border-gray: #444;
  --text-color: #ffffff;
  --title-color: #ffffff;
  /*--hero-section-background-color: #0D0D0D;*/
  --darkest-color: #0D0D0D;

  /* Variáveis Novas */
  /*Index*/
  --header-background: #121212;
  --sobre-nos-background: #1c1c1c;
  /* 252525* /

  /* Páginas produtos */

  /**/

  background: linear-gradient(120deg, #0e0e0e, #1a1a1a);
  font-family: var(--font-family);
}


/* ---------- VARIÁVEIS ---------- */
:root {
  /* Cores */
  --primary-color: #800000;
  --primary-color-dark: #b30000;
  /* ideal para hover */
  --secondary-color: #1a1a1a;
  /* Preto suave */
  --light-bg: #fff;
  --light-gray: #f0f0f0;
  --border-gray: #e0e0e0;
  --secondary-gray: #898584;
  --danger-color: #c62828;
  --success-color: #2e7d32;

  /* Texto */
  --text-color: var(--secondary-color);
  /* padrão texto escuro */
  --title-color: var(--secondary-color);

  /* Tipografia */
  --font-family: 'Poppins', sans-serif;
  --font-size-base: 1rem;
  --font-size-small: 0.9rem;
  --font-size-h1: 2.6rem;
  --font-size-h2: 2.6rem;
  --font-size-h2-mobile: 2rem;

  /* Bordas & Sombra */
  --border-radius: 8px;
  --border-radius-pill: 50px;
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ---------- TIPOGRAFIA GLOBAL ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--title-color);
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

p {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-color);
}

strong {
  color: var(--primary-color);
}

/* ---------- CONTAINERS ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- BOTÕES ---------- */
.btn,
.cta-button,
#bt_op,
.bt_usuario,
.bt_carrinho,
.bt_comprar,
#alternar-tema {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--light-gray);
  color: var(--secondary-color);
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--font-size-small);
  text-transform: uppercase;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover,
.cta-button:hover,
#bt_op:hover,
.bt_usuario:hover,
.bt_carrinho:hover,
.bt_comprar:hover,
#alternar-tema:hover {  
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- CARDS ---------- */
.card {
  /*background-color: var(--light-bg);*/
  background-color: var(--header-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  text-decoration: none;
  color: var(--secondary-color);
}

.card:hover {
  transform: translateY(-5px);
  /*box-shadow: var(--box-shadow-hover);*/
  box-shadow: 0 8px 20px rgba(179, 0, 0, 0.5);
}

.card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.card p {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-color);
}

/* ---------- HEADER ---------- */
header {
  background-color: var(--header-background);
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

header img {
  width: 190px;
  height: auto;
  margin-bottom: -5px;
  margin-top: 6px;
}

/* ---------- NAV ---------- */
nav {
  background-color: var(--header-background);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-gray);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav_right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background-color: rgba(7, 7, 7, 0.5);
  color: white;
  padding-top: 5rem;
  transition: left 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 2000;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 1.5rem 0;
  text-align: center;
}

.sidebar a {
  color: white;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.sidebar.ativa {
  left: 0;
}

/* Overlay que acompanha a sidebar */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Ativa o overlay junto com a sidebar */
.sidebar.ativa~.overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

footer {
  background-color: var(--secondary-color);
  color: #f0f0f0;
  padding: 1rem; /* menor altura */
  font-size: 0.85rem; /* texto mais discreto */
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem; /* menos espaço entre colunas */
  text-align: left;
}

.footer-col h3,
.footer-col h4 {
  color: var(--primary-color);
  margin-bottom: 0.4rem; /* reduz margem */
  font-size: 1rem;
}

.footer-col p {
  margin: 0.2rem 0;
  color: #f0f0f0;
  font-size: 0.9rem;
}

/* Link do Instagram */
.insta-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.insta-link img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.insta-link:hover {
  color: var(--primary-color);
}

.insta-link:hover img {
  filter: none;
}

.email-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: white; /* cor inicial do texto */
    transition: color 0.3s ease;
}

.email-link .icon-email {
    width: 18px;
    height: 18px;
    margin-right: 5px;
    filter: brightness(1);
    transition: filter 0.3s ease;
}

.email-link:hover {
    color: var(--primary-color);
}

.email-link:hover .icon-email {
    filter: invert(34%) sepia(83%) saturate(5934%) hue-rotate(354deg) brightness(95%) contrast(91%);
}

/* Linha inferior */
.footer-bottom {
  text-align: center;
  margin-top: 1rem;
  border-top: 1px solid #333;
  padding-top: 0.5rem;
  font-size: 0.75rem;
  color: #aaa;
}
.footer-bottom p {
  color: #fff;
}

footer .logo-dark:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* ---------- SEÇÕES ESCURAS ---------- */
.hero-section {
  background-color: var(--darkest-color);
  color: #fff;
  --text-color: #fff;
  --title-color: #fff;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  padding: 0 2rem;
}

.hero-section h1,
.hero-section h2,
.hero-section h3 {
  color: var(--title-color);
}

.hero-section p {
  color: var(--text-color);
}

/* ==== Switch de Tema ==== */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: .4s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 18px;
  color: #fff;
}

.slider:before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* Quando marcado (tema claro) */
input:checked+.slider {
  background-color: #ffcc00;
}

input:checked+.slider:before {
  transform: translateX(28px);
}

/* Ícones dentro do switch */
.icon-sun,
.icon-moon {
  pointer-events: none;
}

/* ---------- RESPONSIVIDADE ---------- */
@media (max-width: 768px) {
  h2 {
    font-size: var(--font-size-h2-mobile);
  }

  p {
    font-size: var(--font-size-base);
  }

  .hero-section h1 {
    font-size: var(--font-size-h2-mobile);
  }

  .hero-section p {
    font-size: var(--font-size-base);
  }

  header img {
    width: 150px;
  }

  .bt_usuario,
  #bt_op {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-small);
  }
}

#msg-carrinho {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px); /* começa levemente acima */
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 9999;
    font-weight: bold;
    opacity: 0; /* invisível inicialmente */
    pointer-events: none; /* evita interferir em cliques */
    transition: all 0.3s ease;
}

#msg-carrinho.show {
    opacity: 1; /* visível */
    transform: translateX(-50%) translateY(0); /* anima para baixo suavemente */
}

.msg-sucesso {
    background-color: #4CAF50;
    color: #fff;
}

/*------- FOOTER  -------*/
/* Centralizar conteúdo do footer */
.footer {
  background-color: var(--secondary-color);
  color: #f0f0f0;
  padding: 1rem;
  font-size: 0.85rem;
  text-align: center; /* centraliza todo o conteúdo */
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centraliza colunas horizontalmente */
  gap: 2rem;
  text-align: center; /* centraliza texto dentro das colunas */
}

.footer-col {
  flex: 1 1 200px;
}

/* Cabeçalhos e parágrafos */
.footer-col h3,
.footer-col h4 {
  color: var(--primary-color);
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.footer-col p {
  margin: 0.2rem 0;
  color: #f0f0f0;
  font-size: 0.9rem;
}

/* Link do Instagram */
.insta-link {
  display: flex;
  align-items: center;
  justify-content: center; /* centraliza ícone e texto */
  gap: 6px;
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.insta-link img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.insta-link:hover {
  color: var(--primary-color);
}

.insta-link:hover img {
  filter: none;
}

/* Pix */
.pix-logo {
  display: block;
  width: 100px;
  height: auto;
  margin: 0.5rem auto; /* centraliza a imagem */
  transition: transform 0.3s ease;
}

.pix-logo:hover {
  transform: scale(1.05);
}

/* Footer bottom */
.footer-bottom {
  text-align: center;
  margin-top: 1rem;
  border-top: 1px solid #333;
  padding-top: 0.5rem;
  font-size: 0.75rem;
  color: #aaa;
}

.footer-bottom p {
  color: #fff;
}
