/* ===============================
   Add Product Form – mobile-first
   =============================== */

:root {
  --brand: #76ff03;
  --brand-soft: #bfff19;
  --bg: #000;
  --panel: #111;
  --field: #161616;
  --field-focus: #232923;
  --text: #fff;
  --nav-h: 110px;
  --bottom-gap: 28px;
}

#addProductForm {
  top: calc(var(--nav-h) + 12px);
  bottom: calc(var(--bottom-gap) + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  margin-inline: auto;

  width: min(95vw, 420px);
  min-width: 280px;

  background: var(--panel);
  color: var(--text);
  padding: 40px 24px 400px;
  border: 3px solid var(--brand);
  border-radius: 20px;
  box-shadow: 0 0 28px 6px rgba(118,255,3,.35);

  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;

  scrollbar-width: thin;
  scrollbar-color: var(--brand) var(--bg);
}
#addProductForm::-webkit-scrollbar { width: 8px; }
#addProductForm::-webkit-scrollbar-track { background: var(--bg); }
#addProductForm::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 8px; }
#addProductForm::-webkit-scrollbar-thumb:hover { background: var(--brand-soft); }

#addProductForm, #addProductForm * { box-sizing: border-box; }
#addProductForm form {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  gap: 18px;
}
#addProductForm form > * { width: 100%; max-width: 100%; }

#addProductForm h1, #addProductForm h2 {
  font-size: 2rem;
  margin: 0;
  color: var(--brand);
  font-weight: 800;
  text-align: center;
}

#addProductForm input,
#addProductForm textarea,
#addProductForm select {
  display: block;
  width: 100%;
  max-width: 100%;
  background: var(--field);
  color: var(--text);
  font-size: 1.05rem;
  border: 2px solid var(--brand);
  border-radius: 7px;
  padding: 16px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
#addProductForm textarea {
  min-height: 140px;
  max-height: 280px;
  resize: vertical;
}
#addProductForm input:focus,
#addProductForm textarea:focus,
#addProductForm select:focus {
  border-color: var(--brand-soft);
  background: var(--field-focus);
}

#file-upload-container { display: grid; gap: 10px; width: 100%; }
#addProductForm input[type="file"] {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
}
#addProductForm input[type="file"]::file-selector-button,
#addProductForm input[type="file"]::-webkit-file-upload-button {
  background: var(--field);
  color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 6px;
  padding: 8px 12px;
  margin-right: 12px;
  cursor: pointer;
}

#addProductForm .extrabestandbutton {
  width: 100%;
  max-width: 100%;
  flex: 1 1 100%;
  padding: 14px;
  background: var(--field);
  color: var(--brand);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--brand);
  border-radius: 7px;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
#addProductForm .extrabestandbutton:hover {
  background: var(--brand);
  color: #000;
  transform: scale(1.04);
}

#addProductForm button[type="submit"] {
  width: 100%;
  max-width: 100%;
  background: var(--brand);
  color: #000;
  font-size: 1.08rem;
  font-weight: bold;
  padding: 16px 0;
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 6px var(--brand);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
#addProductForm button[type="submit"]:hover {
  background: var(--brand-soft);
  box-shadow: 0 0 18px var(--brand);
}

#addProductForm form > [style*="display: flex"] > * {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}
#addProductForm select {
  position: relative;
}