/* Winkelwagen-icoon in navigatie + cart-pagina */

/* Desktop: 3-koloms grid — logo | gecentreerd menu | acties (menu staat echt in het midden) */
nav {
    gap: 0.35rem;
}

nav > ul {
    justify-content: center !important;
    min-width: 0 !important;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 769px) {
    nav {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
        align-items: center !important;
        position: relative !important;
    }

    nav > a:first-of-type {
        grid-column: 1;
        justify-self: start;
    }

    nav > ul {
        grid-column: 2;
        justify-self: center;
        display: flex !important;
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        flex: none !important;
        width: max-content !important;
        max-width: min(94vw, 56rem) !important;
        flex-wrap: wrap;
        pointer-events: auto !important;
        z-index: 1;
    }

    nav > .nav-actions {
        grid-column: 3;
        justify-self: end;
    }
}

/* Mobiel: klassieke flex-regel; ul full-screen overlay blijft per pagina */
@media (max-width: 768px) {
    nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    nav > ul {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        max-width: none !important;
        width: auto !important;
        pointer-events: auto !important;
        grid-column: unset !important;
    }

    nav > .nav-actions {
        margin-left: auto !important;
        grid-column: unset !important;
        justify-self: unset !important;
    }
}

.nav-actions {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    gap: 0.35rem !important;
    margin-left: auto !important;
}

@media (min-width: 769px) {
    .nav-actions {
        margin-left: 0 !important;
    }
}

.nav-lang {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
}

.nav-lang__link,
.nav-lang__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 2.25rem;
    height: 30px;
    padding: 0 0.5rem;
    border-radius: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.nav-lang__link {
    color: #fff !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-lang__link:hover {
    background: rgba(255, 255, 255, 0.24) !important;
    border-color: rgba(255, 255, 255, 0.35);
}

/* Wint van per-pagina `.nav-lang a { padding; letter-spacing; … !important }` */
.nav-lang a.nav-lang__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
    min-width: 2.25rem !important;
    width: auto !important;
    height: 30px !important;
    padding: 0 0.5rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.nav-lang a.nav-lang__link:hover {
    background: rgba(255, 255, 255, 0.24) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.nav-lang__current {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.38);
    cursor: default;
    color: #fff;
}

/* Lokale SVG’s (geen data:-URL) — werkt met strikte CSP na deploy */
.nav-lang__icon {
    display: inline-block;
    width: 1.15rem;
    height: 0.78rem;
    flex-shrink: 0;
    border-radius: 2px;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.nav-lang__icon--nl {
    background-image: url("fotosoverig/flags/nl.svg");
}

.nav-lang__icon--gb {
    background-image: url("fotosoverig/flags/gb.svg");
}

.nav-lang .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-right: 0;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s ease;
    font-size: 1.45rem;
    line-height: 1;
}

.nav-cart i {
    font-size: 1.45rem;
}

.nav-cart:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-cart__badge {
    position: absolute;
    top: 6px;
    right: 5px;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2rem;
    text-align: center;
    background: #345939;
    color: #fff;
    border-radius: 999px;
    box-sizing: border-box;
}

.nav-cart__badge[hidden] {
    display: none !important;
}

.epoch-btn--cart.is-added {
    background: #2a4a30 !important;
}

/* Cart page */
.cart-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3.5rem;
    width: 100%;
    box-sizing: border-box;
}

.cart-page h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: #1e3324;
}

.cart-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(30, 51, 36, 0.1);
    color: #6b7670;
    font-size: 1.05rem;
}

.cart-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid rgba(30, 51, 36, 0.12);
    background: #fff;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.cart-table th,
.cart-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(30, 51, 36, 0.08);
    vertical-align: middle;
}

.cart-table th {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7670;
    background: #f4f6f4;
}

.cart-table__num {
    text-align: right;
    white-space: nowrap;
}

.cart-table__qty input {
    width: 3.5rem;
    padding: 0.35rem 0.4rem;
    border: 1px solid #e3e8e5;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
}

.cart-line__sku {
    font-size: 0.82rem;
    color: #6b7670;
}

.cart-table__cell-value {
    font-weight: 700;
    text-align: right;
}

.cart-table td.cart-table__qty .cart-table__cell-value {
    display: block;
    text-align: right;
}

.cart-remove {
    border: none;
    background: rgba(52, 89, 57, 0.1);
    color: #345939;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.cart-remove:hover {
    background: rgba(52, 89, 57, 0.2);
}

.cart-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(30, 51, 36, 0.12);
}

