/**
 * SecurPlanet — header: three strips (utility, masthead, catalog nav).
 * Loaded with a cache-buster from head.tpl (CCC can skip custom.css).
 */

:root {
  --sp-utility: #0b1f3a;
  --sp-utility-rgb: 11, 31, 58;
}

html {
  overflow-x: clip;
}

#header.header {
  overflow: visible;
  z-index: 1021;
}

#header .header-top.sp-utility {
  position: relative;
  z-index: 4;
  background-color: var(--sp-utility);
  color: #e2e8f0;
  border-bottom: 0;
  padding-block: 0.3rem;
}

#header .sp-utility a:not(.btn):not(.sp-help__link),
#header .sp-utility .sp-utility__phone,
#header .sp-utility .sp-help__toggle {
  color: #e2e8f0;
}

#header .sp-utility a:not(.btn):not(.sp-help__link):hover,
#header .sp-utility .sp-help__toggle:hover,
#header .sp-utility .sp-help__toggle:focus-visible {
  color: var(--sp-turquoise);
}

.sp-utility__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.75rem;
}

.sp-utility__lead {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  color: #e2e8f0;
  white-space: nowrap;
}

.sp-utility__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  min-width: 0;
}

.sp-utility__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.sp-utility__phone .material-icons {
  font-size: 1.1rem;
}

.sp-help {
  position: relative;
}

.sp-help__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.sp-help__toggle .material-icons {
  font-size: 1.05rem;
}

.sp-help__caret {
  font-size: 1.1rem !important;
}

.sp-help.is-open .sp-help__caret {
  transform: rotate(180deg);
}

.sp-help__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 1080;
  width: min(20.5rem, calc(100vw - 2rem));
  padding: 1rem 1rem 0.85rem;
  background: var(--sp-white);
  color: var(--sp-night);
  border: 1px solid var(--sp-gray);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(var(--sp-utility-rgb), 0.18);
}

.sp-help__title {
  margin: 0 0 0.65rem;
  color: var(--sp-night);
  font-size: 0.95rem;
  font-weight: 700;
}

.sp-help__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-help__list li + li {
  border-top: 1px solid #f1f5f9;
}

#header .sp-help a.sp-help__link:not(.btn) {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.15rem;
  color: var(--sp-night);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

#header .sp-help a.sp-help__link:not(.btn):hover,
#header .sp-help a.sp-help__link:not(.btn):focus-visible {
  color: var(--sp-electric);
}

.sp-help__link .material-icons {
  color: var(--sp-electric);
  font-size: 1.2rem;
}

.sp-help__foot {
  margin-top: 0.55rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--sp-gray);
}

.sp-help__call,
#header .sp-help a.sp-help__call:not(.btn) {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0;
  max-width: 100%;
  color: var(--sp-night);
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}

.sp-help__call .material-icons {
  flex-shrink: 0;
  color: var(--sp-electric);
  font-size: 1.2rem;
}

.sp-help__call-text,
.sp-help__call > span {
  display: inline;
  min-width: 0;
  white-space: nowrap;
}

.sp-help__call-number,
.sp-help__call strong,
#header .sp-help .sp-help__call-number,
#header .sp-help .sp-help__call strong {
  display: inline;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.sp-help__hours {
  margin: 0.35rem 0 0 1.6rem;
  color: #475569;
  font-size: 0.8rem;
}

@media (max-width: 360px) {
  .sp-help__call,
  #header .sp-help a.sp-help__call:not(.btn),
  .sp-help__call-text,
  .sp-help__call > span {
    white-space: normal;
  }
}

#header .header-bottom.sp-header-stack {
  position: relative;
  z-index: 3;
  background: var(--sp-white);
  border-bottom: 1px solid var(--sp-gray);
  padding-block: 0.45rem;
}

.sp-header-stack__in {
  display: grid;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0;
  position: relative;
}

.sp-masthead__burger {
  grid-area: burger;
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--sp-night);
}

.sp-masthead__burger .material-icons {
  font-size: 1.65rem;
  line-height: 1;
}

.sp-masthead__burger:hover,
.sp-masthead__burger:focus-visible,
.sp-masthead__burger[aria-expanded="true"] {
  color: var(--sp-electric);
}

