/* Desktop masthead. Width follows the product column, same idea as the Justice chrome. */

.ra-desk-mast {
  --ra-desk-h: 74px;
  --ra-desk-bg: #ffffff;
  --ra-desk-ink: #1a1a1a;
  --ra-desk-ink-hover: #0b6cb5;
  --ra-desk-gap: 22px;
  --ra-desk-max: 1585px;
  --ra-desk-pad-x: 20px;
  --ra-desk-logo-h: 40px;
  --ra-desk-logo-w: 176px;
  --ra-desk-radius: 22px;
  --ra-desk-chat-bg: #fb010a;
  --ra-desk-chat-ink: #ffffff;
  --ra-desk-chat-radius: 999px;
  --ra-desk-cart: #1a1a1a;
  --ra-desk-count-bg: #fb010a;
  --ra-desk-count-ink: #ffffff;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  font-family: Verdana, sans-serif;
}

.ra-desk-mast__chrome,
.ra-desk-mast__bar {
  display: none;
}

.ra-desk-mast__panel[hidden] {
  display: none !important;
}

@media (min-width: 781px) {
  body:has(.ra-desk-mast) {
    --ra-desk-h: 74px;
    padding-top: var(--ra-desk-h) !important;
  }

  .ra-desk-mast__chrome {
    position: fixed;
    z-index: 99980;
    top: var(--wp-admin--admin-bar--height, 0px);
    left: 50%;
    display: block;
    width: min(var(--ra-desk-max), calc(100% - 48px));
    transform: translateX(-50%);
  }

  .ra-desk-mast__bar {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: var(--ra-desk-h);
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-top: 0;
    border-radius: 0 0 var(--ra-desk-radius) var(--ra-desk-radius);
    background: var(--ra-desk-bg);
    color: var(--ra-desk-ink);
  }

  .ra-desk-mast__tools {
    display: contents;
  }

  .ra-desk-mast__brand,
  .ra-desk-mast__nav,
  .ra-desk-mast__phone,
  .ra-desk-mast__chat,
  .ra-desk-mast__soc,
  .ra-desk-mast__cart,
  .ra-desk-mast__burger {
    position: absolute;
    top: 50%;
    margin: 0;
    transform: translate(calc(var(--ra-edge-l, 0px) - var(--ra-edge-r, 0px)), calc(-50% + var(--ra-edge-t, 0px) - var(--ra-edge-b, 0px)));
  }

  .ra-desk-mast__brand {
    left: 20px;
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
  }

  .ra-desk-mast__brand img {
    display: block;
    width: var(--ra-desk-logo-w);
    height: var(--ra-desk-logo-h);
    max-width: var(--ra-desk-logo-w);
    object-fit: contain;
    object-position: left center;
  }

  .ra-desk-mast__nav {
    left: 212px;
    right: 503px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    gap: 0;
    padding: 0;
  }

  .ra-desk-mast__nav a {
    color: var(--ra-desk-ink);
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    margin-right: var(--ra-desk-gap);
  }

  .ra-desk-mast__nav a:last-child {
    margin-right: 0;
  }

  .ra-desk-mast__nav a:hover,
  .ra-desk-mast__nav a:focus-visible {
    color: var(--ra-desk-ink-hover);
  }

  .ra-desk-mast__phone {
    right: 326px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ra-desk-ink);
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  .ra-desk-mast__phone svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
  }

  .ra-desk-mast__phone:hover,
  .ra-desk-mast__phone:focus-visible {
    color: var(--ra-desk-ink-hover);
  }

  .ra-desk-mast__chat {
    right: 167px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 42px;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--ra-desk-chat-radius);
    background: var(--ra-desk-chat-bg) !important;
    color: var(--ra-desk-chat-ink) !important;
    font-size: 15px;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
  }

  .ra-desk-mast__chat:hover,
  .ra-desk-mast__chat:focus-visible {
    background: #d40008 !important;
    color: var(--ra-desk-chat-ink) !important;
  }

  .ra-desk-mast__soc,
  .ra-desk-mast__cart,
  .ra-desk-mast__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    background: #ffffff;
    color: var(--ra-desk-cart);
    line-height: 0;
    text-decoration: none;
    cursor: pointer;
  }

  .ra-desk-mast__soc {
    right: 125px;
  }

  .ra-desk-mast__cart {
    right: 73px;
  }

  .ra-desk-mast__burger {
    right: 21px;
  }

  .ra-desk-mast__soc svg,
  .ra-desk-mast__cart svg {
    width: 20px;
    height: 20px;
  }

  .ra-desk-mast__soc:hover,
  .ra-desk-mast__cart:hover,
  .ra-desk-mast__burger:hover {
    border-color: rgba(0, 0, 0, 0.4);
    color: var(--ra-desk-ink);
  }

  .ra-desk-mast__burger span {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
  }

  .ra-desk-mast__burger span:nth-child(1) { top: 14px; }
  .ra-desk-mast__burger span:nth-child(2) { top: 20px; }
  .ra-desk-mast__burger span:nth-child(3) { top: 26px; }

  .ra-desk-mast.is-open .ra-desk-mast__burger span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
  }

  .ra-desk-mast.is-open .ra-desk-mast__burger span:nth-child(2) {
    opacity: 0;
  }

  .ra-desk-mast.is-open .ra-desk-mast__burger span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
  }

  .ra-desk-mast__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--ra-desk-count-bg);
    color: var(--ra-desk-count-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
  }

  .ra-desk-mast__added {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
  }

  .ra-desk-mast__cart.is-added {
    animation: ra-desk-cart-pop 0.7s ease;
  }

  .ra-desk-mast__cart.is-added .ra-desk-mast__added {
    animation: ra-desk-added 1.4s ease;
  }

  .ra-desk-mast__panel {
    margin-top: 8px;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  }

  .ra-desk-mast__panel-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .ra-desk-mast__panel-nav a {
    color: var(--ra-desk-ink);
    font-size: 16px;
    line-height: 1.3;
    text-decoration: none;
  }

  .ra-desk-mast__panel-nav a:hover,
  .ra-desk-mast__panel-nav a:focus-visible {
    color: var(--ra-desk-ink-hover);
  }
}

@media (max-width: 780px) {
  .elementor-widget-ra_desk_masthead,
  .ra-desk-mast {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

@keyframes ra-desk-cart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

@keyframes ra-desk-added {
  0% { opacity: 0; transform: translateY(-4px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ra-desk-mast__cart.is-added,
  .ra-desk-mast__cart.is-added .ra-desk-mast__added,
  .ra-desk-mast.is-open .ra-desk-mast__burger span {
    animation: none;
    transition: none;
  }

  .ra-desk-mast__cart.is-added .ra-desk-mast__added {
    opacity: 1;
  }
}
