/* ── Free3Dicons — Custom Styles ───────────────────────────────────────────── */

:root {
  --brand:        #4F46E5;
  --brand-dark:   #3730A3;
  --brand-light:  #EEF2FF;
  --accent:       #F59E0B;
  --surface:      #F8FAFC;
  --border:       #E2E8F0;
  --text:         #1E293B;
  --muted:        #64748B;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(79,70,229,.15), 0 8px 24px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.f3d-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.f3d-nav .navbar-brand {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--brand);
  letter-spacing: -0.5px;
}
.f3d-nav .navbar-brand span { color: var(--accent); }
.f3d-nav .nav-link {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all .15s;
}
.f3d-nav .nav-link:hover { color: var(--brand); background: var(--brand-light); }

/* ── Hero / Search ───────────────────────────────────────────────────────── */
.f3d-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 56px 0 48px;
  text-align: center;
  color: #fff;
}
.f3d-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.f3d-hero p {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: 32px;
}
.f3d-search-wrap {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}
.f3d-search-input {
  width: 100%;
  padding: 16px 56px 16px 52px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  color: var(--text);
}
.f3d-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1rem;
  pointer-events: none;
}
.f3d-search-clear {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  display: none;
  padding: 4px;
}
.f3d-search-clear.visible { display: block; }
.f3d-icon-count {
  margin-top: 16px;
  font-size: .9rem;
  opacity: .75;
}

/* ── Filter Bar ──────────────────────────────────────────────────────────── */
.f3d-filters {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 61px;
  z-index: 90;
}
.f3d-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.f3d-filter-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.f3d-filter-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.f3d-filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.f3d-filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.f3d-filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

/* ── Results Bar ─────────────────────────────────────────────────────────── */
.f3d-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px;
}
.f3d-results-count {
  font-size: .9rem;
  color: var(--muted);
}
.f3d-results-count strong { color: var(--text); }

/* ── Icon Grid ───────────────────────────────────────────────────────────── */
.f3d-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

/* ── Icon Card ───────────────────────────────────────────────────────────── */
.f3d-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.f3d-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
  color: inherit;
  text-decoration: none;
}
.f3d-card-img-wrap {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  aspect-ratio: 1;
}
.f3d-card-img-wrap img {
  width: 100%;
  max-width: 128px;
  height: auto;
  display: block;
  transition: transform .2s;
}
.f3d-card:hover .f3d-card-img-wrap img { transform: scale(1.08); }
.f3d-card-body {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
}
.f3d-card-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.f3d-card-meta {
  font-size: .72rem;
  color: var(--muted);
}
.f3d-card-download {
  display: none;
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .72rem;
  cursor: pointer;
}
.f3d-card:hover .f3d-card-download { display: block; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.f3d-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}
.f3d-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.f3d-empty h3 { color: var(--text); font-size: 1.2rem; margin-bottom: 8px; }

/* ── Icon Detail Page ────────────────────────────────────────────────────── */
.f3d-detail-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.f3d-detail-preview img { max-width: 256px; width: 100%; }

.f3d-download-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.f3d-size-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.f3d-size-btn {
  flex: 1;
  min-width: 64px;
  padding: 10px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  color: var(--text);
}
.f3d-size-btn:hover { border-color: var(--brand); color: var(--brand); }
.f3d-size-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.f3d-size-btn small { display: block; font-weight: 400; font-size: .7rem; opacity: .7; margin-top: 2px; }

.f3d-fmt-btns { display: flex; gap: 6px; margin-bottom: 16px; }
.f3d-fmt-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  color: var(--muted);
}
.f3d-fmt-btn.active { background: var(--text); border-color: var(--text); color: #fff; }

.f3d-download-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.f3d-download-btn:hover { background: var(--brand-dark); }
.f3d-download-btn:disabled { opacity: .6; cursor: wait; }

.f3d-custom-size {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.f3d-custom-size input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  outline: none;
}
.f3d-custom-size input:focus { border-color: var(--brand); }
.f3d-custom-size button {
  padding: 8px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
  transition: all .15s;
}
.f3d-custom-size button:hover { border-color: var(--brand); color: var(--brand); }

/* ── Tag Pills ───────────────────────────────────────────────────────────── */
.f3d-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.f3d-tag-pill {
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.f3d-tag-pill:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}

/* ── Related Icons ───────────────────────────────────────────────────────── */
.f3d-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.f3d-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.f3d-breadcrumb a { color: var(--muted); text-decoration: none; }
.f3d-breadcrumb a:hover { color: var(--brand); }
.f3d-breadcrumb .sep { opacity: .4; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.f3d-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 48px;
}
.f3d-footer-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--brand);
  margin-bottom: 8px;
}
.f3d-footer-tagline { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.f3d-footer h6 { font-weight: 700; font-size: .85rem; margin-bottom: 12px; color: var(--text); }
.f3d-footer ul { list-style: none; padding: 0; margin: 0; }
.f3d-footer ul li { margin-bottom: 8px; }
.f3d-footer ul li a { color: var(--muted); text-decoration: none; font-size: .85rem; transition: color .15s; }
.f3d-footer ul li a:hover { color: var(--brand); }
.f3d-footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 32px; color: var(--muted); font-size: .82rem; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.f3d-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #1E293B;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}
.f3d-toast.success { background: #16a34a; }
.f3d-toast.error   { background: #dc2626; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Request Form ────────────────────────────────────────────────────────── */
.f3d-request-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .f3d-hero { padding: 36px 0 32px; }
  .f3d-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .f3d-filters { top: 57px; overflow-x: auto; }
  .f3d-filter-group { flex-wrap: nowrap; }
}
@media (max-width: 480px) {
  .f3d-grid { grid-template-columns: repeat(2, 1fr); }
  .f3d-size-btns { gap: 6px; }
}
