/**
 * Firma detail page — /firma/{slug}
 */

.fp-hero {
  --fp-brand: #0f766e;
  padding: 1.75rem 0 1.5rem;
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(15, 118, 110, 0.14), transparent 60%),
    linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.fp-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: 0.84rem;
  color: #64748b;
}

.fp-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: #94a3b8;
}

.fp-breadcrumb a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 600;
}

.fp-hero__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.fp-hero__identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.fp-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.fp-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.15;
}

.fp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: #64748b;
  font-size: 0.88rem;
}

.fp-meta__item i {
  color: #f59e0b;
  margin-right: 0.15rem;
}

.fp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fp-hero__desc {
  margin: 1rem 0 0;
  max-width: 52rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

.fp-quickstats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.fp-qstat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.fp-qstat span {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.fp-qstat strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.fp-section {
  padding: 1.75rem 0 3rem;
  background: #f8fafc;
}

.fp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  align-items: start;
}

.fp-main,
.fp-side {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.fp-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.fp-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.fp-card__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.fp-side-title {
  font-size: 1rem !important;
}

.fp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 0.25rem;
}

.fp-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.fp-hstats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.fp-hstat {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.fp-hstat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.fp-hstat strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.fp-hstat strong.is-down { color: #059669; }
.fp-hstat strong.is-up { color: #dc2626; }

.fp-chart-box {
  position: relative;
  height: 260px;
  width: 100%;
}

.fp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.fp-tab {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.fp-tab:hover {
  border-color: #99f6e4;
  color: #0f766e;
}

.fp-tab.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.fp-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.fp-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.fp-table td {
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  color: #334155;
  vertical-align: middle;
}

.fp-table tbody tr:hover {
  background: #f8fafc;
}

.fp-price {
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.fp-price small {
  font-weight: 600;
  color: #94a3b8;
  margin-left: 0.15rem;
}

.fp-off {
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 800;
}

.fp-row-action {
  text-align: right;
  white-space: nowrap;
}

/* Buttons */
.fp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.fp-btn:hover {
  transform: translateY(-1px);
}

.fp-btn--solid {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.22);
}

.fp-btn--solid:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff !important;
}

.fp-btn--ghost {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a !important;
}

.fp-btn--ghost:hover {
  border-color: #0f766e;
  color: #0f766e !important;
}

.fp-btn--soft {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e !important;
}

.fp-btn--soft:hover {
  background: #ccfbf1;
}

.fp-btn--mini {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 9px;
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e !important;
}

.fp-btn--mini.is-copied {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff !important;
}

.fp-btn--block {
  width: 100%;
  margin-top: 0.85rem;
}

.fp-info {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fp-info li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.fp-info li:last-child {
  border-bottom: 0;
}

.fp-info span {
  color: #94a3b8;
}

.fp-info strong {
  color: #0f172a;
  text-align: right;
}

.fp-coupons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fp-coupon__code {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
}

.fp-coupon__code code {
  flex: 1 1 auto;
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f766e;
  background: transparent;
}

.fp-coupon p {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.fp-compare {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fp-compare__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid transparent;
}

.fp-compare__row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.fp-compare__row.is-self {
  background: #ecfdf5;
  border-color: #99f6e4;
}

.fp-compare__row strong {
  display: block;
  font-size: 0.9rem;
  color: #0f172a;
}

.fp-compare__row span {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

.fp-compare__row em {
  font-style: normal;
  font-weight: 800;
  color: #0f766e;
  white-space: nowrap;
}

.fp-compare__row em small {
  font-weight: 600;
  color: #94a3b8;
}

@media (max-width: 991.98px) {
  .fp-layout {
    grid-template-columns: 1fr;
  }
  .fp-quickstats,
  .fp-hstats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .fp-hero__actions {
    width: 100%;
  }
  .fp-hero__actions .fp-btn {
    flex: 1 1 auto;
  }
  .fp-table {
    min-width: 0;
  }
  .fp-table thead {
    display: none;
  }
  .fp-table,
  .fp-table tbody,
  .fp-table tr,
  .fp-table td {
    display: block;
    width: 100%;
  }
  .fp-table tr {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    background: #fff;
  }
  .fp-table td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border: 0;
    padding: 0.35rem 0;
    text-align: right;
  }
  .fp-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #94a3b8;
    text-align: left;
  }
  .fp-row-action {
    text-align: left;
  }
  .fp-row-action::before {
    display: none;
  }
  .fp-row-action .fp-btn {
    width: 100%;
    margin-top: 0.35rem;
  }
  .fp-chart-box {
    height: 220px;
  }
}

@media (max-width: 420px) {
  .fp-quickstats {
    grid-template-columns: 1fr;
  }
  .fp-hero__actions .fp-btn--soft {
    flex-basis: 100%;
  }
}

[data-theme="dark"] .fp-hero {
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  border-color: #1e293b;
}

[data-theme="dark"] .fp-hero h1,
[data-theme="dark"] .fp-card__head h2,
[data-theme="dark"] .fp-qstat strong,
[data-theme="dark"] .fp-hstat strong,
[data-theme="dark"] .fp-info strong,
[data-theme="dark"] .fp-price,
[data-theme="dark"] .fp-compare__row strong {
  color: #e2e8f0;
}

[data-theme="dark"] .fp-section {
  background: #0b1220;
}

[data-theme="dark"] .fp-card,
[data-theme="dark"] .fp-qstat,
[data-theme="dark"] .fp-table tr {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .fp-hstat,
[data-theme="dark"] .fp-coupon__code {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .fp-btn--ghost {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .fp-tab {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .fp-tab.is-active {
  background: #14b8a6;
  border-color: #14b8a6;
  color: #042f2e;
}
