:root {
  color-scheme: dark;
  --background: #101010;
  --surface: #1c1c1c;
  --text: #f5f5f5;
  --muted: #bdbdbd;
  --accent: #c7cacd;
  --accent-dark: #141414;
  --border: #383838;
  --silver: linear-gradient(135deg, #d6d8da 0%, #a3a6aa 20%, #55585c 40%, #75787c 50%, #9a9da1 60%, #45484b 80%, #c2c4c7 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.site-header,
.site-footer,
.container {
  width: min(1320px, 90%);
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 16px;
  border-bottom: 2px solid transparent;
  border-image: var(--silver) 1;
}

.brand {
  display: inline-block;
  flex-shrink: 0;
}

.brand img {
  width: 150px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--silver);
  color: var(--accent-dark);
  border: 0;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.button:hover {
  filter: brightness(1.08);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 365px;
  margin-block: 28px 38px;
  background: #202020;
  border: 1px solid #414141;
  border-radius: 16px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 70%;
  padding: 40px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -2.5px;
  text-transform: uppercase;
}

h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero-note {
  max-width: 370px;
  margin: 22px 0 0;
  color: #d1d1d1;
  font-size: 14px;
}

.hero-photo {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  width: 44%;
}

.hero-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #202020, transparent 40%);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo span {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  padding: 8px 12px;
  background: #131313;
  color: var(--accent);
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 1px;
}

.catalog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.catalog-heading h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

.catalog-heading h2 span {
  margin-left: 14px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
}

#count {
  flex-shrink: 0;
  margin: 0;
  padding: 7px 12px;
  color: #dedede;
  border: 1px solid #505050;
  border-radius: 30px;
  font-size: 13px;
}

.filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tabs button {
  padding: 12px 16px;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.tabs button[aria-pressed="true"] {
  background: var(--silver);
  color: var(--accent-dark);
}

.tabs button:hover:not([aria-pressed="true"]) {
  background: #2b2b2b;
}

.length-filter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.length-filter label {
  color: var(--muted);
  font-size: 14px;
}

select {
  padding: 10px 12px;
  background: #111111;
  color: var(--text);
  border: 1px solid #515151;
  border-radius: 6px;
  font-size: 14px;
}

select:disabled {
  opacity: 0.5;
  cursor: default;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  transition: transform 0.2s, border-color 0.2s;
}

.product:hover {
  transform: translateY(-3px);
  border-color: #929292;
}

.product-image {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1;
  padding: 0;
  background: #282828;
  color: var(--text);
  border: 0;
  border-radius: 7px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-image:hover img {
  transform: scale(1.04);
}

.image-error {
  display: block;
  padding: 30px 15px;
  font-size: 14px;
}

.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  background: #171717;
  color: #e5e5e5;
  border: 1px solid #707070;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.expand {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: var(--silver);
  color: var(--accent-dark);
  border-radius: 50%;
  font-size: 21px;
}

.product-meta {
  margin: 15px 6px 7px;
  color: #b6b6b6;
  font-size: 12px;
  letter-spacing: 1px;
}

.product h3 {
  margin: 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.product-price {
  margin: auto 6px 16px;
  padding-top: 16px;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
}

.product .button {
  width: 100%;
  padding: 12px 8px;
}

.empty {
  grid-column: 1 / -1;
  padding: 35px;
  color: var(--muted);
  text-align: center;
}

.help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-block: 55px 40px;
  padding: 32px;
  background: var(--silver);
  color: var(--accent-dark);
  border-radius: 14px;
}

.help .eyebrow {
  margin-bottom: 9px;
  color: #3b3b3b;
}

.help h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
}

.help p:last-child {
  margin-bottom: 0;
  color: #3b3b3b;
}

.button-dark {
  flex-shrink: 0;
  background: var(--accent-dark);
  color: #f1f1f1;
}

.button-dark:hover {
  background: #303030;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 35px;
}

.site-footer p,
.site-footer > a:last-child {
  color: var(--muted);
  font-size: 14px;
}

dialog {
  position: fixed;
  width: min(880px, 94vw);
  max-height: 90vh;
  padding: 35px;
  overflow: auto;
  background: #181818;
  color: var(--text);
  border: 1px solid #505050;
  border-radius: 15px;
}

dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

.close-button {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  background: #181818;
  color: white;
  border: 0;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 28px;
}

.detail-photo {
  overflow: hidden;
  background: #282828;
  border-radius: 8px;
}

.detail-photo img {
  width: 100%;
}

.detail-photo p {
  padding: 25px;
}

.detail-copy h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
}

#detail-size,
.detail-note {
  color: var(--muted);
  font-size: 14px;
}

.detail-price {
  margin: 20px 0;
  font-size: 34px;
  font-weight: 800;
}

.detail-copy .button {
  width: 100%;
  margin-top: 12px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-copy {
    padding: 32px;
  }

  h1 {
    font-size: 56px;
  }
}

@media (max-width: 800px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

  .filters {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy {
    width: 78%;
  }

  h1 {
    font-size: 47px;
  }

  .catalog-heading h2 span {
    display: none;
  }

  .help {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .site-header,
  .site-footer,
  .container {
    width: 92%;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 14px;
  }

  .brand img {
    width: 100px;
  }

  .catalog-nav {
    display: none;
  }

  nav {
    gap: 10px;
  }

  nav .button {
    padding: 12px 10px;
    font-size: 12px;
  }

  .hero {
    display: block;
    margin-top: 20px;
  }

  .hero-copy {
    width: 100%;
    padding: 24px 20px;
  }

  .hero .eyebrow {
    font-size: 12px;
    letter-spacing: 1px;
  }

  h1 {
    font-size: clamp(32px, 9.4vw, 47px);
    letter-spacing: -1.6px;
  }

  .hero-note {
    margin-top: 16px;
    font-size: 14px;
  }

  .hero-photo {
    position: relative;
    width: 100%;
    height: 205px;
  }

  .hero-photo::after {
    background: linear-gradient(180deg, #202020, transparent 45%);
  }

  .hero-photo img {
    object-position: center 48%;
  }

  .catalog-heading {
    gap: 10px;
  }

  .catalog-heading h2 {
    font-size: 26px;
    line-height: 1.1;
  }

  #count {
    padding: 6px 9px;
    font-size: 12px;
  }

  .filters {
    padding: 10px;
  }

  .tabs {
    gap: 3px;
  }

  .tabs button {
    padding: 11px 9px;
    font-size: 13px;
  }

  .product-grid {
    gap: 12px;
  }

  .product {
    padding: 6px;
    border-radius: 9px;
  }

  .product h3 {
    margin-inline: 3px;
    font-size: 14px;
  }

  .product-meta {
    margin-inline: 3px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .product-price {
    margin-inline: 3px;
    font-size: 20px;
  }

  .product .button {
    padding: 11px 5px;
    font-size: 13px;
  }

  .tag {
    top: 7px;
    left: 7px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .help {
    padding: 24px;
  }

  .help h2 {
    font-size: 27px;
  }

  .site-footer p {
    display: none;
  }

  dialog {
    padding: 40px 20px 22px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-photo img {
    max-height: 330px;
    object-fit: contain;
  }
}

@media (max-width: 340px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product,
  .product-image img {
    transition: none;
  }

  .product:hover,
  .product-image:hover img {
    transform: none;
  }
}

/* Fundo da logo integrado ao catálogo e filtros adaptáveis. */
.brand img { mix-blend-mode: lighten; }
.tabs { flex-wrap: wrap; }
.filters { flex-wrap: wrap; }
