/* ============================================================================
   SESA COMMAND BAR — navegación global 2026-09-11
   Capa aislada: conserva top-bar, floating navigation, videos y estilos de página.
   ============================================================================ */

:root {
  --command-primary: #00284d;
  --command-primary-deep: #001a35;
  --command-blue: #0b67f0;
  --command-ink: #0b1f35;
  --command-muted: #66758a;
  --command-line: rgba(0, 40, 77, .12);
  --command-surface: rgba(255, 255, 255, .97);
  --command-shadow: 0 22px 54px rgba(0, 31, 61, .18);
}

.header.header--solid {
  overflow: visible;
}

.command-bar.nav {
  padding: 12px 0;
  background: rgba(255, 255, 255, .98);
  position: relative;
  z-index: 1002;
}

.header.scrolled .command-bar.nav {
  padding: 8px 0;
}

.command-bar__inner {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  position: relative;
}

.command-bar .nav__logo {
  min-width: 0;
}

.command-bar .nav__logo img {
  display: block;
  width: min(188px, 100%);
  height: auto;
  max-height: 52px;
}

.command-bar__search {
  position: relative;
  min-width: 0;
  z-index: 1004;
}

.command-bar__searchbox {
  min-height: 50px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 16px;
  border: 1px solid rgba(0, 40, 77, .18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 40, 77, .05);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.command-bar__search:focus-within .command-bar__searchbox,
.command-bar__search.is-open .command-bar__searchbox {
  border-color: var(--command-blue);
  box-shadow: 0 0 0 4px rgba(11, 103, 240, .10), 0 12px 26px rgba(0, 40, 77, .08);
}

.command-bar__search-icon {
  color: var(--command-primary);
  font-size: 16px;
  pointer-events: none;
}

.command-bar__search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--command-ink);
  font: 500 14px/1.2 var(--font-body, Inter, sans-serif);
}

.command-bar__search input::placeholder {
  color: #7f8da0;
  opacity: 1;
}

.command-bar__shortcut {
  min-width: 38px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid rgba(0, 40, 77, .12);
  border-bottom-color: rgba(0, 40, 77, .22);
  border-radius: 7px;
  background: #f6f8fb;
  color: #63748a;
  font: 700 10px/1 var(--font-body, Inter, sans-serif);
  letter-spacing: .02em;
}

.command-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(780px, calc(100vw - 34px));
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid var(--command-line);
  border-radius: 18px;
  background: var(--command-surface);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow: var(--command-shadow);
  color: var(--command-ink);
}

.command-panel[hidden] {
  display: none !important;
}

.command-panel__default {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.command-panel__section {
  padding: 22px 22px 18px;
}

.command-panel__section + .command-panel__section {
  border-left: 1px solid var(--command-line);
}

.command-panel__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #6d7c8f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.command-panel__note {
  color: #8491a1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.command-panel__list {
  display: grid;
  gap: 4px;
}

.command-panel__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 11px;
  color: var(--command-ink);
  text-decoration: none;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}

.command-panel__item:hover,
.command-panel__item:focus-visible {
  background: #f1f6ff;
  color: var(--command-primary);
  transform: translateX(2px);
  outline: none;
}

.command-panel__item-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #edf4ff;
  color: var(--command-blue);
  font-size: 14px;
}

.command-panel__item strong,
.command-result strong {
  display: block;
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
}

.command-panel__item small,
.command-result small {
  display: block;
  margin-top: 2px;
  color: var(--command-muted);
  font-size: 11px;
  line-height: 1.35;
}

.command-panel__item > i:last-child {
  color: #8c9aad;
  font-size: 10px;
}

.command-panel__brands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.command-brand {
  display: flex;
  align-items: center;
  height: 58px;
  min-height: 58px;
  padding: 7px 10px;
  border-radius: 11px;
  color: var(--command-primary);
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid rgba(0, 40, 77, .07);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.command-brand__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  overflow: hidden;
}

.command-brand:hover,
.command-brand:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(11, 103, 240, .24);
  background: #f1f6ff;
  outline: none;
}

.command-brand strong {
  font-size: 12px;
  letter-spacing: .02em;
}

.command-brand__image {
  display: block;
  width: 100%;
  height: 38px;
  max-height: 38px;
  max-width: 124px;
  object-fit: contain;
  object-position: center;
}

.command-brand__image--product {
  object-fit: contain;
  object-position: center;
}

.command-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--command-line);
  background: #fafcff;
  color: #607086;
  font-size: 11px;
}

.command-panel__footer a {
  color: var(--command-blue);
  font-weight: 750;
  text-decoration: none;
}

.command-results {
  padding: 10px;
}

.command-results[hidden] {
  display: none !important;
}

.command-results__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 10px;
  color: #6b7a8c;
  font-size: 11px;
  font-weight: 700;
}

.command-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  color: var(--command-ink);
  text-decoration: none;
}

.command-result:hover,
.command-result:focus-visible {
  background: #f1f6ff;
  outline: none;
}

.command-result__media {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--command-primary);
}

.command-result__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.command-result__go {
  color: var(--command-blue);
  font-size: 11px;
}

.command-results__empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--command-muted);
}

.command-results__empty i {
  display: block;
  margin-bottom: 8px;
  color: var(--command-primary);
  font-size: 22px;
}

