/* Fesarea shared frontend UI */
:root {
  --fesarea-primary: #0ea2bd;
  --fesarea-primary-dark: #087f96;
  --fesarea-secondary: #284b63;
  --fesarea-ink: #18212f;
  --fesarea-muted: #687586;
  --fesarea-line: #dfe7ee;
  --fesarea-soft: #f4f8fb;
  --fesarea-surface: #ffffff;
  --fesarea-success: #168a63;
  --fesarea-warning: #d89b12;
  --fesarea-radius: 8px;
  --fesarea-shadow: 0 16px 40px rgba(24, 33, 47, 0.09);
  --accent-color: var(--fesarea-primary);
  --primary-color: var(--fesarea-primary);
  --heading-color: var(--fesarea-ink);
  --default-color: var(--fesarea-ink);
}

html {
  scroll-padding-top: 86px;
}

body {
  background: var(--fesarea-soft);
  color: var(--fesarea-ink);
  font-family: "Inter", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body .main {
  background: var(--fesarea-soft);
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title {
  color: var(--fesarea-ink);
  letter-spacing: 0;
}

p,
.card-text,
.form-text,
.breadcrumb,
small {
  color: var(--fesarea-muted);
}

a {
  color: var(--fesarea-primary);
}

a:hover {
  color: var(--fesarea-primary-dark);
}

.navbar.navbar-light {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(223, 231, 238, 0.9);
  box-shadow: 0 8px 30px rgba(24, 33, 47, 0.06) !important;
  backdrop-filter: blur(14px);
}

.frontend-navbar {
  min-height: 78px;
}

.frontend-navbar .container {
  gap: 22px;
}

.navbar-brand {
  align-items: center;
  color: var(--fesarea-ink) !important;
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  margin-right: 22px;
}

.navbar-brand img {
  height: 34px;
  object-fit: contain;
  width: 34px;
  border-radius: 6px;
}

.frontend-navbar .navbar-nav {
  align-items: center;
  gap: 4px;
}

.navbar .nav-link {
  color: #435164 !important;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.55rem 0.78rem !important;
  white-space: nowrap;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  background: rgba(14, 162, 189, 0.08);
  color: var(--fesarea-primary) !important;
}

.navbar-actions {
  gap: 10px !important;
  margin-left: auto;
}

.navbar-actions > .nav-item {
  align-items: center;
  display: flex;
}

.navbar-actions .dropdown-toggle {
  background: #f4f8fb;
  border: 1px solid var(--fesarea-line);
  padding-inline: 1rem !important;
}

.navbar-actions .btn-primary {
  min-height: 40px;
  padding: 0.55rem 1rem;
  white-space: nowrap;
}

.dropdown-menu {
  border: 1px solid var(--fesarea-line);
  border-radius: var(--fesarea-radius);
  box-shadow: var(--fesarea-shadow);
}

.btn {
  border-radius: var(--fesarea-radius);
  font-weight: 700;
  letter-spacing: 0;
}

.btn-primary,
.buy-btn,
.read-more,
.download-btn,
.contact form button[type=submit] {
  background: var(--fesarea-primary) !important;
  border-color: var(--fesarea-primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(14, 162, 189, 0.22);
}

.btn-primary:hover,
.buy-btn:hover,
.read-more:hover,
.download-btn:hover,
.contact form button[type=submit]:hover {
  background: var(--fesarea-primary-dark) !important;
  border-color: var(--fesarea-primary-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: var(--fesarea-primary);
  color: var(--fesarea-primary);
}

.btn-outline-primary:hover {
  background: var(--fesarea-primary);
  border-color: var(--fesarea-primary);
  color: #fff;
}

.btn-success {
  background: var(--fesarea-success);
  border-color: var(--fesarea-success);
}

.section {
  background: var(--fesarea-soft);
}

.section:nth-of-type(even),
.bg-light {
  background: #ffffff !important;
}

.hero,
.hero-section,
.bg-gradient-primary,
.bg-primary {
  background:
    linear-gradient(135deg, rgba(14, 162, 189, 0.94), rgba(40, 75, 99, 0.96)),
    url("../img/hero-bg.jpg") center / cover no-repeat !important;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero::after,
.hero-section::after {
  background: rgba(255, 255, 255, 0.08);
  content: "";
  inset: auto 0 0;
  height: 1px;
  position: absolute;
}

.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section p,
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary p {
  color: #fff;
}

.hero {
  min-height: calc(100vh - 76px);
  padding: 86px 0 72px;
}

.hero h2 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  max-width: 780px;
}

.hero p,
.hero-section .lead {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  max-width: 720px;
}

.hero-img img,
.product-gallery .main-image img,
.card-img-top,
.product-image {
  border-radius: var(--fesarea-radius);
}

.card,
.icon-box,
.pricing-item,
.faq-item,
.info-item,
.search-box,
.filter-sidebar,
.card-item {
  background: var(--fesarea-surface) !important;
  border: 1px solid var(--fesarea-line) !important;
  border-radius: var(--fesarea-radius) !important;
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.06) !important;
}

.card:hover,
.company-card:hover,
.product-card:hover,
.team-card:hover {
  box-shadow: var(--fesarea-shadow) !important;
  transform: translateY(-3px);
}

.card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card .card,
.card:hover .card {
  box-shadow: none !important;
  transform: none;
}

.pricing .pricing-grid {
  align-items: stretch;
}

.pricing .pricing-grid > [class*="col-"] {
  display: flex;
}

.pricing .pricing-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 34px 24px !important;
}

.pricing .pricing-item.featured {
  transform: none !important;
}

.pricing .pricing-item h4 {
  font-size: 34px;
  margin-bottom: 16px;
}

.pricing .pricing-item h4 span {
  display: inline-block;
  font-size: 15px;
}

.pricing .pricing-item .icon {
  margin: 22px auto 18px auto;
}

.pricing .pricing-item ul {
  flex: 1;
  padding: 14px 0 18px;
  margin-bottom: 0;
  line-height: 1.25;
}

.pricing .pricing-item ul li {
  align-items: flex-start;
  padding: 7px 0;
  font-size: 15px;
}

.pricing .pricing-item ul i {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1.25;
  padding-top: 1px;
}

.pricing .pricing-item .buy-btn {
  padding: 10px 24px;
  min-width: 170px;
}

@media (min-width: 1400px) {
  .pricing .container {
    max-width: 1560px;
  }
}

.section-title {
  margin-bottom: 2rem;
}

.section-title h2,
.section-title,
.card-title {
  font-weight: 800;
}

.section-title p {
  color: var(--fesarea-muted);
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.badge.bg-primary,
.badge.text-primary,
.text-primary {
  color: var(--fesarea-primary) !important;
}

.badge.bg-primary {
  background: rgba(14, 162, 189, 0.12) !important;
}

.text-muted,
.card .text-muted,
footer .text-muted {
  color: var(--fesarea-muted) !important;
}

.form-control,
.form-select,
.select2-container--bootstrap-5 .select2-selection {
  border: 1px solid var(--fesarea-line);
  border-radius: var(--fesarea-radius);
  min-height: 44px;
}

.form-control:focus,
.form-select:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
  border-color: var(--fesarea-primary);
  box-shadow: 0 0 0 0.2rem rgba(14, 162, 189, 0.14);
}

.breadcrumb {
  background: transparent;
  margin-bottom: 0;
}

.breadcrumb a {
  color: var(--fesarea-primary);
  font-weight: 700;
}

.company-logo {
  background: #fff;
  border: 1px solid var(--fesarea-line);
}

.filter-sidebar {
  position: sticky;
  top: 96px;
}

.page-link {
  border: 1px solid var(--fesarea-line);
  color: var(--fesarea-primary);
  margin: 0 0.15rem;
}

.page-link:hover,
.page-item.active .page-link {
  background: var(--fesarea-primary);
  border-color: var(--fesarea-primary);
  color: #fff;
}

footer.bg-dark {
  background: #142433 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0 !important;
}

footer h5,
footer h6 {
  color: #7dd5e5 !important;
}

footer p,
footer a,
footer .text-muted {
  color: rgba(255, 255, 255, 0.76) !important;
}

footer a:hover {
  color: #fff !important;
}

.scroll-top {
  background: var(--fesarea-primary);
  border-radius: var(--fesarea-radius);
}

@media (max-width: 991px) {
  .navbar .btn {
    margin-top: 0.75rem;
    width: fit-content;
  }

  .frontend-navbar .navbar-collapse {
    border-top: 1px solid var(--fesarea-line);
    margin-top: 14px;
    padding-top: 14px;
  }

  .frontend-navbar .navbar-nav {
    align-items: stretch;
    gap: 6px;
  }

  .navbar-actions {
    align-items: flex-start !important;
    margin-left: 0;
    margin-top: 12px;
  }

  .filter-sidebar {
    position: static;
  }

  .hero,
  .hero-section {
    padding: 48px 0;
  }
}

@media (max-width: 576px) {
  .hero h2,
  .hero-section .display-4 {
    font-size: 2rem;
  }

  .d-flex.justify-content-between.align-items-center {
    align-items: flex-start !important;
    gap: 1rem;
  }

  .hero-stats {
    flex-wrap: wrap;
  }
}

.contact-lock {
    position: relative;
}

.contact-lock__content {
    filter: blur(5px);
    opacity: 0.42;
    pointer-events: none;
    user-select: none;
}

.contact-lock__overlay {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(14, 162, 189, 0.2);
    border-radius: 8px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    left: 0;
    padding: 16px;
    position: absolute;
    right: 0;
    text-align: center;
    top: 0;
    z-index: 2;
}

.contact-lock__overlay strong {
    color: #18212f;
    display: block;
}

.marketplace-strip {
    background: #f7fbfd;
    border-bottom: 1px solid #dfe7ee;
    border-top: 1px solid #dfe7ee;
}

.marketplace-category-pill {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    color: #18212f;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 68px;
    padding: 14px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.marketplace-category-pill:hover {
    border-color: #0ea2bd;
    box-shadow: 0 12px 28px rgba(14, 162, 189, 0.12);
    color: #0ea2bd;
    transform: translateY(-2px);
}

.marketplace-product-card,
.marketplace-company-card {
    background: #fff;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    height: 100%;
    overflow: hidden;
    transition: all 0.2s ease;
}

.marketplace-product-card:hover,
.marketplace-company-card:hover {
    box-shadow: 0 18px 40px rgba(24, 33, 47, 0.12);
    transform: translateY(-3px);
}

.marketplace-product-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.marketplace-company-logo {
    border-radius: 8px;
    height: 64px;
    object-fit: cover;
    width: 64px;
}

.specification-list {
    background: #f7fbfd;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    overflow: hidden;
}

.specification-list__row {
    align-items: flex-start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(140px, 220px) 1fr;
    padding: 14px 16px;
}

.specification-list__row + .specification-list__row {
    border-top: 1px solid #dfe7ee;
}

.specification-list__row--plain .specification-list__value {
    grid-column: 1 / -1;
}

.specification-list__label {
    color: #506176;
    font-weight: 700;
}

.specification-list__value {
    color: #18212f;
    overflow-wrap: anywhere;
}

@media (max-width: 575px) {
    .specification-list__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.filter-autocomplete {
    position: relative;
    width: 100%;
}

.filter-autocomplete__menu {
    background: #fff;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(24, 33, 47, 0.14);
    display: none;
    left: 0;
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 30;
}

.filter-autocomplete.is-open .filter-autocomplete__menu {
    display: block;
}

.filter-autocomplete__item,
.filter-autocomplete__empty {
    background: transparent;
    border: 0;
    color: #18212f;
    display: block;
    padding: 11px 14px;
    text-align: left;
    width: 100%;
}

.filter-autocomplete__item:hover {
    background: #f3f9fb;
    color: #0ea2bd;
}

.filter-autocomplete__empty {
    color: #718096;
}

.filter-select {
    position: relative;
    width: 100%;
}

.filter-select__button {
    align-items: center;
    background: #fff;
    border: 1px solid #d8e2eb;
    border-radius: 8px;
    color: #18212f;
    display: flex;
    font-size: 1rem;
    gap: 10px;
    justify-content: space-between;
    min-height: 46px;
    padding: 10px 13px;
    text-align: left;
    width: 100%;
}

.filter-select__button:hover,
.filter-select.is-open .filter-select__button {
    border-color: #0ea2bd;
    box-shadow: 0 0 0 3px rgba(14, 162, 189, 0.12);
}

.filter-select__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-select__menu {
    background: #fff;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(24, 33, 47, 0.14);
    display: none;
    left: 0;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 25;
}

.filter-select.is-open .filter-select__menu {
    display: block;
}

.filter-select__option {
    align-items: center;
    border-radius: 6px;
    color: #314158;
    cursor: pointer;
    display: flex;
    gap: 9px;
    margin: 0;
    padding: 9px 8px;
}

.filter-select__option:hover {
    background: #f3f9fb;
}

.filter-select__option input {
    cursor: pointer;
    flex: 0 0 auto;
}

.search-box .input-group > .filter-autocomplete {
    flex: 1 1 auto;
    min-width: 0;
}

.search-box .input-group > .filter-autocomplete .form-control {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

@media (max-width: 767px) {
    .search-box .input-group {
        display: block;
    }

    .search-box .input-group > .filter-autocomplete .form-control,
    .search-box .input-group .btn {
        border-radius: 8px;
        width: 100%;
    }

    .search-box .input-group .btn {
        margin-top: 10px;
    }
}
