/* SEO BD Tools — All Tools Page (matches pricing.html design system) */

.tools-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.tools-hero {
  text-align: center;
  margin-bottom: 28px;
}

.tools-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--p-black);
  line-height: 1.25;
}

.tools-hero p {
  margin: 0;
  font-size: 1rem;
  color: var(--p-muted);
}

/* ---- Search + filters ---- */
.tools-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.tools-page-search {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 48px;
  border: 1px solid var(--p-border);
  border-radius: 999px;
  background: var(--p-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tools-page-search:focus-within {
  border-color: var(--p-green);
  box-shadow: 0 0 0 3px rgba(92, 187, 58, 0.15);
}

.tools-page-search svg {
  color: var(--p-muted-light);
  flex-shrink: 0;
}

.tools-page-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--p-text);
}

.tools-page-search input::placeholder {
  color: var(--p-muted-light);
}

.tools-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tools-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--p-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: var(--p-white);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tools-filter-pill:hover {
  border-color: #c4c4c4;
}

.tools-filter-pill.active {
  background: var(--p-black);
  border-color: var(--p-black);
  color: #fff;
}

/* ---- Grid ---- */
.all-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tool-card {
  background: var(--p-white);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.tool-card:hover {
  box-shadow: var(--p-shadow);
  transform: translateY(-3px);
  border-color: #d8d8db;
}

.tool-card.is-hidden {
  display: none;
}

.tool-card-logo {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--p-radius-sm);
  background: var(--p-card-head);
  padding: 12px;
}

.tool-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.02em;
}

.tool-badge svg {
  width: 24px;
  height: 24px;
}

.tool-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--p-black);
  letter-spacing: -0.01em;
}

.tool-card-tag {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--p-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tool-card-tag .info-popup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px;
  color: #8b5cf6;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
  vertical-align: middle;
}

.tool-card-tag .info-popup:hover,
.tool-card-tag .info-popup:focus {
  color: #7c3aed;
  background-color: #f3e8ff;
  transform: scale(1.15);
  outline: none;
}

.tool-card-tag .info-popup svg {
  display: block;
}

.tool-price-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 12px 10px;
  border: 1.5px solid var(--p-border);
  border-radius: 12px;
  background: #fbfbfc;
}

.tool-price-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: #12203c;
  letter-spacing: -0.02em;
}

.tool-price-period {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--p-muted);
}

.btn-buy-now {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(90deg, #d7dd4c 0%, #5cbb3a 100%);
  color: #10230f;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(92, 187, 58, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-buy-now:hover {
  transform: scale(0.98);
  filter: brightness(1.04);
  box-shadow: 0 4px 10px rgba(92, 187, 58, 0.3);
}

.tools-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 16px;
  color: var(--p-muted);
  font-size: 14px;
}

.tools-count-note {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: var(--p-muted-light);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .all-tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .tools-page {
    padding: 32px 16px 64px;
  }

  .all-tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tools-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 4px;
  }
}

@media (max-width: 480px) {
  .tools-hero h1 {
    font-size: 1.4rem;
  }

  .all-tools-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }
}
