/* AIToolBunch Phase 1 */

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

html, body {
  font-family: 'Calibri', Candara, Optima, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1A1916;
  background: #F5F4F2;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ══════════════════════════════
   NAV
══════════════════════════════ */
.aiv-nav {
  background: #fff;
  border-bottom: 1px solid #E8E5E0;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.aiv-logo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #1A1916;
  margin-right: 20px;
  flex-shrink: 0;
  user-select: none;
}
.aiv-logo span { color: #FF6B35; }

.aiv-nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.aiv-nav-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #5A554F;
  padding: 6px 13px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.aiv-nav-btn:hover   { background: #F5F4F2; color: #1A1916; }
.aiv-nav-btn.aiv-active { background: #F5F4F2; color: #1A1916; font-weight: 600; }

.aiv-cta-btn {
  background: #FF6B35;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  margin-left: auto;
  transition: background .15s;
  white-space: nowrap;
}
.aiv-cta-btn:hover { background: #E8561F; }

/* ══════════════════════════════
   VIEWS
══════════════════════════════ */
.aiv-view { display: none; }
.aiv-view.aiv-visible { display: block; }

/* ══════════════════════════════
   HERO — compact, left-aligned search
══════════════════════════════ */
.aiv-hero {
  background: #fff;
  border-bottom: 1px solid #E8E5E0;
  padding: 32px 28px 28px;
}
.aiv-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.aiv-hero h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 6px;
  color: #1A1916;
}
.aiv-hero h1 em { font-style: normal; color: #FF6B35; }
.aiv-hero p {
  font-size: 14px;
  color: #5A554F;
  margin-bottom: 18px;
}

/* Search row — compact */
.aiv-hero-search-row {
  display: flex;
  gap: 10px;
  max-width: 600px;
}
.aiv-search-wrap {
  flex: 1;
  position: relative;
}
.aiv-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #ABA7A0;
  pointer-events: none;
}
.aiv-search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1.5px solid #D1CDC6;
  border-radius: 9px;
  font-size: 14px;
  color: #1A1916;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.aiv-search-wrap input::placeholder { color: #ABA7A0; }
.aiv-search-wrap input:focus {
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255,107,53,.1);
}
#aiv-sort {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid #D1CDC6;
  border-radius: 9px;
  font-size: 13px;
  color: #5A554F;
  background: #fff;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 120px;
}
#aiv-sort:focus { border-color: #FF6B35; }

/* ══════════════════════════════
   MAIN LAYOUT — sidebar + grid
══════════════════════════════ */
.aiv-main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px 60px;
  align-items: start;
}

/* ══════════════════════════════
   LEFT SIDEBAR
══════════════════════════════ */
.aiv-sidebar {
  position: sticky;
  top: 80px;
  padding-right: 20px;
  border-right: 1px solid #E8E5E0;
  min-height: 200px;
}
.aiv-sidebar-section { margin-bottom: 24px; }
.aiv-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #ABA7A0;
  margin-bottom: 10px;
}
.aiv-sidebar-chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.aiv-chip {
  background: none;
  border: none;
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  color: #5A554F;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.aiv-chip:hover { background: #F5F4F2; color: #1A1916; }
.aiv-chip.aiv-on {
  background: #FFF3EF;
  color: #E8561F;
  font-weight: 600;
}
.aiv-chip.aiv-on::before {
  content: '✓ ';
  font-size: 11px;
}

.aiv-clear-btn {
  background: none;
  border: 1px solid #E8E5E0;
  color: #ABA7A0;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
  text-align: left;
  margin-top: 8px;
}
.aiv-clear-btn:hover { border-color: #DC2626; color: #DC2626; }

/* ══════════════════════════════
   CONTENT AREA
══════════════════════════════ */
.aiv-content {
  padding-left: 24px;
}
.aiv-grid-info {
  font-size: 12px;
  color: #ABA7A0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.aiv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ══════════════════════════════
   TOOL CARD
══════════════════════════════ */
.aiv-card-item {
  background: #fff;
  border: 1px solid #E8E5E0;
  border-radius: 13px;
  padding: 18px;
  cursor: pointer;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  position: relative;
  display: flex;
  flex-direction: column;
  outline: none;
}
.aiv-card-item:hover {
  border-color: #C5C1BB;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.aiv-card-item:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 2px;
}

.aiv-ch {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 10px;
}
.aiv-clogo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.aiv-cmeta { flex: 1; min-width: 0; }
.aiv-cname {
  font-size: 15px;
  font-weight: 700;
  color: #1A1916;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  display: block;
}
.aiv-cco {
  font-size: 11px;
  color: #ABA7A0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.aiv-cbadge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  letter-spacing: .4px;
  flex-shrink: 0;
  align-self: flex-start;
  text-transform: uppercase;
}
.aiv-b-featured { background: #EFF6FF; color: #2563EB; }
.aiv-b-new      { background: #F0FDF4; color: #16A34A; }
.aiv-b-hot      { background: #FFF3EF; color: #E8561F; }

.aiv-cdesc {
  font-size: 13px;
  color: #5A554F;
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.aiv-ctags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.aiv-ctag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 50px;
  background: #F5F4F2;
  color: #ABA7A0;
  border: 1px solid #EEEBE6;
}
.aiv-cf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F1EFEC;
  padding-top: 10px;
  margin-top: auto;
}
.aiv-cstars { display: flex; align-items: center; gap: 1px; font-size: 12px; color: #D1CDC6; }
.aiv-cstars .aiv-f { color: #F59E0B; }
.aiv-crating { font-size: 12px; font-weight: 600; color: #1A1916; margin-left: 4px; }
.aiv-crcnt   { font-size: 10px; color: #ABA7A0; margin-left: 2px; }
.aiv-cprice  { font-size: 12px; font-weight: 600; }
.aiv-free    { color: #16A34A; }
.aiv-fm      { color: #2563EB; }
.aiv-paid    { color: #D97706; }
.aiv-ent     { color: #5A554F; }

.aiv-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #ABA7A0;
}
.aiv-empty-ico { font-size: 40px; margin-bottom: 12px; display: block; }

/* ══════════════════════════════
   MODAL
══════════════════════════════ */
.aiv-modal-ov {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.46);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.aiv-modal-ov.aiv-open { display: flex; }
.aiv-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.17);
}
.aiv-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: #F5F4F2;
  border: 1px solid #E8E5E0;
  color: #5A554F;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all .15s;
}
.aiv-modal-close:hover { background: #E8E5E0; color: #1A1916; }
.aiv-modal-body    { padding: 26px; }
.aiv-modal-head    { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.aiv-m-logo        { width: 54px; height: 54px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.aiv-m-title       { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 3px; color: #1A1916; }
.aiv-m-sub         { font-size: 12px; color: #ABA7A0; }
.aiv-m-sec         { margin-bottom: 16px; }
.aiv-m-lbl         { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #ABA7A0; margin-bottom: 7px; }
.aiv-m-desc        { font-size: 14px; color: #5A554F; line-height: 1.7; }
.aiv-m-infogrid    { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aiv-m-ic          { background: #F9F8F7; border-radius: 9px; padding: 11px 13px; }
.aiv-m-ic .k       { font-size: 10px; color: #ABA7A0; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.aiv-m-ic .v       { font-size: 13px; font-weight: 600; color: #1A1916; }
.aiv-m-tags        { display: flex; flex-wrap: wrap; gap: 5px; }
.aiv-m-tag         { font-size: 11px; padding: 3px 10px; border-radius: 50px; background: #F5F4F2; border: 1px solid #E8E5E0; color: #5A554F; }
.aiv-rate-box      { background: #F9F8F7; border: 1px solid #E8E5E0; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.aiv-rate-lbl      { font-size: 13px; color: #5A554F; margin-bottom: 10px; font-weight: 500; }
.aiv-stars         { display: flex; gap: 5px; margin-bottom: 12px; }
.aiv-rstar         { font-size: 28px; color: #D1CDC6; cursor: pointer; line-height: 1; transition: color .12s, transform .12s; }
.aiv-rstar:hover, .aiv-rstar.aiv-hv, .aiv-rstar.aiv-sl { color: #F59E0B; transform: scale(1.1); }
.aiv-rate-fb       { font-size: 12px; color: #16A34A; font-weight: 500; margin-top: 8px; }
.aiv-visit-btn     { display: inline-flex; align-items: center; gap: 7px; background: #FF6B35; color: #fff; border: none; font-size: 13px; font-weight: 600; padding: 11px 22px; border-radius: 9px; cursor: pointer; transition: background .15s; }
.aiv-visit-btn:hover { background: #E8561F; }

/* ══════════════════════════════
   SUBMIT FORM
══════════════════════════════ */
.aiv-form-wrap     { max-width: 700px; margin: 0 auto; padding: 36px 28px 60px; }
.aiv-form-wrap h2  { font-size: 24px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 6px; color: #1A1916; }
.aiv-sub-p         { font-size: 14px; color: #5A554F; margin-bottom: 24px; }
.aiv-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.aiv-step  { background: #fff; border: 1px solid #E8E5E0; border-radius: 11px; padding: 16px; text-align: center; }
.aiv-step-n { width: 26px; height: 26px; background: #FF6B35; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.aiv-step strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; color: #1A1916; }
.aiv-step span   { font-size: 11px; color: #ABA7A0; }
.aiv-card { background: #fff; border: 1px solid #E8E5E0; border-radius: 13px; padding: 24px; }
.aiv-fsec { font-size: 11px; font-weight: 700; color: #E8561F; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid #F1EFEC; padding-bottom: 8px; margin: 20px 0 14px; }
.aiv-fsec:first-child { margin-top: 0; }
.aiv-fg   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aiv-fi   { display: flex; flex-direction: column; gap: 5px; }
.aiv-fi.aiv-full { grid-column: 1 / -1; }
.aiv-fi label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #ABA7A0; display: block; }
.aiv-req { color: #FF6B35; }
.aiv-fi input, .aiv-fi textarea, .aiv-fi select {
  background: #F9F8F7; border: 1px solid #E8E5E0; color: #1A1916;
  font-size: 14px; padding: 10px 13px; border-radius: 8px; width: 100%;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.aiv-fi input::placeholder, .aiv-fi textarea::placeholder { color: #C5C1BB; }
.aiv-fi input:focus, .aiv-fi textarea:focus, .aiv-fi select:focus {
  border-color: #FF6B35; box-shadow: 0 0 0 3px rgba(255,107,53,.1); background: #fff;
}
.aiv-fi textarea { resize: vertical; min-height: 85px; }
.aiv-agree { display: flex; align-items: flex-start; gap: 10px; background: #F9F8F7; border: 1px solid #E8E5E0; border-radius: 9px; padding: 12px; margin-top: 16px; }
.aiv-agree input[type=checkbox] { width: 16px; height: 16px; accent-color: #FF6B35; flex-shrink: 0; margin-top: 2px; }
.aiv-agree label { font-size: 13px; color: #5A554F; cursor: pointer; line-height: 1.5; text-transform: none; letter-spacing: 0; font-weight: 400; }
.aiv-form-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.aiv-btn-primary { background: #FF6B35; color: #fff; border: none; font-size: 14px; font-weight: 600; padding: 11px 26px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.aiv-btn-primary:hover { background: #E8561F; }
.aiv-btn-sec { background: #fff; border: 1px solid #D1CDC6; color: #5A554F; font-size: 14px; padding: 11px 20px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.aiv-btn-sec:hover { border-color: #ABA7A0; color: #1A1916; }
.aiv-success { background: #F0FDF4; border: 1px solid #86efac; color: #16A34A; padding: 12px 15px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-top: 12px; }
.aiv-error   { background: #FEF2F2; border: 1px solid #fecaca; color: #DC2626; padding: 12px 15px; border-radius: 8px; font-size: 13px; margin-top: 12px; }

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.aiv-toast { display: none; position: fixed; bottom: 24px; right: 24px; background: #1A1916; color: #fff; padding: 11px 20px; border-radius: 9px; font-size: 13px; font-weight: 500; z-index: 99999; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.aiv-toast.aiv-show { display: block; }
.aiv-toast.aiv-ok   { background: #16A34A; }
.aiv-toast.aiv-warn { background: #D97706; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 900px) {
  .aiv-main-layout { grid-template-columns: 1fr; padding: 16px 16px 48px; }
  .aiv-sidebar { position: static; border-right: none; border-bottom: 1px solid #E8E5E0; padding-right: 0; padding-bottom: 16px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 16px; }
  .aiv-sidebar-section { margin-bottom: 0; }
  .aiv-sidebar-chips { flex-direction: row; flex-wrap: wrap; }
  .aiv-chip { width: auto; white-space: nowrap; border: 1px solid #E8E5E0; background: #fff; }
  .aiv-chip.aiv-on { background: #FFF3EF; }
  .aiv-content { padding-left: 0; }
  .aiv-grid { grid-template-columns: 1fr; }
  .aiv-hero { padding: 24px 16px 20px; }
  .aiv-hero h1 { font-size: 24px; }
  .aiv-hero-search-row { max-width: 100%; }
  .aiv-cta-btn { display: none; }
  .aiv-nav { padding: 0 16px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .aiv-grid { grid-template-columns: repeat(2, 1fr); }
  .aiv-main-layout { grid-template-columns: 200px 1fr; }
}
