.ap-cart-overlay {
    position:fixed;
    inset:0;
    z-index:99998;
    background:rgba(24,21,17,.46);
    opacity:0;
    pointer-events:none;
    transition:opacity .28s ease;
}

.ap-cart-overlay.is-open {
    opacity:1;
    pointer-events:auto;
}

.ap-cart-panel {
    position:fixed;
    top:0;
    right:0;
    z-index:99999;
    width:min(760px, calc(100vw - 24px));
    height:100dvh;
    background:var(--ap-color-bg);
    color:var(--ap-color-ink);
    transform:translateX(100%);
    transition:transform .38s cubic-bezier(.16,1,.3,1);
    display:flex;
    flex-direction:column;
    box-shadow:-20px 0 60px rgba(0,0,0,.08);
    font-family:var(--ap-font-body);
    font-size:14px;
    letter-spacing:0;
}

.ap-cart-panel.is-open {
    transform:translateX(0);
}

body.ap-cart-open {
    overflow:hidden;
}

.ap-cart-panel__header {
    height:74px;
    padding:0 40px;
    border-bottom:1px solid var(--ap-color-line);
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-shrink:0;
}

.ap-cart-panel__header h2 {
    margin:0;
    font-family:var(--ap-font-heading);
    font-size:25px;
    font-weight:400;
    letter-spacing:-0.025em;
}

.ap-cart-panel__close {
    position:relative;
    width:36px;
    height:36px;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:var(--ap-color-muted)!important;
    cursor:pointer;
    box-shadow:none!important;
    appearance:none;
    -webkit-appearance:none;
}

.ap-cart-panel__close:hover,
.ap-cart-panel__close:focus,
.ap-cart-panel__close:focus-visible {
    background:transparent!important;
    color:var(--ap-color-ink)!important;
    outline:none!important;
    box-shadow:none!important;
}

.ap-cart-panel__close::before,
.ap-cart-panel__close::after {
    content:'';
    position:absolute;
    top:50%;
    left:50%;
    width:20px;
    height:1px;
    background:currentColor;
    transform-origin:center;
}

.ap-cart-panel__close::before {
    transform:translate(-50%,-50%) rotate(45deg);
}

.ap-cart-panel__close::after {
    transform:translate(-50%,-50%) rotate(-45deg);
}

.ap-cart-panel__content {
    min-height:0;
    flex:1;
    display:flex;
    flex-direction:column;
}

.ap-cart-status,
.ap-cart-error {
    margin:14px 40px 0;
    font-size:13px;
    line-height:1.45;
}

.ap-cart-status[hidden],
.ap-cart-error[hidden] {
    display:none;
}

.ap-cart-status {
    color:var(--ap-color-muted);
}

.ap-cart-error {
    color:#8f241c;
}

.ap-cart-panel.is-loading .ap-cart-panel__content {
    opacity:.68;
    pointer-events:none;
}

.ap-cart-panel__scroll {
    min-height:0;
    flex:1;
    overflow:auto;
    padding:32px 40px 40px;
}

.ap-cart-items {
    display:flex;
    flex-direction:column;
    gap:24px;
}

.ap-cart-item,
.ap-cart-recommendation {
    display:grid;
    grid-template-columns:120px minmax(0,1fr) auto;
    gap:24px;
    align-items:center;
}

