/* Header mini cart: clear product rows and a focused removal moment. */
.cart-dropdown-wrap.cart-dropdown-panel {
    width: 390px !important;
    max-width: min(390px, calc(100vw - 24px));
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #dce8f3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(19, 52, 85, .16);
}

.cart-dropdown-panel .sp-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 18px 13px;
    border-bottom: 1px solid #e5edf6;
    color: #173f66;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.cart-dropdown-panel .sp-cart-head span {
    color: #72879a;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
}

.cart-dropdown-panel > ul {
    display: block !important;
    max-height: min(392px, 48vh);
    margin: 0 !important;
    padding: 6px 10px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #bfd4e8 transparent;
    scrollbar-width: thin;
}

.cart-dropdown-panel > ul > li {
    position: relative;
    display: grid !important;
    grid-template-columns: 66px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 11px;
    min-height: 91px;
    margin: 0 !important;
    padding: 10px 5px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f8 !important;
    background: #fff;
    transition: background .2s ease;
}

.cart-dropdown-panel > ul > li:last-child { border-bottom: 0 !important; }
.cart-dropdown-panel > ul > li:hover { background: #f8fbff; }

.cart-dropdown-panel .shopping-cart-img {
    float: none !important;
    width: 66px !important;
    height: 70px;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid #e8eef5;
    border-radius: 9px;
    background: #fff;
}

.cart-dropdown-panel .shopping-cart-img a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.cart-dropdown-panel .shopping-cart-img img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: contain;
    padding: 4px;
}