.sp-masthead__logo {
  grid-area: logo;
  min-width: 0;
}

.sp-masthead__logo .navbar-brand {
  display: flex;
  align-items: center;
  max-width: min(16rem, 42vw);
}

.sp-masthead__logo img,
.sp-masthead__logo .logo,
#header .sp-masthead__logo .logo--header {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 3.1rem;
  object-fit: contain;
  object-position: left center;
}

.sp-masthead__search {
  grid-area: search;
  min-width: 0;
  position: relative;
  z-index: 4;
}

.sp-masthead__search #_desktop_ps_searchbar,
.sp-masthead__search .ps-searchbar,
.sp-header-search {
  width: 100%;
  max-width: none;
  margin: 0;
}

.sp-masthead__search .ps-searchbar__form {
  width: 100%;
}

.sp-masthead__search .ps-searchbar__input {
  height: 2.75rem;
  color: var(--sp-night);
  background: var(--sp-white);
  border-color: var(--sp-gray);
}

.sp-masthead__search .ps-searchbar__dropdown {
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1080;
}

.sp-masthead__tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  min-width: 0;
}

.sp-masthead__tools .header-block__title {
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-masthead__tools .header-block__badge {
  min-width: 1.25rem;
  padding-inline: 0.3rem;
}

.sp-masthead__search-mobile {
  grid-area: searchm;
  padding-top: 0.45rem;
}

.sp-masthead__search-mobile .ps-searchbar,
.sp-masthead__search-mobile .ps-searchbar__container {
  width: 100%;
}

.sp-header-stack__menu {
  display: contents;
}

.sp-catalog {
  position: absolute;
  left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  top: 100%;
  z-index: 1080;
  display: block;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

#header .ps-mainmenu.ps-mainmenu--desktop.sp-catalog {
  display: block;
  width: 0;
  height: 0;
}

.sp-catalog__panel {
  pointer-events: auto;
  position: absolute;
  top: 0.35rem;
  left: 0;
  z-index: 1080;
  width: max-content;
  max-width: min(22rem, calc(100vw - 2.5rem));
  padding: 0.4rem 0;
  overflow: visible;
  background: var(--sp-white);
  border: 1px solid var(--sp-gray);
  border-radius: 0.75rem;
  box-shadow: 0 16px 40px rgba(var(--sp-night-rgb, 11, 31, 58), 0.16);
}

.sp-catalog.is-open .sp-catalog__panel {
  max-width: min(40rem, calc(100vw - 2.5rem));
}

.sp-catlist {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0.2rem 0;
  min-width: 16.5rem;
}

.sp-catlist__item {
  position: relative;
}

.sp-catlist__row {
  display: flex;
  align-items: stretch;
}

#header .sp-catalog .sp-catlist__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.7rem 0.55rem 0.95rem;
  border: 0;
  background: transparent;
  color: var(--sp-night);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

#header .sp-catalog a.sp-catlist__link:not(.btn):hover,
#header .sp-catalog a.sp-catlist__link:not(.btn):focus-visible,
#header .sp-catalog button.sp-catlist__link:hover,
#header .sp-catalog button.sp-catlist__link:focus-visible,
#header .sp-catalog .sp-catlist__item.is-open .sp-catlist__link {
  color: var(--sp-electric);
}

.sp-catlist__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sp-night);
  cursor: pointer;
}

.sp-catlist__caret .material-icons {
  font-size: 1.25rem;
}

.sp-catlist__item.is-open > .sp-catlist__row .sp-catlist__caret {
  color: var(--sp-electric);
}

.sp-catlist__flyout {
  min-width: 13.5rem;
  padding: 0.35rem 0;
  background: var(--sp-white);
  border: 1px solid var(--sp-gray);
  border-radius: 0.65rem;
  box-shadow: 0 10px 24px rgba(var(--sp-night-rgb), 0.1);
}

.sp-catlist__kids {
  list-style: none;
  margin: 0;
  padding: 0;
}

#header .sp-catalog a.sp-catlist__all:not(.btn),
#header .sp-catalog a.sp-catlist__child:not(.btn) {
  display: block;
  padding: 0.42rem 0.95rem;
  color: var(--sp-night);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

