/* "Hikvision" mega-menu dropdown (#cbp-hrmenu-tab-57). Markup from tools/menu/build_hikvision_menu.php.
   Loaded after ift-megamenu.css; selectors start with #cbp-hrmenu #cbp-hrmenu-tab-57 so they win over the shared tab rules.
   Brand strip + four product cards (AcuSense kits, ColorVu 4K kits, video intercom, AX PRO alarm) + "More from Hikvision"
   column + popular cameras strip. Hikvision colours from hikvision.com/au-en and its logo: red #d71820, graphite #2b2b2b,
   grey #6d6e72 / #f4f4f4. Square corners like Hikvision's own site; red only for accents (ticks, links, the pick card).
   Must fit a 1280x720 screen without scrolling (about 490px). Desktop only. */

@media (min-width: 992px) {
  #cbp-hrmenu #cbp-hrmenu-tab-57 .cbp-hrsub-inner {
    padding: 0 !important;
    background: #fff !important;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .cbp-hrsub-inner > .container,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .menu_row,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .cbp-menu-column {
    margin: 0 auto;
    padding: 0;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .cbp-menu-column-inner {
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    border-radius: 0;
  }

  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm {
    color: #2b2b2b;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.4;
    text-align: left;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm a {
    color: inherit;
    text-decoration: none;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm p,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm ul {
    margin: 0;
    padding: 0;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm ul {
    list-style: none;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm svg {
    flex: none;
  }

  /* Brand strip */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 46px;
    padding: 0 22px;
    border-bottom: 1px solid #e2e2e2;
    background: #f6f6f6;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top__brand {
    display: flex;
    flex: none;
    align-items: center;
    gap: 12px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top__brand img {
    display: block;
    width: 126px;
    height: auto;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top__brand span {
    padding-left: 12px;
    border-left: 1px solid #cfcfcf;
    color: #2b2b2b;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-trust {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    gap: 24px;
    min-width: 0;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-trust li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #45464a;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-trust svg {
    color: #d71820;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top__all {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 2px;
    color: #d71820 !important;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top__all:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
  }

  /* Body: product cards + "More from Hikvision" */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 18px;
    padding: 12px 22px 0;
  }

  /* Cards: each card spans the grid rows through a subgrid so names, facts, chips and prices line up. */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto repeat(6, auto);
    column-gap: 12px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card {
    position: relative;
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: subgrid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    background: #fff;
    transition: border-color .15s ease;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card:hover {
    border-color: #a9aaad;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card.is-pick {
    border-color: #d71820;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card > :not(.hkm-card__img) {
    margin-right: 14px;
    margin-left: 14px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__img {
    position: relative;
    display: block;
    height: 118px;
    background: #f4f4f4;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card.is-white .hkm-card__img {
    background: #e6e7e9;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card.is-kit .hkm-card__photo {
    visibility: hidden;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 9px;
    border-radius: 0 0 3px 0;
    background: #d71820;
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 22px;
    letter-spacing: .03em;
    text-transform: uppercase;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-top: 11px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__name {
    color: #1f1f1f;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__name:hover {
    color: #d71820;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__tag {
    color: #5c5d61;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__for {
    margin-top: 4px;
    color: #45464a;
    font-size: 13.5px;
    line-height: 1.38;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__facts {
    margin-top: 8px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__facts li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__facts svg {
    margin-top: 3px;
    color: #d71820;
  }

  /* Chips: link to one product each; .is-def marks the product the card opens on */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chiprow {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips-l {
    color: #5c5d61;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips {
    display: flex;
    gap: 4px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 7px;
    border: 1px solid #cfcfcf;
    border-radius: 3px;
    background: #fff;
    color: #2b2b2b !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color .12s ease, background-color .12s ease, color .12s ease;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips a:hover,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips a:focus-visible,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips a.is-on,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card:not(.is-kit) .hkm-card__chips a.is-def {
    border-color: #2b2b2b;
    background: #2b2b2b;
    color: #fff !important;
    outline: none;
  }

  /* Price + button */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #ededed;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__from {
    min-width: 0;
    overflow: hidden;
    color: #5c5d61;
    font-size: 12.5px;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__from strong {
    display: block;
    color: #1f1f1f;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.01em;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__from s {
    margin-left: 5px;
    color: #8c8d91;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 2px;
    height: 32px;
    padding: 0 9px 0 12px;
    border: 1px solid #2b2b2b;
    border-radius: 3px;
    background: #fff;
    color: #2b2b2b !important;
    font-size: 13px;
    font-weight: 700;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__btn:hover {
    background: #2b2b2b;
    color: #fff !important;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card.is-pick .hkm-card__btn {
    border-color: #d71820;
    background: #d71820;
    color: #fff !important;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card.is-pick .hkm-card__btn:hover {
    border-color: #b3121a;
    background: #b3121a;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__sub {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
    margin-bottom: 10px;
    color: #c4151d !important;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__sub strong {
    margin-left: 3px;
    font-weight: 800;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__sub:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
  }

  /* More from Hikvision */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 18px;
    border-left: 1px solid #e2e2e2;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more__t {
    margin-bottom: 4px !important;
    color: #5c5d61;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more li a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -8px;
    padding: 3px 8px;
    border-radius: 3px;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more li a:hover {
    background: #f6f6f6;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more__img {
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    background: #fff;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more__txt {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more__l {
    color: #1f1f1f;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more li a:hover .hkm-more__l {
    color: #d71820;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more__s {
    overflow: hidden;
    color: #5c5d61;
    font-size: 12.5px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* Popular cameras strip */
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 12px 22px;
    padding: 5px 7px 5px 16px;
    border-radius: 4px;
    background: #f4f4f4;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__t {
    flex: none;
    color: #1f1f1f;
    font-size: 13.5px;
    font-weight: 800;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__l {
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__l a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 2px 10px 2px 3px;
    border-radius: 3px;
    color: #2b2b2b !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__l a:hover {
    background: #fff;
    color: #d71820 !important;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__l img {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    background: #fff;
    object-fit: contain;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__a {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    color: #2b2b2b !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__a--ask {
    gap: 4px;
    padding: 3px 8px 3px 10px;
    border: 1px solid #d71820;
    border-radius: 3px;
    background: #fff;
    color: #d71820 !important;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__a--ask:hover {
    background: #fdf1f1;
    text-decoration: none !important;
  }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__a:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
  }
}

@media (min-width: 992px) and (max-width: 1439px) {
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-body { padding-right: 16px; padding-left: 16px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot { margin-right: 16px; margin-left: 16px; gap: 14px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top { gap: 18px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-trust { gap: 18px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-body { grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more { padding-left: 14px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-cards { column-gap: 10px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card > :not(.hkm-card__img) { margin-right: 11px; margin-left: 11px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__btn { padding: 0 11px; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__btn svg { display: none; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__l { gap: 2px; }
}

@media (min-width: 992px) and (max-width: 1199px) {
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-top__brand span,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-trust li:nth-child(n+2),
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-foot__l li:nth-child(n+3),
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-more { display: none; }
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-body { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__chips a,
  #cbp-hrmenu #cbp-hrmenu-tab-57 .hkm-card__btn { transition: none; }
}
