:root {
    --bg1: #fff;
    --bg2: #fff;
    --text1: #fff;
    --font-size-small: 14px;
    --button-font-size: 15px;
    --font-size-large: 24px;
    --font-family: Poppins, sans-serif;
    --p-border: none;
    --p-border-top: none;
    --p-border-radius: none;
    --btn-border-radius: none;
    --p-margin: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    touch-action: manipulation;
    font-family: var(--font-family);
    background-color: var(--bg1);
    margin: 0;
}

.bPadd {
    padding: var(--b-padding);
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.search-bar-box {
    background-color: var(--bg2);
    margin: 0;
    padding: 20px 15px 1px 15px;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
    padding: 5px 5px 5px 5px;
    background-color: var(--input-bg);
    border-radius: var(--p-border-radius);
    color: var(--text1);
}

input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: none;
    background-color: var(--input-bg);
    color: var(--text1);
}

input::placeholder {
    color: var(--text1);
}

.input-checkout {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 10px;
    border-radius: var(--p-border-radius);
    font-family: var(--font-family);
    background-color: var(--bg1);
    border: 1px solid var(--text2);
    color: var(--text2);
    font-size: 16px;
}

.input-checkout.has-error,
select.has-error {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}
.field-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
}
.checkout-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promo-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.promo-input {
    flex: 1;
}
.promo-btn {
    padding: 0 16px;
    background: var(--btn1, #0746ea);
    color: var(--btn1-text, #fff);
    border: none;
    border-radius: var(--p-border-radius, 10px);
    font: 600 14px Poppins, system-ui, sans-serif;
    cursor: pointer;
    white-space: nowrap;
}
.promo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.promo-feedback {
    margin-top: 6px;
    font-size: 13px;
    min-height: 18px;
}
.promo-feedback.is-valid {
    color: #15803d;
}
.promo-feedback.is-invalid {
    color: #b91c1c;
}
.promo-input.is-applied {
    background: #f0fdf4;
    border-color: #15803d;
    color: #1a1a1a;
    font-weight: 600;
}

.categories {
    display: flex;
    overflow-x: auto;
    list-style-type: none;
    justify-content: space-between;
    padding: 15px;
    background-color: var(--bg2);
    color: var(--text1);
}

.categories li {
    padding: 0 15px;
    cursor: pointer;
    white-space: nowrap;
}

main {
    display: flex;
    flex-direction: column;
    padding: 15px;
    margin-bottom: 100px;
}

.product {
    display: flex;
    align-items: center;
    background-color: var(--bg1);
    border: var(--p-border);
    border-top: var(--p-border-top);
    padding: var(--p-padding);
    border-radius: var(--p-border-radius);
    margin: var(--p-margin);
}

.product img {
    object-fit: contain;
    object-position: center;
    width: 160px;
    height: 160px;
    border-radius: var(--p-border-radius);
    margin-right: 15px;
    flex-shrink: 0;
}

.product-details {
    flex-grow: 1;
}

.product h2 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text2);
    font-family: var(--font-family);
}

.product p {
    font-size: 12px;
    margin-bottom: 12px;
    color: var(--text2);
    font-family: var(--font-family);
}

.product button {
    display: flex;
    align-items: center;
    padding: 10px 40px;
    border: 1px solid var(--bg1);
    background-color: var(--btn1);
    color: var(--btn1-text);
    border-radius: var(--btn-border-radius);
    cursor: pointer;
    font-weight: 800;
    transition: 0.2s;
}

/* Hover-state alleen op apparaten die echt hoveren (desktop), niet op touch */
@media (hover: hover) {
    .product button:hover {
        background-color: var(--btn2);
        color: var(--btn2-text);
        border: 1px solid var(--btn2);
    }
}

.product-list {
    padding: 0;
    margin-top: 150px;
}

.icon {
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
    margin: 1px;
}

.navlist {
    display: flex;
    align-items: center;
    align-content: center;
    text-align: center;
    color: var(--text1);
    transition: 0.2s;
}

.navlist:hover {
    color: var(--text1-hover);
}

.btn-text {
    padding: 0 20px;
    font-size: 15px;
}

.sticky-cart-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--cart-icon);
    color: var(--cart-icon-text);
    border-radius: 50%;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
    font-size: 28px;
    z-index: 999;
    border: 1px solid var(--cart-icon);
}

.sticky-cart-icon:hover {
    background-color: var(--bg1);
    color: var(--text1);
    border: 1px solid var(--text1);
}

