.product-listing {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-left: 0;
}
.product p {
    margin-bottom: 0.5rem;
}
.product > .add-to-cart p {
    margin-bottom: 0;
}

.product-listing > .product {
    border: solid 1px #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px; 
    width: calc(100% / 2 - 7.5px); 
}
.product > img {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}
.product > .product-info, .product > .add-to-cart > form {
    padding: 1rem;
}
.product > .product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product > .add-to-cart > form {
    align-items: center;
    background: #efefef;
    display: flex;
    flex-wrap: wrap;
}
.product > .add-to-cart > form > p, .product > .add-to-cart input[type="number"] {
    margin-right: 0.5rem;
}
.product > .add-to-cart > form > div {
    display: flex;
}
.product > .add-to-cart input[type="number"] {
    padding: 0.25rem 0.5rem;
}
.product > .add-to-cart input[type="submit"], .ssq-minicart-submit #ssq-cart-checkout, .ssq-minicart-submit #ssq-cart-edit, .ssq-minicart-submit #ssq-cart-checkout:visited, .ssq-minicart-submit #ssq-cart-edit:visited {
    background: #007DB3;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    line-height: normal;
    margin-right: 0;
    padding: 0.5rem;
    transition: background 0.1s;
    text-decoration: none;
    flex-shrink: 0;
}
.add-to-cart input[type="button"]:hover {
     background: #0071A1;
     transition: background 0.1s;
}
.ssq-minicart-submit #ssq-cart-checkout, .ssq-minicart-submit #ssq-cart-checkout:visited {
    background: #9ac02c;
}

#minicart {
    padding-left: 0;
}
.ssq-minicart-cards {
    display: none !important;
}
.ssq-minicart-empty {
    padding: 1rem;
}


@media screen and (min-width: 768px){
    .product-listing > .product {
        width: calc(100% / 4 - 7.5px);
    }
    .product > .product-info, .product > .add-to-cart > form {
        flex-wrap: nowrap;
        padding: 0.5rem;
    }
}


.digital-copy {
    margin-top: auto;
}

/* shims added for minicart v3 */
#ssq-minicart-qgds-bs5 {
    margin-bottom: 2rem;
}
#ssq-minicart-view {
    .qld-table {
        border: 1px solid var(--qld-neutral-lighter);
        border-radius: .75rem;
        table {
            thead th, tbody td, tfoot th, tfoot td {
                padding: 0.75rem;
            }
            margin: auto;
            caption, caption > span {
                color: var(--qld-color-default-color-light-text-heading);
                font-size: 1.25rem;
                font-weight: 600;
            }
            caption > span {
                display: inline;
            }
            tfoot {
                box-shadow: 0 -2px 0 var(--qld-light-accent);
            }
            thead th {
                box-shadow: inset 0 -2px 0 var(--qld-light-accent);
            }
            tfoot > tr > th {
                color: var(--qld-color-default-color-light-text-heading);
            }
        }
    }
}

.ssq-minicart-submit {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    a.btn.btn-primary {
        color: var(--brand-light-action-text);
    }
}
.ssq-minicart-submit, #ssq-minicart-history-text {
        margin-top: 1rem;
}

.ssq-minicart-empty.alert {
    background: var(--brand-light-background);
    border-color: var(--alert-info);
    border-width: 0.125rem 0.125rem 0.125rem 3.75rem;
    border-style: solid;
    border-radius: 0.25rem;
    max-width: 85ch;
    word-wrap: break-word;
    padding: 1rem 1.25rem;
    margin: 1rem auto 1rem 0;
    position: relative;
    p {
        color: var(--brand-light-text);
        margin: 0;
    }
    &:after {
        color: var(--brand-dark-text);
        content: '\f05a';
        font-family: 'Font Awesome 6 Pro';
        font-weight: 300;
        font-size: 1.5rem;
        position: absolute;
        height: 1.125rem;
        width: 1.125rem;
        top: calc(50% - 1rem);
        left: -2.6rem;
    }
}