.command-bar .nav__menu {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.command-bar .nav__menu a {
  padding: 10px 9px;
  color: #172d45;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
}

.command-bar .nav__menu a::after {
  left: 9px;
  right: 9px;
  bottom: 4px;
  background: var(--command-blue);
}

.command-bar .nav__menu a.active {
  color: var(--command-blue);
}

.command-bar .nav__menu .command-bar__home {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(0, 40, 77, .10);
  border-radius: 10px;
  background: #f7f9fc;
  color: var(--command-primary);
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.command-bar .nav__menu .command-bar__home svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.command-bar .nav__menu .command-bar__home::after {
  display: none;
}

.command-bar .nav__menu .command-bar__home:hover,
.command-bar .nav__menu .command-bar__home:focus-visible,
.command-bar .nav__menu .command-bar__home.active {
  color: var(--command-blue);
  border-color: rgba(11, 103, 240, .26);
  background: #eef5ff;
  transform: translateY(-1px);
}

.command-bar__home-label {
  display: none;
}

.command-bar .nav__menu .command-bar__sales {
  margin-left: 8px;
  padding: 11px 16px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #075cd6, #0b73ff) !important;
  color: #fff !important;
  font-size: 12.5px !important;
  box-shadow: 0 8px 20px rgba(11, 103, 240, .20);
}

.command-bar .nav__menu .command-bar__sales:hover,
.command-bar .nav__menu .command-bar__sales:focus-visible {
  background: linear-gradient(135deg, #004db8, #0667eb) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.command-bar .nav__menu .command-bar__sales::after {
  display: none !important;
}

.command-bar .nav__toggle {
  justify-self: end;
}

@media (max-width: 1240px) {
  .command-bar__inner {
    grid-template-columns: minmax(135px, 165px) minmax(250px, 1fr) auto auto;
    gap: 12px;
  }

  .command-bar .nav__menu a {
    padding-inline: 7px;
    font-size: 12px;
  }

  .command-bar__shortcut {
    display: none;
  }
}

@media (max-width: 1100px) {
  .command-bar__inner {
    grid-template-columns: minmax(135px, 168px) minmax(220px, 1fr) auto;
  }

  .command-bar .nav__toggle {
    display: flex;
    z-index: 1011;
  }

  .command-bar .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(390px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 100px 24px 28px;
    background: rgba(255, 255, 255, .99);
    box-shadow: -24px 0 60px rgba(0, 25, 50, .16);
    transform: translateX(110%);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
    overflow-y: auto;
    z-index: 1010;
  }

  .command-bar .nav__menu.active {
    transform: translateX(0);
  }

  .command-bar .nav__menu li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 40, 77, .08);
  }

  .command-bar .nav__menu a {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
    padding: 14px 2px;
    color: var(--command-ink) !important;
    font-size: 15px;
    text-shadow: none !important;
  }

  .command-bar .nav__menu a::after {
    display: none;
  }

  .command-bar .nav__menu .command-bar__home {
    width: 100%;
    min-height: 52px;
    height: auto;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .command-bar .nav__menu .command-bar__home:hover,
  .command-bar .nav__menu .command-bar__home:focus-visible,
  .command-bar .nav__menu .command-bar__home.active {
    background: transparent;
    transform: none;
  }

  .command-bar__home-label {
    display: inline;
  }

  .command-bar .nav__menu .command-bar__sales {
    width: 100%;
    justify-content: center;
    margin: 20px 0 0;
    min-height: 48px;
  }

  .command-panel {
    width: min(720px, calc(100vw - 30px));
  }
}

@media (max-width: 760px) {
  .command-bar.nav,
  .header.scrolled .command-bar.nav {
    padding: 9px 0;
  }

  .command-bar__inner {
    grid-template-columns: minmax(104px, 132px) minmax(0, 1fr) auto;
    gap: 8px;
  }

  .command-bar .nav__logo img {
    width: 126px !important;
    max-width: 100% !important;
  }

  .command-bar__searchbox {
    min-height: 43px;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 7px;
    padding: 0 11px;
    border-radius: 11px;
  }

  .command-bar__search input {
    font-size: 13px;
  }

  .command-bar__search input::placeholder {
    color: transparent;
  }

  .command-bar__shortcut {
    display: none;
  }

  .command-panel {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 88px);
    transform: none;
    overflow-y: auto;
    border-radius: 16px;
  }

  .command-panel__default {
    grid-template-columns: 1fr;
  }

  .command-panel__section + .command-panel__section {
    border-left: 0;
    border-top: 1px solid var(--command-line);
  }

  .command-panel__brands {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-panel__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 430px) {
  .command-bar__inner {
    grid-template-columns: 108px minmax(0, 1fr) 28px;
  }

  .command-bar .nav__logo img {
    width: 106px !important;
  }

  .command-panel__section {
    padding: 18px 14px 14px;
  }

  .command-panel__brands {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .command-brand { height: 48px; min-height: 48px; padding: 5px 8px; }
  .command-brand__media { height: 36px; }
  .command-brand__image { width: 100%; height: 30px; max-width: 104px; max-height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .command-bar *,
  .command-bar *::before,
  .command-bar *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* El blog conserva su lenguaje editorial, pero comparte el header global fijo. */
.page-blog main {
  padding-top: 122px;
}

@media (max-width: 760px) {
  .page-blog main {
    padding-top: 64px;
  }
}
