/* ── Hero ── */
.hero-section {
  background: var(--bg2);
  border-bottom: 1px solid var(--ln);
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
  padding: 0 32px;
}

.hero-left {
  padding: 52px 48px 52px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--ln);
}

.type-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.type-div {
  width: 1px;
  height: 12px;
  background: var(--ln);
  flex-shrink: 0;
}

.hero-left h1 {
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--tx2);
  min-height: 78px;
  margin-bottom: 32px;
  font-weight: 400;
  word-break: break-word;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-right {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

.hero-stat-chip {
  position: absolute;
  background: var(--bg2);
  border: 1.5px solid var(--ln);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 2px 12px rgba(14,165,233,0.08);
  z-index: 2;
}

.stat-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--ac);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--tx3);
  font-weight: 600;
  margin-top: 2px;
}

.hero-qr-card {
  background: var(--bg2);
  border: 1.5px solid var(--ln);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 220px;
  box-shadow: 0 4px 24px rgba(14,165,233,0.1);
  position: relative;
  z-index: 1;
}

.hero-qr-frame {
  width: 188px;
  height: 188px;
  background: #fff;
  border: 1.5px solid var(--ln);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  overflow: hidden;
}

.hero-qr-frame canvas {
  display: block;
  width: 160px !important;
  height: 160px !important;
}

.hero-qr-dest {
  font-size: 10px;
  color: var(--tx3);
  font-weight: 600;
  line-height: 1.5;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-dl-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.hero-dl-row .btn {
  flex: 1;
  padding: 8px 6px;
  font-size: 12px;
  justify-content: center;
}

/* ── Generator ── */
.generator-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.type-selector-wrap {
  background: var(--bg2);
  border: 1.5px solid var(--ln);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.cat-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ln);
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--ln);
  background: transparent;
  color: var(--tx2);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.cat-btn:hover { border-color: var(--ac); color: var(--ac); }
.cat-btn.active { background: var(--tx); color: #fff; border-color: var(--tx); }
.cat-btn.cat-ai { color: #9333ea; border-color: rgba(147,51,234,0.25); background: #fdf2f8; }
.cat-btn.cat-ai.active { background: #9333ea; color: #fff; border-color: #9333ea; }

.type-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 8px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--ln);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx2);
  text-align: center;
}

.type-card:hover { border-color: var(--ac); background: var(--ac-lite); color: var(--ac); }
.type-card.active { border-color: var(--ac); background: var(--ac-lite); color: var(--ac); }
.type-card-ai.active { border-color: #9333ea; background: #fdf2f8; color: #9333ea; }
.type-card.hidden { display: none; }

.type-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gen-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: flex-start;
}

.gen-form-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Form fields inside card */
#gen-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Customization card */
.customize-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.customize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Dot styles */
.dot-styles-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dot-style-btn {
  width: 38px;
  height: 38px;
  background: var(--bg2);
  border: 1.5px solid var(--ln);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--tx3);
  transition: all 0.18s;
  padding: 0;
}

.dot-style-btn:hover {
  border-color: var(--ac);
  color: var(--ac);
}

.dot-style-btn.active {
  border-color: var(--ac);
  background: var(--ac-lite);
  color: var(--ac);
}

/* Color picker */
.color-picker-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}

.color-swatch.active {
  border-color: var(--tx);
  transform: scale(1.15);
}

.color-custom-input {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--ln);
  padding: 0;
  cursor: pointer;
  background: none;
  overflow: hidden;
}

/* Logo upload */
.logo-upload-zone {
  border: 1.5px dashed var(--ln);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--tx3);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.18s, background 0.18s;
  text-align: center;
}

.logo-upload-zone:hover {
  border-color: var(--ac);
  background: var(--ac-lite);
  color: var(--ac);
}

/* Preview card */
.gen-preview-card {
  position: sticky;
  top: 80px;
}

.qr-preview-frame {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border: 1.5px solid var(--ln);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.qr-preview-frame canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.qr-size-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.qr-size-slider {
  flex: 1;
  height: 4px;
  appearance: none;
  background: var(--ln);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.qr-size-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ac);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(14,165,233,0.3);
}

.dl-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

/* Dynamic CTA inside preview */
.dynamic-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--ln);
  border-radius: 12px;
  padding: 12px 14px;
}

.dynamic-cta-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ac-lite);
  color: var(--ac);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--ln);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tx2);
}

/* ── QR type form panels ── */
.qr-form-panel { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.qr-form-panel.hidden { display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .gen-body { grid-template-columns: 1fr; }
  .gen-preview-col { order: -1; }
  .gen-preview-card { position: static; }
  .customize-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; padding: 0 16px; }
  .hero-left { padding: 40px 0 32px; border-right: none; border-bottom: 1px solid var(--ln); }
  .hero-right { padding: 32px 16px; }
  .features-grid { grid-template-columns: 1fr; }
}
