/* ===============================
   HEADER GENERAL
=================================*/

.custom-header {
  font-family: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  z-index: 17;
}

/* Franja superior */
.header-top {
  background: #101547;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 15px;
}
.header-top p {
  margin: 0 !important;
}

/* Bloque principal (desktop) */
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 100px;
  background: #f5f5f5;
}

/* Logo */
.logo {
  flex-shrink: 0;
  max-width: 150px;
}
.logo img {
  max-width: 100%;
  height: auto;
}

/* Botón contacto */
.btn-contacto-header {
  background-color: #001970;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  margin: 0 10px;
  text-decoration: none;
  display: inline-block;
  transition: background-color .25s ease;
}
.btn-contacto-header:hover {
  background-color: #0033a0;
  color: #fff;
}

/* Carrito */
.custom-cart-icon a {
  color: #11113e;
  text-decoration: none;
}
.custom-cart-icon .cart-count {
  margin-left: 4px;
  font-weight: 600;
}

.header-right{
  display:flex;
  align-items:center;
}

/* ===============================
   BLOQUE: TODOS LOS PRODUCTOS + BUSCADOR
=================================*/

.search-block {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 12px;
  max-width: 720px;   /* para que el buscador no sea gigante */
}

/* ===== Botón "Todos los productos" ===== */

.all-products {
  position: relative;
  flex-shrink: 0;
}

.all-products__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 16px;
  height: 44px;
  background: #11113e;
  color: #fff;
  border-radius: 22px;
  border: 0;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.all-products__btn i {
  font-size: .8em;
  transition: transform .2s ease;
}

/* MEGA MENÚ */
.all-products__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  width: auto;
  max-width: none;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 8px 30px rgba(0,0,0,.16);
  padding: 0;
  display: none;
  z-index: 20;
}

/* Mostrar SOLO cuando el contenedor tenga la clase .is-open (click) */
.all-products.is-open .all-products__dropdown {
  display: block;
}

/* Rotar la flechita cuando está abierto */
.all-products.is-open .all-products__btn i {
  transform: rotate(180deg);
}

.ap-dropdown {
  display: flex;
}

/* ===============================
   COLUMNA IZQUIERDA (Cierres / Deslizadores / Hebillas...)
=================================*/

.ap-main {
  width: 190px;
  background: #0b1447;
  padding: 18px 40px 18px 30px;
  display: flex;
  flex-direction: column;
}

.ap-main-item,
.ap-main-link {
  background: transparent;
  color: #fff;
  padding: 10px 20px;
  text-align: left;
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
}

.ap-main-item:hover,
.ap-main-link:hover {
  background: rgba(255,255,255,.18);
}

.ap-main-item.is-active {
  background: #fff;
  color: #0b1447;
  font-weight: 700;
}

/* Enlace "Catálogo completo" */
.ap-main-link--all {
  margin-top: 8px;
  font-weight: 600;
}

/* ===============================
   PANEL DERECHO (mega menú)
=================================*/

.ap-panels {
  width: 100%;
  z-index: 10;
}

/* Cada panel individual */
.ap-panel {
  display: none;
  background-color: #fff;
}

/* Panel visible */
.ap-panel.is-active {
  display: block;
}

/* Interior del panel */
.ap-panel-inner {
  display: flex;
  padding: 22px 32px;
}

/* Columna texto (izquierda dentro del panel) */
.ap-panel-left {
  width: 230px;
  padding-right: 24px;
  border-right: 1px solid #e4e4e4;
}

.ap-panel-left h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #0b1447;
}

.ap-subblock {
  margin-bottom: 18px;
}

.ap-subblock h4 {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 14px;
}

.ap-subblock a {
  display: block;
  font-size: 14px;
  color: #0b1447;
  text-decoration: none;
  margin-bottom: 4px;
}
.ap-subblock a:hover {
  text-decoration: underline;
}

/* Columna filtros (derecha dentro del panel) */
.ap-panel-right {
  flex: 1;
  display: flex;
  gap: 32px;
  padding-left: 32px;
  align-items: flex-start;
}

/* Paneles de filtros (YKK armados / YKK por metro / importados...) */
.ap-filtros-panel {
  display: none;
}

.ap-filtros-panel.is-active {
  display: flex;
}

/* Link “Armados / Por metro” activo */
.ap-sub-link.is-active {
  font-weight: 600;
}

/* Columnas genéricas */
.column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 16px;
}

.column h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

/* ===============================
   FILTROS EN CASCADA
=================================*/

.filtro-pasos-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Cada paso (MATERIAL / NÚMERO / TIPO DE CIERRE / DESLIZADOR) */
.paso-container {
  display: none;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity .25s ease;
}

.paso-container h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #555;
}

.paso-container.shown {
  display: flex;
  opacity: 1;
}

.paso-container.disabled {
  pointer-events: none;
  opacity: .25;
}

/* Chip de opción */
.opcion {
  padding: 2px 0;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  transition: color .15s ease;
}

.opcion:hover {
  color: #11113e;
  text-decoration: underline;
}

.opcion.selected {
  color: #11113e;
  font-weight: 600;
}

/* Columna “Tipo de uso” */
.por-tipo-de-uso {
  border-right: 1px solid #11113e;
}
.por-tipo-de-uso h4 {
  margin: 0 0 10px;
}
.por-tipo-de-uso a {
  display: inline-block;
  padding: 8px 16px;
  background: #f1f1f1;
  border-radius: 20px;
  text-decoration: none;
  color: #000;
  border: 1px solid transparent;
  text-transform: lowercase;
  transition: all .2s ease;
}
.por-tipo-de-uso a::first-letter {
  text-transform: capitalize;
}
.por-tipo-de-uso a:hover {
  background: #101547;
  color: #fff;
  border-color: #101547;
}

