/* ===============================
   VARIÁVEIS GLOBAIS E RESET
   =============================== */
:root {
    /* Cores */
    --cor-primaria: #2e3031;
    --cor-fundo: #f8f9fa;
    --cor-texto: #222222;
    --cor-texto-escuro: #171817;
    --cor-header: #EB008B;
    --cor-botao: #000000;
    --cor-botao-acao: #e74c3c;

    /* Espaçamento e bordas */
    --bordas: 0.625rem; /* 10px */
    --espacamento: 1rem;

    /* Sombras */
    --sombra-leve: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.1);
    --sombra-forte: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.2);

    /* Tipografia */
    --font-base: clamp(0.9rem, 1.2vw, 1.1rem);
    --font-header: 'Roboto', sans-serif;
    --font-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset geral */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px base */
}

body {
    font-family: var(--font-principal);
    font-size: var(--font-base);
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===============================
   LINKS E INTERATIVOS
   =============================== */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus-visible {
    color: var(--cor-secundaria);
    outline-offset: 3px;
}

button, a, .icone-menu, #header-icons i, .slider-buttons button, .close {
    cursor: pointer;
    transition: all 0.3s ease;
}

button, input, textarea, select, .slider-buttons button, .close {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Foco acessível */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--cor-secundaria);
    outline-offset: 2px;
}

/* ===============================
   NOTIFICAÇÃO FIXA
   =============================== */
.notification {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--bordas);
    box-shadow: var(--sombra-leve);
    z-index: 1000;
    font-weight: 600;
    font-size: 1rem;
}

/* === CABEÇALHO === */
#header {
  background: linear-gradient(90deg, #EB008B, #FF69B4);
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#logo img {
  height: 100px;
  transition: height 0.3s;
}

#header-icons {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

#header-icons input[type="text"] {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  width: 250px;
  max-width: 100%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

#header-icons a {
  font-size: 22px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s, color 0.3s ease;
}
#header-icons a:hover { 
  transform: scale(1.2);
  color: #922438;
}
.fas.fa-heart.icone-menu:hover{ color: #ff4d6d !important; }

/* ===============================
   CONTAINER PRINCIPAL DO DETALHE
   =============================== */
#detalhes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    box-shadow: var(--sombra-leve);
    max-width: 75rem; /* 1200px */
    justify-content: center;

}

/* ===============================
   SLIDER DE IMAGENS
   =============================== */
#slider-container {
    position: relative;
    max-width: 31.25rem; /* 500px */
    overflow: hidden;

}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-wrapper img {
    width: 100%;
    object-fit: contain;
    cursor: zoom-in;
    user-select: none;
    border-radius: var(--bordas);
}

.slider-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.slider-buttons button {
    pointer-events: auto;
    background-color: transparent !important;
    border: none;
    color: var(--cor-primaria);
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: none;
    outline: none;
    user-select: none;
    border-radius: var(--bordas);
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* ===============================
   MODAL DE IMAGEM
   =============================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;     /* força largura total da viewport */
    height: 100vh;    /* força altura total da viewport */
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: zoom-out;
    padding: 1rem;
    box-sizing: border-box;
    user-select: none;
    display: flex;
}

.modal-content {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
    object-fit: contain;
    outline: none;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}


.close {
    position: relative;  /* MUITO IMPORTANTE: o botão fica fixo em relação à tela */
    top: auto;
    bottom: 20px;  /* 2rem acima do rodapé */
    right: -50px;   /* 2rem afastado da direita */
    font-size: 2rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: background 0.3s ease, transform 0.2s ease;
}

.close:hover {
    background: #EB008B;
    transform: scale(1.1);
}


@media (max-width: 768px) {
    .modal .close {
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}




/* ===============================
   INFORMAÇÕES DO PRODUTO
   =============================== */
#informacoes-produto {
    flex: 1;
    min-width: 17.5rem; /* 280px */
}

#informacoes-produto h2 {



    padding-bottom: 0.5rem;
    margin-bottom: 1rem;


}

#informacoes-produto p {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: #444444;
    line-height: 1.4;
}

/* ===============================
   BOTÃO COMPRAR
   =============================== */
.compra {
    background-color: #ff0095;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    min-height: 4rem;
    width: 15rem;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    user-select: none;
}

.compra:hover,
.compra:focus {
    background-color: #72134a;
    box-shadow: 0 0.375rem 0.875rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    outline: none;
}

/* ===============================
   BOTÕES GERAIS
   =============================== */