#header .sp-catalog a.sp-catlist__all:not(.btn) {
  font-weight: 600;
  color: var(--sp-electric);
  border-bottom: 1px solid var(--sp-gray);
  margin-bottom: 0.15rem;
}

#header .sp-catalog a.sp-catlist__all:not(.btn):hover,
#header .sp-catalog a.sp-catlist__child:not(.btn):hover,
#header .sp-catalog a.sp-catlist__all:not(.btn):focus-visible,
#header .sp-catalog a.sp-catlist__child:not(.btn):focus-visible {
  color: var(--sp-electric);
}

#header .sp-catalog a.sp-catlist__offers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  margin: 0.4rem 0.7rem 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.4rem;
  background: var(--sp-electric);
  color: var(--sp-white);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

#header .sp-catalog a.sp-catlist__offers:hover,
#header .sp-catalog a.sp-catlist__offers:focus-visible {
  background: var(--sp-electric-hover);
  color: var(--sp-white);
}

.sp-catalog__extras {
  padding: 0.65rem 0.95rem 0.35rem;
  border-top: 1px solid var(--sp-gray);
}

@media (min-width: 768px) {
  .sp-catlist__flyout {
    position: absolute;
    left: 100%;
    top: 0;
    z-index: 3;
    margin-left: 0.2rem;
  }

  .sp-catlist__item.is-open .sp-catlist__caret .material-icons {
    transform: none;
  }
}

@media (max-width: 767.98px) {
  #header .ps-mainmenu.ps-mainmenu--desktop.sp-catalog,
  .sp-catalog {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }

  .sp-catalog__panel {
    left: 0;
    right: 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .sp-catalog.is-open .sp-catalog__panel {
    max-width: none;
  }

  .sp-catlist {
    min-width: 0;
  }

  .sp-catlist__flyout {
    position: static;
    margin: 0 0.6rem 0.35rem 2.4rem;
    box-shadow: none;
  }

  .sp-catlist__item.is-open .sp-catlist__caret .material-icons {
    transform: rotate(90deg);
  }
}

.sp-featured {
  grid-area: featured;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 1rem 1.5rem;
  overflow: visible;
}

.sp-featured__list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.15rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  overflow: visible;
}

.sp-featured__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
}

#header .sp-featured a.sp-featured__link:not(.btn) {
  display: inline-flex;
  align-items: center;
  padding-block: 0.55rem;
  color: var(--sp-night);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

#header .sp-featured a.sp-featured__link:not(.btn):hover,
#header .sp-featured a.sp-featured__link:not(.btn):focus-visible,
#header .sp-featured a.sp-featured__link:not(.btn)[aria-current="page"],
#header .sp-featured .sp-featured__item.is-open > a.sp-featured__link:not(.btn) {
  color: var(--sp-electric);
}

.sp-featured__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.35rem 0.1rem 0.35rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--sp-night);
  cursor: pointer;
  line-height: 1;
}

.sp-featured__caret .material-icons {
  font-size: 1.2rem;
}

.sp-featured__item.is-open .sp-featured__caret {
  color: var(--sp-electric);
}

.sp-featured__item.is-open .sp-featured__caret .material-icons {
  transform: rotate(180deg);
}

.sp-featured__drop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1070;
  min-width: 12.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  max-height: min(70vh, 24rem);
  overflow: auto;
  padding: 0.4rem 0;
  background: var(--sp-white);
  border: 1px solid var(--sp-gray);
  border-radius: 0.6rem;
  box-shadow: 0 10px 28px rgba(var(--sp-night-rgb), 0.1);
}

.sp-featured__children {
  list-style: none;
  margin: 0;
  padding: 0;
}

#header .sp-featured a.sp-featured__child:not(.btn) {
  display: block;
  padding: 0.4rem 0.95rem;
  color: var(--sp-night);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

#header .sp-featured a.sp-featured__child:not(.btn):hover,
#header .sp-featured a.sp-featured__child:not(.btn):focus-visible {
  color: var(--sp-electric);
}

#header .sp-featured a.sp-featured__offers:not(.btn) {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
  padding: 0.4rem 0.95rem;
  border-radius: 0.4rem;
  background: var(--sp-electric);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(var(--sp-electric-rgb, 37, 99, 235), 0.4);
}

