:root {
  --red: #CC1010;
  --red-dark: #A00C0C;
  --red-light: #E01515;
  --black: #111111;
  --dark: #1a1a1a;
  --gray: #555;
  --light-gray: #f4f4f4;
  --white: #ffffff;
  --border: #e0e0e0;
  --primary: #CC1010;
  --nav-bg: #8a1a1a;
}

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

body { overflow-x: hidden; }

body, .body {
  font-family: 'Barlow', sans-serif;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg, #b33030);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 86px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.logo img {
  height: clamp(2.9rem, 6vw, 4.125rem);
  width: auto;
}

.logo-shield {
  width: 44px;
  height: 44px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--white);
  letter-spacing: 1px;
}

.logo-name span { color: rgba(255,255,255,0.7); }

.logo-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Sidebar */
.nav-sidebar {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-close {
  display: none;
}

.nav-toggle,
.nav-close {
  -webkit-tap-highlight-color: transparent;
}

.nav-links {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color .2s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

.nav-links a.active { color: var(--white); }
.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--white);
  color: #b33030 !important;
  padding: 11px 22px;
  border-radius: 4px;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}

.nav-cta:hover { background: rgba(255,255,255,0.85); transform: translateY(-1px); }

/* Overlay */
.nav-overlay {
  display: none;
}

/* Force consistency on pages with external CSS */
nav { display: flex; }
nav .nav-links { display: flex; list-style: none; }
nav .nav-links li { list-style: none; }
nav .nav-links a { font-family: inherit; text-transform: uppercase; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(100deg, #111 0%, #1e1e1e 40%, #2a0505 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #000 url('../images/Banner-1.png') 100% center / auto 140% no-repeat;
  transition: opacity 1s ease;
}
.hero-bg--alt {
  opacity: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: -80px;
  background: linear-gradient(to right, #000 0%, #000 40%, transparent 60%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 30%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 80px;
  max-width: 600px;
  animation: fadeUp .8s ease both;
}

@keyframes fadeUp {
  from { opacity:0; transform: translateY(28px); }
  to   { opacity:1; transform: translateY(0); }
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-accent { color: var(--red-light); }

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
}

.badge svg { flex-shrink: 0; }

.hero-products {
  position: absolute;
  right: 0; bottom: 0; top: 0;
  width: 55%;
  background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

/* Extinguisher illustration group */
.ext-group {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 0;
  animation: fadeUp .9s .2s ease both;
  opacity: 0;
}

.ext {
  border-radius: 8px 8px 4px 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── SERVICES ── */
.services {
  background: var(--light-gray);
  padding: clamp(50px, 5vw, 80px) 0;
  position: relative;
}

.services .container {
  position: relative;
  max-width: none;
  padding-left: 2rem;
  padding-right: 2rem;
}



/* ── CATEGORY CARDS (home page) ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1350px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.category-card {
  position: relative;
  display: flex;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  height: clamp(240px, 22vw, 320px);
  transition: transform .3s ease, box-shadow .3s ease;
}

@media (max-width: 860px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  .category-overlay {
    padding: 20px 24px;
  }
  .category-title {
    font-size: clamp(20px, 5vw, 30px);
  }
  .category-desc {
    font-size: clamp(12px, 2.8vw, 15px);
    min-height: 0;
  }
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.category-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .4s ease;
}

.category-card:hover .category-img {
  transform: scale(1.06);
}

.category-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  color: var(--white);
  z-index: 1;
}

.category-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 42px);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 8px;
}

.category-desc {
  font-size: clamp(13px, 1.1vw, 16px);
  opacity: .85;
  margin: 0 0 16px;
  max-width: 280px;
  min-height: 2.8em;
}

.category-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  flex-shrink: 0;
  align-self: flex-end;
  transition: background .2s, transform .2s;
}

.category-card:hover .category-arrow {
  background: var(--white);
  color: var(--red);
  transform: translateX(4px);
}

/* ── SERVICE CARDS (shared across sub-pages) ── */
.service-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
}

.service-card-link .service-card {
  width: 100%;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card-link:hover .service-card {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(180,20,20,0.15);
}

.service-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #ddd;
}

.service-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.service-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.service-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.2;
}

.service-desc {
  flex: 1;
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
}

.services-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 30px 0 80px;
  margin-bottom: -60px;
}

.services-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}



