/* ============================================================
   METALOBIRŽA.LT — Main Styles (Industrial Metallic Aesthetics)
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  width: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  overflow-x: hidden;
  width: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--text-main);
  background: #f4f5f7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-family); border: none; background: none; }

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- PAGE TOP SPACING FIX FOR FIXED HEADER --- */
.page-header,
.profile-hero,
.auth-container {
  padding-top: calc(var(--header-height) + var(--space-6)) !important;
}

/* For pages without .page-header or .hero */
body:not(:has(.hero)):not(:has(.page-header)):not(:has(.profile-hero)):not(:has(.auth-container)) > .container:first-of-type,
body:not(:has(.hero)):not(:has(.page-header)):not(:has(.profile-hero)):not(:has(.auth-container)) > div:first-of-type:not(.adm-wrap) {
  padding-top: calc(var(--header-height) + var(--space-6)) !important;
}

/* --- TYPOGRAPHY --- */
.h1, h1 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-extrabold); line-height: var(--line-height-tight); color: var(--text-main); }
.h2, h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); line-height: var(--line-height-snug); color: var(--text-main); }
.h3, h3 { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); line-height: var(--line-height-snug); color: var(--text-main); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 22px;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  border: 2px solid transparent;
  text-transform: uppercase;
}
.btn--primary {
  background: linear-gradient(180deg, #ed7a02 0%, #d35e00 100%);
  color: #ffffff;
  border-color: #d35e00;
  box-shadow: 0 2px 6px rgba(234, 115, 0, 0.25);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #d86800 0%, #b85000 100%);
  border-color: #b85000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 115, 0, 0.35);
}
.btn--outline {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}
.btn--outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #ffffff;
}
.btn--outline-dark {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}
.btn--outline-dark:hover {
  background: #f1f5f9;
  border-color: #0f172a;
}
.btn--lg {
  padding: 14px 28px;
  font-size: 14px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-height);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo__img {
  height: 28px;
  max-height: 28px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}
.logo__icon {
  width: 44px; height: 44px;
  background: #0f172a;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo__icon svg { width: 28px; height: 28px; }
.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #0f172a;
}
.logo__tld {
  font-size: 14px;
  font-weight: 900;
  color: #ea7300;
}
.logo__sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-top: 3px;
}

/* Nav */
.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav__link {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}
.nav__link:hover, .nav__link.active { color: #ea7300; }

/* Header Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.btn-login svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.btn-login:hover { color: #ea7300; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #1a1a1a;
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height); left: 0; right: 0; bottom: 0;
  background: #ffffff;
  z-index: 999;
  padding: var(--space-6) var(--container-pad);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  border-top: 1px solid var(--border-color);
}
.mobile-nav.open { transform: translateX(0) !important; }
.mobile-nav__list { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-6); }
.mobile-nav__link {
  display: block;
  padding: 14px var(--space-4);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--text-main);
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-height);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-bg.png');
  background-size: cover;
  background-position: center;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(15, 23, 42, 0.65) 50%,
    rgba(15, 23, 42, 0.35) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: left;
  padding: 60px 0;
  max-width: 650px;
}
.hero__title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.hero__subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 28px;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.search-section {
  position: relative;
  z-index: 10;
  margin-top: -32px;
  padding-bottom: 40px;
}
.search-bar {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-bar__field {
  flex: 1.5;
  position: relative;
}
.search-bar__input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  color: #1a1a1a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  outline: none;
}
.search-bar__select-wrap {
  flex: 1;
  position: relative;
}
.search-bar__select-wrap svg {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  stroke: #64748b;
  fill: none;
  pointer-events: none;
}
.search-bar__select {
  width: 100%;
  padding: 10px 32px 10px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  color: #1a1a1a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  outline: none;
  appearance: none;
  cursor: pointer;
}
.search-bar__divider {
  width: 1px; height: 32px;
  background: #e2e8f0;
}
.search-bar__btn {
  padding: 11px 28px;
}

/* ============================================================
   CATEGORY CARDS (10 Categories Grid)
   ============================================================ */
.categories { padding: 20px 0 50px; }

.categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.categories__grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.cat-card {
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}
.cat-card:hover {
  border-color: #ea7300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.cat-card__header-title {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
}
.cat-card__link {
  display: block;
  text-decoration: none;
}
.cat-card__link:hover .cat-card__header-title {
  color: #ea7300;
  background: #fff8f3;
}
.cat-card:hover .cat-card__link .cat-card__thumb {
  transform: scale(1.03);
}
.cat-card__thumb {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
  transition: transform 0.3s ease;
}
.cat-card:hover .cat-card__thumb {
  transform: scale(1.03);
}

.cat-card__thumb--1 { background-image: url('../assets/images/cat-1.jpg'); }
.cat-card__thumb--2 { background-image: url('../assets/images/cat-2.jpg'); }
.cat-card__thumb--3 { background-image: url('../assets/images/cat-3.jpg'); }
.cat-card__thumb--4 { background-image: url('../assets/images/cat-4.jpg'); }
.cat-card__thumb--5 { background-image: url('../assets/images/cat-5.jpg'); }
.cat-card__thumb--6 { background-image: url('../assets/images/cat-6.jpg'); }
.cat-card__thumb--7 { background-image: url('../assets/images/cat-7.jpg'); }
.cat-card__thumb--8 { background-image: url('../assets/images/cat-8.jpg'); }
.cat-card__thumb--9 { background-image: url('../assets/images/cat-9.jpg'); }
.cat-card__thumb--10 { background-image: url('../assets/images/cat-10.jpg'); }

.cat-card__body {
  padding: 14px 16px;
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}
.cat-card__subtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  padding-bottom: 24px;
}
.cat-subtag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.25;
}
.cat-subtag:hover {
  background: #fff7ed;
  border-color: #ea7300;
  color: #ea7300;
  box-shadow: 0 2px 4px rgba(234, 115, 0, 0.1);
  transform: translateY(-1px);
}
.cat-card__badge {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 34px; height: 34px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
  border: 1px solid #ea7300;
}

