/** BoostroGO Commerce RC56 — hover panel koszyka w desktopowym headerze. */
@media (min-width:1000px){
  .ct-header [data-id="cart"],
  .ct-header .ct-header-cart{
    position:relative!important;
    overflow:visible!important;
  }

  .ct-header [data-id="cart"]::after,
  .ct-header .ct-header-cart::after{
    content:"";
    position:absolute;
    left:-12px;
    right:-12px;
    top:100%;
    height:18px;
  }

  .ct-header [data-id="cart"] .ct-cart-content,
  .ct-header .ct-header-cart .ct-cart-content{
    display:block!important;
    position:absolute!important;
    top:calc(100% + 10px)!important;
    right:0!important;
    left:auto!important;
    width:370px!important;
    max-width:calc(100vw - 32px)!important;
    margin:0!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateY(10px) scale(.985)!important;
    transform-origin:top right!important;
    transition:opacity .16s ease,transform .16s ease,visibility .16s ease!important;
    border:1px solid rgba(28,36,75,.11)!important;
    border-radius:24px!important;
    background:#fff!important;
    box-shadow:0 24px 70px rgba(17,26,73,.20)!important;
    overflow:hidden!important;
    z-index:999999!important;
  }

  .ct-header [data-id="cart"]:hover .ct-cart-content,
  .ct-header [data-id="cart"]:focus-within .ct-cart-content,
  .ct-header .ct-header-cart:hover .ct-cart-content,
  .ct-header .ct-header-cart:focus-within .ct-cart-content{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translateY(0) scale(1)!important;
  }

  .ct-header .ct-cart-content::before{
    content:"Twój koszyk"!important;
    min-height:54px!important;
    padding:15px 18px!important;
    border-bottom:1px solid rgba(28,36,75,.08)!important;
    background:linear-gradient(135deg,#f7fbfd,#fff)!important;
    color:#1c244b!important;
    font-size:17px!important;
    font-weight:950!important;
    letter-spacing:-.025em!important;
  }

  .ct-header .ct-cart-content .woocommerce-mini-cart{
    max-height:300px!important;
    padding:10px 12px!important;
  }

  .ct-header .ct-cart-content .woocommerce-mini-cart__buttons{
    display:none!important;
  }

  .bg-header-cart-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:9px;
    padding:13px;
    border-top:1px solid rgba(28,36,75,.08);
    background:#fff;
  }

  .bg-header-cart-actions a{
    position:relative;
    z-index:3;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 14px;
    border-radius:13px;
    font-size:11.5px;
    line-height:1;
    font-weight:900;
    text-decoration:none!important;
    cursor:pointer;
    pointer-events:auto!important;
    user-select:none;
    -webkit-user-select:none;
    transition:transform .15s ease,background .15s ease,border-color .15s ease,color .15s ease;
  }

  .bg-header-cart-actions__shop{
    border:1px solid rgba(28,36,75,.13);
    background:#f8fbfd;
    color:#1c244b!important;
  }

  .bg-header-cart-actions__cart{
    border:1px solid #fb0444;
    background:#fb0444;
    color:#fff!important;
  }

  .bg-header-cart-actions a:hover,
  .bg-header-cart-actions a:focus-visible{
    transform:translateY(-1px);
  }

  .bg-header-cart-actions__shop:hover,
  .bg-header-cart-actions__shop:focus-visible{
    background:#1c244b;
    border-color:#1c244b;
    color:#fff!important;
  }

  .bg-header-cart-actions__cart:hover,
  .bg-header-cart-actions__cart:focus-visible{
    background:#172252;
    border-color:#172252;
  }
}

@media (max-width:999px){
  .bg-header-cart-actions{display:none!important}
}


/** RC57 — pusty koszyk: tylko czytelny komunikat, bez zbędnych CTA. */
@media (min-width:1000px){
  .ct-header .ct-cart-content.bg-cart-is-empty{
    width:330px!important;
  }

  .ct-header .ct-cart-content.bg-cart-is-empty .woocommerce-mini-cart,
  .ct-header .ct-cart-content.bg-cart-is-empty .widget_shopping_cart_content{
    max-height:none!important;
  }

  .ct-header .ct-cart-content.bg-cart-is-empty .woocommerce-mini-cart__empty-message,
  .ct-header .ct-cart-content.bg-cart-is-empty .ct-cart-content-empty,
  .ct-header .ct-cart-content.bg-cart-is-empty .cart-empty{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:94px!important;
    margin:0!important;
    padding:22px 24px!important;
    color:#66708d!important;
    font-size:13px!important;
    line-height:1.45!important;
    font-weight:750!important;
    text-align:center!important;
    background:#fff!important;
  }

  .ct-header .ct-cart-content.bg-cart-is-empty .woocommerce-mini-cart__buttons,
  .ct-header .ct-cart-content.bg-cart-is-empty .bg-header-cart-actions{
    display:none!important;
  }
}