button, .botao-finalizar-pedido, .botao-voltar {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    color: var(--cor-botao);
    box-shadow: var(--sombra-leve);
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: var(--bordas);
    user-select: none;
}

.botao-finalizar-pedido, .botao-voltar {
    background-color: var(--cor-botao-acao);
    margin-right: 0.5rem;
    color: #fff;
}

.botao-finalizar-pedido:hover,
.botao-voltar:hover,
.botao-finalizar-pedido:focus,
.botao-voltar:focus {
    background-color: #c0392b;
    outline: none;
    transform: translateY(-2px);
}
#descricao-container {
    margin: 1.5rem auto;
    padding: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    max-width: 800px;
    width: 95%;
    font-family: var(--font-principal);
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.descricao-titulo {
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
    margin: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    letter-spacing: normal; /* remove espaçamento exagerado */
}

.descricao-conteudo {
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
    text-align: left;
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    letter-spacing: normal; /* letras normais, sem afastamento extra */
}


.icone-favorito {
    width: 56px;
    height: 56px;
    stroke: #555; /* Cor padrão do coração */
    transition: stroke 0.3s;
    position: relative;
    top: 10px;
}


.icone-favorito.ativo {
    stroke: red;
    fill: red;
}
/* ===============================
   QUANTIDADE
   =============================== */
.quantidade {
    position: relative;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantidade button {
    width: 3.125rem; /* 50px */
    height: 2.5rem;  /* 40px */
    background-color: transparent;
    border: 1px solid #ccc;
    padding: 0.4rem 0.8rem;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--bordas);
    transition: background-color 0.3s ease, color 0.3s ease;
    user-select: none;
}


.quantidade input[type="number"] {
    width: 3.125rem; /* 50px */
    text-align: center;
    padding: 0.4rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: var(--bordas);
    user-select: none;
}

/* ===============================
   FOOTER
   =============================== */
.footer {
    background-color: var(--cor-header);
    color: #fff;
    padding: 2.5rem 1.25rem;
    font-family: var(--font-principal);
    font-size: 0.875rem;
    margin-top: 12.5rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.875rem; /* 30px */
    max-width: 75rem; /* 1200px */
    margin: 0 auto;
}

.footer-col {
    flex: 1;
    min-width: 15.625rem; /* 250px */
}

.footer-col img {
    max-width: 11.25rem; /* 180px */
    margin-bottom: 0.9375rem; /* 15px */
    user-select: none;
}

.footer-col p {
    margin: 0.625rem 0;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover,
.footer-col ul li a:focus {
    color: #3f112c;
    outline: none;
}

/* Redes sociais */
.footer-social {
    display: flex;
    gap: 0.9375rem; /* 15px */
    margin-bottom: 0.9375rem; /* 15px */
}

.footer-social a svg {
    fill: #fff;
    width: 3.25rem; /* 52px */
    height: 3.25rem;
    transition: fill 0.3s ease;
    position: relative;
    left: 1.25rem;
    user-select: none;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 3.125rem;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover,
.footer-social a:focus {
    filter: brightness(0.2);
    transform: scale(1.1);
    outline: none;
}

/* Mapa */
.footer-mapa {
    max-width: 75rem; /* 1200px */
    margin: 1.875rem auto 0;
    padding: 0 1.25rem;
}

.footer-mapa h3 {
    color: #fff;
    margin-bottom: 0.625rem;
    font-size: 1rem;
    user-select: none;
}

/* Rodapé final */
.footer-bottom {
    text-align: center;
    margin-top: 1.875rem;
    font-size: 0.8125rem;
    color: #ccc;
}
/* === PRODUTOS RELACIONADOS === */
#produtos-relacionados {
  max-width: 1300px;
  margin: 3rem auto;
  padding: 0 15px;

}

#produtos-relacionados h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
  text-align: center;
  font-weight: bold;
}

#produtos-lista {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.produto-relacionado {
  background: #fff;
  border: 1px solid #dbdbdb;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.produto-relacionado img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

.produto-relacionado p {
  margin: 0.4rem 0;
}

.produto-relacionado:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
.produto-relacionado p:first-of-type {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limita em 2 linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: #333;
}


.produto-relacionado p:last-of-type {
  color: #333333;
  font-weight: bold;
  font-size: 1.1rem;
}
.variacao-item.selecionada {
    border-color: #c0392b;
    box-shadow: 0 0 5px #c0392b;
    background-color: #fdecea;
}
#variacoes-container {
    margin-top: 1.5rem;
}

#variacoes-container h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #333;
}

