body {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  background: #000;
}

body header {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  align-items: center;
  width: 100%;
  gap: 16px;
  max-width: 580px;
}

body header .logo {
  display: block;
  height: 128px;
  width: 128px;
  border-radius: 100%;
  overflow: hidden;
}

body header .socials {
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
  gap: 16px;
  align-items: center;
}

body header .sheetContainer {
  z-index: 100;
  position: fixed;
  top: 0;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  width: 100%;
  gap: 16px;
  box-sizing: border-box;
}

body header .sheet {
  max-width: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 16px;
  transition: 0.2s all;
  text-decoration: none;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  background: rgb(16, 124, 65, 0.75);
  backdrop-filter: blur(10.5px);
  -webkit-backdrop-filter: blur(10.5px);
  border: 1px solid rgba(16, 124, 65, 0.23);
  justify-content: space-around;
}

body header .telegram {
  max-width: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 16px;
  transition: 0.2s all;
  text-decoration: none;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  background: rgb(36, 161, 222, 0.75);
  backdrop-filter: blur(10.5px);
  -webkit-backdrop-filter: blur(10.5px);
  border: 1px solid rgba(36, 161, 222, 0.23);
  box-sizing: border-box;
  justify-content: space-around;
}

body header .sheet:hover {
  scale: 103%;
}

body header .telegram:hover {
  scale: 103%;
}

body header div .icon path {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

body main {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

body main section {
  width: 100%;
  display: flex;
  flex-direction: column;
  max-width: 580px;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

body header img {
  border: solid 2px white;
}

.icon path {
  fill: #DADADA;
  color: #DADADA;
}

.icon:hover path {
  fill: #9e9e9e;
  color: #9e9e9e;
}

@media (max-width: 600px) {
  body header .telegram {
    gap: 0;
  }

  body header .sheet {
    gap: 0;
  }
}

/* ================== TABELA / CARDS ================== */

.grupo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  /*padding: 0 20px;*/
  box-sizing: border-box;
  overflow-x: hidden;
}

.grupo {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  background: transparent;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  table-layout: fixed;
}

.grupo th {
  background: #1a1a1a;
  color: #ffffff;
  padding: 14px 8px;
  font-size: 24px;
  font-weight: 900;
}

.grupo td,
.grupo th {
  padding: 10px 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.grupo tbody tr:nth-child(odd) {
  background-color: #000000;
  color: #ffffff;
}

.grupo tbody tr:nth-child(even) {
  background-color: #141414;
  color: #ffffff;
}

.grupo thead tr:nth-child(2) {
  background-color: #1a1a1a;
  color: #ffffff;
}

.resolution-subtitle {
  background: black;
  color: white;
}

thead tr td {
  text-align: center;
  font-size: 14px;
  padding: 8px 4px;
}

/* primeira coluna (imagem) */
.grupo td:first-child {
  width: 160px;
  text-align: center;
  padding: 8px 4px;
}

/* imagem ocupa o máximo possível da célula */
.grupo td:first-child .img-periferico {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
}

/* coluna de preço não quebra linha */
.grupo td:nth-last-child(1),
.grupo td:nth-last-child(2) {
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
}

td a {
  color: #3391ff;
}

/* Linhas com altura padrão e "Ler mais" */
.grupo tbody tr.row-fixed {
  height: 210px;
}

.grupo tbody tr.row-expanded {
  height: auto;
}

.cell-text {
  position: relative;
}

.cell-text.text-clamp {
  max-height: 140px;
  overflow: hidden;
}

.ver-mais-btn {
  margin-top: 4px;
  border: none;
  background: none;
  color: #4a9eff;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.ver-mais-btn:hover {
  text-decoration: underline;
}

/* Responsividade entre 1250px e 1920px */
@media (min-width: 1251px) and (max-width: 1920px) {
  .grupo {
    font-size: 13px;
  }

  .grupo th {
    font-size: 20px;
    padding: 12px 6px;
  }

  .grupo td {
    padding: 8px 6px;
  }

  thead tr td {
    font-size: 12px;
    padding: 6px 4px;
  }
}

@media (min-width: 1251px) {
  .grupo {
    font-size: 12px;
  }

  .grupo th {
    font-size: 18px;
    padding: 10px 4px;
  }

  .grupo td {
    padding: 6px 4px;
  }

  thead tr td {
    font-size: 11px;
  }

  .links-container {
    display: row;
    flex-direction: column;
    gap: 4px;
  }

  .loja-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* ===== LAYOUT CARDS ABAIXO DE 1250px ===== */
@media (max-width: 1250px) {
  .grupo-container {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
  }
  
    .links-container {
    display: row;
    flex-direction: row !important; 
    gap: 4px;
  }

  /* Esconde a tabela */
  .grupo {
    display: none;
  }

  /* Container dos cards */
  .cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  /* Título da categoria */
  .cards-title {
    background: #000000;
    color: #ffffff;
    padding: 16px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 10px;
  }

  /* Card individual */
  .product-card {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  /* Header do card (sempre visível) */
  .card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #333;
  }

  .card-header:hover {
    background: #141414;
  }

  .card-header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .card-title {
    flex: 1;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
  }

  .card-toggle {
    font-size: 24px;
    color: #666;
    transition: transform 0.3s;
    user-select: none;
  }

  .card-toggle.active {
    transform: rotate(180deg);
  }

  /* Corpo do card (expansível) */
  .card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
  }

  .card-body.active {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
  }

  .card-content {
    padding: 16px;
  }

  /* Cada característica */
  .card-field {
    padding: 12px 0;
    border-bottom: 1px solid #222;
  }

  .card-field:last-child {
    border-bottom: none;
  }

  .card-field-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: bold;
  }

  .card-field-value {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.5;
  }

  .card-field-value ul {
    margin: 4px 0;
    padding-left: 20px;
  }

  .card-field-value ul li {
    margin-bottom: 4px;
  }

  .card-field-value a {
    color: #4a9eff;
    text-decoration: none;
    padding: 6px 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s;
  }

  .card-field-value a:hover {
    background: #222;
    border-color: #4a9eff;
  }
}

@media (min-width: 1251px) {
  .cards-container {
    display: none;
  }
}

@media (max-width: 600px) {
  .cards-container {
    padding: 0 10px;
  }

  .card-header {
    padding: 12px;
    gap: 12px;
  }

  .card-header img {
    width: 60px;
    height: 60px;
  }

  .card-title {
    font-size: 14px;
  }

  .card-content {
    padding: 12px;
  }

  .card-field-value {
    font-size: 13px;
  }
}

/* ================== TOOLTIP ================== */

.tooltip-trigger {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted #666;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  width: 280px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  position: fixed;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: normal;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ================== LINKS / BOTÕES ================== */

.links-container {
  display: flex;
  gap: 6px;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.loja-btn {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.loja-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.loja-btn:active {
  transform: translateY(0);
}