.checkbox-group input {
    margin-right: 10px;
    width: 20px;
}

/* ==== CHECKOUT ==== */

.checkout-button {
    width: 100%;
    padding: 15px;
    background-color: var(--btn1);
    border: 1px solid var(--btn1);
    color: var(--btn1-text);
    border-radius: var(--btn-border-radius);
    cursor: pointer;
    font-size: 1.2em;
    transition: 0.2s;
}

.checkout-button:hover {
    background-color: var(--bg1);
    color: var(--text1);
    border: 1px solid var(--text1);
}

.back {
    color: var(--text1);
    cursor: pointer;
}

.checkout-header .back {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.checkout-header {
    position: sticky;
    top: 0;
    background-color: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.checkout-header h1 {
    margin: 0;
    color: var(--text1);
    font-size: 22px;
    font-weight: 400;
}

.checkout-header p {
    margin: 0;
    font-size: 1.5em;
}

.container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

select {
    padding: 12px 10px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text2);
}

.form-group .input-checkout,
.form-group select,
.form-group textarea {
    color: var(--text2);
}

.form-group .input-checkout::placeholder,
.form-group textarea::placeholder {
    color: var(--text2);
    opacity: 0.6;
}

.tip-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.tip-buttons button {
    flex: 1;
    margin-right: 5px;
    padding: 10px;
    background-color: var(--btn1);
    color: var(--btn1-text);
    border-radius: var(--btn-border-radius);
    border: 1px solid var(--btn1);
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.tip-buttons button:last-child {
    margin-right: 0;
}

.tip-buttons button:hover {
    background-color: var(--bg1);
    color: var(--text1);
    border: 1px solid var(--text1);
}

.total-list {
    list-style-type: none;
    padding: 0;
    margin: 16px 0 24px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.total-list li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: var(--text2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text2);
}

/* ======================== geoptimaliseerd ========================== */

@media (min-width: 768px) {
    main {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .product {
        flex: 0 0 48%;
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1001;
    pointer-events: none;
    transition: background-color 0.25s ease;
    box-sizing: border-box;
}
.overlay.is-open {
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

body.no-scroll {
    overflow: hidden;
}

#popup {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    box-sizing: border-box;
}

/* ==== Bottom sheet ==== */
.sheet {
    background: #fff;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    color: #1a1a1a;
    isolation: isolate;
}
.sheet.is-visible {
    transform: translateY(0);
}

/* Desktop: modal in het midden + hoger in beeld, afgeronde hoekjes rondom */
@media (min-width: 741px) {
    .overlay,
    #popup {
        align-items: center;
    }
    .sheet {
        max-height: 80vh;
        min-height: 60vh;
        border-radius: 16px;
    }
}

.sheet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0;
    transform: translateZ(0);
}
.sheet-close:hover {
    background: #fff;
}
.sheet-close .material-icons {
    font-size: 22px;
    color: #333;
}

.sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
}

/* Sheet heeft eigen vaste donkere tekstkleur (onafhankelijk van tenant --text1) */
.sheet {
    color: #1a1a1a;
}

.sheet-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f3f3;
}
.sheet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sheet-head {
    padding: 16px 20px 12px;
}
.sheet-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}
.sheet-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

.sheet-section {
    padding: 16px 20px 4px;
    border-top: 8px solid #f5f5f5;
}
.sheet-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.sheet-section-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.sheet-section-sub {
    font-size: 12px;
    color: #666;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f0f0f0;
}
.sheet-section-sub.is-required {
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

.sheet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sheet-list-item {
    border-bottom: 1px solid #eee;
}
.sheet-list-item:last-child {
    border-bottom: none;
}
.sheet-list-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}
.sheet-list-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.sheet-list-name {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    text-align: left;
}
.sheet-list-price {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
    text-align: left;
}
.sheet-radio,
.sheet-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    cursor: pointer;
    margin-left: auto;
    margin-right: 0;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}
.sheet-radio:checked,
.sheet-checkbox:checked {
    border-color: var(--btn1, #0746ea);
    background: var(--btn1, #0746ea);
}
.sheet-radio:checked::after,
.sheet-checkbox:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.sheet-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}
.sheet-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.sheet-qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1a;
}
.sheet-qty-btn .material-icons {
    font-size: 20px;
    color: #1a1a1a;
}
.sheet-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.sheet-qty-label {
    min-width: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}