/* ── WHY US ── */
.why {
  padding: 64px 48px;
  background: var(--white);
}

.why-header {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 36px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.why-header::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--red);
  margin-top: 8px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
  max-width: 1280px;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.why-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-item h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.why-item p {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
}

/* ── CTA BANNER ── */
.cta-banner {
  position: relative;
  background: #000 url('../images/Banner-1.png') 100% center / auto 140% no-repeat;
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: -80px;
  background: linear-gradient(to right, #000 0%, #000 40%, transparent 60%);
  filter: blur(50px);
  pointer-events: none;
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 30%, transparent 50%);
  pointer-events: none;
}

.cta-banner-text,
.cta-white {
  position: relative;
  z-index: 1;
}

.cta-banner-text {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--white);
}

.cta-banner-text h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 28px;
  text-transform: uppercase;
}

.cta-banner-text p {
  font-size: 15px;
  opacity: .85;
}

.cta-white {
  background: var(--white);
  color: var(--red);
  padding: 13px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
  flex-shrink: 0;
}

.cta-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  padding: 56px 48px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 16px;
  line-height: 1.6;
}



.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col .contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.footer-col .contact-row .icon-circle,
.footer-col .contact-row a.icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background .25s, border-color .25s;
  text-decoration: none;
  color: inherit;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-row-mobile {
  display: none;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  text-decoration: none;
}

.social-btn:hover { background: var(--red); border-color: var(--red); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  max-width: 1280px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color .2s;
}

.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

.address-link {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}
.address-link:hover {
  color: #e53935 !important;
}
.contact-row:has(.address-link):hover .icon-circle {
  background: var(--red);
  border-color: var(--red);
}
.contact-row:has(.address-link):hover .address-link {
  color: #e53935 !important;
}

.footer-col .phone-row {
  align-items: center;
}
.footer-col .phone-row .icon-circle {
  margin-top: 0;
}
.phone-link {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}
.phone-link:hover {
  color: #e53935 !important;
}
.contact-row:has(.phone-link):hover .icon-circle {
  background: var(--red);
  border-color: var(--red);
}

/* ── WEBSITE PAGES (shared content styles) ── */
.section { display: block; }
.space-7rem { height: 7rem; }
.space-2rem { height: 2rem; }
.w-layout-blockcontainer, .w-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.padding-4-5rem { padding: 4.5rem 0; }
.hero-wrapper { text-align: center; }
.hero-block { max-width: 800px; margin: 0 auto; }
.hero-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: clamp(2.85rem, 5.7vw, 4.75rem); text-transform: uppercase; line-height: 1; }
.background-primary { background: var(--light-gray); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 32px 0; flex-wrap: wrap; }
.footer-block { flex-shrink: 0; }
.footer-logo-link-wrapper { display: inline-block; }
.w-nav-brand { display: inline-block; text-decoration: none; }
.footer-logo { height: auto; max-width: 120px; }
.footer-right-flex { text-align: right; }
.footer-line { height: 1px; background: var(--border); margin: 0; }

/* ── UTILS ── */
.container { max-width: 1600px; margin: 0 auto; padding: 0 2rem; }

/* ── PRODUCTOS PAGE ── */
.products-header {
  padding: 24px 0 8px;
  text-align: left;
}

.products-header .products-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-transform: uppercase;
  line-height: 1;
}

.products-header p {
  font-size: 14px;
  color: var(--gray);
  margin-top: 4px;
}

.products-layout {
  padding: 40px 0 80px;
  background: var(--white);
}

.products-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Sidebar */
.products-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 106px;
}

.sidebar-search {
  position: relative;
  margin-bottom: 24px;
}

.sidebar-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
}

.sidebar-search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.sidebar-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,16,16,0.1);
}

.sidebar-search input::placeholder {
  color: #999;
}

.sidebar-categories h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.sidebar-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Search bar + heading stay put; only the category list scrolls, fitting the
   remaining viewport height below them. */
#categoryList {
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#categoryList::-webkit-scrollbar {
  width: 6px;
}

#categoryList::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

#categoryList::-webkit-scrollbar-track {
  background: transparent;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
  font-size: 14px;
  color: var(--black);
  user-select: none;
}

.category-item:hover {
  background: var(--light-gray);
}

.category-item.active .category-name {
  font-weight: 600;
}

