/* ==========================================================================
   1. FONTES
========================================================================== */

@font-face {
  font-family: Amana;
  src: url(../images/font/Amana.ttf);
}

@font-face {
  font-family: Playlist-Script;
  src: url(../images/font/Playlist-Script.otf);
}

.leckerli-one-regular {
  font-family: "Leckerli One", cursive;
  font-weight: 400;
  font-style: normal;
}

.open-sans {
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
  font-variation-settings: "width" 100;
}

/* ==========================================================================
   2. RESET E CONFIGURAÇÕES GLOBAIS
========================================================================== */

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

/* ==========================================================================
   3. HEADER E NAVEGAÇÃO
========================================================================== */

.header {
  margin-top: 10px;
  color: black;
  min-height: 120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  position: relative;
  z-index: 50;
}

/* Reordenação: [MENU] — [AMANA] — [CART] */
.header > a {
  order: 0;
  flex: 1;
  text-align: center;
  text-decoration: none;
}

.header > .menu {
  order: -1;
}

.header > .cart {
  order: 1;
}

/* Logo */
.title {
  font-family: Amana;
  font-size: 90px;
  font-weight: bold;
  text-align: center;
}

header .title {
  margin: 0;
  display: block;
}

/* Menu de Navegação */
.menu {
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  text-align: center;
  min-width: 300px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header .menu .nav-menu li {
  list-style: none;
  text-align: left;
  display: inline;
  margin-right: 20px;
}

.header .menu .nav-menu li a {
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
  font-weight: bold;
  color: black;
  font-size: 140%;
}

.header .menu .nav-menu li a:hover {
  color: #58b9ac;
}

/* Hamburger: ESCONDIDO no desktop */
.mobile-menu {
  display: none;
}

/* Carrinho */
.cart {
  width: auto;
  height: auto;
  position: static;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 300px;
}

.cart a,
.link-cart {
  font-family: sans-serif;
  font-weight: bold;
  color: black;
  font-size: 100%;
  text-decoration: none;
}

.nav-cart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  position: relative;
}

.cart p {
  font-family: sans-serif;
  font-weight: bold;
  color: black;
  font-size: 120%;
  text-decoration: none;
  display: inline;
}

.cart img {
  width: 70px;
  height: 70px;
  margin: 0;
}

.item-cart {
  position: absolute;
  top: -5px;
  right: -5px;
}

.item-cart h6 {
  font-family: sans-serif;
  font-weight: bold;
  color: #58b9ac;
  background-color: white;
  font-size: 16px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  border: 3px solid #58b9ac;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   4. SEÇÃO INICIAL E BANNER
========================================================================== */

h1 {
  color: black;
  cursor: pointer;
}

.initial-image {
  margin-top: 20px;
  position: relative;
  z-index: 1;
  display: block;
}

.initial {
  margin-top: 4%;
  position: relative;
  z-index: 10;
}

.initial h1 {
  font-family: "Leckerli One", cursive;
  color: white;
  width: auto;
  font-size: 32pt;
  margin: 0;
  z-index: 210;
  transform: none !important;
  pointer-events: auto;
}

.initial .initial-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  color: black;
  display: block;
  z-index: 200;
  pointer-events: none;
}

.product-image:hover {
  cursor: pointer;
  opacity: 30%;
}

.initial img {
  width: 90%;
  height: 100px;
  border-radius: 14px;
  margin-left: 5%;
  margin-right: 5%;
  z-index: 1;
  display: inline;
}

/* ==========================================================================
   5. SLIDER DE PRODUTOS
========================================================================== */