.sheet-add-btn {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--btn1, #0746ea);
    color: var(--btn1-text, #fff);
    border: none;
    border-radius: var(--btn-border-radius, 12px);
    cursor: pointer;
    font: 600 16px Poppins, system-ui, sans-serif;
}
.sheet-add-btn.is-disabled,
.sheet-add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.sheet-section.has-error {
    outline: 2px solid #e11900;
    outline-offset: -2px;
    animation: sheetShake 0.3s ease-in-out;
}
@keyframes sheetShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.sheet-add-price {
    font-weight: 700;
}

/* ==== Image modal ==== */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    padding: 20px;
    box-sizing: border-box;
}
.image-modal.is-open {
    display: flex;
}
.image-modal-wrap {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: inline-block;
}
.image-modal-wrap img {
    max-width: 100%;
    max-height: calc(100vh - 40px);
    object-fit: contain;
    border-radius: 8px;
    display: block;
}
.image-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 0;
}
.image-modal-close:hover {
    background: #fff;
}
.image-modal-close .material-icons {
    font-size: 22px;
    color: #333;
}

.upsell-list {
    padding: 5px 0;
    flex-grow: 1;
    max-height: 50vh;
    overflow-y: auto;
}

.upsell-item {
    display: flex;
    align-items: center;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.popup .close-btn {
    cursor: pointer;
    font-size: 1.5em;
    color: #000;
    position: absolute;
    top: 15px;
    right: 15px;
}

.popup .close-btn:hover {
    color: #999;
}

.popup-content {
    padding: 5px 0;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.popup-footer .quantity-control {
    display: flex;
    align-items: center;
}

#addtocart,
.addToCart {
    margin-left: 15px;
}

.popup-footer .quantity-control button {
    padding: 15px 20px;
    background-color: var(--btn1);
    color: var(--btn1-text);
    border: none;
    cursor: pointer;
    border-radius: var(--btn-border-radius);
}

.popup-footer .quantity-control button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.popup-footer button {
    padding: 15px 20px;
    background-color: var(--btn1);
    color: var(--btn1-text);
    border: none;
    cursor: pointer;
    border-radius: var(--btn-border-radius);
    width: 100%;
    font-family: poppins;
    font-size: 16px;
}

.popup-footer button:hover {
    background-color: #424242;
    color: #fff;
}

.popup-footer .quantity-control label {
    margin: 0 20px;
}

.upsell {
    margin: 8px 10px 8px 0;
    width: 20px;
    height: 20px;
}

.upsell:hover {
    cursor: pointer;
}

li {
    display: flex;
    align-items: center;
    align-content: center;
    text-align: center;
    color: #000;
}

.overlay2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup2 {
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    padding: 15px;
    box-sizing: border-box;
    border-radius: var(--p-border-radius);
    position: relative;
}

.popup-header2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.popup2 .close-btn2 {
    cursor: pointer;
    font-size: 1.5em;
    color: #000;
    position: absolute;
    top: 15px;
    right: 15px;
}

.popup2 .close-btn2:hover {
    color: #999;
}

#cart-items {
    max-height: 50vh;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.quantity-control2 {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.product-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.product-name,
.product-price {
    margin: 0;
}

.product-price {
    margin-top: 5px;
}

.quantity-control2 i {
    color: #000;
    cursor: pointer;
}

.quantity-control2 i:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.quantity-control2 label {
    margin: 0 10px;
}

.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 0 0;
    font-weight: bold;
    font-size: 18px;
}

.checkout {
    padding: 15px 20px;
    margin-top: 15px;
    background-color: var(--btn1);
    color: var(--btn1-text);
    border: none;
    cursor: pointer;
    border-radius: var(--p-border-radius);
    width: 100%;
    font-family: poppins;
    font-size: 16px;
}

.checkout:hover {
    background-color: #424242;
    color: #fff;
}

.product-name {
    margin: 0 25px;
}

.category-hidden {
    display: none;
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: #fff;
    font-size: 12px;
    border-radius: 50%;
    padding: 3px 7px;
    font-weight: bold;
    display: none;
}

.cart-fade {
    position: absolute;
    bottom: 120px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, rgba(112,112,112,0), rgba(112,112,112,.5));
    pointer-events: none;
    z-index: 2;
}

.product-fade {
    position: absolute;
    bottom: 84px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, rgba(112,112,112,0), rgba(112,112,112,.5));
    pointer-events: none;
    z-index: 2;
}