/* NEXUS STORE | Estilos da página index */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px Arial,sans-serif;
  background: #FFFFFF;
  color: #141414;
}

/* Cabeçalho e identidade visual */
header {
  background: #141414;
  color: white;
  padding: 22px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header strong {
  font-size: clamp(14px,3vw,26px);
  letter-spacing: 2px;
}
a {
  color: inherit;
  text-decoration: none;
}
nav {
  white-space: nowrap;
}
nav a {
  margin-left: 18px;
}

/* Banner principal */
.hero {
  background: #F1EDE4;
  color: #141414;
  padding: 48px 7%;
  text-align: center;
}
.hero h1 {
  font-size: clamp(32px,5.5vw,60px);
  letter-spacing: -2px;
  margin: 12px 0;
}
.hero p {
  color: #514B43;
}
.btn,button {
  display: inline-block;
  border: 0;
  border-radius: 5px;
  padding: 13px 20px;
  font: inherit;
  cursor: pointer;
  background: #111;
  color: white;
}
.hero .btn {
  background: #141414;
  color: white;
  margin-top: 10px;
}
main {
  max-width: 1200px;
  margin: auto;
  padding: 45px 20px;
}
h2 {
  text-align: center;
  letter-spacing: 3px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 25px 0;
}
.filters button {
  background: white;
  color: #111;
  border: 1px solid #ddd;
}
.filters button.active {
  background: #111;
  color: white;
}

/* Grade de produtos */
.products {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,280px));
  gap: 20px;
  justify-content: center;
  align-items: stretch;
}
.product {
  background: white;
  border: 1px solid #E7E2D9;
  border-radius: 9px;
  overflow: hidden;
  padding: 15px;
}
.photo {
  aspect-ratio: 1;
  background: #e9e9e9;
  display: grid;
  place-items: center;
  color: #777;
  border-radius: 5px;
  overflow: hidden;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product h3 {
  margin: 16px 0 5px;
}
.product p {
  color: #777;
  margin: 0 0 12px;
}
.price {
  display: block;
  font-size: 23px;
  margin-bottom: 15px;
}
.product button {
  width: 100%;
}
.photo {
  position: relative;
  background: white;
  touch-action: pan-y;
}
.photo .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #111b;
  color: white;
  font-size: 22px;
  line-height: 1;
}
.photo .prev {
  left: 6px;
}
.photo .next {
  right: 6px;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.product .dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: #ccc;
}
.product .dots button.active {
  background: #111;
}
.product h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.product .price {
  font-size: 20px;
}
.product button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
@media(max-width:1000px) {
  .products {
    grid-template-columns: repeat(3,minmax(0,280px));
  }
}
@media(max-width:720px) {
  .products {
    grid-template-columns: repeat(2,minmax(0,280px));
  }
}

/* Rodapé */
footer {
  text-align: center;
  background: #141414;
  color: white;
  padding: 35px;
}
small {
  color: #777;
}
.notice {
  text-align: center;
  color: #666;
  font-size: 13px;
}
@media(max-width:480px) {
  header {
    padding: 16px;
  }
  nav a {
    margin-left: 10px;
  }
  .hero {
    padding: 36px 20px;
  }
  .products {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }
  .product {
    padding: 10px;
  }
  .product button {
    font-size: 12px;
    padding: 12px 5px;
  }
}
.toolbar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.toolbar input,.toolbar select {
  font: inherit;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #111;
  min-width: 0;
}
.toolbar input {
  width: min(100%,360px);
}
.toolbar select {
  max-width: 100%;
}
.product .zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: white;
  border-radius: 0;
  cursor: pointer;
}
.photo img {
  display: block;
}

