:root{
  --bg: #fffaf9;
  --primary: #f3c6c6; /* rosa chá suave */
  --primary-700: #d08b8b; /* tom mais escuro para acentos */
  --muted: #6b6b6b; /* cor para texto secundario */
  --text: #222; /* cor para texto principal */
  --card-bg: #ffffff;
  --radius: 10px;
  --glass: rgba(255,255,255,0.6);
  --shadow: 0 6px 18px rgba(9,9,9,0.06);
  --gap: 16px;
  --container-max: 1180px;
  --hero-height: 180px;
  --header-height: 120px;
}


/* evita que qualquer flex-item mantenha largura mínima e empurre layout */
*{
  box-sizing:border-box;
  min-width: 0;
}

html,body{height:100%}

body{
  margin:0;
  padding: 0;
  width: 100%;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, #fffaf9 0%, #fff6f6 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  height: 100vh;
}

/* utilities */
.container{
  max-width:var(--container-max);
  margin: 0 auto;
  padding:0 18px;
  display: flex;
  flex-direction: column
}

.visually-hidden{
  position:absolute !important;
  height:1px;
  width:1px;
  overflow:hidden;
  clip:rect(1px,1px,1px,1px);
  white-space:nowrap
}

/* Cabeçalho do site */
.site-header{
  background: var(--primary);
  padding:14px 0;
  border-bottom:1px solid rgba(208,139,139,0.15);
  box-shadow: var(--shadow);
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

/* imagem do site */
.header-hero{
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  flex: 0 0 auto; /* NÃO cresce */;
}

.hero-logo{
  max-height: 100%;
  max-width: 90%;
  object-fit: contain;
}

/* adicionais para testar */

.search,
.filters{
  width: 100%;
}

.search input,
.filters select{
  width: 100%;
  min-width: 0;
}



/* termina aqui */


/* Configurações para organizar o titulo e os campos de busca e filtros. */
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex: 1 1 auto; /* CRESCE */
  min-width: 0;   /* obrigatório p/ inputs */
  padding: 18px;
  margin: 0;
}

/* Configurações do titulo do site */
.brand{
  text-decoration:none;
  color:var(--primary-700);
  font-weight:700;
  letter-spacing:0.2px;
  font-size:1.05rem;
}

/* header controls */
.header-controls {
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  box-sizing: border-box;
  border-radius: 8px;
}

/*tranforma o campo de busca em posição relativa para a lupa e ocupa toda largura possível. */
.search {
  position: relative;
  width: 100%;
}

/* Configurações do input do campo de pesquisa*/
.search input {
  width: 100%;
  height: 37px;
  padding: 0 12px 0 45px; /* <-- AQUI O PLACEHOLDER É EMPURRADO */
  box-sizing: border-box;
  font-size: 16px;
  border-radius: 8px;
  border:1px solid rgba(0,0,0,0.06);
  margin: 0.2%;
}

/* Configurações do simbolo de lupa dentro do input de pesquisa */
.search .lup {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: #444;
}

/* Configurações para organizar os filtros. */
.filters{
  display:flex;
  gap:8px;
  align-items:center;
  width: 100%;
}

/* Configurações para os selects dentro dos filtros. */
.filters select{
  padding:9px 10px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,0.06);
  background:white;
  width: 100%;
  min-width: 0;
}

/* Descartar depois, pois há outros meios de usar a responsividade de forma eficiente.*/
@media (max-width: 600px) {
  .header-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search input {
    width: 100%;
    border-radius: 8px;
  }
  .filters select {
    width: 100%;
  }
}

/* CONTEUDO PRINCIPAL */
.main-content{
  padding-top: 200px; /* ALTURA DO HEADER + ESPAÇO EXTRA */
  box-sizing: border-box;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Configurações para organizar os card de produtos */
.products-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:18px;
}

/* product card */
.product-card{
  background:var(--card-bg);
  border-radius:12px;
  padding:12px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
  transition:transform 180ms ease, box-shadow 180ms ease;
  border:1px solid rgba(0,0,0,0.04);
}

.product-card:focus-within,
.product-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(9,9,9,0.08);
}

