:root {
  --red: #BA000E;
  --red-dark: #93000B;
  --dark: #313131;
  --darker: #1C1C1C;
  --gray: #ECECEC;
  --gray-border: #D6D6D6;
  --white: #FFFFFF;
  --muted: #666666;
  --whatsapp: #1F9D55;
  --whatsapp-dark: #177A41;
  --container: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: var(--white);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color 0.18s ease, background 0.18s ease; }
a:hover { color: var(--red-dark); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons (sharp industrial 0px radius matching Nedmach brand) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn-dark { background: var(--dark); color: var(--white); border-color: var(--dark); }
.btn-dark:hover { background: var(--darker); color: var(--white); }
.btn-outline { background: transparent; color: var(--dark); border-color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--dark); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); border-color: var(--whatsapp); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); border-color: var(--whatsapp-dark); color: var(--white); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  font-size: 14px;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 16px;
}
.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}
.social-links a {
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.social-links a:hover { color: var(--red); }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-email { color: var(--dark); font-weight: 600; }
.top-email:hover { color: var(--red); }
.lang-switch { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.lang-switch a { color: var(--muted); }
.lang-switch a.active { color: var(--red); text-decoration: underline; }
.lang-switch .sep { color: var(--gray-border); }

.main-nav-bar {
  background: var(--gray);
}
.main-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}
.site-logo img { height: 42px; width: auto; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block;
  padding: 10px 10px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li > a.active { color: var(--red); }

.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-top: 3px solid var(--red);
  box-shadow: 0 12px 30px rgba(0,0,0,0.14);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  z-index: 200;
}
.has-dropdown .dropdown-wide {
  min-width: 310px;
  max-height: 75vh;
  overflow-y: auto;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}
.dropdown li a:hover { background: var(--gray); color: var(--red); }
.dropdown .sub-links {
  list-style: none;
  margin: 0;
  padding: 0 0 4px 12px;
}
.dropdown .sub-links li a { font-size: 13px; font-weight: 500; padding: 5px 16px; color: var(--muted); }

.nav-search {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-border);
}
.nav-search input {
  border: 0;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 14px;
  width: 155px;
  outline: none;
}
.nav-search button {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  cursor: pointer;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.mobile-menu-toggle span { display: block; width: 26px; height: 3px; background: var(--dark); }

/* Flash messages */
.flash-banner { padding: 14px 0; font-weight: 600; text-align: center; }
.flash-success { background: #E6F6EC; color: #14532D; border-bottom: 2px solid #1F9D55; }
.flash-error { background: #FDECEC; color: #7F1D1D; border-bottom: 2px solid var(--red); }

/* Typography helpers */
.kicker {
  display: inline-block;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
h1, h2, h3, h4 {
  margin-top: 0;
  font-weight: 700;
  line-height: 1.2;
}
h2 { font-size: 36px; text-transform: uppercase; margin-bottom: 14px; }
h3 { font-size: 22px; margin-bottom: 10px; }

/* Hero */
.hero {
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 110px 0 100px;
}
.hero-inner { max-width: 820px; }
.hero h1 {
  font-size: clamp(32px, 4.5vw, 54px);
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--white);
}
.hero-sub {
  font-size: 20px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Sections */
.section { padding: 68px 0; }
.section-white { background: var(--white); }
.section-gray { background: var(--gray); }
.section-header { margin-bottom: 36px; }
.section-header p { color: var(--muted); max-width: 720px; margin: 0; }
.section-cta { text-align: center; margin-top: 36px; }

/* Page Banner */
.page-banner {
  background: var(--darker);
  color: var(--white);
  padding: 48px 0;
  border-bottom: 4px solid var(--red);
}
.page-banner h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--white);
}
.banner-count { margin: 0; color: rgba(255,255,255,0.82); font-size: 16px; }

/* Experience Section */
.experience-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.experience-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.stat-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--gray);
  border-left: 5px solid var(--dark);
}
.stat-box-accent {
  background: var(--red);
  color: var(--white);
  border-left-color: var(--darker);
}
.stat-box h4 { margin: 0; font-size: 20px; text-transform: uppercase; }
.stat-icon { font-size: 28px; line-height: 1; }

