* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f3f4f6;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  color: #1f2937;
  margin-bottom: 30px;
  font-size: 28px;
}

h2 {
  color: #1f2937;
  margin: 40px 0 20px;
  font-size: 22px;
}

.message {
  background-color: #10b981;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-layout {
  display: grid;
  grid-template-columns: 350px 1fr 180px;
  gap: 40px;
  align-items: start;
}

/* Área da Imagem */
.image-section {
  position: relative;
}

.image-upload {
  width: 100%;
  aspect-ratio: 1;
  background-color: #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.image-upload input[type="file"] {
  display: none;
}

.upload-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background-color: #d1d5db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #6b7280;
  z-index: 2;
}

.image-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  background-color: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.no-image {
  color: #9ca3af;
  font-size: 14px;
}

/* Campos do Formulário */
.form-section {
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 15px;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: #d1d5db;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  color: #1f2937;
  resize: none;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: 2px solid #3b82f6;
  background-color: #e5e7eb;
}

.field-display {
  background-color: #d1d5db;
  padding: 12px 16px;
  border-radius: 6px;
  min-height: 45px;
  font-size: 15px;
  color: #1f2937;
}

.field-display.description {
  min-height: 100px;
}

/* Tamanhos */
.sizes-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.size-option {
  cursor: pointer;
}

.size-option input {
  display: none;
}

.size-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: #f3f4f6;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-weight: 600;
  color: #374151;
  transition: all 0.2s;
}

.size-option input:checked + span {
  background-color: #1f2937;
  border-color: #1f2937;
  color: white;
}

.size-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: #f3f4f6;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-weight: 600;
  color: #374151;
}

/* Cores */
.colors-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option {
  cursor: pointer;
}

.color-option input {
  display: none;
}

.color-circle {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.color-circle.bordered {
  border: 2px solid #d1d5db;
}

.color-option input:checked + .color-circle {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Botões */
.actions-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  min-width: 140px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-save {
  background-color: #2563eb;
  color: white;
}

.btn-edit {
  background-color: #fb923c;
  color: white;
}

.btn-delete {
  background-color: #ef4444;
  color: white;
}

/* Responsividade */
@media (max-width: 1200px) {
  .product-layout {
    grid-template-columns: 280px 1fr 160px;
    gap: 30px;
  }
}

@media (max-width: 992px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .image-section {
    max-width: 400px;
    margin: 0 auto;
  }

  .actions-section {
    flex-direction: row;
    justify-content: center;
  }

  .btn {
    flex: 1;
    max-width: 200px;
  }
}

@media (max-width: 576px) {
  body {
    padding: 15px;
  }

  .product-card {
    padding: 20px;
  }

  h1 {
    font-size: 22px;
  }

  .actions-section {
    flex-direction: column;
  }

  .btn {
    max-width: 100%;
  }

  .size-option span,
  .size-badge {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .color-circle {
    width: 32px;
    height: 32px;
  }
}

/* Estilos do Login */
.login-wrapper {
  max-width: 400px;
  margin: 100px auto 0;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-wrapper h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #1f2937;
  font-size: 24px;
}

.login-wrapper .form-group {
  margin-bottom: 20px;
}

.login-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.login-wrapper input[type="email"],
.login-wrapper input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-wrapper input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-wrapper .btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-wrapper .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.message.error {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid #fecaca;
}

.logout-btn {
  position: absolute;
  top: 20px;
  right: 20px;
}
