/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, serif;
  background: #faf9f6;
  color: #222;
}

/* ===== Nav ===== */
nav {
  background: #1a1a1a;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
}
nav .brand {
  color: #e8d5a3;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  margin-right: auto;
}
nav a {
  color: #ccc;
  text-decoration: none;
  font-size: .9rem;
  padding: 4px 10px;
  border-radius: 4px;
}
nav a:hover { background: #333; color: #fff; }

@media (max-width: 600px) {
  nav { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; }
  nav .brand { margin-right: 0; margin-bottom: 4px; }
}

/* ===== Layout ===== */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.back { display: inline-block; margin-bottom: 18px; color: #666; text-decoration: none; font-size: 0.9rem; }

/* ===== Logo ===== */
.logo-wrap { text-align: center; margin-bottom: 12px; }
.logo-wrap img { max-width: 160px; max-height: 160px; object-fit: contain; }

/* ===== Typography ===== */
h1 { font-size: 1.8rem; margin-bottom: 8px; }
.tagline { color: #555; margin-bottom: 16px; line-height: 1.5; }

/* ===== Notice Banners ===== */
.notice {
  background: #fffbe6;
  border-left: 4px solid #f0b429;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.notice.green { background: #f0faf0; border-color: #38a169; }
.notice.red   { background: #fff0f0; border-color: #e53e3e; }

/* ===== Terms Box ===== */
.terms-box {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.term-pill {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.85rem;
  display: inline-block;
  margin: 2px;
}

/* ===== Sections ===== */
.section { margin-bottom: 28px; }
.section-title {
  font-size: 1.05rem;
  font-weight: bold;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.section-pricing { font-size: 0.82rem; color: #555; margin-bottom: 10px; }
.subsection-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: #444;
  margin: 12px 0 6px;
  padding-left: 4px;
  border-left: 3px solid #ccc;
}

/* ===== Order Table ===== */
table.ot { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-bottom: 4px; }
table.ot th {
  background: #f5f5f5;
  padding: 7px 8px;
  border: 1px solid #ddd;
  text-align: center;
  white-space: nowrap;
  font-size: 0.82rem;
}
table.ot td { padding: 6px 8px; border: 1px solid #ddd; vertical-align: middle; }
table.ot td.sn { font-size: 0.87rem; }
table.ot td.thc { font-size: 0.82rem; color: #666; text-align: center; }
table.ot input[type=number] {
  width: 52px; padding: 4px; border: 1px solid #ccc;
  border-radius: 4px; text-align: center; font-size: 0.85rem;
}

/* ===== Order Box ===== */
.order-box { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; margin-top: 32px; }
.order-box h2 { font-size: 1.1rem; margin-bottom: 12px; }
.order-items { min-height: 36px; margin-bottom: 12px; font-size: 0.88rem; color: #555; }
.oir { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.88rem; }
.order-total { font-weight: bold; font-size: 1rem; margin: 10px 0 4px; }
.omn { font-size: 0.85rem; margin-bottom: 16px; }
.omn.warn    { color: #c05621; }
.omn.block   { color: #e53e3e; font-weight: bold; }
.omn.ok      { color: #276749; }
.omn.neutral { color: #888; }

/* ===== Form ===== */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: bold; margin-bottom: 4px; color: #444; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 8px 10px; border: 1px solid #ccc;
  border-radius: 4px; font-size: 0.9rem; font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 70px; }

.btn-submit { width: 100%; padding: 12px; background: #1a1a1a; color: #fff; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; margin-top: 8px; }
.btn-submit:hover    { background: #333; }
.btn-submit:disabled { background: #aaa; cursor: not-allowed; }

.success-msg { display: none; text-align: center; padding: 30px 20px; }
.success-msg h2 { font-size: 1.4rem; margin-bottom: 10px; color: #276749; }

/* ===== Vendor Table ===== */
table.vt { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 12px; }
table.vt th, table.vt td { padding: 7px 10px; border: 1px solid #ddd; text-align: left; }
table.vt th { background: #f5f5f5; }

/* ===== Merch Grid ===== */
.merch-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.merch-item {
  background: #fff; border: 1px solid #ddd; border-radius: 6px;
  padding: 10px 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; min-width: 190px; flex: 1; font-size: 0.9rem;
}
.qc { display: flex; align-items: center; gap: 6px; }
.qc button { width: 28px; height: 28px; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.qc span { min-width: 24px; text-align: center; font-size: 0.93rem; }

/* ===== Brand Cards ===== */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.brand-card {
  background: #fff; border: 1px solid #ddd; border-radius: 10px;
  padding: 24px 20px; text-align: center; text-decoration: none;
  color: #222; transition: box-shadow 0.2s, transform 0.15s; display: block;
}
.brand-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.12); transform: translateY(-2px); }
.brand-card img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 12px; }
.brand-card h2 { font-size: 1.1rem; margin-bottom: 6px; }
.brand-card p  { font-size: 0.85rem; color: #666; }

/* ===== Nabis Box ===== */
.nabis-box { background: #222; border-radius: 8px; padding: 20px; margin-top: 28px; }
.nabis-box h3 { color: #e8d5a3; margin-bottom: 10px; font-size: 1rem; }
.nbrand { background: #333; color: #ddd; padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; display: inline-block; margin: 3px; }

.nabis-logos { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; align-items: center; }
.nabis-logo-link {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; text-decoration: none; border-radius: 6px;
  transition: opacity 0.2s, transform 0.15s; background: transparent;
}
.nabis-logo-link:hover { opacity: 0.75; transform: scale(1.05); }
.nabis-logo-link img { height: 38px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.nabis-logo-link.sunrise-logo img { height: 44px; }

/* ===== Image Upload Panel ===== */
.upload-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 32px;
}
.upload-panel summary {
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  color: #444;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-panel summary::before {
  content: '▶';
  font-size: 0.7rem;
  transition: transform 0.2s;
  color: #888;
}
.upload-panel[open] summary::before { transform: rotate(90deg); }
.upload-panel summary::-webkit-details-marker { display: none; }
.upload-panel-body { margin-top: 16px; }
.upload-panel-body > p { font-size: 0.85rem; color: #666; margin-bottom: 16px; line-height: 1.5; }

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.upload-slot {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
  font-size: 0.82rem;
  color: #666;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafafa;
}
.upload-slot:hover,
.upload-slot.drag-over { border-color: #1a1a1a; background: #f0f0f0; color: #222; }
.upload-slot img.slot-preview {
  width: 64px; height: 64px; object-fit: contain;
  margin: 0 auto 8px; display: block;
}
.upload-slot .slot-label { font-weight: bold; color: #333; margin-bottom: 4px; font-size: 0.85rem; }
.upload-slot .slot-hint  { font-size: 0.78rem; color: #999; margin-bottom: 6px; }
.upload-slot input[type=file] { display: none; }
.upload-slot .dl-btn {
  display: inline-block;
  margin-top: 6px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
}
.upload-slot .dl-btn:hover { background: #333; }
.upload-slot .changed-badge {
  display: inline-block;
  background: #38a169;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.72rem;
  margin-left: 4px;
  vertical-align: middle;
}
.upload-notice {
  margin-top: 14px;
  padding: 10px 14px;
  background: #fffbe6;
  border-left: 4px solid #f0b429;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}