.cart-dropdown-panel .shopping-cart-title {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.cart-dropdown-panel .shopping-cart-title h4 {
    display: -webkit-box;
    max-height: 38px;
    margin: 0 0 8px !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35 !important;
}

.cart-dropdown-panel .shopping-cart-title h4 a {
    color: #173b60 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.cart-dropdown-panel .shopping-cart-title h3 {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 !important;
    color: #647d93 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}

.cart-dropdown-panel .shopping-cart-title h3 span:last-child {
    color: #17619c;
    font-weight: 750;
}

.cart-dropdown-panel .shopping-cart-title p:empty { display: none; }
.cart-dropdown-panel .shopping-cart-delete {
    position: static !important;
    float: none !important;
    width: 32px !important;
    margin: 0 !important;
    align-self: start;
}

.cart-dropdown-panel .shopping-cart-delete .remove-cart-item {
    display: grid !important;
    width: 30px !important;
    height: 30px !important;
    place-items: center;
    border: 1px solid #e4eaf1;
    border-radius: 9px;
    color: #6b8194 !important;
    background: #fff;
    transition: color .2s, background .2s, border-color .2s, transform .2s;
}

.cart-dropdown-panel .shopping-cart-delete .remove-cart-item:hover,
.cart-dropdown-panel .shopping-cart-delete .remove-cart-item:focus-visible {
    border-color: #c8dfee;
    color: #0d619d !important;
    background: #edf7ff;
    transform: translateY(-1px);
    outline: none;
}

.cart-dropdown-panel .remove-cart-item i { display: none !important; }
.cart-dropdown-panel .remove-cart-item::before {
    display: block;
    width: 16px;
    height: 16px;
    background: currentColor;
    content: '';
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M10 11v6m4-6v6M6 7l1 13h10l1-13M9 7V4h6v3' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cart-dropdown-panel .shopping-cart-footer {
    margin: 0 !important;
    padding: 14px 18px 17px !important;
    border-top: 1px solid #e3edf7;
    background: #f8fbff;
}

.cart-dropdown-panel .shopping-cart-total { margin: 0 0 13px !important; }
.cart-dropdown-panel .shopping-cart-total h5,
.cart-dropdown-panel .shopping-cart-total h4 {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    float: none !important;
    width: 100%;
    margin: 0 0 5px !important;
    color: #6a8094;
    font-size: 12px !important;
    line-height: 1.35;
}

.cart-dropdown-panel .shopping-cart-total h4 {
    margin: 10px 0 0 !important;
    padding-top: 10px;
    border-top: 1px solid #e2eaf2;
    color: #173b60;
    font-size: 15px !important;
    font-weight: 700;
}

.cart-dropdown-panel .shopping-cart-total h4 span { color: #17619c !important; }
.cart-dropdown-panel .shopping-cart-total .clearfix { display: none; }
.cart-dropdown-panel .shopping-cart-button {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 0 !important;
}

.cart-dropdown-panel .shopping-cart-button a {
    display: flex !important;
    min-width: 0;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 8px 7px !important;
    border: 1px solid #b9d6eb !important;
    border-radius: 8px !important;
    color: #145989 !important;
    background: #fff !important;
    font-size: 11px !important;
    font-weight: 700;
    text-align: center;
}

.cart-dropdown-panel .shopping-cart-button a:last-child {
    border-color: #176fa9 !important;
    color: #fff !important;
    background: #176fa9 !important;
}

.cart-dropdown-panel .shopping-cart-button a:hover { filter: brightness(.95); }

@media (max-width: 575px) {
    .cart-dropdown-wrap.cart-dropdown-panel { width: min(360px, calc(100vw - 18px)) !important; }
    .cart-dropdown-panel > ul { max-height: min(340px, 44vh); }
}

/* A full cart card travels to the marked lower centre of the home slider. */
.cart-dropdown-panel > ul > li.sp-cart-item-departing {
    opacity: .25;
    pointer-events: none;
}

.sp-cart-flight-stage.cart-dropdown-panel {
    position: fixed !important;
    z-index: 2147483646 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    border: 1px solid #afcee5 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 16px 34px rgba(15, 56, 93, .27) !important;
    will-change: transform, opacity;
}

.sp-cart-flight-stage.cart-dropdown-panel > ul {
    width: 100%;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.sp-cart-flight-stage.cart-dropdown-panel > ul > li {
    min-height: 100%;
    height: 100%;
    border: 0 !important;
    background: #fff !important;
}

.sp-cart-trash-target {
    position: fixed;
    z-index: 2147483645;
    width: 172px;
    height: 140px;
    opacity: 0;
    transform: translateY(24px) scale(.82);
    transform-origin: 50% 100%;
    transition: opacity .22s ease, transform .32s cubic-bezier(.2,1.3,.3,1);
    pointer-events: none;
    color: #fff;
    isolation: isolate;
}

.sp-cart-trash-target.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.sp-cart-trash-target.is-leaving { opacity: 0; transform: translateY(16px) scale(.84); }

.sp-cart-trash-glow {
    position: absolute;
    inset: 26px 0 5px;
    border-radius: 40%;
    background: radial-gradient(ellipse, rgba(28, 142, 209, .55), transparent 72%);
    filter: blur(11px);
}

.sp-cart-trash-body {
    position: absolute;
    top: 35px;
    left: 22px;
    display: grid;
    width: 128px;
    height: 85px;
    place-items: center;
    border: 3px solid #b9e4ff;
    border-radius: 9px 9px 22px 22px;
    background: linear-gradient(145deg, #258ac5, #0a4c82 75%);
    box-shadow: inset 0 0 0 2px #ffffff29, 0 13px 24px #042b5180;
}

.sp-cart-trash-body svg {
    width: 45px;
    height: 45px;
    color: #eaf8ff;
    filter: drop-shadow(0 2px 2px #06385a);
}

.sp-cart-trash-lid {
    position: absolute;
    top: 23px;
    left: 15px;
    z-index: 2;
    width: 142px;
    height: 21px;
    border: 3px solid #c6eaff;
    border-radius: 7px;
    background: linear-gradient(#459cce, #176295);
    box-shadow: 0 5px 8px #082c5b55;
    transform-origin: 13px 16px;
    transition: transform .28s cubic-bezier(.24,1.3,.37,1);
}

.sp-cart-trash-lid::before {
    position: absolute;
    top: -11px;
    left: 53px;
    width: 31px;
    height: 9px;
    border: 2px solid #c6eaff;
    border-radius: 6px 6px 0 0;
    background: #247aaf;
    content: '';
}

.sp-cart-trash-target.is-open .sp-cart-trash-lid { transform: rotate(-28deg) translate(-3px, -4px); }
.sp-cart-trash-target.is-received .sp-cart-trash-body { animation: sp-cart-bin-receive .36s ease-out; }

.sp-cart-trash-caption {
    position: absolute;
    right: -27px;
    bottom: -1px;
    left: -27px;
    padding: 5px 8px;
    border: 1px solid #d4eaff;
    border-radius: 20px;
    color: #0d4e7b;
    background: #fff;
    box-shadow: 0 4px 14px #123e5955;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

@keyframes sp-cart-bin-receive {
    35% { transform: scale(1.09); }
    70% { transform: scale(.96); }
}

@media (max-width: 575px) {
    .sp-cart-trash-target { transform-origin: 50% 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .sp-cart-trash-target, .sp-cart-trash-lid, .sp-cart-trash-target.is-received .sp-cart-trash-body {
        animation: none !important;
        transition: none !important;
    }
}

/* The removed book becomes a small folded sheet before entering the bin. */
.table--cart tr.sp-cart-item-departing,
.cart-dropdown-panel > ul > li.sp-cart-item-departing {
    opacity: .28;
    pointer-events: none;
}

.sp-cart-paper {
    position: fixed;
    z-index: 2147483646;
    box-sizing: border-box;
    width: 64px;
    height: 78px;
    padding: 20px 10px 9px;
    overflow: hidden;
    pointer-events: none;
    border: 1px solid #a9bfd4;
    border-radius: 4px 12px 4px 4px;
    background: linear-gradient(145deg, #fff 70%, #e7f2fb);
    box-shadow: 0 12px 22px rgba(16, 59, 96, .25);
    transform-origin: center;
    will-change: transform, opacity;
}

.sp-cart-paper::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-bottom: 1px solid #a9bfd4;
    border-left: 1px solid #a9bfd4;
    border-radius: 0 0 0 4px;
    background: #dcecf8;
    content: '';
}

.sp-cart-paper span {
    display: block;
    height: 3px;
    margin-bottom: 7px;
    border-radius: 3px;
    background: #a9c9df;
}

.sp-cart-paper span:nth-child(2) { width: 78%; }
.sp-cart-paper span:nth-child(3) { width: 88%; }
.sp-cart-paper span:nth-child(4) { width: 62%; }

