/* Pinpoint4: cart button (top right of the header) + the slide-out cart.
 * Loaded on the Elementor pages (css-2) and the hand-built pages (hand-head). */

/* ---- header button ---- */
.p4-cart-btn {
    position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: 18px; padding: 0; border-radius: 12px; cursor: pointer;
    color: #FFFFFF; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(143, 179, 236, 0.18);
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.p4-cart-btn[hidden], [data-p4-add][hidden] { display: none !important; } /* shop switched off */
.p4-cart-btn:hover, .p4-cart-btn:focus-visible, .p4-cart-btn[aria-expanded="true"] {
    background: rgba(74, 129, 211, 0.16); border-color: rgba(143, 179, 236, 0.45); color: #FFFFFF;
}
.p4-cart-btn:focus-visible { outline: 2px solid #8FB3EC; outline-offset: 2px; }
.p4-cart-btn__count {
    position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    font: 700 11.5px/20px "DM Sans", system-ui, sans-serif; text-align: center; color: #FFFFFF;
    background: #15803D; box-shadow: 0 0 0 2px #000022, 0 0 10px rgba(34, 197, 94, .6);
}
.p4-cart-btn__count:empty { display: none; }
.p4-cart-btn.is-bump .p4-cart-btn__count { animation: p4-cart-bump .4s ease-out; }
@keyframes p4-cart-bump { 40% { transform: scale(1.35); } }

/* Elementor header: menu sits next to the cart instead of being spread across the bar */
.elementor-location-header .elementor-element-631b31b2 > .elementor-element-6c39f30c { margin-left: auto; }
@media (max-width: 1024px) {
    .p4-cart-btn { margin-left: 14px; }
}
/* phones: Elementor lets this header row wrap; keep logo, menu and cart on one line */
@media (max-width: 767px) {
    .elementor-2136 .elementor-element.elementor-element-631b31b2 { --flex-wrap: nowrap; }
}

/* ---- slide-out cart ---- */
.p4-cart { position: fixed; inset: 0; z-index: 100000; font-family: "DM Sans", system-ui, sans-serif; }
.p4-cart[hidden] { display: none; }
.p4-cart__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 20, .6); animation: p4-cart-fade .25s ease-out; }
.p4-cart__panel {
    position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(420px, 100%);
    color: rgba(255, 255, 255, .78); background: linear-gradient(180deg, #12132C 0%, #191B36 100%);
    border-left: 1px solid rgba(143, 179, 236, .18); box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .6);
    animation: p4-cart-in .3s cubic-bezier(.2, .8, .2, 1);
}
@keyframes p4-cart-in { from { transform: translateX(100%); } }
@keyframes p4-cart-fade { from { opacity: 0; } }
.p4-cart__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.p4-cart__title { margin: 0; font: 700 22px/1.2 "Exo 2", sans-serif; color: #FFFFFF; }
.p4-cart__close {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0;
    border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .7); cursor: pointer;
}
.p4-cart__close:hover, .p4-cart__close:focus-visible { color: #FFFFFF; background: rgba(255, 255, 255, .06); }
.p4-cart__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px; }
.p4-cart__list { margin: 0; padding: 0; list-style: none; }
.p4-cart__item { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.p4-cart__name { font-size: 16px; font-weight: 600; color: #FFFFFF; line-height: 1.35; }
.p4-cart__size { grid-column: 1; font-size: 13.5px; color: rgba(255, 255, 255, .55); }
.p4-cart__price { grid-column: 2; grid-row: 1; font: 700 17px/1.35 "Exo 2", sans-serif; color: #FFFFFF; font-variant-numeric: tabular-nums; text-align: right; }
.p4-cart__remove {
    grid-column: 2; grid-row: 2; justify-self: end; padding: 2px 0; border: 0; background: none; cursor: pointer;
    font: 500 13px "DM Sans", sans-serif; color: #8FB3EC; text-decoration: underline; text-underline-offset: 3px;
}
.p4-cart__remove:hover, .p4-cart__remove:focus-visible { color: #FFFFFF; }
.p4-cart__empty { padding: 40px 0; text-align: center; font-size: 15px; line-height: 1.6; }
.p4-cart__empty a { color: #8FB3EC; font-weight: 600; }
.p4-cart__foot { padding: 20px 24px 24px; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 34, .35); }
.p4-cart__total { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 16px; font-size: 15px; }
.p4-cart__total b { font: 700 28px/1 "Exo 2", sans-serif; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.p4-cart__recur { margin: -8px 0 16px; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .7); }
.p4-cart__checkout {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border-radius: 999px; cursor: pointer;
    font: 600 16px "DM Sans", sans-serif; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .18);
    background-image: linear-gradient(45deg, #3569BB 0%, #514A9D 100%); box-shadow: 0 2px 10px rgba(74, 129, 211, .35);
    transition: background-color .2s, box-shadow .2s;
}
.p4-cart__checkout:hover:not(:disabled), .p4-cart__checkout:focus-visible {
    background-image: none; background-color: #15803D; border-color: #4ADE80;
    box-shadow: 0 0 8px rgba(34, 197, 94, .9), 0 0 24px rgba(34, 197, 94, .6);
}
.p4-cart__checkout:disabled { opacity: .55; cursor: default; }
.p4-cart__checkout[aria-busy="true"] { cursor: progress; }
.p4-cart__msg { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: #FCD34D; }
.p4-cart__msg:empty { display: none; }
.p4-cart__note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .5); }
html.p4-cart-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .p4-cart__panel, .p4-cart__backdrop, .p4-cart-btn.is-bump .p4-cart-btn__count { animation: none; }
}
