/* ==========================================================
   Bridartis Premium V4.9.73 — cart tile geometry fix
   Goal: cart behaves exactly like Account/Wishlist without
   changing the width/position of the desktop header actions.
   ========================================================== */

@media (min-width: 1280px) {
  /*
   * ps_shoppingcart adds four structural wrappers around the real link.
   * They must not create a separate box inside the 3-column action grid.
   * display:contents keeps the module DOM (and its data-refresh-url for JS)
   * but lets the real <a.bp-action> occupy the third grid cell directly.
   */
  #header .bp-header-actions > .bp-desktop-cart-host,
  #header .bp-desktop-cart-host > #_desktop_cart,
  #header .bp-desktop-cart-host .blockcart,
  #header .bp-desktop-cart-host .blockcart > .header {
    display: contents !important;
  }

  /* Exact geometry copied from the working Account/Wishlist tiles. */
  #header .bp-desktop-cart-host .bp-action {
    position: relative !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 66px !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 18px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #5f6747 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: background .2s ease, color .2s ease !important;
  }

  /* Separator at the left edge of the cart cell, same as Wishlist. */
  #header .bp-desktop-cart-host .bp-action::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 18% !important;
    bottom: 18% !important;
    width: 1px !important;
    background: rgba(95, 103, 71, .16) !important;
    pointer-events: none !important;
  }

  /* Full tile hover/click area — no separate icon-only background. */
  #header .bp-desktop-cart-host .bp-action:hover,
  #header .bp-desktop-cart-host .bp-action:focus-visible {
    background: rgba(95, 103, 71, .055) !important;
    color: #444b33 !important;
    outline: none !important;
  }

  #header .bp-desktop-cart-host .bp-action__icon,
  #header .bp-desktop-cart-host .bp-action:hover .bp-action__icon,
  #header .bp-desktop-cart-host .bp-action:focus-visible .bp-action__icon {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #header .bp-desktop-cart-host .bp-action__copy {
    width: auto !important;
    min-width: 0 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 4px !important;
    line-height: 1 !important;
  }

  #header .bp-desktop-cart-host .bp-action__copy strong {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    color: #303226 !important;
    font-family: "Manrope", Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
  }

  #header .bp-desktop-cart-host .bp-action__copy small {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    color: #8a8b84 !important;
    font-family: "Manrope", Arial, sans-serif !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;
  }

  #header .bp-desktop-cart-host .bp-action__icon svg {
    display: block !important;
    width: 34px !important;
    height: 34px !important;
    overflow: visible !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.55 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  /* Badge stays attached to the bag icon. */
  #header .bp-desktop-cart-host .cart-products-count {
    position: absolute !important;
    top: -7px !important;
    right: -6px !important;
    z-index: 2 !important;
    pointer-events: none !important;
  }
}
