/* ═══════════════════════════════════════════════════════════════════════════
   Hornos A&D — Componentes compartidos de página
   Navbar v2 · Utility bar · Chat widget · Mobile bar · Footer · Responsive
   Usado por: catalogo, contacto, especificaciones, faq, 404
═══════════════════════════════════════════════════════════════════════════ */

/* ── Header sticky ───────────────────────────────────────────────────────── */
#main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #eee;
  transition: box-shadow 0.3s;
}
#main-header.scrolled        { box-shadow: 0 2px 24px rgba(0,0,0,.09); }
#main-header.background-header {
  background-color: #fff !important;
  border-radius:    0   !important;
  height:           auto!important;
  position:         sticky !important;
  top:              0   !important;
  box-shadow:       0 2px 24px rgba(0,0,0,.09) !important;
}

/* ── Navbar inner ────────────────────────────────────────────────────────── */
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-brand {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  letter-spacing: -0.3px;
}
.nav-brand small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #888;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li                      { position: relative; }
.nav-menu > li > a {
  display: block;
  padding: 0 16px;
  height: 70px;
  line-height: 70px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: #C8922A;
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-menu > li > a:hover,
.nav-menu > li > a.active                    { color: #C8922A; }
.nav-menu > li > a:hover::after,
.nav-menu > li > a.active::after             { transform: scaleX(1); }

/* Flecha submenu */
.nav-menu > li.has-sub > a::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  vertical-align: middle;
  transition: transform 0.2s;
}
.nav-menu > li.has-sub:hover > a::before     { transform: rotate(-135deg) translateY(2px); }

/* Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #111;
  font-size: 17px;
  transition: color 0.2s;
}
.nav-search-btn:hover                        { color: #C8922A; }
.nav-cta {
  display: inline-block;
  background: #111;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-cta:hover                               { background: #C8922A; }
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span                              { display: block; width: 24px; height: 2px; background: #111; transition: all 0.3s; }

/* ── Mega menú ───────────────────────────────────────────────────────────── */
.mega-wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: 70px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
}
.nav-menu > li:hover .mega-wrap              { opacity: 1; pointer-events: all; transform: translateY(0); }
.mega-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 48px;
  align-items: start;
}
.mega-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.mega-links                                  { list-style: none; padding: 0; margin: 0; }
.mega-links li                               { margin-bottom: 2px; }
.mega-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.mega-links a:hover                          { background: #f5f5f5; color: #C8922A; }
.mega-links a .arr                           { opacity: 0; transition: opacity 0.15s; font-size: 12px; }
.mega-links a:hover .arr                     { opacity: 1; }
.mega-img                                    { border-radius: 12px; overflow: hidden; height: 240px; position: relative; }
.mega-img img                                { width: 100%; height: 100%; object-fit: cover; }
.mega-img-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0,0,0,.75) 0%, transparent 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ── Dropdown (Info / FAQ) ───────────────────────────────────────────────── */
.drop-wrap {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #fff;
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
}
.nav-menu > li:hover .drop-wrap              { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.drop-inner                                  { padding: 10px; }
.drop-inner a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
}
.drop-inner a:hover                          { background: #f5f5f5; color: #C8922A; }
.drop-inner a .drop-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fdf3e7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #C8922A;
  flex-shrink: 0;
}
.drop-divider                                { height: 1px; background: #f0f0f0; margin: 4px 10px; }

/* ── Utility bar ─────────────────────────────────────────────────────────── */
#utility-bar {
  background: #000;
  color: #fff;
  height: 36px;
  overflow: hidden;
  transition: height 0.3s, opacity 0.3s;
}
#utility-bar.hidden                          { height: 0; opacity: 0; }
.utility-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}
.utility-links                               { display: flex; align-items: center; }
.utility-links a {
  color: #aaa;
  font-size: 12px;
  padding: 0 12px;
  border-right: 1px solid #2a2a2a;
  transition: color 0.2s;
}
.utility-links a:first-child                 { padding-left: 0; }
.utility-links a:last-child                  { border-right: none; }
.utility-links a:hover                       { color: #fff; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
}
.lang-btn:hover                              { color: #fff; }

/* ── Chat widget ─────────────────────────────────────────────────────────── */
#chat-widget                                 { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
.chat-btn {
  width: 56px;
  height: 56px;
  background: #C8922A;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(200,146,42,.4);
  transition: transform 0.3s;
}
.chat-btn:hover                              { transform: scale(1.06); }
.chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 19px;
  height: 19px;
  background: #e53935;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-panel {
  position: absolute;
  bottom: 66px;
  right: 0;
  width: 290px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s, transform 0.25s;
}
.chat-panel.open                             { opacity: 1; pointer-events: all; transform: translateY(0); }
.chat-panel h4                               { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.chat-panel p                                { font-size: 14px; color: #666; margin-bottom: 18px; }
.chat-wa {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.chat-wa:hover                               { background: #1da851; color: #fff; }

/* ── Mobile bar ──────────────────────────────────────────────────────────── */
#mob-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: #fff;
  border-top: 1px solid #eee;
}
.mob-inner                                   { display: flex; justify-content: space-around; padding: 6px 0; }
.mob-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #999;
  padding: 4px 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.mob-btn i                                   { font-size: 17px; }
.mob-btn.green                               { color: #25D366; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer                                       { background: #000; border-top: 1px solid #1a1a1a; padding: 60px 0 0; }
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.f-brand-logo                                { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.f-brand-logo img {
  height: 62px;
  width: auto;
  object-fit: contain;
  filter: none;
  transition: opacity 0.2s;
}
.f-brand-logo:hover img                      { opacity: .8; }
.f-brand-name {
  line-height: 1.1;
}
.f-brand-name strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.f-brand-name small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #555;
  margin-top: 3px;
}
.f-desc                                      { font-size: 13px; color: #666; line-height: 1.8; margin-bottom: 20px; }
.f-social                                    { display: flex; gap: 10px; }
.f-social a {
  width: 34px;
  height: 34px;
  border: 1px solid #2a2a2a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}
.f-social a:hover                            { border-color: #fff; background: rgba(255,255,255,.08); }
.f-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 18px;
}
.f-links                                     { list-style: none; }
.f-links li                                  { margin-bottom: 10px; }
.f-links a                                   { font-size: 13px; color: #666; transition: color 0.2s; }
.f-links a:hover                             { color: #fff; }
.f-info                                      { font-size: 13px; color: #666; line-height: 1.9; }
.footer-bottom {
  border-top: 1px solid #1a1a1a;
  padding: 14px 24px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.f-legal                                     { font-size: 11px; color: #333; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .nav-cta                                   { display: none; }
  .nav-menu > li > a                         { padding: 0 10px; font-size: 11px; letter-spacing: .5px; }
  #chat-widget                               { bottom: 72px; right: 12px; }
}
@media (max-width: 1024px) {
  .footer-grid                               { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  .hamburger                                 { display: flex; }
  .nav-menu                                  { display: none !important; }
  .nav-menu.open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    padding: 20px 0;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
  }
  .nav-menu.open > li > a                   { height: auto; line-height: 1; padding: 15px 24px; font-size: 13px; }
  .nav-menu.open .mega-wrap,
  .nav-menu.open .drop-wrap                 { display: none; }
  .mega-inner                               { grid-template-columns: 1fr; }
  .mega-img                                 { display: none; }
  .nav-menu > li.has-sub > a::before        { display: none; }
}
@media (max-width: 768px) {
  .utility-links a:nth-child(n+4)           { display: none; }
  .footer-grid                              { grid-template-columns: 1fr; }
  #chat-widget                              { bottom: 76px; right: 16px; }
  #mob-bar                                  { display: block; }
  body                                      { padding-bottom: 60px; }
}

/* ── Footer responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid                               { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .footer-grid                               { grid-template-columns: 1fr; }
  .footer-bottom                             { flex-direction: column; align-items: flex-start; }
  #mob-bar                                   { display: block; }
  body                                       { padding-bottom: 60px; }
}