/* ============================================================
   TRUST / VALUE PROPOSITION
   ============================================================ */
.trust {
  padding: 40px 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.trust-item__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #ea7300;
}
.trust-item__icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.trust-item__title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.trust-item__text {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

/* ============================================================
   STATISTICS BANNER (Industrial Glassmorphism)
   ============================================================ */
.stats {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 40px 0;
  border-top: 3px solid #ea7300;
  border-bottom: 1px solid #334155;
  position: relative;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffffff;
  transition: all 0.25s ease;
}
.stat-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #ea7300;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.stat-item__icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(234, 115, 0, 0.12);
  border: 1px solid rgba(234, 115, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-item__icon svg {
  width: 24px;
  height: 24px;
  stroke: #ea7300;
  fill: none;
}
.stat-item__value {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-item__label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  margin-bottom: 12px;
}
.footer__logo .logo__img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}
.footer__logo-name { font-size: 16px; font-weight: 900; color: #fff; }
.footer__desc { font-size: 13px; color: #94a3b8; line-height: 1.6; margin-top: 8px; }
.footer__col-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__link { font-size: 13px; color: #cbd5e1; }
.footer__link:hover { color: #ffffff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.footer__legal {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer__legal a {
  color: #94a3b8;
  transition: color 0.15s ease;
}
.footer__legal a:hover {
  color: #ffffff;
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES (TABLET & MOBILE BREAKPOINTS)
   ============================================================ */
@media (max-width: 1024px) {
  .nav { display: none !important; }
  .header__actions { display: none !important; }
  .hamburger { display: flex !important; }
  .mobile-nav { 
    display: block !important;
    position: fixed;
    top: var(--header-height); 
    left: 0; right: 0; bottom: 0;
    background: #ffffff;
    z-index: 999;
    padding: var(--space-6) var(--container-pad);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    border-top: 1px solid var(--border-color);
  }
  .mobile-nav.open {
    transform: translateX(0) !important;
  }

  /* Categories Grid Responsive */
  .categories__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

@media (max-width: 640px) {
  .categories__grid { grid-template-columns: 1fr; gap: 14px; }
  .cat-subtag { padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* Header Logo Mobile Reduction */
  .header .logo__img {
    height: 24px;
    max-height: 24px;
  }

  /* Hero Section Stacking */
  .hero__content {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 0 60px;
  }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }
  .hero__actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  /* Search Bar Stacking */
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 10px;
  }
  .search-bar__field,
  .search-bar__select-wrap,
  .search-bar__btn {
    width: 100%;
    min-width: 100%;
  }
  .search-bar__divider { display: none; }

  /* Trust */
  .trust__grid { grid-template-columns: 1fr; gap: 20px; }

  /* Stats Grid */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 14px;
  }

  /* Footer Inner */
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero__title { font-size: 28px; }
  .hero__subtitle { font-size: 14px; }
  .stats__grid { grid-template-columns: 1fr; gap: 16px; }
  .stat-item { justify-content: flex-start; }
}