/* Brands Grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.brand-card {
  background: var(--white);
  padding: 32px 24px;
  border-top: 4px solid var(--red);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.brand-logo-wrap { height: 56px; display: flex; align-items: center; }
.brand-logo-wrap img { max-height: 50px; width: auto; object-fit: contain; }
.brand-card h3 { text-transform: uppercase; margin: 0; }
.brand-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }

/* Product Groups */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.group-card {
  display: flex;
  flex-direction: column;
  background: var(--gray);
  color: var(--dark);
  overflow: hidden;
  border-bottom: 3px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.group-card:hover {
  transform: translateY(-4px);
  border-bottom-color: var(--red);
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
  color: var(--red);
}
.group-card-img { aspect-ratio: 16/10; background: var(--white); overflow: hidden; }
.group-card-img img { width: 100%; height: 100%; object-fit: cover; }
.group-card-title {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.group-card-title h3 { margin: 0; font-size: 18px; text-transform: uppercase; }
.group-card-title .arrow { font-size: 20px; font-weight: 700; color: var(--red); }

/* Two-col Highlight */
.two-col-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.highlight-card { padding: 42px 36px; }
.highlight-card-dark { background: var(--darker); color: var(--white); }
.highlight-card-dark p { color: rgba(255,255,255,0.85); }
.highlight-card-light { background: var(--white); color: var(--dark); border-top: 4px solid var(--red); }

/* Catalog Layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}
.sidebar-box {
  background: var(--white);
  padding: 22px;
  margin-bottom: 20px;
  border-top: 3px solid var(--red);
}
.sidebar-box h3 { font-size: 17px; text-transform: uppercase; margin-bottom: 14px; }
.cat-tree, .cat-sub { list-style: none; margin: 0; padding: 0; }
.cat-tree > li > a {
  display: block;
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 1px solid var(--gray);
}
.cat-tree > li > a:hover { color: var(--red); background: #F7F7F7; }
.cat-tree > li.active > a {
  background: var(--red);
  color: var(--white);
}
.cat-sub { padding-left: 14px; background: #FAFAFA; }
.cat-sub li a {
  display: block;
  padding: 7px 12px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid #EFEFEF;
}
.cat-sub li.active a { background: var(--dark); color: var(--white); font-weight: 600; }

.archive-description {
  background: var(--white);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--red);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.products-grid-4 { grid-template-columns: repeat(4, 1fr); }
.product-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  border-bottom: 3px solid transparent;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.product-card:hover { transform: translateY(-3px); border-bottom-color: var(--red); }
.product-card-img {
  position: relative;
  aspect-ratio: 4/3;
  background: #F9F9F9;
  overflow: hidden;
  display: block;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--darker);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
}
.product-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.product-card-body h2,
.product-card-body h3 {
  font-size: 18px;
  margin: 0;
  text-transform: none;
  flex: 1;
}
.product-card-body h2 a,
.product-card-body h3 a { color: var(--dark); }
.product-card-body h2 a:hover,
.product-card-body h3 a:hover { color: var(--red); }
.product-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Breadcrumbs */
.breadcrumbs-bar { background: var(--gray); padding: 12px 0; font-size: 14px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); }
.breadcrumbs a { color: var(--dark); font-weight: 600; }
.breadcrumbs a:hover { color: var(--red); }

/* Product Detail */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: start;
}
.gallery-main {
  background: #F9F9F9;
  border: 1px solid var(--gray-border);
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.gallery-thumb {
  width: 78px;
  height: 60px;
  padding: 0;
  border: 2px solid var(--gray-border);
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
}
.gallery-thumb.active { border-color: var(--red); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-summary h1 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 18px; }
.product-meta-list {
  background: var(--gray);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
}
.product-cta-stack { display: flex; flex-wrap: wrap; gap: 12px; }

/* Tabs */
.tabs-box { background: var(--white); border-top: 3px solid var(--red); }
.tabs-nav { display: flex; border-bottom: 1px solid var(--gray-border); flex-wrap: wrap; }
.tab-btn {
  padding: 15px 26px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--red); border-bottom-color: var(--red); background: #FAFAFA; }
.tab-panel { display: none; padding: 28px; }
.tab-panel.active { display: block; }
.rich-content ul { padding-left: 22px; }
.rich-content li { margin-bottom: 6px; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.rich-content th, .rich-content td { border: 1px solid var(--gray-border); padding: 8px 12px; text-align: left; }

.capacity-section, .video-section { margin-top: 40px; }
.capacity-images { display: flex; flex-direction: column; gap: 16px; }
.capacity-images img { background: var(--white); padding: 12px; border: 1px solid var(--gray-border); cursor: zoom-in; }
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Catalogs & Projects */
.catalogs-grid, .projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.catalog-card, .project-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-bottom: 3px solid var(--red);
}
.catalog-card-thumb, .project-img { aspect-ratio: 16/10; overflow: hidden; background: #F5F5F5; }
.catalog-card-thumb img, .project-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.catalog-card-body, .project-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.catalog-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.contact-item { margin-bottom: 18px; }
.contact-item p { margin: 4px 0 0; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 24px; }
.map-embed { border: 1px solid var(--gray-border); overflow: hidden; }
.contact-form-box { background: var(--gray); padding: 34px; border-top: 4px solid var(--red); }

/* Quote Banner */
.quote-banner {
  background: var(--darker);
  color: var(--white);
  padding: 64px 0;
  border-top: 4px solid var(--red);
}
.quote-banner-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 44px;
  align-items: center;
}
.quote-sub { font-size: 22px; font-weight: 600; margin: 0 0 12px; color: var(--white); }
.quote-form { display: flex; flex-direction: column; gap: 12px; }
.quote-form .form-row { display: flex; gap: 12px; flex-direction: column; }
.quote-banner .quote-form .form-row:first-of-type { flex-direction: row; }
.quote-form input, .quote-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  color: var(--dark);
}
.quote-form input:focus, .quote-form textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--gray-border); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer-logo { margin-bottom: 16px; }
.footer-address { font-size: 15px; margin: 0 0 12px; }
.footer-address a, .footer-emails a { color: var(--dark); }
.footer-address a:hover, .footer-emails a:hover { color: var(--red); }
.footer-actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.footer-socials a { font-weight: 700; font-size: 13px; border: 1px solid var(--gray-border); padding: 4px 8px; }
.footer-col h3 { font-size: 16px; text-transform: uppercase; margin-bottom: 14px; border-bottom: 2px solid var(--red); display: inline-block; padding-bottom: 4px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: var(--dark); font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: var(--red); }
.footer-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; }
.footer-bottom { background: var(--darker); color: rgba(255,255,255,0.8); padding: 16px 0; font-size: 14px; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-admin-link { color: rgba(255,255,255,0.45); font-size: 12px; }
.footer-admin-link:hover { color: var(--white); }

/* Modal & Lightbox */
.modal-backdrop, .lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden], .lightbox-backdrop[hidden] { display: none; }
.modal-box {
  background: var(--white);
  width: 100%;
  max-width: 500px;
  padding: 32px;
  position: relative;
  border-top: 4px solid var(--red);
}
.modal-close, .lightbox-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: var(--dark);
}
.lightbox-close { color: var(--white); top: 20px; right: 28px; font-size: 40px; }
.lightbox-backdrop img { max-width: 92vw; max-height: 88vh; object-fit: contain; background: var(--white); }

.empty-state { background: var(--white); padding: 48px 24px; text-align: center; }
.about-content-wrap { max-width: 960px; }
.brands-strip { margin-top: 48px; }

/* Responsive */
@media (max-width: 1180px) {
  .nav-search { display: none; }
  .nav-list > li > a { padding: 10px 7px; font-size: 13px; }
}
@media (max-width: 960px) {
  .mobile-menu-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    max-height: 80vh;
    overflow-y: auto;
  }
  .primary-nav.open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .has-dropdown .dropdown { position: static; box-shadow: none; border-top: 0; padding-left: 14px; display: block; }
  .nav-search { display: flex; margin-top: 12px; }
  .nav-search input { width: 100%; }
  .experience-grid, .two-col-highlight, .catalog-layout, .product-detail-grid, .contact-grid, .quote-banner-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .brands-grid, .groups-grid, .products-grid, .products-grid-4, .catalogs-grid, .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .top-email { display: none; }
  .brands-grid, .groups-grid, .products-grid, .products-grid-4, .catalogs-grid, .projects-grid, .footer-cats {
    grid-template-columns: 1fr;
  }
  .quote-banner .quote-form .form-row:first-of-type { flex-direction: column; }
}
