.custom-cart-items {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 30px 0;
    border-bottom: 1px solid #e5e5e5;
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item:last-child {
    border-bottom: none;
}
.cart-item-thumb {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    gap: 0 20px;
    min-height: 120px;
}

.cart-item-info {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    color: #000;
    font-family: "Bebas Neue";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: uppercase;
    }

.cart-item-name:hover {
    color: #5c4a3d;
}

.cart-item-delivery {
    font-size: 14px;
    color: #333;
    margin: 4px 0 0 0;
    justify-content: flex-start !important;
}

.cart-item-delivery,
.cart-item-delivery strong {
    display: inline;
}

.cart-item-delivery strong {
    color: #333;
    font-weight: 600;
    margin-right: 5px;
}

.cart-item-qty {
    display: inline-flex;
    border: 1px solid #ccc;
    margin-top: auto;
    width: fit-content;
}

.qty-btn {
    width: 32px;
    height: 34px;
    background: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f5f5f5;
}

.qty-input {
    width: 40px;
    height: 34px;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.cart-item-end {
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.remove-item {
    background: none;
    border: none;
    font-size: 22px;
    font-weight: 400;
    color: #d64545;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: opacity 0.2s;
}

.remove-item:hover {
    opacity: 0.7;
}

.cart-item-total {
    font-size: 16px;
    color: #333;
    font-weight: 400;
}

.cart-loader {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
}

.cart-loader.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-loader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #5c4a3d;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty cart */
.custom-cart-empty {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.custom-cart-empty p {
    color: #000;
	font-family: 'Impact', Helvetica, Arial, Lucida, sans-serif;
    font-weight: normal;
    font-size: 40px;
}

.empty-cart-btn {
    padding: 5px 60px;
    font-family: 'Impact', Helvetica, Arial, Lucida, sans-serif;
    text-transform: uppercase;
    color: var(--gcid-primary-color);
    font-size: 20px;
    background-color: var(--gcid-link-color) !important;
    transition: all 0.3s ease;
}

.empty-cart-btn:hover {
    background: #000 !important;
    color: #fff !important;
}

.cart-item-options {
    margin: 6px 0 0 0;
}

.cart-item-options dl.variation {
    margin: 0;
    padding: 0;
}

.cart-item-options dl.variation dt,
.cart-item-options dl.variation dd {
    display: inline;
    margin: 0;
    color: #000;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-style: normal;
    line-height: normal;
}

.cart-item-options dl.variation dt {
    font-weight: 700;
}

.cart-item-options dl.variation dd {
    font-weight: 400;
}

/* Line break after each value to get one option per row */
.cart-item-options dl.variation dd::after {
    content: "";
    display: block;
}

.cart-item-options dl.variation dd p {
    margin: 0;
    padding: 0;
    display: inline;
    font: inherit;
    color: inherit;
}

/* Mobile view (0 - 981px) */
@media (max-width: 981px) {
    .cart-item {
        display: grid;
        grid-template-columns: 100px 1fr auto;
        grid-template-rows: auto auto;
        gap: 10px 15px;
        padding: 20px 0;
    }

    .cart-item-thumb {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 100px;
        height: 100px;
    }

    .cart-item-content {
        display: contents;
    }

    .cart-item-info {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .cart-item-name {
        font-size: 15px;
    }

    .cart-item-delivery {
        display: none;
    }

    .cart-item-qty {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }

    .cart-item-end {
        grid-column: 3;
        grid-row: 1 / -1;
        justify-content: space-between;
    }

    .remove-item {
        font-size: 20px;
    }

    .cart-item-total {
        font-size: 15px;
    }

    #ww-checkout-totals .et_pb_blurb:not(#cadeau-coupon) {
        display: none !important;
    }

    #ww-checkout-products .et_pb_blurb {
        display: block !important;
    }
}

/* Desktop/tablet landscape view (982px+) */
@media (min-width: 982px) {

    #ww-checkout-products .et_pb_blurb {
        display: none !important;
    }
    #ww-checkout-totals .et_pb_blurb {
        display: block !important;
    }

    body.page-winkelwagen-2,
    body.page-winkelwagen-2 #page-container {
        overflow: visible !important;
        overflow-x: clip !important;
    }

    .et_pb_row:has(#ww-checkout-totals) {
        align-items: flex-start !important;
    }

    #ww-checkout-totals.et_pb_column {
        position: sticky !important;
        top: 260px !important;
    }
}

#ga-verder-met-bestellen,
#ga-verder-met-bestellen .et_pb_button_module_wrapper,
#ga-verder-met-bestellen .et_pb_button_module_wrapper a {
    width: 100% !important;
    display: block !important;
}

a#ga-verder-met-bestellen,
#ga-verder-met-bestellen .et_pb_button,
#ga-verder-met-bestellen .et_pb_button_module_wrapper a.et_pb_button {
    width: 100% !important;
    text-align: center !important;
}

#ww-checkout-totals .et_pb_text_inner p {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.cart-total-display {
    margin-left: auto !important;
}

* Verberg de H1 titel wanneer winkelwagen leeg is */
.et_pb_text:has(.custom-cart-empty) ~ .et_pb_post_title,
.et_pb_row:has(.custom-cart-empty) .et_pb_post_title,
body:has(.custom-cart-empty) .et_pb_post_title_0 {
    display: none !important;
}

body:has(.custom-cart-empty) #ww-checkout-totals {
    display: none !important;
}

body:has(.custom-cart-empty) #ww-checkout-products {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

body:has(.custom-cart-empty) #ww-checkout-products .et_pb_blurb {
    display: none !important;
}

body:has(.custom-cart-empty) .et_pb_row:has(#ww-checkout-products) {
    justify-content: center !important;
}

body:has(.custom-cart-empty) .et_pb_row_0 {
    display: none !important;
}

body:has(.custom-cart-empty) .custom-cart-empty {
    padding: 80px 20px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.cart-is-empty .et_pb_post_title_0 {
    display: none !important;
}

body.cart-is-empty #ww-checkout-totals {
    display: none !important;
}

body.cart-is-empty #ww-checkout-products {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

body.cart-is-empty #ww-checkout-products .et_pb_blurb {
    display: none !important;
}

body.cart-is-empty .et_pb_row_0 {
    display: none !important;
}

.custom-cart-empty .empty-subtitle {
    font-size: 12px;
    color: #000;
    margin-bottom: 15px;
    font-weight: 400;
	font-family: 'inter', sans-serif;
}

.empty-title {
	padding-bottom: 0px !important;
	line-height: 1.7em;
}

.variation-Typelevering {
    display: none !important;
}

@media (max-width: 530px) {
    .cart-item-options dl.variation dt,
    .cart-item-options dl.variation dd {
        font-size: 10px;
    }

    .cart-item-thumb {
        width: 80px;
        height: 80px;
    }
    .cart-item {
        grid-template-columns: 80px 1fr auto;
    }
}