#header .sp-featured a.sp-featured__offers:not(.btn):hover,
#header .sp-featured a.sp-featured__offers:not(.btn):focus-visible {
  background: var(--sp-electric-hover);
  color: var(--sp-white);
}

.sp-catalog .sp-menu-icon {
  display: none;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  background: center / contain no-repeat;
}

.sp-catalog [data-id="category-7"] .sp-menu-icon {
  display: block;
  background-image: url("../img/menu/01-alarmas.svg");
}

.sp-catalog [data-id="category-14"] .sp-menu-icon {
  display: block;
  background-image: url("../img/menu/02-camaras-seguridad.svg");
}

.sp-catalog [data-id="category-34"] .sp-menu-icon {
  display: block;
  background-image: url("../img/menu/03-videoporteros.svg");
}

.sp-catalog [data-id="category-4"] .sp-menu-icon {
  display: block;
  background-image: url("../img/menu/04-control-accesos.svg");
}

.sp-catalog [data-id="category-61"] .sp-menu-icon {
  display: block;
  background-image: url("../img/menu/05-domotica.svg");
}

.sp-catalog [data-id="category-51"] .sp-menu-icon {
  display: block;
  background-image: url("../img/menu/06-redes-conectividad.svg");
}

.sp-help-mobile {
  width: 100%;
  padding-top: 0.35rem;
  border-top: 1px solid var(--sp-gray);
}

.sp-help-mobile__title {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.sp-help-mobile__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-help-mobile__list a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0;
  color: var(--sp-night);
  font-weight: 550;
  text-decoration: none;
}

.sp-help-mobile__list .material-icons,
.sp-help-mobile__phone .material-icons {
  color: var(--sp-electric);
  font-size: 1.2rem;
}

.sp-help-mobile__phone,
.sp-help-mobile__hours {
  margin: 0.35rem 0 0;
  color: var(--sp-night);
}

.sp-help-mobile__phone,
.sp-help-mobile__phone a,
.sp-help-mobile__phone span {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  max-width: 100%;
  white-space: nowrap;
}

.ps-mainmenu--mobile .offcanvas-title {
  font-size: 1rem;
  font-weight: 650;
  color: var(--sp-night);
}

@media (min-width: 768px) {
  .sp-header-stack__in {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "burger logo search tools"
      ". . featured featured";
    column-gap: 1.125rem;
  }

  .sp-masthead__burger {
    display: inline-flex;
    margin-inline-end: 0.125rem;
  }

  .sp-masthead__search-mobile {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .sp-header-stack__in {
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas:
      "burger logo tools"
      "search search search"
      "featured featured featured";
  }

  .sp-masthead__search {
    padding-top: 0.35rem;
  }
}

@media (max-width: 767.98px) {
  .sp-header-stack__in {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "burger logo tools"
      "searchm searchm searchm";
    column-gap: 1rem;
  }

  .sp-masthead__burger {
    display: inline-flex;
  }

  .sp-featured {
    display: none;
  }

  .sp-masthead__logo .navbar-brand {
    max-width: min(11.2rem, 48vw);
  }

  .sp-masthead__logo img,
  .sp-masthead__logo .logo,
  #header .sp-masthead__logo .logo--header {
    max-height: 2rem;
  }

  #header .header-bottom.sp-header-stack {
    padding-block: 0.35rem 0.5rem;
  }
}

@media (min-width: 768px) {
  #header.sp-header--compact .sp-utility {
    max-height: none;
    padding-block: 0.3rem;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
  }

  #header.sp-header--compact .sp-header-stack__in {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "burger logo search tools";
    align-items: center;
  }

  #header.sp-header--compact .sp-featured {
    display: none;
  }

  #header.sp-header--compact .sp-masthead__logo img,
  #header.sp-header--compact .sp-masthead__logo .logo,
  #header.sp-header--compact .logo--header {
    max-height: 2.35rem;
  }

  #header.sp-header--compact .header-bottom.sp-header-stack {
    padding-block: 0.8rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #header .sp-utility,
  #header .header-bottom.sp-header-stack {
    transition: padding 0.2s ease;
  }

  #header .sp-masthead__logo img {
    transition: max-height 0.2s ease;
  }
}
