:root {
  --fl-primary: #1457d9;
  --fl-ink: #172033;
  --fl-muted: #64748b;
  --fl-bg: #f6f8fb;
  --fl-line: #dbe3ef;
  --fl-success: #16805b;
}

body {
  background: var(--fl-bg);
  color: var(--fl-ink);
  letter-spacing: 0;
  padding-bottom: 64px;
}

.factory-top-nav {
  background: var(--fl-nav-bg, #fff);
  border-bottom: 1px solid rgba(15, 23, 42, .12);
}

.factory-top-nav .factory-nav-brand {
  color: var(--fl-nav-logo, var(--fl-primary)) !important;
}

.factory-top-nav .nav-link {
  color: var(--fl-nav-link, var(--fl-ink));
}

.factory-top-nav .nav-link:hover,
.factory-top-nav .nav-link:focus,
.factory-top-nav .nav-link.active {
  color: var(--fl-nav-active, var(--fl-primary));
  font-weight: 700;
}

.factory-top-nav .fl-nav-button {
  border-radius: 6px;
  white-space: nowrap;
}

.factory-top-nav .fl-nav-button-primary {
  background: var(--fl-nav-primary, var(--fl-primary));
  border-color: var(--fl-nav-primary, var(--fl-primary));
  color: var(--fl-nav-primary-text, #fff);
}

.factory-top-nav .fl-nav-button-primary:hover,
.factory-top-nav .fl-nav-button-primary:focus,
.factory-top-nav .fl-nav-button-primary.active {
  background: var(--fl-nav-active, var(--fl-primary));
  border-color: var(--fl-nav-active, var(--fl-primary));
  color: var(--fl-nav-primary-text, #fff);
}

.factory-top-nav .fl-nav-button-outline {
  border-color: var(--fl-nav-outline, var(--fl-primary));
  color: var(--fl-nav-outline-text, var(--fl-primary));
}

.factory-top-nav .fl-nav-button-outline:hover,
.factory-top-nav .fl-nav-button-outline:focus,
.factory-top-nav .fl-nav-button-outline.active {
  background: var(--fl-nav-outline, var(--fl-primary));
  border-color: var(--fl-nav-outline, var(--fl-primary));
  color: #fff;
}

.hero {
  background: linear-gradient(120deg, var(--hero-bg-1, #0f2e68), var(--hero-bg-2, #1457d9) 58%, var(--hero-bg-3, #0f9f8f));
  color: var(--hero-text, #fff);
  padding: 64px 0 40px;
}

.hero.hero-bg-solid {
  background: var(--hero-bg-1, #0f2e68);
}

.hero.hero-bg-image {
  position: relative;
  isolation: isolate;
  background: linear-gradient(120deg, rgba(15, 46, 104, .82), rgba(20, 87, 217, .72)), var(--hero-image), var(--hero-bg-1, #0f2e68);
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-subtitle {
  color: var(--hero-muted, rgba(255, 255, 255, .78));
}

.hero-btn-primary {
  background: var(--hero-primary-bg, #fff);
  border-color: var(--hero-primary-bg, #fff);
  color: var(--hero-primary-text, var(--fl-primary));
}

.hero-btn-primary:hover,
.hero-btn-primary:focus {
  background: var(--hero-primary-hover-bg, var(--hero-primary-text, var(--fl-primary)));
  border-color: var(--hero-primary-hover-bg, var(--hero-primary-text, var(--fl-primary)));
  color: var(--hero-primary-hover-text, var(--hero-primary-bg, #fff));
}

.hero-btn-outline {
  background: transparent;
  border-color: var(--hero-secondary-border, #fff);
  color: var(--hero-secondary-text, #fff);
}

.hero-btn-outline:hover,
.hero-btn-outline:focus {
  background: var(--hero-secondary-hover-bg, #fff);
  border-color: var(--hero-secondary-hover-bg, #fff);
  color: var(--hero-secondary-hover-text, var(--fl-primary));
}

.surface {
  background: #fff;
  border: 1px solid var(--fl-line);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
}

.section {
  padding: 48px 0;
}

.eyebrow {
  color: var(--fl-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .78rem;
}

.hero .hero-eyebrow {
  color: var(--hero-eyebrow, var(--hero-muted, rgba(255, 255, 255, .78)));
}

.stat {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  padding: 14px;
}

.rfq-card, .supplier-card, .plan-card, .admin-card, .product-card {
  background: #fff;
  border: 1px solid var(--fl-line);
  border-radius: 8px;
  padding: 18px;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

button.product-card {
  color: inherit;
  cursor: pointer;
  display: block;
  border-style: solid;
}

.product-card:hover {
  border-color: rgba(20, 87, 217, .45);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.product-card-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 180px;
  max-height: 180px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--fl-line);
  margin-bottom: 10px;
  background: #eef2f7;
}

.product-thumb,
.admin-product-thumb {
  display: block;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 44px;
  max-height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--fl-line);
}

.product-modal-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 180px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--fl-line);
  background: #eef2f7;
}

.admin-product-thumb {
  cursor: zoom-in;
}

.product-thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 190px;
  overflow: hidden;
}

.admin-product-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.product-review-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid var(--fl-primary);
  border-radius: 8px;
  padding: 14px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.product-review-media,
.product-review-body {
  min-width: 0;
  overflow: visible;
}

.product-review-body,
.product-review-body * {
  overflow-wrap: anywhere;
  word-break: normal;
}

.product-review-img,
.product-review-placeholder {
  display: block;
  width: 100%;
  height: 150px;
  max-height: 150px;
  object-fit: cover;
  border: 1px solid var(--fl-line);
  border-radius: 6px;
  background: #eef2f7;
}

.product-review-placeholder {
  display: grid;
  place-items: center;
  color: var(--fl-muted);
  font-size: .85rem;
}

.product-review-supplier {
  border-bottom: 1px solid var(--fl-line);
  margin-bottom: 10px;
  padding-bottom: 8px;
  font-weight: 700;
}

.product-review-card .btn {
  white-space: nowrap;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid var(--fl-line);
}

.surface img,
.modal img,
.table img {
  max-width: 100%;
}

@media (max-width: 575px) {
  .product-review-card {
    display: flex;
  }
}

.supplier-profile-hero {
  position: relative;
  overflow: hidden;
}

.supplier-public-banner {
  min-height: 260px;
  background: linear-gradient(120deg, #0f2e68, #1457d9 60%, #0f9f8f);
  overflow: hidden;
  position: relative;
}

.supplier-public-banner img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
}

.supplier-public-body {
  padding: 34px;
}

.supplier-public-logo {
  width: 118px;
  min-width: 118px;
  height: 118px;
  border-radius: 14px;
  border: 5px solid #fff;
  background: #eef2f7;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-top: -74px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .2);
}

.supplier-public-logo img,
.supplier-review-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supplier-public-logo span {
  color: var(--fl-primary);
  font-size: 2.3rem;
  font-weight: 800;
}

.supplier-profile-narrative {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 860px;
  padding-top: 18px;
  border-top: 1px solid var(--fl-line);
}

.supplier-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.supplier-media-grid img,
.supplier-content-preview,
.supplier-review-banner {
  width: 100%;
  max-width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--fl-line);
  background: #eef2f7;
}

.supplier-content-logo,
.supplier-review-logo {
  width: 96px;
  max-width: 96px;
  height: 96px;
  border-radius: 10px;
}

.supplier-video iframe {
  border: 0;
  border-radius: 8px;
}

.supplier-public-profile h1 {
  font-size: clamp(1.85rem, 4vw, 3rem);
  letter-spacing: 0;
}

.supplier-public-profile .btn {
  white-space: nowrap;
}

.admin-profile-description-editor {
  min-height: 360px;
  resize: vertical;
  font-size: .95rem;
  line-height: 1.55;
}

.profile-review-modal-body {
  padding-bottom: 118px;
}

.profile-review-modal .modal-footer {
  box-shadow: 0 -10px 24px rgba(15, 23, 42, .08);
}

.profile-review-media-card {
  min-width: 0;
}

.supplier-profile-review-thumb {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--fl-line);
  background: #eef2f7;
}

.profile-review-empty {
  display: grid;
  place-items: center;
  color: var(--fl-muted);
  font-size: .82rem;
}

@media (max-width: 767px) {
  .supplier-public-banner,
  .supplier-public-banner img {
    min-height: 190px;
    height: 220px;
  }

  .supplier-public-body {
    padding: 22px;
  }

  .supplier-public-logo {
    width: 96px;
    min-width: 96px;
    height: 96px;
    margin-top: -58px;
  }
}

.badge.badge-verified,
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #e8fff6 !important;
  color: #16805b !important;
  border: 1px solid #b8ead8 !important;
  font-weight: 700;
}

.badge.badge-verified::before,
.badge-verified::before {
  content: "✓";
  font-weight: 900;
}

.badge.badge-pending,
.badge-pending {
  background-color: #fff8e1 !important;
  color: #8a5a00 !important;
  border: 1px solid #f2d27b !important;
  font-weight: 700;
}

.badge.badge-premium,
.badge-premium {
  background-color: #fff6db !important;
  color: #9a6600 !important;
  border: 1px solid #f1d48d !important;
  font-weight: 700;
}

.badge.badge-picked,
.badge-picked {
  background-color: #ffecec !important;
  color: #b42318 !important;
  border: 1px solid #ffb9b3 !important;
  font-weight: 700;
}

.muted {
  color: var(--fl-muted);
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1fa855;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  z-index: 20;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid var(--fl-line);
  z-index: 30;
}

.mobile-bottom-nav a {
  text-align: center;
  text-decoration: none;
  color: var(--fl-muted);
  font-size: .78rem;
  padding: 10px 4px;
}

.mobile-bottom-nav a.active {
  color: var(--fl-primary);
  font-weight: 700;
}

.site-footer {
  background-color: var(--footer-bg, #101827) !important;
  color: var(--footer-text, #fff) !important;
}

.footer-muted {
  color: var(--footer-muted, rgba(255,255,255,.72));
}

.footer-link {
  display: block;
  color: var(--footer-link, rgba(255,255,255,.72));
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-link:hover,
.footer-link:focus {
  color: var(--footer-link-hover, #fff);
}

.language-select {
  min-width: 118px;
}

.admin-body {
  padding-bottom: 0;
}

.admin-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  overflow: hidden;
}

.admin-sidebar {
  background: #101827;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-sidebar a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.admin-sidebar a.active, .admin-sidebar a:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.admin-sidebar::-webkit-scrollbar {
  width: 8px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.22);
  border-radius: 999px;
}

.admin-brand {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.admin-menu-search {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: #fff;
}

.admin-menu-search::placeholder {
  color: rgba(255,255,255,.55);
}

.admin-menu-search:focus {
  background: #fff;
  color: #172033;
}

.admin-content {
  padding: 28px;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-sticky-search,
.admin-sticky-filters {
  position: sticky;
  z-index: 20;
}

.admin-sticky-search {
  top: 0;
  background: #fff;
}

.admin-sticky-filters {
  top: 78px;
  background: #f6f8fb;
  padding: 10px 0;
  border-bottom: 1px solid var(--fl-line);
}

.admin-filter-strip {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 4px;
}

.admin-filter-control {
  flex: 0 0 auto;
  width: auto;
  min-width: 140px;
  max-width: 240px;
}

.admin-filter-strip .btn {
  flex: 0 0 auto;
}

.admin-content .table-responsive {
  overflow-x: auto;
}

.admin-content table thead,
.admin-content table thead tr,
.admin-content table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

.table td, .table th {
  vertical-align: middle;
}

.table tr:target td {
  background: #fff8d6;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }

  .mobile-bottom-nav {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero {
    padding-top: 34px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
    max-height: none;
  }

  .admin-content {
    height: auto;
    overflow: visible;
  }

  .admin-sticky-search,
  .admin-sticky-filters {
    position: static;
  }
}