/** RC58 — pusty koszyk naprawdę bez CTA Blocksy/WooCommerce. */
@media (min-width:1000px){
  .ct-header .ct-cart-content.bg-cart-is-empty .return-to-shop,
  .ct-header .ct-cart-content.bg-cart-is-empty .wc-backward,
  .ct-header .ct-cart-content.bg-cart-is-empty .woocommerce-mini-cart__buttons,
  .ct-header .ct-cart-content.bg-cart-is-empty .bg-header-cart-actions,
  .ct-header .ct-cart-content.bg-cart-is-empty a.button,
  .ct-header .ct-cart-content.bg-cart-is-empty button{
    display:none!important;
  }
}

@media (min-width:1000px){
  .ct-header [data-id="cart"]:has(.ct-cart-content.bg-cart-is-empty) .return-to-shop,
  .ct-header [data-id="cart"]:has(.ct-cart-content.bg-cart-is-empty) .wc-backward,
  .ct-header .ct-header-cart:has(.ct-cart-content.bg-cart-is-empty) .return-to-shop,
  .ct-header .ct-header-cart:has(.ct-cart-content.bg-cart-is-empty) .wc-backward{
    display:none!important;
  }
}


/** RC59 — pusty koszyk: jeden konkretny przycisk „Przejdź do sklepu”. */
@media (min-width:1000px){
  .ct-header .ct-cart-content.bg-cart-is-empty .bg-header-cart-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    padding:12px 14px 14px!important;
    border-top:1px solid rgba(28,36,75,.08)!important;
  }

  .ct-header .ct-cart-content.bg-cart-is-empty .bg-header-cart-actions__shop{
    display:flex!important;
    width:100%!important;
    min-height:44px!important;
    border:1px solid #1c244b!important;
    background:#1c244b!important;
    color:#fff!important;
  }

  /* Native Blocksy/Woo empty-cart actions must never sit next to our CTA. */
  .ct-header [data-id="cart"]:has(.ct-cart-content.bg-cart-is-empty) :is(.return-to-shop,.wc-backward,.ct-cart-actions,.ct-cart-content-actions),
  .ct-header .ct-header-cart:has(.ct-cart-content.bg-cart-is-empty) :is(.return-to-shop,.wc-backward,.ct-cart-actions,.ct-cart-content-actions){
    display:none!important;
  }
}

/** RC61 — actions muszą działać również, gdy Blocksy przenosi dropdown poza .ct-header. */
@media (min-width:1000px){
  .ct-cart-content .bg-header-cart-actions,
  .widget_shopping_cart_content .bg-header-cart-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
    padding:12px 14px 14px!important;
    border-top:1px solid rgba(28,36,75,.08)!important;
    background:#fff!important;
  }

  .ct-cart-content.bg-cart-is-empty .bg-header-cart-actions,
  .widget_shopping_cart_content.bg-cart-is-empty .bg-header-cart-actions,
  .bg-header-cart-actions.is-empty-state{
    grid-template-columns:1fr!important;
  }

  .ct-cart-content .bg-header-cart-actions a,
  .widget_shopping_cart_content .bg-header-cart-actions a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:44px!important;
    border-radius:13px!important;
    font-size:11.5px!important;
    font-weight:900!important;
    text-decoration:none!important;
  }

  .ct-cart-content .bg-header-cart-actions__shop,
  .widget_shopping_cart_content .bg-header-cart-actions__shop{
    border:1px solid rgba(28,36,75,.14)!important;
    background:#f8fbfd!important;
    color:#1c244b!important;
  }

  .ct-cart-content .bg-header-cart-actions__cart,
  .widget_shopping_cart_content .bg-header-cart-actions__cart{
    border:1px solid #fb0444!important;
    background:#fb0444!important;
    color:#fff!important;
  }
}


/* RC64 — CTA muszą leżeć nad warstwami triggera Blocksy i być fizycznie klikalne. */
@media (min-width:1000px){
  .bg-header-cart-actions{
    position:relative!important;
    z-index:2147483000!important;
    pointer-events:auto!important;
  }
  .bg-header-cart-actions a{
    position:relative!important;
    z-index:2147483001!important;
    pointer-events:auto!important;
    cursor:pointer!important;
  }
}
