/* =========================================================
   Tools page — Промена МК (AI алатки)
   ========================================================= */

.btn.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.tools-scope {
  padding: clamp(32px, 5vw, 72px) 0 clamp(80px, 12vw, 140px);
}

.tools-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.tools-empty {
  text-align: center;
  padding: 1.35rem 1rem;
  margin: 0 0 2rem;
  font-size: 0.94rem;
  color: var(--text-dim);
  background: rgba(139, 92, 246, 0.06);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: 16px;
  line-height: 1.55;
}




.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ftab {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ftab:hover {
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--text);
}

.ftab.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
  color: #e9d5ff;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  max-width: 320px;
  width: 100%;
}

.search-wrap svg {
  flex-shrink: 0;
  opacity: 0.45;
}

.search-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 0.94rem;
  font-family: inherit;
}

.search-wrap input::placeholder {
  color: var(--text-muted);
}

.cat-section {
  margin-bottom: 3rem;
}

.cat-section-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.cat-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.tool-count-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

/* ---------- Featured ---------- */
.section-featured-tools .cat-section-title {
  border-bottom-color: rgba(139, 92, 246, 0.45);
}

.featured-tool-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.featured-tool {
  background: linear-gradient(145deg, rgba(20, 20, 32, 0.95), rgba(10, 8, 20, 0.98));
  border-radius: var(--radius, 18px);
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  flex: 1 1 100%;
}

.featured-tool:hover {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ft-logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.ft-content {
  flex: 1;
  min-width: 0;
}

.ft-content h3 {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.ft-content > p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.ft-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.ft-price {
  font-weight: 700;
  color: #5eead4;
  font-size: 0.85rem;
}

.ft-why {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.featured-tool .btn-ghost.btn-sm {
  align-self: center;
}

/* ---------- Tool grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius, 18px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tool-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.tool-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.tool-info h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.tool-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tool-desc {
  font-size: 0.875rem;
  line-height: 1.62;
  color: var(--text-dim);
  flex: 1;
}

.tool-card .use-cases {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.use-pill {
  padding: 0.18rem 0.52rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.tool-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.tool-price.free {
  color: #4ade80;
}

.tool-stars {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- CTA block (dual cards) ---------- */
.tools-page-cta {
  padding: clamp(48px, 8vw, 90px) 0 clamp(72px, 10vw, 120px);
}

.tools-page-cta .section-head {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.tools-page-cta .section-head p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.tools-cta-pack {
  max-width: 1080px;
  margin: 0 auto;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
}

.tools-cta-modules {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tools-cta-modules-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: #fff;
  margin: 0 0 6px;
}

.tools-cta-modules-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.tools-mod-list {
  display: grid;
  gap: 10px;
}

.tools-mod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(7, 7, 11, 0.45);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.tools-mod-row:hover {
  border-color: var(--border-strong);
}

.tools-mod-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tools-mod-info > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tools-mod-info strong {
  font-size: 0.92rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
}

.tools-mod-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tools-mod-row .btn-method-buy {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.82rem;
  min-width: 88px;
  justify-content: center;
}

.tools-cta-bundle {
  padding-left: clamp(8px, 2vw, 24px);
  border-left: 1px solid var(--border);
}

.tools-cta-bundle-title {
  margin: 8px 0 14px;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: #fff;
  line-height: 1.35;
}

.tools-cta-bundle .sp-features {
  margin-bottom: 22px;
}

.tools-cta-bundle .sp-actions .sp-buy {
  min-width: 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .tools-cta-pack {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }

  .tools-cta-bundle {
    padding-left: 0;
    border-left: none;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 768px) {
  .tools-mod-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  .tools-mod-info {
    padding: 14px 16px;
    gap: 12px;
    align-items: flex-start;
  }

  .tools-mod-info > div {
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .tools-mod-info strong {
    font-size: 0.94rem;
    line-height: 1.35;
    padding-right: 4px;
  }

  .tools-mod-price {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c4b5fd;
    padding: 5px 11px;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 999px;
    white-space: nowrap;
  }

  .tools-mod-row .sp-mini-icon {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .tools-mod-row .btn-method-buy {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 13px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .tools-mod-list {
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .tools-cta-pack {
    padding: 22px;
  }

  .tools-cta-modules-title {
    font-size: 1.1rem;
  }

  .tools-mod-info strong {
    font-size: 0.9rem;
  }

  .tools-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrap {
    max-width: none;
  }

  .featured-tool {
    flex-direction: column;
  }

  .featured-tool .btn {
    width: 100%;
    justify-content: center;
  }
}
