/* ===== PÁGINA DE PRODUTO - MOBILE RESPONSIVO ===== */

/* Container da página de produto */
.product-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Grid responsivo */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: start;
}

/* Coluna principal (imagem + descrição) */
.product-main {
  background: #0f1116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
}

.product-main img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 20px;
  background: #1a1c22;
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  color: #e7edf4;
  margin: 0 0 16px 0;
}

/* Descrição com altura máxima e scroll */
.product-description {
  color: #d6dae3;
  line-height: 1.6;
  max-height: none;
  overflow: visible;
  padding-right: 10px;
  margin-bottom: 20px;
}

/* Scrollbar customizada */
.product-description::-webkit-scrollbar {
  width: 6px;
}

.product-description::-webkit-scrollbar-track {
  background: #1a1c22;
  border-radius: 3px;
}

.product-description::-webkit-scrollbar-thumb {
  background: #2DD4BF;
  border-radius: 3px;
}

.product-description::-webkit-scrollbar-thumb:hover {
  background: #1a9b8a;
}

/* Sidebar de compra */
.product-sidebar {
  position: sticky;
  top: 80px;
  background: #0f1116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
}

.product-price {
  font-size: 36px;
  font-weight: 700;
  color: #2DD4BF;
  margin: 0 0 20px 0;
}

.product-price small {
  font-size: 18px;
  color: #9fb2c8;
  font-weight: 400;
}

.btn-buy {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #2DD4BF, #1a9b8a);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.4);
}

.product-features {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.product-features h4 {
  font-size: 14px;
  color: #9fb2c8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
}

.product-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  padding: 8px 0;
  color: #d6dae3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-features li::before {
  content: "✓";
  color: #2DD4BF;
  font-weight: 700;
  font-size: 16px;
}

/* MOBILE RESPONSIVO */
@media (max-width: 968px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-sidebar {
    position: relative;
    top: 0;
    order: -1; /* Sidebar aparece primeiro no mobile */
  }
  
  .product-price {
    font-size: 28px;
  }
  
  .btn-buy {
    font-size: 16px;
    padding: 14px;
  }
}

@media (max-width: 768px) {
  .product-page {
    padding: 12px;
  }
  
  .product-main {
    padding: 16px;
  }
  
  .product-sidebar {
    padding: 16px;
  }
  
  .product-title {
    font-size: 22px;
  }
  
  /* Descrição com altura reduzida no mobile */
  .product-description {
    max-height: 300px;
    font-size: 14px;
  }
  
  .product-main img {
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .product-title {
    font-size: 20px;
  }
  
  .product-description {
    max-height: 200px;
    font-size: 13px;
  }
  
  .product-price {
    font-size: 24px;
  }
}

/* ===== FORMULÁRIO DE CRIAR PRODUTO - ADMIN ===== */

.create-product-form {
  background: #0f1116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
}

.create-product-form h2 {
  margin: 0 0 24px 0;
  font-size: 22px;
  color: #e7edf4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #d6dae3;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  background: #1a1c22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e7edf4;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2DD4BF;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 12px;
  color: #9fb2c8;
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .create-product-form {
    padding: 20px;
  }
}

/* ===== TABELA DE PRODUTOS - ADMIN ===== */

.products-table-card {
  background: #0f1116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table th {
  background: #1a1c22;
  color: #9fb2c8;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.products-table td {
  padding: 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #d6dae3;
  font-size: 14px;
}

.products-table tr:hover {
  background: rgba(45, 212, 191, 0.03);
}

.products-table img {
  border-radius: 6px;
}

/* Mobile: esconder algumas colunas */
@media (max-width: 1200px) {
  .products-table th:nth-child(4),
  .products-table td:nth-child(4),
  .products-table th:nth-child(6),
  .products-table td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 768px) {
  .products-table {
    font-size: 12px;
  }
  
  .products-table th,
  .products-table td {
    padding: 8px 6px;
  }
  
  /* Mostrar apenas colunas essenciais */
  .products-table th:not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(8)),
  .products-table td:not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(8)) {
    display: none;
  }
}