.variacoes-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.variacao-item {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem;
    width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.variacao-item:hover {
    border-color: #999;
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.variacao-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.variacao-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.variacao-item .cor-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #999;
    margin: 0.4rem auto 0;
}

/* Estado selecionado */
.variacao-item.selecionada {
    border-color: #c0392b;
    box-shadow: 0 0 5px #c0392b;
    background-color: #fdecea;
}

/* SEARCH CONTAINER */
#search-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* SEARCH FORM */
#search-form {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* SEARCH BAR */
#search-bar {
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  outline: none;
  width: 0;
  max-width: 200px;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 14px;
}

/* SEARCH BAR ATIVO */
#search-bar.active {
  width: 180px;
  opacity: 1;
  padding: 6px 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* SEARCH BUTTON */
#search-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, color 0.3s, background 0.3s;
  border-radius: 6px;
  padding: 5px;
}
#search-toggle:hover {
  transform: scale(1.2);
  background-color: rgba(255,255,255,0.15);
  color: #ffd1e6;
}
/* ===============================
   RESPONSIVIDADE GERAL
   =============================== */

/* Tablets e notebooks pequenos (<= 992px) */
@media (max-width: 992px) {
    #header {
        flex-direction: column;
        align-items: stretch; /* para ocupar toda largura */
        gap: 1rem;
    }

    #header-icons {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    #header-icons input[type="text"] {
        width: 100%;
        min-width: 200px;
        max-width: 100%;
        box-sizing: border-box;
    }

    #detalhes-container {
        flex-direction: column;
        padding: 1rem;
        max-width: 95%;
        margin: 0 auto;
    }

    #slider-container {
        max-width: 100%;
        border-radius: var(--bordas);
    }

    .compra {
        width: 100%;
        min-width: unset;
    }

    #descricao-container {
        padding: 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .descricao-conteudo {
        font-size: 1.375rem; /* 22px */
        line-height: 1.5;
    }

    .footer-container {
        flex-direction: column;
        gap: 1.25rem; /* 20px */
    }

    .footer-col {
        min-width: 100%;
    }

    .footer-social a svg {
        width: 2.5rem; /* 40px */
        height: 2.5rem;
        left: 0;
    }
}

/* Smartphones grandes e tablets pequenos (<= 768px) */
@media (max-width: 768px) {
    #logo img {
        height: 4.375rem; /* 70px */
        max-width: 100%;
    }

    #header {
        padding: 1rem;
        gap: 0.75rem;
    }

    .icone-menu, #header-icons i {
        font-size: 1.25rem;
    }

    #header-icons {
        justify-content: space-around;
    }

    .slider-buttons button {
        padding: 0.375rem 0.75rem; /* 6px 12px */
        font-size: 1rem;
    }

    .compra {
        min-height: 3.4375rem; /* 55px */
        font-size: 1rem;
        width: 100%;
    }

    #informacoes-produto h2 {
        font-size: 1.5rem;
    }

    .descricao-conteudo {
        font-size: 1.25rem; /* 20px */
        line-height: 1.4;
    }

    .footer-social a svg {
        width: 2.25rem; /* 36px */
        height: 2.25rem;
    }
}

/* Smartphones pequenos (<= 480px) */
@media (max-width: 480px) {
    #header-icons input[type="text"] {
        padding: 0.3125rem 0.5rem; /* 5px 8px */
        font-size: 0.9rem;
        width: 100%;
    }

    #header-icons {
        justify-content: center;
        gap: 0.5rem;
    }

    .slider-buttons button {
        padding: 0.25rem 0.5rem; /* 4px 8px */
        font-size: 0.9rem;
    }

    .compra {
        min-height: 3.125rem; /* 50px */
        font-size: 0.875rem;
        width: 100%;
    }

    .descricao-conteudo {
        font-size: 1.125rem; /* 18px */
        line-height: 1.4;
    }

    #informacoes-produto p {
        font-size: 0.95rem;
    }

    #detalhes-container {
        padding: 0.75rem;
    }

    .footer {
        padding: 1.875rem 0.9375rem; /* 30px 15px */
    }

    .footer-social a svg {
        width: 1.875rem; /* 30px */
        height: 1.875rem;
    }
}
/* Tablet - 3 colunas */
@media (max-width: 992px) {
  #produtos-lista {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Celular grande - 2 colunas */
@media (max-width: 768px) {
  #produtos-lista {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Celular pequeno - 1 coluna */
@media (max-width: 480px) {
  #produtos-lista {
    grid-template-columns: 1fr;
  }
}
