/* =========================================================
   MOBIEL LAYOUT (max 768px)
========================================================= */
@media (max-width: 768px) {

    html, body {
        overflow-x: hidden !important;
    }

    
    h1 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }


    /* ================= HEADER ================ */


    .header-inner {
        display: grid;
        grid-template-columns: auto auto;
        grid-template-rows: auto auto auto;
        align-items: center;
        column-gap: 12px;
        row-gap: 8px;
        width: 100%;
    }


    .hamburger {
        grid-column: 2 / 3;
        grid-row: 1;
        justify-self: end;
        margin-left: 0 !important;
        font-size: 22px;
        background: none;
        border: none;
        cursor: pointer;
        display: block !important;
    }


    
    .header-left {
        grid-column: 1 / 2;
        grid-row: 1;
    }

    .header-right {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .header-nav {
        grid-column: 1 / -1;
        grid-row: 3;
        display: none;
        flex-direction: column;
        background: #fff;
        padding: 15px 20px;
        border-radius: 8px;
        gap: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .header-nav.open {
        display: flex !important;
        flex-direction: column;
    }

    .header-nav .header-separator {
        display: none !important;
    }

    .header-nav a {
        padding: 6px 0;
        font-size: 17px;
        display: block;
        border-radius: 4px;
    }

    
    img.logo {
        height: 36px;          /* vaste hoogte */
        width: auto;           /* proporties behouden */
        max-width: 160px;      /* veiligheid */
        object-fit: contain;
        display: block;
    }

    
    .btn-admin-link {
        font-size: 0.8rem;
        padding: 5px 8px;
        white-space: nowrap;
    }



    /* ================= MAIN ================ */

    .main {
        padding: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* ================= SHOP LAYOUT ================ */

    .shop-layout {
        display: block !important;
        width: 100%;
    }

    .sidebar.desktop-only {
        display: none !important;
    }

    .filter-toggle-btn {
        width: 85% !important;
        max-width: 300px;
        margin: 0 auto 12px auto;
        padding: 12px;
        background: #ce5700 !important;
        color: white !important;
        border: none !important;
        border-radius: 6px;
        font-size: 15px;
        text-align: center;
        display: block;
    }

    .mobile-filters {
        width: 85% !important;
        max-width: 300px;
        margin: 0 auto 15px auto;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
    }

    /* ================= ZOEK / SORTEER ================ */

    .searchbar-sticky form {
        display: grid !important;
        grid-template-columns: 1fr 110px 90px;
        gap: 8px;
        width: 100%;
    }

    .searchbar-sticky input[type="text"] {
        grid-column: 1 / span 3;
        width: 94%;
        padding: 10px;
        margin: 0 auto;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

    .searchbar-sticky select,
    .searchbar-sticky button {
        width: 100% !important;
        padding: 10px !important;
        border-radius: 6px;
        font-size: 14px;
    }

    .searchbar-sticky button {
        background: #ce5700;
        color: white;
        border: none;
    }

    /* ================= PRODUCT TABLE ================ */

    .product-table {
        width: 100% !important;
        table-layout: fixed !important;
        display: block !important;
        overflow-x: auto !important;
    }

    .product-table th,
    .product-table td {
        padding: 10px 6px !important;
        font-size: 14px;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
    }

    /* eerste kolom (naam) */
    .product-table td:nth-child(1),
    .product-table th:nth-child(1) {
        max-width: 130px !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    /* prijs kolom */
    .product-table td:nth-child(2),
    .product-table th:nth-child(2) {
        width: 55px !important;
        text-align: right !important;
    }

    /* eenheid */
    .product-table td:nth-child(3),
    .product-table th:nth-child(3) {
        width: 35px !important;
        padding-left: 4px;
    }

    /* laatste kolom → knop */
    .product-table td:last-child,
    .product-table th:last-child {
        width: 1% !important;
        text-align: right !important;
        white-space: nowrap !important;
    }

    /* IN WINKELWAGEN */
    .btn-add {
        font-size: 0 !important;
        padding: 6px 8px !important;
        width: auto !important;
        white-space: nowrap !important;
        position: relative;
        background: #ce5700 !important;
        border-radius: 6px;
    }

    .btn-add::after {
        content: "Toevoegen";
        font-size: 13px !important;
        color: #fff !important;
    }

    /* ================= MODAL (Add to cart) ================ */

    .modal-content {
        width: 85% !important;
        max-width: 320px !important;
        padding: 16px !important;
        margin: 0 auto;
    }

    .qty-control input {
        width: 60px !important;
        padding: 6px !important;
    }

    .qty-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 18px;
    }

    #cut-container { margin-bottom: 14px !important; }
    #cut-weight-row { margin-top: 6px !important; }

    /* ================= CART PAGE ================ */

    /* inline grid → 1 kolom */
    div[style*="grid-template-columns"] {
        display: block !important;
        width: 100% !important;
    }

    .cart-right,
    .cart-summary,
    .cart-info {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .cart-right input[type="date"],
    .cart-right textarea {
        width: 100% !important;
        font-size: 16px;
        padding: 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

    /* datum-veld kleiner op mobiel */
    #bezorgdatum {
        width: 80% !important;
        max-width: 260px !important;
        margin: 0 auto;
        display: block;
    }

    /* iPhone date picker zichtbaar */
    input[type="date"] {
        -webkit-appearance: menulist-button !important;
        appearance: menulist-button !important;
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        background: #fff !important;
    }

    input[type="date"]::-webkit-datetime-edit {
        color: #000 !important;
    }


    /* Filters-paneel moet zichtbaar worden bij .open */
    .mobile-filters {
        display: none !important;
    }

    .mobile-filters.open {
        display: block !important;
        width: 85% !important;
        max-width: 300px;
        margin: 10px auto 15px auto !important;
        padding: 15px;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
    }

    #bezorgdatum,
    input[type="date"] {
        font-size: 16px !important;      /* voorkomt iPhone zoom */
        line-height: 1.2 !important;
    }

    /* ================= BACKOFFICE BESTELLINGEN ================ */
    
    /* Backoffice orders tabel compacter maken */
    .backoffice table {
        width: 100%;
        table-layout: fixed;   /* ✅ dwingt kolombreedtes af */
        font-size: 0.85rem;
    }

    .backoffice th,
    .backoffice td {
        padding: 6px 6px;
        word-wrap: break-word;
    }

    /* Datum kolom smaller */
    .backoffice td:nth-child(3),
    .backoffice th:nth-child(3) {
        width: 90px;
        font-size: 0.8rem;
    }

    /* Status kolom kleiner */
    .backoffice td:nth-child(4),
    .backoffice th:nth-child(4) {
        width: 60px;
        text-align: center;
        font-size: 0.8rem;
    }

    /* Actie kolom ZO SMAL MOGELIJK */
    .backoffice td:last-child,
    .backoffice th:last-child {
        width: 70px;
        text-align: right;
        padding-right: 4px;
    }

    /* Verwerken knop compacter */
    .backoffice .btn,
    .backoffice .confirm {
        padding: 5px 6px;
        font-size: 0.75rem;
        white-space: nowrap;
    }


    /* ================= FOOTER ================ */
    footer {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    
/* Footer kolommen onder elkaar */
    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 1x;                 /* ruimte tussen de kolommen */
        text-align: left;
    }

    .footer-column {
        width: 100%;
    }

    /* Kleinere typografie op mobiel */
    .footer {
        font-size: 0.85rem;
    }



}
/* =========================================================
   DESKTOP
========================================================= */
@media (min-width: 769px) {


    * Hamburger nooit op desktop */
    .hamburger {
        display: none !important;
    }

    .header-inner {
        display: flex;
        align-items: center;
    }

    /* Logo links */
    .header-left {
        order: 1;
        display: flex;
        align-items: center;
        gap: 30px;
    }

    /* Navigatie in het midden */
    .header-nav {
        order: 2;
        display: flex !important;
        gap: 30px;
        align-items: center;
        margin-left: 40px;       /* optisch midden */
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    /* Acties rechts */
    .header-right {
        order: 3;
        margin-left: auto;      /* duwt alles naar rechts */
        display: flex;
        align-items: center;
        gap: 25px;
    }


}