/* ===============================
   BUSCADOR (YITH)
=================================*/

.search-bar {
  flex: 1;
}

.search-bar .yith-ajaxsearchform {
  width: 100% !important;
  max-width: 100% !important;
}

.search-block .yith-ajaxsearchform input[type="search"],
.search-block .yith-ajaxsearchform input[type="text"] {
  border-radius: 22px;
}

/* ===============================
   LAYOUT DESKTOP (3 columnas)
=================================*/

@media (min-width: 992px) {

  .header-main {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr; /* izquierda | logo | derecha */
    align-items: center;
    padding: 10px 100px;
    gap: 20px;
    background: #f5f5f5;
  }

  .header-left {
    grid-column: 1 / 2;
    justify-self: start;
  }

  .header-left .search-block {
    max-width: 600px;
    width: 100%;
  }

  .logo {
    grid-column: 2 / 3;
    justify-self: center;
    max-width: 170px;
  }

  .header-right {
    grid-column: 3 / 4;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .menu-toggle,
  .mobile-header,
  .mobile-nav,
  .nav-overlay {
    display: none !important;
  }
}

/* Ajuste padding intermedio */
@media (max-width: 1199px) {
  .header-main {
    padding: 10px 40px;
  }
}

/* ===============================
   HEADER MOBILE (barra superior)
=================================*/

.mobile-header {
  display: none;
}

@media (max-width: 991px) {

  /* Ocultamos el header de escritorio pero dejamos la franja top */
  .custom-header .header-main {
    display: none !important;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #eee;
  }

  .mobile-header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #101547;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }

  .mobile-header .mobile-logo img {
    height: 34px;
    width: auto;
  }

  .mobile-header .mobile-cart {
    position: relative;
    font-size: 22px;
  }

  .mobile-header .mobile-cart a {
    color: #111;
    text-decoration: none;
  }

  .mobile-header .mobile-cart .cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #d80032;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 5px;
  }
}

/* ===============================
   OFF-CANVAS MOBILE NAV
=================================*/

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
  z-index: 11;
}
body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* Panel lateral */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86%, 360px);
  background: #fff;
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 12;
  overflow: auto;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
body.nav-open .mobile-nav {
  transform: translateX(0);
  box-shadow: 12px 0 24px rgba(0,0,0,.15);
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  font-size: 15px;
	margin-top:53px;
}

.mc-back,
.mc-header .menu-close {
  background: none;
  border: 0;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
	color:black;
}

.mc-back {
  visibility: hidden; /* la muestra JS cuando hay historial */
}

.mc-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 16px;
}

.mc-view {
  display: none;
  padding: 0 16px;
}

.mc-view.is-active {
  display: block;
}

.mc-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 0;
    border: 0;
    background: none;
    font-size: 15px;
    cursor: pointer;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    border-radius: 0px;
}

.mc-item--link {
  text-decoration: none;
  color: inherit;
}

.mc-item--link:hover {
  text-decoration: underline;
}

.mc-separator {
  border: 0;
  border-top: 1px solid #e0e0e0;
  margin: 12px 0;
}

/* Ocultar todo el bloque mobile en desktop */
@media (min-width: 992px) {
  .mobile-header,
  .mobile-nav,
  .nav-overlay {
    display: none !important;
  }
}

/* ===============================
   OCULTAR HEADER NATIVO ASTRA EN MOBILE
=================================*/

@media (max-width: 991px) {
  .ast-mobile-header-wrap,
  .ast-main-header-bar.ast-header-mobile,
  .ast-header-break-point .main-header-bar {
    display: none !important;
  }
	.mc-separator{
		display:none;
	}
}


/* ===============================
   MOBILE NAV – ESTILO UNIFICADO
=================================*/

/* Panel lateral sin sombra y con fondo azul */
.mobile-nav {
  background: #0F0F57;
  box-shadow: none;
}

/* Header del menú mobile */
.mc-header {
  background: #0F0F57;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.mc-title {
  color: #ffffff;
}

/* Iconos del header (back, close) */
.mc-back,
.mc-header .menu-close {
  color: #ffffff;
}

.mc-back i,
.mc-header .menu-close i {
  color: inherit;
}

/* Vista interior */
.mc-body {
  background: #0F0F57;
}

/* Ítems generales */
.mc-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border: 0;
  background: none;
  font-size: 15px;
  cursor: pointer;

  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* Links se ven igual que los botones */
.mc-item--link {
  text-decoration: none;
  color: #ffffff;
}

/* Hover / focus */
.mc-item:hover,
.mc-item:focus-visible {
  background: rgba(255,255,255,.08);
}

/* Separador */
.mc-separator {
  border-top: 1px solid rgba(255,255,255,.25);
}

/* Texto de ayuda dentro de vistas internas */
.mc-helper {
  color: #ffffff;
  font-size: 13px;
  margin: 12px 0 4px;
}

/* ===============================
   INDICADOR "+" PARA LOS QUE DESPLIEGAN
=================================*/

/* Todos los botones con data-target llevan un iconito a la derecha */
.mc-item[data-target] {
  position: relative;
  padding-right: 30px; /* espacio para el + */
}

.mc-item[data-target]::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
}

/* Si querés distinguir los finales (que redirigen) y que NO tengan +,
   mantené esto: */
.mc-item[data-target="__final__"]::after {
  content: none;
}

/* Opcional: cuando una vista está activa, podrías marcar el item padre
   con un fondo un poco más fuerte (si le agregás una clase en JS) */
.ap-panel-title-link{
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.ap-panel-title-link:hover{
  color: #0a2a66; /* ajustalo al azul de marca */
  text-decoration: underline; /* opcional */
}