/* Visualização ampliada das fotos */
.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: #111;
  padding: 16px;
}
.viewer[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.viewer::backdrop {
  background: rgba(245,245,245,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.viewer img {
  max-width: 100%;
  max-height: 75vh;
  min-height: 0;
  object-fit: contain;
  touch-action: pan-y;
}
.viewer .close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.viewer button {
  background: #333;
  color: white;
}
.viewer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.viewer button[hidden] {
  display: none;
}
body:has(.viewer[open]) {
  overflow: hidden;
}
.price del {
  color: #777;
  font-size: .8em;
}
.photo .arrow {
  z-index: 1;
}
.viewer {
  opacity: 0;
  transition: opacity .24s ease,display .24s allow-discrete,overlay .24s allow-discrete;
}
.viewer[open] {
  opacity: 1;
}
.viewer::backdrop {
  opacity: 0;
  transition: opacity .24s ease,display .24s allow-discrete,overlay .24s allow-discrete;
}
.viewer[open]::backdrop {
  opacity: 1;
}
.viewer img {
  border-radius: 14px;
  box-shadow: 0 18px 65px #0003;
  background: white;
  max-width: min(88vw,850px);
  transform: scale(.94);
  transition: transform .24s ease;
}
.viewer[open] img {
  transform: scale(1);
}
.viewer button {
  background: rgba(255,255,255,.9);
  color: #111;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  box-shadow: 0 3px 16px #0002;
}
.viewer-count,#viewer-count {
  background: #fffd;
  border-radius: 20px;
  padding: 8px 14px;
}
.viewer .close {
  top: 20px;
  right: 20px;
}
@starting-style {
  .viewer[open] {
    opacity: 0;
  }
  .viewer[open]::backdrop {
    opacity: 0;
  }
  .viewer[open] img {
    transform: scale(.94);
  }
}
@media(prefers-reduced-motion:reduce) {
  .viewer,.viewer::backdrop,.viewer img {
    transition: none;
  }
}
.product .whatsapp-buy {
  transition: background-color .22s ease,color .22s ease,box-shadow .22s ease;
}
@media(hover:hover) {
  .product .whatsapp-buy:not(:disabled):hover {
    background: #25D366;
    color: #111;
    box-shadow: 0 4px 12px #25d36640;
  }
}
.product .whatsapp-buy:not(:disabled):focus-visible {
  background: #25D366;
  color: #111;
  outline: 2px solid #128c45;
  outline-offset: 3px;
}
@media(prefers-reduced-motion:reduce) {
  .product .whatsapp-buy {
    transition: none;
  }
}
.brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.brand:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}
footer .brand-logo {
  margin: auto;
  width: 160px;
}
@media(max-width:480px) {
  header .brand-logo {
    width: 135px;
  }
  header {
    gap: 12px;
  }
  nav {
    font-size: 14px;
  }
}
.products .product {
  display: flex;
  flex-direction: column;
}
.products .product .dots {
  min-height: 10px;
}
.products .product h3 {
  flex: 1;
  min-height: 2.4em;
}
.products .product .price {
  margin-top: 8px;
}
.products .product .whatsapp-buy {
  margin-top: auto;
}

/* Controles exclusivos das categorias e paginação responsiva. */
.category-tools[hidden], .pagination[hidden], .toolbar select[hidden] { display: none; }
/* Barra horizontal inspirada na referência, sem caixas nos controles. */
.category-tools {
  border: 1px solid #E7E2D9;
  border-radius: 5px;
  padding: 24px 28px 18px;
  margin: 0 0 24px;
  background: #fff;
}
.category-tools h3 { margin: 0 0 22px; font-size: 26px; font-weight: 400; }
.category-controls { display: flex; align-items: center; gap: 24px; font-size: 13px; color: #514B43; white-space: nowrap; }
.category-controls label { display: inline-flex; align-items: center; gap: 4px; }
.category-controls label:nth-of-type(2) { margin-left: auto; }
.category-controls select { font: inherit; border: 0; padding: 4px 2px; background: transparent; color: inherit; cursor: pointer; }
.view-controls { display: flex; align-items: center; gap: 10px; }
.view-controls button { background: transparent; color: #999; padding: 3px; border: 0; border-radius: 2px; display: inline-flex; align-items: center; }
.view-controls button[aria-pressed="true"] { background: transparent; color: #141414; }
.view-controls svg { width: 19px; height: 19px; }
.category-controls select:focus-visible, .view-controls button:focus-visible { outline: 2px solid #514B43; outline-offset: 3px; }
@media(max-width: 900px) {
  .category-controls { flex-wrap: wrap; gap: 12px 20px; }
  .category-controls label:nth-of-type(2) { margin-left: 0; }
}
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 24px; white-space: normal; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.products.list-view { grid-template-columns: minmax(0, 850px); }
.products.list-view .product { display: grid; grid-template-columns: minmax(100px, 220px) minmax(0,1fr); gap: 8px 20px; align-items: center; }
.list-view .photo { grid-column: 1; grid-row: 1 / 5; }
.list-view .dots { grid-column: 1; grid-row: 5; }
.products.list-view h3, .products.list-view .price, .products.list-view p, .products.list-view .whatsapp-buy { grid-column: 2; margin: 0; min-height: 0; }
@media(max-width:480px) {
  .category-tools { padding: 12px; }
  .category-controls { gap: 8px 12px; font-size: 12px; }
  .category-tools h3 { font-size: 22px; margin-bottom: 12px; }
  #category-count { flex-basis: 100%; }
  .products.list-view .product { grid-template-columns: minmax(90px, 38%) minmax(0,1fr); gap: 6px 10px; }
}