.ap-cart-item__image,
.ap-cart-recommendation__image {
    width:120px;
    height:auto;
    background:transparent;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

.ap-cart-item__image img,
.ap-cart-recommendation__image img {
    width:100%;
    height:auto;
    object-fit:contain;
    display:block;
}

.ap-cart-item__title,
.ap-cart-recommendation__title {
    display:block;
    color:var(--ap-color-ink);
    text-decoration:none;
    font-size:14px;
    letter-spacing:.08em;
    line-height:1.45;
    text-transform:none;
}

.ap-cart-item__title:hover,
.ap-cart-recommendation__title:hover {
    color:var(--ap-color-accent);
}

.ap-cart-item__price,
.ap-cart-recommendation__price {
    margin-top:7px;
    color:var(--ap-color-text);
    font-size:15px;
    font-weight:300;
    letter-spacing:-.005em;
}

.ap-cart-item__controls {
    margin-top:14px;
    display:flex;
    align-items:center;
    gap:18px;
}

.ap-cart-qty {
    display:inline-grid;
    grid-template-columns:36px 44px 36px;
    height:38px;
    border:1px solid var(--ap-color-line);
    background:var(--ap-color-bg);
}

.ap-cart-qty__btn {
    border:0!important;
    background:transparent!important;
    color:var(--ap-color-soft-ink)!important;
    cursor:pointer;
    font-size:18px;
    line-height:1;
    box-shadow:none!important;
    padding:0!important;
}

.ap-cart-qty__btn:hover,
.ap-cart-qty__btn:focus-visible {
    background:var(--ap-color-line-soft)!important;
    color:var(--ap-color-ink)!important;
    outline:none;
}

.ap-cart-qty__value {
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
}

.ap-cart-remove,
.ap-cart-note,
.ap-cart-continue {
    border:0!important;
    background:transparent!important;
    color:var(--ap-color-ink)!important;
    padding:0!important;
    cursor:pointer;
    text-decoration:underline;
    font:inherit;
    font-size:13px;
    letter-spacing:0;
    box-shadow:none!important;
    border-radius:0!important;
}

.ap-cart-remove:hover,
.ap-cart-note:hover,
.ap-cart-continue:hover,
.ap-cart-remove:focus-visible,
.ap-cart-note:focus-visible,
.ap-cart-continue:focus-visible {
    background:transparent!important;
    color:var(--ap-color-accent)!important;
    outline:none;
}

.ap-cart-empty {
    margin:70px 0;
    color:var(--ap-color-muted);
    text-align:center;
    letter-spacing:.03em;
}

.ap-cart-complete {
    margin-top:36px;
    padding-top:34px;
    border-top:1px solid var(--ap-color-line);
}

.ap-cart-complete__title {
    margin:0 0 22px;
    font-size:12px;
    font-weight:400;
    letter-spacing:.16em;
    text-transform:uppercase;
}

.ap-cart-complete__list {
    display:flex;
    flex-direction:column;
    gap:20px;
}

.ap-cart-recommendation__button {
    width:178px;
    height:54px;
	/* Vale sia per il button "Aggiungi" sia per il link "Scopri". */
	display:inline-flex;
	align-items:center;
	justify-content:center;
	text-decoration:none;
    border:1px solid var(--ap-color-line)!important;
    background:transparent!important;
    color:var(--ap-color-ink)!important;
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    letter-spacing:.12em;
    text-transform:uppercase;
    transition:background .2s, color .2s, border-color .2s;
    box-shadow:none!important;
    border-radius:0!important;
}

.ap-cart-recommendation__button:hover,
.ap-cart-recommendation__button:focus-visible {
    background:var(--ap-color-accent)!important;
    border-color:var(--ap-color-accent)!important;
    color:#fff!important;
    outline:none;
}

.ap-cart-panel__footer {
    flex-shrink:0;
    border-top:1px solid var(--ap-color-line);
    padding:26px 40px 32px;
    background:var(--ap-color-bg);
}

.ap-cart-tax-note {
    margin:10px 0 20px;
    color:var(--ap-color-muted);
    font-size:13px;
    letter-spacing:0;
}

.ap-cart-checkout {
    height:56px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    width:100%;
    background:var(--ap-color-deep)!important;
    color:#fff!important;
    text-decoration:none!important;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-size:13px;
    font-weight:600;
}

.ap-cart-checkout .woocommerce-Price-amount,
.ap-cart-checkout .woocommerce-Price-currencySymbol {
    color:#fff!important;
    font-size:inherit;
    font-weight:600;
}

.ap-cart-checkout:hover,
.ap-cart-checkout:focus-visible {
    background:var(--ap-color-accent)!important;
    color:#fff!important;
    outline:none;
}

.ap-cart-continue {
    display:block;
    margin:12px auto 0;
}

.ap-cart-view-cart {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:48px;
    margin:14px auto 0;
    border:1px solid var(--ap-color-line)!important;
    background:transparent!important;
    color:var(--ap-color-ink)!important;
    font-size:12px;
    font-weight:600;
    line-height:1;
    letter-spacing:.12em;
    text-transform:uppercase;
    text-decoration:none!important;
    transition:background .2s ease, border-color .2s ease, color .2s ease;
}

.ap-cart-view-cart:hover,
.ap-cart-view-cart:focus-visible {
    border-color:var(--ap-color-accent)!important;
    background:var(--ap-color-accent)!important;
    color:#fff!important;
    outline:none;
}

.ap-cart-panel a,
.ap-cart-panel button {
    -webkit-tap-highlight-color:transparent;
}

.ap-cart-panel button:not(.ap-cart-recommendation__button):not(.ap-cart-checkout),
.ap-cart-panel button:not(.ap-cart-recommendation__button):not(.ap-cart-checkout):hover,
.ap-cart-panel button:not(.ap-cart-recommendation__button):not(.ap-cart-checkout):focus,
.ap-cart-panel button:not(.ap-cart-recommendation__button):not(.ap-cart-checkout):active {
    background-color:transparent!important;
}

.ap-cart-panel ::selection {
    background:var(--ap-color-accent);
    color:#fff;
}

.ap-cart-panel.is-loading .ap-cart-panel__content {
    opacity:.55;
    pointer-events:none;
}

.ap-cart-count {
    min-width:18px;
    height:18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    font-size:11px;
    line-height:1;
}

@media (max-width: 768px) {
    .ap-cart-panel {
        width:100vw;
    }

    .ap-cart-panel__header {
        height:64px;
        padding:0 20px;
    }

    .ap-cart-panel__header h2 {
        font-size:21px;
        letter-spacing:.05em;
    }

    .ap-cart-panel__scroll {
        padding:22px 20px 28px;
    }

    .ap-cart-item,
    .ap-cart-recommendation {
        grid-template-columns:92px minmax(0,1fr);
        gap:16px;
    }

    .ap-cart-item__image,
    .ap-cart-recommendation__image {
        width:92px;
        height:auto;
    }

    .ap-cart-recommendation__button {
        grid-column:1 / -1;
        width:100%;
        height:50px;
    }

    .ap-cart-item__title,
    .ap-cart-recommendation__title {
        font-size:12px;
        letter-spacing:.06em;
    }

    .ap-cart-item__controls {
        gap:14px;
        flex-wrap:wrap;
    }

    .ap-cart-panel__footer {
        padding:20px;
    }

    .ap-cart-checkout {
        height:54px;
        font-size:12px;
        letter-spacing:.1em;
    }
}