.slider-container {
  width: 100%;
  max-width: 1200px;
  margin: 50px auto;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* As larguras são recalculadas em JS conforme a quantidade real de slides
   (renderProductosEnSliders): wrapper = n × 100%, cada slide = 100 / n % */
.slider-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.slider {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 20px;
  min-height: 450px;
}

.products {
  height: 450px;
  width: 100%;
  align-items: stretch;
  display: flex;
  justify-content: center;
  gap: 90px;
}

.product-category {
  font-family: "Lato";
  text-align: center;
  color: #595959;
  font-size: 80%;
}

/* ==========================================================================
   6. CARDS DE PRODUTOS
========================================================================== */

.initial-item {
  height: auto;
  width: 100%;
  max-width: 220px;
  min-width: 180px;
  margin: 0;
  display: flex;
  flex-direction: column;
  object-fit: contain;
  padding: 10px;
  z-index: 10;
}

.button-hover-background {
  background: none;
  border: none;
  cursor: pointer;
}

/* Escopado na imagem do produto para não afetar os ícones de .dinamic-icons */
.initial-item .product-image {
  width: 200px;
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.initial-item h3 {
  font-family: "Oswald", sans-serif;
  text-align: center;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 10%;
}

.initial-item:hover h3 {
  color: #58b9ac;
  cursor: pointer;
}

.dinamic-icons {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 8px auto 0;
}

/* Nenhum item do flex pode absorver espaço livre (senão os ícones saem do centro) */
.dinamic-icons > * {
  flex: 0 0 auto;
  margin: 0;
}

.dinamic-icons img {
  height: 30px;
  width: 30px;
  margin: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Só opacidade e transform: o tamanho da caixa não muda, então nada sobrepõe a imagem */
.initial-item:hover .dinamic-icons img,
.initial-item:focus-within .dinamic-icons img {
  opacity: 1;
  visibility: visible;
  transform: scale(1.1);
}

.dinamic-icons .button-hover-background {
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-product {
  height: 30px;
  width: 100px;
  color: black;
  font-weight: bold;
  align-items: center;
  margin: 0 auto;
  display: flex;
  text-align: center;
  justify-content: space-around;
}

.price-product p {
  font-family: "Montserrat", sans-serif;
  font-weight: lighter;
  font-style: italic;
}

/* ==========================================================================
   7. NAVEGAÇÃO DO SLIDER
========================================================================== */

.slider-nav {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 15px;
}

.nav-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Open Sans", sans-serif;
  font-weight: bold;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-number:hover {
  background: #58b9ac;
  border-color: #58b9ac;
  color: white;
  transform: scale(1.1);
}

/* ==========================================================================
   8. CATEGORIAS (exclusivo da tienda)
========================================================================== */

.categorias {
  width: 65%;
  height: 100px;
  display: inline-block;
  margin: 0 15% 0 15%;
  text-align: center;
}

.categorias li {
  list-style: none;
  display: inline-block;
  margin-top: 25px;
}

.categorias a {
  text-decoration: none;
  font-family: "Lato";
  color: #000;
  font-weight: 700;
  font-size: 12pt;
  margin: 0 50px 0 50px;
}

.categorias a:hover {
  color: #58b9ac;
}

/* ==========================================================================
   9. FOOTER
========================================================================== */

.img-footer {
  margin-top: 1%;
  margin-bottom: 2%;
  text-align: center;
}

.img-footer img {
  width: 90%;
  height: 120px;
  border-radius: 14px;
  display: inline;
  position: relative;
}

.references {
  font-family: sans-serif;
  text-align: right;
  margin-right: 5%;
}

.black-bar {
  width: 100%;
  height: 15px;
  background-color: black;
}

/* ==========================================================================
   10. MEDIA QUERIES — TABLET (max-width: 834px)
========================================================================== */

@media (max-width: 1024px) {
  body {
    overflow-x: hidden;
  }

  .header {
    min-height: auto;
    height: auto;
    padding: 10px 4%;
  }

  .header .title {
    font-size: 60px;
  }

  .menu {
    min-width: auto;
    position: relative;
  }

  /* Hamburger visível */
  .mobile-menu {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 38px;
    height: 34px;
    padding: 4px;
    z-index: 1100;
    position: relative;
    margin: 0;
  }

  .mobile-menu .line1,
  .mobile-menu .line2,
  .mobile-menu .line3 {
    height: 3px;
    width: 100%;
    background: #000;
    border-radius: 2px;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    transform-origin: center;
  }

  .mobile-menu.active .line1 {
    transform: translateY(9px) rotate(45deg);
  }

  .mobile-menu.active .line2 {
    opacity: 0;
  }

  .mobile-menu.active .line3 {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Overlay escuro */
  .menu::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1000;
  }

  .menu.active::before {
    opacity: 1;
    pointer-events: auto;
  }

  /* Painel lateral */
  .header .menu .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 70vw;
    max-width: 300px;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 80px 24px 40px;
    gap: 0;
    margin: 0;
    overflow-y: auto;
  }

  .menu.active .nav-menu {
    transform: translateX(0);
  }

  .header .menu .nav-menu li {
    list-style: none;
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .header .menu .nav-menu li a {
    display: block;
    padding: 16px 8px;
    font-size: 18px;
    color: #000;
    text-decoration: none;
    width: 100%;
  }

  /* Cart mobile */
  .cart {
    min-width: auto;
  }

  .cart a,
  .cart p {
    font-size: 0;
  }

  .cart img {
    width: 40px;
    height: 40px;
  }

  .item-cart h6 {
    font-size: 14px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    top: -5px;
    right: -5px;
  }

  /* Conteúdo */
  .initial {
    margin-top: 2%;
    z-index: 1;
  }

  .initial img {
    width: 92%;
    height: 80px;
    border-radius: 8px;
    margin-left: 4%;
    margin-right: 4%;
  }

  /* Categorias mobile */
  .categorias {
    width: 90%;
    margin: 0 5%;
    height: auto;
    padding: 10px 0;
  }

  .categorias a {
    margin: 0 15px;
    font-size: 10pt;
  }

  /* Sem produtos cadastrados, a área dos sliders não ocupa espaço */
  .slider {
    min-height: auto;
  }

  .slider .products {
    height: auto;
    gap: 16px;
    justify-content: center;
    overflow: hidden;
  }

  .slider .products .initial-item {
    flex: 0 0 calc((100% - 32px) / 3);
    max-width: none;
  }

  .products .initial-item {
    margin-left: 10px;
  }

  .references {
    margin-top: 40px;
    margin-right: 0;
    padding: 0 4%;
    text-align: center;
    font-size: 14px;
  }
}

/* ==========================================================================
   11. MEDIA QUERIES — CELULAR (max-width: 480px)
========================================================================== */

@media (max-width: 480px) {
  .header .title {
    font-size: 44px;
  }

  .header .menu .nav-menu {
    width: 78vw;
    max-width: 280px;
    padding: 70px 20px 30px;
  }

  .header .menu .nav-menu li a {
    font-size: 16px;
    padding: 14px 6px;
  }

  .cart img {
    width: 34px;
    height: 34px;
  }

  .item-cart h6 {
    font-size: 12px;
    width: 20px;
    height: 20px;
    line-height: 20px;
  }

  .initial img {
    height: 60px;
  }

  /* Categorias celular */
  .categorias {
    width: 95%;
    margin: 0 2.5%;
  }

  .categorias a {
    margin: 0 8px;
    font-size: 9pt;
  }

  .categorias li {
    margin-top: 15px;
  }

  /* No celular cabem 2 por linha: o 3º produto do slide quebra para baixo
     em vez de ser escondido */
  .slider .products {
    gap: 10px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .slider .products .initial-item {
    flex: 0 0 calc((100% - 10px) / 2);
    min-width: 0;
  }

  .initial-item .product-image {
    height: 150px;
  }

  .initial-item h3 {
    font-size: 12px;
    letter-spacing: 1px;
  }
}
