.header-cart {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    width: 80px;
}
.header-cart[data-num-cart-items]::before {
    content: attr(data-num-cart-items);
    position: absolute;
    top: 50%;
    left: 60%;
    border-radius: 100%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    background-color: var(--colour-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.header-cart.active::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
    rotate: 45deg;
    background-color: var(--colour-black);
    width: 20px;
    height: 20px;
    border-top: 1px solid var(--colour-white);
    border-left: 1px solid var(--colour-white);
    cursor: default;
    clip-path: polygon(0 100%, 0 0, 100% 0, 70% 70%);
}

#cart-popup {
    position: fixed;
    top: calc(var(--header-top-height) + 10px);
    right: 10px;
    display: none;
    width: 400px;
    border: 1px solid var(--colour-white);
    border-radius: 6px;
    z-index: 1000;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: var(--colour-black);
    box-sizing: border-box;
}
#cart-popup.visible {
    display: flex;
}

#cart-popup > .divider {
    margin-top: 8px;
    margin-bottom: 8px;
}

.cart-popup-button {
    cursor: pointer;
    background-color: var(--colour-blue);
    align-self: center;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.cart-popup-item {
    display: flex;
    gap: 12px;
    align-items: center;
    height: calc(120px * var(--scale));
    width: 100%;
    border: 1px solid var(--colour-grey);
    padding: 4px;
    box-sizing: border-box;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-popup-item > img {
    height: 100%;
    width: calc(200px * var(--scale));
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
}

.cart-popup-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.cart-popup-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-size: calc(16px * var(--scale));
}

.cart-popup-item-quantity-cont {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: calc(14px * var(--scale));
}

.cart-popup-item-quantity {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--colour-grey);
    box-sizing: border-box;
    width: fit-content;
    font-size: calc(18px * var(--scale));
}

.cart-popup-item-quantity > * {
    padding: 4px;
    border-right: 1px solid var(--colour-grey);
    width: calc(32px * var(--scale));
    height: calc(14px * var(--scale));
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-popup-item-quantity > *:last-child {
    border-right: none;
}

.cart-popup-item-quantity > i {
    cursor: pointer;
    font-size: calc(14px * var(--scale));
    width: calc(14px * var(--scale));
}

.cart-popup-item-price {
    font-size: calc(22px * var(--scale));
}

.store-item.discount > .store-item-price::after, .cart-popup-item.discount .cart-popup-item-price::after {
    content: attr(data-original-price);
    text-decoration: line-through;
    color: var(--colour-red);
    font-size: 18px;
    align-self: center;
    margin-left: 8px;
}
.cart-popup-item.discount .cart-popup-item-price::after {
    font-size: calc(18px * var(--scale));
}