.category-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--white);
  background: var(--white);
  transition: background .15s, border-color .15s;
  line-height: 1;
}

.category-item.active .category-check {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.category-name {
  flex: 1;
}


.category-count {
  font-size: 12px;
  color: var(--gray);
  background: var(--light-gray);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.category-item.active .category-count {
  background: var(--red);
  color: var(--white);
}

/* ── Category tree groups ── */

.category-group {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  margin-bottom: 6px;
}

.category-group.is-expanded {
  background: #fafafa;
}

.category-group + .category-group {
  margin-top: 2px;
}

.category-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
  font-size: 14px;
  color: var(--black);
  user-select: none;
}

.category-group-header:hover {
  background: var(--light-gray);
}

.category-group-header .category-name {
  font-weight: 600;
}

.category-group-header .category-count {
  display: none;
}

.category-group-header .category-check.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.category-group-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: transform .2s;
}

.category-group-chevron.is-open {
  transform: rotate(180deg);
}

.category-group-children {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0 0 0 24px;
}

.category-group-children.is-open {
  display: block;
}

.category-item--child {
  padding-left: 12px !important;
  margin-bottom: 2px;
}

.category-item--child .category-name {
  font-size: 13px;
}

/* ── End category tree groups ── */

/* Category dropdown (mobile) */
.category-dropdown {
  display: none;
  position: relative;
  margin-bottom: 24px;
}

.category-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--black);
  cursor: pointer;
  min-height: 44px;
  text-align: left;
}

.category-dropdown-trigger:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.dropdown-chevron {
  flex-shrink: 0;
  transition: transform .2s;
}

.category-dropdown-menu.is-open .dropdown-chevron {
  transform: rotate(180deg);
}

.category-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
}

.category-dropdown-menu.is-open {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--black);
  user-select: none;
  min-height: 44px;
}

.dropdown-item:hover {
  background: var(--light-gray);
}

.dropdown-cb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--white);
  background: var(--white);
  line-height: 1;
}

.dropdown-cb.checked {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.dropdown-cb-name {
  flex: 1;
}


.dropdown-item--parent .dropdown-cb-name {
  font-weight: 600;
}

.dropdown-item--child {
  padding-left: 28px !important;
}

.dropdown-item--child .dropdown-cb-name {
  font-size: 13px;
  color: var(--gray);
}

/* Main content */
.products-main {
  flex: 1;
  min-width: 0;
  max-width: 754px;
}

.products-count {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 20px;
  font-weight: 500;
  width: 100%;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.product-item:hover {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(204,16,16,0.08);
}

.product-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  flex-shrink: 0;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.product-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  line-height: 1.4;
}

.product-cat-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--red);
  background: rgba(204,16,16,0.06);
  padding: 3px 10px;
  border-radius: 4px;
  align-self: flex-start;
}

.products-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  font-size: 15px;
}

/* ── PRODUCT DETAIL PANEL ── */

.product-detail {
  display: none;
}

.product-detail.is-visible {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.product-detail-inner {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 460px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.detail-top {
  display: flex;
  gap: 16px;
  padding: 20px 24px 0;
  align-items: flex-start;
}

.detail-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.detail-text .product-cat-tag {
  display: inline-block;
  margin-bottom: 4px;
}

.detail-text .product-detail-name {
  margin: 0 0 6px;
}

.detail-text .product-detail-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray);
  margin: 0;
}

.detail-img-wrap {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.detail-img-wrap.no-image {
  background: var(--light-gray);
}

.product-detail-img {
  height: 100%;
  width: auto;
  display: block;
  margin: 0 auto;
}

.product-detail-body {
  padding: 16px 24px 24px;
}

.product-detail-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
}

.product-detail-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: #25D366;
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}

.product-detail-wa:hover {
  background: #1da851;
}

.product-item {
  cursor: pointer;
}

/* Desktop: sticky inline flex child */
@media (min-width: 1024px) {
  .product-detail {
    display: block;
    width: 0;
    max-height: 0;
    overflow: hidden;
    flex-shrink: 0;
    visibility: hidden;
  }

  .product-detail.is-visible {
    visibility: visible;
    width: 360px;
    max-height: calc(100vh - 132px);
    overflow-y: auto;
    position: sticky;
    top: 106px;
    align-self: flex-start;
    z-index: 150;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  }

  .product-detail.is-visible .product-detail-inner {
    box-shadow: none;
    max-height: none;
    max-width: 100%;
    width: 100%;
    overflow: visible;
  }

  }

