/* ==========================================================================
   AAS Instruments — design system
   Precision / medical engineering / stainless steel / international export
   ========================================================================== */

:root {
  /* Ink (deep steel navy) */
  --ink-950: #060f1a;
  --ink-900: #0b1a2b;
  --ink-800: #122740;
  --ink-700: #1a3859;
  --ink-600: #274a70;

  /* Steel (instrument-grade greys) */
  --steel-700: #3c4650;
  --steel-600: #5a6570;
  --steel-500: #7c8790;
  --steel-400: #a6afb7;
  --steel-300: #ced4d9;
  --steel-200: #e3e7ea;
  --steel-100: #f1f3f5;

  /* Accent — clinical cyan/teal */
  --accent-700: #076671;
  --accent-600: #0a8998;
  --accent-500: #0fa8b8;
  --accent-400: #3fc2cf;
  --accent-100: #e2f7f9;

  --paper: #ffffff;
  --ok: #1a8a5f;
  --warn: #b8720a;
  --danger: #c02b3c;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container-max: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(6, 15, 26, 0.06), 0 1px 1px rgba(6, 15, 26, 0.04);
  --shadow-md: 0 8px 24px rgba(6, 15, 26, 0.10);
  --shadow-lg: 0 24px 64px rgba(6, 15, 26, 0.16);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  /* Reserved: site intentionally ships a single light, clinical theme. */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto; /* Lenis drives smooth scroll when JS is enabled */
}

body {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

a {
  color: var(--accent-700);
  text-decoration: none;
}
a:hover {
  color: var(--accent-600);
}

.container-aas {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-950);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent-500);
  display: inline-block;
}

.display-fluid {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.75rem);
  line-height: 1.05;
}
.h-fluid-lg {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.12;
}

.lead-fluid {
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  color: var(--steel-700);
  line-height: 1.6;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.72rem 1.5rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s;
}
.btn-aas-primary {
  background: var(--ink-950);
  color: #fff;
  border: 1px solid var(--ink-950);
}
.btn-aas-primary:hover {
  background: var(--accent-700);
  border-color: var(--accent-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-aas-outline {
  background: transparent;
  color: var(--ink-950);
  border: 1.5px solid var(--steel-300);
}
.btn-aas-outline:hover {
  border-color: var(--ink-950);
  color: var(--ink-950);
  transform: translateY(-1px);
}
.btn-aas-accent {
  background: var(--accent-500);
  color: #fff;
  border: 1px solid var(--accent-500);
}
.btn-aas-accent:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--steel-200);
}
.site-header .navbar > .container-aas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: inherit;
}
.site-header .navbar-brand {
  display: flex;
  align-items: center;
}
.site-header .navbar-brand img {
  height: 34px;
  width: auto;
  display: block;
}
.site-header .navbar-brand img.site-logo-custom {
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}
@media (max-width: 575.98px) {
  .site-header .navbar-brand img.site-logo-custom {
    height: 38px;
    max-width: 180px;
  }
}
.site-logo-footer {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.site-header .nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-800);
  padding: 0.5rem 0.9rem !important;
}
.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--accent-700);
}
.topbar {
  background: var(--ink-950);
  color: var(--steel-300);
  font-size: 0.82rem;
}
.topbar a {
  color: var(--steel-200);
}
.topbar a:hover {
  color: var(--accent-400);
}

.mega-panel {
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* Products nav dropdown — opens on hover (desktop), CSS-only (no JS timing
   issues), falls back to a plain expanded list on mobile where hover
   doesn't apply. */
.hover-dropdown {
  position: relative;
}
.hover-dropdown-menu {
  display: none;
  width: 300px;
}
.dropdown-item-fancy {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.dropdown-item-fancy:hover {
  background: var(--accent-100);
  color: var(--accent-700);
}
.dropdown-item-icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  background: var(--steel-100);
  color: var(--accent-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.dropdown-item-fancy:hover .dropdown-item-icon {
  background: var(--accent-500);
  color: #fff;
}
.dropdown-item-divider {
  height: 1px;
  background: var(--steel-200);
  margin: 0.4rem 0.2rem;
}
.dropdown-item-fancy-all {
  color: var(--steel-600);
  font-size: 0.85rem;
}
@media (min-width: 992px) {
  .hover-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    z-index: 1050;
    background: #fff;
  }
  .hover-dropdown:hover .hover-dropdown-menu,
  .hover-dropdown:focus-within .hover-dropdown-menu {
    display: block;
  }
  /* Invisible bridge so moving the mouse from the link down to the panel
     doesn't cross a gap and close the menu. */
  .hover-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.5rem;
  }
}
@media (max-width: 991.98px) {
  .hover-dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: var(--steel-100);
    margin: 0.25rem 0 0.5rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--ink-950) 0%, var(--ink-800) 55%, var(--ink-700) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(4.5rem, 4rem + 4vw, 8rem) clamp(3.5rem, 3rem + 3vw, 6rem);
}
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-slider .swiper-slide {
  position: relative;
}
.hero-slider .swiper-slide a {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.hero-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 15, 26, 0.92) 0%, rgba(6, 15, 26, 0.75) 45%, rgba(6, 15, 26, 0.35) 100%);
}
.hero h1, .hero h2, .hero h3, .hero h4 {
  color: #fff;
}
.hero .eyebrow {
  color: var(--accent-400);
}
.hero .eyebrow::before {
  background: var(--accent-400);
}
.hero-lead {
  color: var(--steel-300);
  max-width: 46ch;
}
.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--steel-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3.5rem, 3rem + 2vw, 6rem);
}
.section-alt {
  background: var(--steel-100);
}
.section-dark {
  background: var(--ink-950);
  color: #fff;
}
.section-dark .eyebrow { color: var(--accent-400); }
.section-dark .eyebrow::before { background: var(--accent-400); }
.section-dark h2, .section-dark h3 { color: #fff; }

/* ---------- Category cards ---------- */
.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  isolation: isolate;
  box-shadow: var(--shadow-sm);
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.category-card:hover img {
  transform: scale(1.06);
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 15, 26, 0.88) 0%, rgba(6, 15, 26, 0.15) 55%, rgba(6, 15, 26, 0.05) 100%);
  z-index: 1;
}
.category-card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  color: #fff;
}
.category-card-count {
  font-size: 0.78rem;
  color: var(--steel-300);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.category-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0.15rem 0 0.5rem;
}
.category-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-400);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Product cards ---------- */
.product-card {
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  height: 100%;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.25s;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--steel-300);
}
.product-card-media {
  aspect-ratio: 1 / 1;
  background: var(--steel-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}
.product-card-body {
  padding: 1rem 1.1rem 1.2rem;
}
.product-card-artno {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-700);
  text-transform: uppercase;
}
.product-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0.2rem 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-actions {
  display: flex;
  gap: 0.5rem;
}
.product-card-actions .btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
}
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--steel-500);
  background: repeating-linear-gradient(135deg, var(--steel-100) 0 10px, var(--steel-200) 10px 20px);
  font-size: 1.4rem;
}