/* image box keeps aspect ratio */
.product-thumb{
  width:100%;
  padding-bottom:80%;
  position:relative;
  overflow:hidden;
  border-radius:8px;
  background:linear-gradient(180deg,#fff,#fff8f8);
}

.product-thumb img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* meta */
.product-meta{
  display:flex;
  flex-direction:column;
  gap:6px
}

.product-title{
  font-weight:600;
  font-size:0.98rem;
  color: black
}

.product-desc{
  font-size:0.92rem;
  color:var(--muted);
  min-height:36px
}

.product-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px
}

.price{
  font-weight:700;
  color:var(--primary-700)
}

/* buttons */
/* Butão de 'ver' nos cards */


/* Descrição do produto no card */
.product-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-primary{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background: #25D366;
  color:#FFFFFF;
  border:none;
  padding:8px 12px;
  border-radius:8px;
  gap: 8px;
  font-weight:600;
  width: fit-content;
  flex-grow: 0;
  flex-shrink: 1;
  min-width: 0;
}

.primary {
  cursor:pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

a:hover {color: #D2B4DE;}


.btn-outline{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #C67878;
  color: white;
  border:1px solid rgba(208,139,139,0.18);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  width: fit-content;
  flex-grow: 0;
  flex-shrink: 1;
  min-width: 0;
  height: 33px;
}

/* no results */
.no-results{
  padding:32px;
  text-align:center;
  color:var(--muted);
  font-weight:600
}

/* Modais dentro do card */
.modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:120;
}

.modal.hidden{display:none}

.modal-backdrop{position:absolute; inset:0;background:rgba(0,0,0,0.35)}

.modal-panel{
  position:relative;
  z-index:121;
  background:var(--card-bg);
  border-radius:12px;
  padding:18px;
  max-width:920px;
  width:90%;
  box-shadow:0 20px 60px rgba(9,9,9,0.18);
  display:flex;
  flex-direction:column;
  min-width: 0;
}

/* botão para fechar o card do produto */
.modal-close{
  position:absolute;
  right:1px;
  top:1px;
  border:none;
  background:transparent;
  font-size:18px;
  cursor:pointer;
  color:var(--muted)
}

.modal-body{
  display:flex;
  gap:18px;
  align-items:flex-start;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.modal-image{
  flex:0 0 48%;
  min-width: 220px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.modal-image img{
  width:100%;
  height:auto;
  border-radius:8px;
  object-fit:cover
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,0.4);
  color: white;
  padding: clamp(6px, 2vw, 12px);
  font-size: clamp(14px, 3vw, 28px);
  cursor: pointer;
}

.left {left: 5px;}
.right {right: 5px;}

.modal-info{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width: 0;
}


/* footer */
.site-footer{
  padding:18px 0;
  text-align:center;
  color:var(--muted);
  border-top:1px solid rgba(0,0,0,0.03);
}

.containerFooter {
  display:flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: column ;
  text-decoration: none !important;
  gap: 3px;
  color: #333333;
}

#year {color:#333333;}


/* responsiveness */
@media (max-width:900px){
  .modal-body{
    flex-direction: column;
  }
  .modal-image{width:100%}
  .header-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:10px
  }
  .search input{min-width:140px}
}

/*Aba sobre*/
/* Página Sobre (começa escondida) */
.sobre-page {
  display: none;
  padding: 20px;
  max-width: 900px;
  margin: 40px auto;
  line-height: 1.6;
  font-size: 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Quando ativa */
.sobre-page.active {display: block;}

/* Botão padrão */
#sobre-page button,
#sobre-voltar {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  background: #d8a39d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#sobre-voltar:hover {background: #c48d86;}

/* Link do rodapé */
.sobre-link {
  cursor: pointer;
  text-decoration: underline;
}

.sobre-link:hover {
  color: #D2B4DE;
  transition: color 0.3s ease;
}


/* ========== ESTADOS DE CARREGAMENTO E ERRO ========== */
.status-message {
  text-align: center;
  padding: 3rem 1rem;
  margin: 2rem auto;
  max-width: 500px;
  border-radius: var(--radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(243, 198, 198, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-retry,
.btn-clear,
.btn-copy {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 1rem;
  display: inline-block;
}

.hidden {
  display: none !important;
}