/* ── ADMIN PANEL ── */
.admin-body {
  background: #f0f2f5;
  min-height: 100vh;
}

.admin-login {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  z-index: 9999;
}

.admin-login-box {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  text-align: center;
  width: 340px;
}

.admin-login-box h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--black);
}

.admin-login-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: 'Barlow', sans-serif;
  outline: none;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.admin-login-box input:focus {
  border-color: var(--red);
}

.admin-login-box button {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .15s;
}

.admin-login-box button:hover {
  background: var(--red-dark);
}

.admin-login-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
}

.admin-panel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-topbar h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-search-input {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  min-width: 220px;
  background: #fff;
  color: var(--black);
  outline: none;
  transition: border-color .15s;
}

.admin-search-input:focus {
  border-color: var(--red);
}

.admin-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: background .15s, box-shadow .15s;
}

.admin-btn-primary {
  background: var(--red);
  color: #fff;
}

.admin-btn-primary:hover {
  background: var(--red-dark);
}

.admin-btn-outline {
  background: #fff;
  color: var(--black);
  border: 1px solid var(--border);
}

.admin-btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.admin-btn-sm {
  padding: 6px 12px;
  border-radius: 4px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s;
}

.admin-btn-edit {
  background: #e8f0fe;
  color: #1a73e8;
}

.admin-btn-edit:hover {
  background: #d2e3fc;
}

.admin-btn-del {
  background: #fce8e6;
  color: #d93025;
}

.admin-btn-del:hover {
  background: #f8d7da;
}

.admin-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.admin-form h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.admin-form input,
.admin-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  outline: none;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: var(--red);
}

.admin-form-actions {
  display: flex;
  gap: 10px;
}

.admin-table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 14px 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  background: var(--light-gray);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #fafafa;
}

.admin-inline-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--red);
  border-radius: 4px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.admin-inline-select {
  padding: 6px 10px;
  border: 1px solid var(--red);
  border-radius: 4px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  outline: none;
}

.admin-form-field {
  margin-bottom: 12px;
}

.admin-form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 4px;
}

.admin-form-field input[type="file"] {
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
}

.admin-img-preview {
  max-width: 120px;
  max-height: 80px;
  border-radius: 6px;
  margin-top: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.admin-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.admin-textarea:focus {
  border-color: var(--red);
}

.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  width: 480px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.admin-modal h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.admin-name-cell {
  cursor: pointer;
}

.admin-name-cell:hover {
  color: var(--red);
}

.admin-table-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.admin-table-img-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
}

.admin-edit-img {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .products-container {
    flex-direction: column;
    gap: 0;
  }
  .products-sidebar {
    width: 100%;
    position: sticky;
    top: 66px;
    z-index: 10;
    background: var(--white);
    padding: 8px 0 0;
  }
  .category-dropdown {
    display: block;
    margin-bottom: 0;
  }
  #categoryList {
    display: none;
  }
  .sidebar-search {
    margin-bottom: 8px;
  }
  .products-header {
    padding-top: 2rem;
  }
  .products-header .products-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }
  .products-layout {
    padding: 8px 0 40px;
  }
  .products-main {
    padding-top: 4px;
  }
}