.cart-summary__vat {
    font-size: 0.88rem;
    font-weight: 600;
    color: #5a6560;
    white-space: normal;
}

.cart-summary__shipping-note {
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #6b7670;
    font-weight: 600;
    max-width: 18rem;
}

.cart-summary__shipping-note strong {
    display: block;
    font-weight: 800;
    color: #2a3330;
}

.cart-summary__shipping-note__detail {
    display: block;
    margin-top: 0.08rem;
}

.cart-summary__total {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e3324;
}

.cart-summary__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.cart-note {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: #6b7670;
    line-height: 1.55;
}

.cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.82rem 1.35rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.94rem;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.cart-btn--primary {
    background: #345939;
    color: #fff;
}

.cart-btn--primary:hover {
    background: #2a4a30;
    color: #fff;
}

.cart-btn--ghost {
    background: transparent;
    color: #1e3324;
    border: 2px solid #345939;
}

.cart-btn--ghost:hover {
    background: rgba(52, 89, 57, 0.08);
}

.cart-btn:disabled,
.cart-btn.cart-btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cognito-formulier in overlay (zelfde patroon als Fiat-reservering) */
.cart-request-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    align-content: center;
    z-index: 2000;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

.cart-request-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: min(500px, 100%);
    min-width: 0;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    max-height: min(90vh, calc(100dvh - 24px));
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Cognito seamless: ingesloten inhoud niet breder dan paneel */
.cart-request-panel iframe,
.cart-request-panel > div {
    max-width: 100% !important;
    box-sizing: border-box;
}

.cart-request-panel h3 {
    color: #345939;
    font-size: 1.5rem;
    margin: 0 0 20px;
    text-align: center;
    word-wrap: break-word;
}

.cart-request-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    z-index: 1;
    line-height: 1;
}

@media (max-width: 768px) {
    .cart-page {
        padding: 1.25rem 0.9rem 2.5rem;
        max-width: 100%;
    }

    .cart-note {
        font-size: 0.86rem;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .cart-request-overlay {
        align-items: flex-start;
        padding-top: max(8px, env(safe-area-inset-top, 0px));
    }

    .cart-request-panel {
        padding: 1rem 0.85rem 1.25rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        max-height: none;
    }

    .cart-request-panel h3 {
        font-size: 1.15rem;
        padding-right: 2.25rem;
    }

    .cart-request-close {
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 640px) {
    .cart-table-wrap {
        overflow-x: visible;
        border: none;
        background: transparent;
        padding: 0;
    }

    .cart-table {
        display: block;
        width: 100%;
        font-size: 0.88rem;
    }

    .cart-table thead {
        border: 0;
        clip: rect(0, 0, 0, 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .cart-table tbody {
        display: block;
        width: 100%;
    }

    .cart-table tbody tr {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid rgba(30, 51, 36, 0.12);
        border-radius: 14px;
        padding: 0.75rem 0.9rem;
        margin-bottom: 0.85rem;
    }

    .cart-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .cart-table tbody td {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.35rem 0.75rem;
        padding: 0.4rem 0;
        border: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        text-align: left !important;
        vertical-align: middle;
    }

    .cart-table tbody td::before {
        content: attr(data-label);
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #6b7670;
        flex: 0 0 auto;
        max-width: 45%;
    }

    .cart-table tbody td.cart-table__cell--product {
        display: block;
        padding-bottom: 0.6rem;
        margin-bottom: 0.35rem;
        border-bottom: 1px solid rgba(30, 51, 36, 0.08);
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .cart-table tbody td.cart-table__cell--product::before {
        display: none;
    }

    .cart-table tbody td.cart-table__cell--action {
        justify-content: flex-end;
        padding-top: 0.55rem;
        margin-top: 0.2rem;
        border-top: 1px solid rgba(30, 51, 36, 0.08);
    }

    .cart-table tbody td.cart-table__cell--action::before {
        display: none;
    }

    .cart-table__cell-value {
        flex: 1 1 auto;
        text-align: right !important;
        min-width: 0;
    }

    .cart-table__cell-value--qty {
        flex: 0 0 auto;
    }

    .cart-table__qty input {
        width: 4rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .cart-table__num {
        white-space: normal;
    }

    .cart-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-summary__actions {
        flex-direction: column;
    }

    .cart-btn {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Contactpagina: Cognito seamless binnen schermbreedte */
.contact-form {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.contact-form iframe,
.contact-form > div {
    max-width: 100% !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .contact-form {
        padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    }
}