/* ---------- Value / process cards ---------- */
.value-card {
  border-radius: var(--radius-md);
  padding: 1.6rem;
  background: #fff;
  border: 1px solid var(--steel-200);
}
.value-card .icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-100);
  color: var(--accent-700);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.process-step {
  position: relative;
  padding-left: 3.4rem;
}
.process-step .step-index {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--ink-950);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.subcat-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--steel-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.subcat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Breadcrumbs ---------- */
.aas-breadcrumb {
  font-size: 0.85rem;
  color: var(--steel-600);
}
.aas-breadcrumb a {
  color: var(--steel-600);
}
.aas-breadcrumb a:hover {
  color: var(--accent-700);
}

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--steel-300);
  padding: 0.65rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 0.2rem rgba(15, 168, 184, 0.18);
}
.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-800);
}
.captcha-box {
  background: var(--steel-100);
  border: 1px dashed var(--steel-400);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-900);
  display: inline-block;
}

/* ---------- Alerts / flash ---------- */
.alert-aas-success { background: #e7f7f0; color: var(--ok); border: 1px solid #bfe8d5; }
.alert-aas-error { background: #fbe9eb; color: var(--danger); border: 1px solid #f2c3c9; }

/* ---------- Site-wide map (above footer) ---------- */
.site-map-section {
  border-top: 1px solid var(--steel-200);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-950);
  color: var(--steel-400);
}
.site-footer a {
  color: var(--steel-300);
}
.site-footer a:hover {
  color: var(--accent-400);
}
.footer-link-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: transform 0.2s, color 0.2s;
}
.footer-link-list a i {
  width: 16px;
  color: var(--accent-400);
  font-size: 0.85rem;
}
.footer-link-list a:hover {
  transform: translateX(4px);
}
.site-footer h6 {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.1rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: var(--steel-500);
}
.social-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}
.social-icon:hover {
  background: var(--accent-500);
  border-color: var(--accent-500);
  color: #fff;
}
.social-icon-light {
  border-color: var(--steel-300);
  color: var(--ink-900);
}

/* ---------- Swiper nav override ---------- */
/* Swiper's own prev/next glyphs rely on an embedded icon-font whose data-URI
   fails to decode in some environments (renders as literal "prev"/"next"
   text at a huge font-size instead of an arrow). We render our own Font
   Awesome icon instead and fully disable Swiper's default content/position. */
.swiper-nav-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.aas-swiper-nav.swiper-button-prev,
.aas-swiper-nav.swiper-button-next {
  position: static;
  margin: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink-950);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.aas-swiper-nav.swiper-button-prev:after,
.aas-swiper-nav.swiper-button-next:after {
  content: none;
}
.aas-swiper-nav:hover {
  background: var(--accent-600);
}
.aas-swiper-nav.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- Utility reveal (GSAP hooks) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}
.reveal-ready [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ---------- Floating widgets (WhatsApp / back-to-top) ---------- */
.floating-widgets {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-md);
  border: none;
  color: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
.floating-btn:hover {
  transform: translateY(-2px);
  color: #fff;
}
.floating-whatsapp {
  background: #25d366;
}
.floating-top {
  background: var(--ink-950);
  font-size: 1.1rem;
}
.floating-top[hidden] {
  display: none;
}

/* ---------- 404 ---------- */
.error-code {
  font-size: clamp(4rem, 3rem + 6vw, 8rem);
  font-weight: 800;
  color: var(--steel-300);
  line-height: 1;
}

@media (max-width: 767.98px) {
  .hero-stats { gap: 1.5rem; }
}