/* ── MOBILE NAV & FOOTER ── */
@media (max-width: 1129px) {
  nav {
    position: fixed;
    width: 100%;
    padding: 0 20px;
    height: 66px;
  }

  body {
    padding-top: 66px;
  }



  .nav-toggle {
    display: flex;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }

  .nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: -webkit-fill-available;
    height: 100dvh;
    background: var(--nav-bg, #8a1a1a);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 24px 24px;
    z-index: 99;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }

  .nav-sidebar.is-open {
    transform: translateX(0);
  }

  .nav-close {
    display: flex;
    position: fixed;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: rgba(255,255,255,0.85);
    z-index: 101;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }

  .nav-close.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    position: static;
    transform: none;
    flex: none;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(255,255,255,0.1);
  }

  .nav-links a.active::after,
  .nav-links a:hover::after {
    display: none;
  }

  .nav-sidebar .nav-cta {
    justify-content: center;
    margin-top: auto;
  }

  .nav-cta {
    display: flex;
  }

  html.nav-open,
  body.nav-open {
    overflow: hidden;
  }

  /* ── FOOTER MOBILE ── */
  footer {
    padding: 40px 20px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: left;
  }

  .footer-grid .footer-col:nth-child(2) { order: 1; }
  .footer-grid .footer-col:nth-child(3) { order: 2; }
  .footer-grid .footer-col:nth-child(4) { order: 3; }
  .footer-grid .footer-brand { order: 4; }

  .footer-brand p {
    margin-bottom: 16px;
  }

  .social-row-mobile {
    display: flex;
  }

  .services {
    padding-left: clamp(24px, 4vw, 48px) !important;
    padding-right: clamp(24px, 4vw, 48px) !important;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: clamp(200px, 30vh, 300px);
  }

  .hero-content {
    padding: 32px 24px;
  }

  .hero p {
    max-width: 260px;
  }

  .hero-bg {
    background-size: cover;
    background-position: 100% center;
  }

  .hero-accent {
    display: block;
  }

  .hero h1 br {
    display: none;
  }

  .services-scroll-wrap {
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 20px 0;
    margin-bottom: 0;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card-link {
    flex: 1 1 100%;
  }

  .why {
    padding: 40px 20px;
  }

  .cta-banner {
    padding: 28px 20px;
  }
}

@media (max-width: 460px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .hero {
    flex-direction: column;
    min-height: auto;
    padding-bottom: 160px;
    background: #000;
  }

  .hero-bg {
    top: auto;
    bottom: 0;
    height: 160px;
    background: #000 url('../images/Banner-1.png') center center / cover no-repeat;
  }

  .hero-bg::before {
    display: none;
  }

  .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.15) 20%, transparent 35%);
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    max-width: 100%;
    padding: 16px 24px;
    background: #000;
  }

  .hero h1 {
    margin-bottom: 8px;
  }

  .hero p {
    max-width: 100%;
    margin-bottom: 12px;
  }

}

/* ── SEGURIDAD INDUSTRIAL THEME (orange accent) ── */
.seguridad {
  --red: #ff6700;
  --red-dark: #e55d00;
  --red-light: #ff8533;
  --primary: #ff6700;
}

.seguridad {
  --nav-bg: #d45500;
}
.seguridad nav {
  background: var(--nav-bg);
}

.seguridad .nav-cta {
  color: #d45500 !important;
}

.seguridad .hero,
.seguridad .hero-uc {
  background: linear-gradient(100deg, #111 0%, #1e1e1e 40%, #3a2a00 100%) !important;
}

.seguridad .hero-industrial .hero-bg::before,
.seguridad .hero-bg::before {
  background: linear-gradient(to right, #000 0%, #000 40%, transparent 60%);
}

.seguridad .address-link:hover,
.seguridad .phone-link:hover {
  color: #ff6700 !important;
}

.seguridad .contact-row:has(.address-link):hover .icon-circle,
.seguridad .contact-row:has(.phone-link):hover .icon-circle {
  background: var(--red);
  border-color: var(--red);
}

.seguridad .service-card-link:hover .service-card {
  box-shadow: 0 10px 32px rgba(255,103,0,0.15);
}

.seguridad .social-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

/* Seguridad-industrial has 7 nav items — compress at intermediate desktop widths */
@media (min-width: 1100px) and (max-width: 1349px) {
  .seguridad .nav-links { gap: 16px; }
  .seguridad .nav-links a { font-size: 11px; letter-spacing: 0.5px; }
  .seguridad .nav-cta { padding: 9px 14px; font-size: 12px; }
}

/* ── INSPECCIONES THEME (yellow accent) ── */
.inspecciones {
  --nav-bg: #f6b926;
}

.inspecciones .nav-toggle span {
  background: #1a1a1a;
}

.inspecciones .nav-close {
  color: rgba(26,26,26,0.85);
}

/* ── CAPACITACIONES THEME (blue accent) ── */
.capacitaciones {
  --nav-bg: #75AADB;
}

.capacitaciones .nav-toggle span {
  background: #1a1a1a;
}

.capacitaciones .nav-close {
  color: rgba(26,26,26,0.85);
}

.capacitaciones .nav-cta {
  color: #2C5F8A !important;
  border-color: #2C5F8A !important;
}

.capacitaciones .nav-cta:hover {
  background: rgba(255,255,255,0.85);
  color: #2C5F8A !important;
}
