/* =========================================================
   FUTURISTIC THEME ROOT VARIABLES
========================================================= */
:root {
    --bg: #f5f7fb;
    --bg-alt: #ffffff;
    --primary: #1554c0;
    --primary-soft: #e4edff;
    --primary-dark: #0c3c8b;
    --accent: #1ba1f1;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #d4dbe9;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-soft: 0 22px 40px rgba(15, 23, 42, 0.10);
    --shadow-light: 0 10px 25px rgba(15, 23, 42, 0.06);
    --glass: rgba(255,255,255,0.75);
}


/* =========================================================
   BASE RESET
========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #e1ecff, var(--bg) 40%);
    min-height: 100%;
    color: var(--text-main);
}

/* =========================================================
   PAGE WRAPPER
========================================================= */
.page {
    max-width: 1250px;
    margin: 20px auto 60px;
    padding: 0 18px;
}

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    padding: 12px 22px;
    box-shadow: var(--shadow-soft);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ================================
   TOP NAVIGATION IN HEADER
================================ */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 34px;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-nav-link {
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    transition: 0.15s ease;
}

.top-nav-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cart-button {
    display: flex;
    align-items: center;
    gap: 8px;

    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;

    box-shadow: var(--shadow-light);
    transition: 0.15s ease;
}
.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.cart-button-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--primary-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    color: var(--primary-dark);
}

.cart-count {
    background: var(--primary);
    color: white;
    padding: 2px 7px;
    font-size: 11px;
    border-radius: 999px;
}

/* =========================================================
   FILTER BAR
========================================================= */
/* =========================================================
   MODERN FILTER BAR
========================================================= */

.pretty-filters {
    padding: 26px 26px 20px;
    border-radius: var(--radius-lg);
    background: var(--glass);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow-soft);
}

.filters-row {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}

.filter-item label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    padding-left: 6px;
}

.filter-input,
.filter-select {
    padding: 11px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: white;
    font-size: 14px;
    outline: none;
    box-shadow: var(--shadow-light);
    transition: 0.15s ease;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-footer {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}


/* =========================================================
   PRODUCT GRID
========================================================= */
.product-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width:900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:600px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
    background: linear-gradient(135deg,#ffffff,#f3f6ff);
    border-radius: var(--radius-lg);
    padding: 14px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: var(--shadow-light);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.15s ease;
    position: relative;
}
.product-card .product-image-wrapper,
.product-card .product-image-img {
    pointer-events: none;
}

.btn-add-to-cart,
.qty-control,
.qty-control * {
    pointer-events: auto; /* deze moeten blijven werken */
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: var(--primary-soft);
}


.product-image-wrapper {
    aspect-ratio: 4/3;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image {
    aspect-ratio: 4/3;
    background: linear-gradient(145deg,#17396a,#264c8e);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e6eeff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
}

.product-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.product-price {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 15px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-add-to-cart {
    background: var(--primary-soft);
    border: none;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s ease;
}
.btn-add-to-cart:hover {
    background: var(--primary);
    color: white;
}

.stock {
    font-size: 11px;
    color: var(--text-muted);
}

/* simple qty control */
.qty-control {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    overflow: hidden;
    font-size: 12px;
}
.qty-control button {
    border: none;
    background: transparent;
    padding: 4px 8px;
    cursor: pointer;
}
.qty-control input {
    width: 36px;
    border: none;
    text-align: center;
    font-size: 12px;
    outline: none;
}

/* =========================================================
   FLOATING CART DRAWER
========================================================= */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: flex-end;
    backdrop-filter: blur(0px);
    z-index: 100;
}

.cart-drawer-overlay.open {
    display: flex;
    backdrop-filter: blur(3px);
}

.cart-drawer {
    width: 360px;
    background: white;
    height: 100%;
    border-radius: 20px 0 0 20px;
    padding: 20px;
    box-shadow: -14px 0px 40px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.cart-drawer.open {
    transform: translateX(0%);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.drawer-title {
    font-size: 16px;
    font-weight: 700;
}

.drawer-close {
    border: 1px solid var(--border);
    background: var(--bg-alt);
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
}

/* =========================================================
   CART ITEMS
========================================================= */
.cart-items {
    max-height: calc(100% - 200px);
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 18px;
}
.cart-item {
    padding: 8px 0;
    border-bottom: 1px dashed #d0d6e6;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.cart-item:last-child {
    border-bottom: none;
}
.cart-item-name {
    font-size: 14px;
    font-weight: 600;
}
.cart-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.no-cart-items {
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================================================
   CHECKOUT BUTTON
========================================================= */
.checkout-btn {
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg,var(--primary),var(--primary-dark));
    color: white;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(37,99,235,0.45);
}

.checkout-info-banner {
    background: var(--primary-soft);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
    color: var(--text-main);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.45;
}
.checkout-info-banner strong {
    color: var(--primary-dark);
}
/* =========================================================
   TOAST
========================================================= */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: #0f172a;
    color: white;
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 999px;
    box-shadow: 0 16px 40px rgba(15,23,42,0.6);
    transition: 0.2s ease;
    opacity: 0;
    z-index: 200;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.order-line-header,
.order-line-row {
    display: grid;
    grid-template-columns: 1fr 120px 150px 150px;
    padding: 12px 0;
    align-items: center;
}

.order-line-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 6px;
}

.order-line-row {
    font-size: 14px;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.order-line-row:last-child {
    border-bottom: none;
}

.ol-col-name {
    font-weight: 600;
    color: var(--text-main);
}

.ol-col-qty,
.ol-col-unit,
.ol-col-total {
    font-size: 14px;
    text-align: right;
}

.order-lines-box {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-top: 30px;
}

.order-lines-title {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
}

.order-lines-separator {
    width: 100%;
    height: 1px;
    margin: 26px 0;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0,0,0,0.15),
        transparent
    );
}



/* =========================================================
   USER BUBBLE (topbar user corner)
========================================================= */
.user-bubble {
    display: flex;
    align-items: center;
    gap: 10px;

    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    box-shadow: var(--shadow-light);
    cursor: default;

    transition: 0.15s ease;
}

.user-bubble:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.user-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--primary-dark);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.logout-link {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}


/* =========================================================
   dit is voor de website product pagina, dus wanneer je erop klikt
========================================================= */

.product-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 200;
}

.product-modal-overlay.open {
    display: flex;
}

.product-modal {
    width: 92%;
    max-width: 980px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: var(--bg-alt);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-light);
}

.product-modal-content {
    display: flex;
    gap: 26px;
}

.product-modal-left {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    padding: 10px;
    display: flex;
    justify-content: center;
}

.pm-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pm-supplier {
    font-size: 12px;
    color: var(--text-muted);
}

.pm-name {
    font-size: 20px;
    font-weight: 700;
}

.pm-category {
    font-size: 13px;
    color: var(--primary-dark);
}

.pm-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
}

.pm-stock {
    font-size: 13px;
    color: var(--text-muted);
}

.pm-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    width: fit-content;
}

.pm-qty-control button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    cursor: pointer;
}

.pm-qty-control input {
    width: 50px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 14px;
}

.pm-add-btn {
    margin-top: 8px;
    padding: 14px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}


.orders-th {
    text-align:left;
    padding:14px 18px;
    font-size:14px;
    font-weight:700;
    color:var(--primary-dark);
    border-bottom:1px solid var(--border);
}

.orders-row {
    transition:0.15s ease;
}

.orders-row:hover {
    background:var(--primary-soft);
}

.orders-td {
    padding:14px 18px;
    font-size:14px;
    color:var(--text-main);
    border-bottom:1px solid var(--border);
}

.orders-view-btn {
    color:var(--primary);
    font-weight:600;
    text-decoration:none;
    font-size:13px;
}

.pagination-wrapper {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 13px;
    box-shadow: var(--shadow-light);
    transition: 0.15s ease;
}

.pagination-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    cursor: default;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.pagination-bar {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    box-shadow: var(--shadow-light);
    transition: 0.15s ease;
}

.pagination-btn:hover {
    background: var(--primary);
    color: white;
}

.pagination-number {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
}

.pagination-number.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}




/* =========================================================
   dit is voor de algemene link fucnties
========================================================= */

/* =========================================================
   GENERIC MODALS (Supplier side)
   Matches LINK COMMERCE futuristic theme
========================================================= */

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* ACTION BUTTON ROW */
.actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
}

/* TABLE CARD */
.card-block {
    background: white;
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* NICE TABLE */
.nice-table {
    width: 100%;
    border-collapse: collapse;
}

.nice-table th {
    text-align: left;
    padding: 12px 10px;
    background: var(--primary-soft);
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--border);
}

.nice-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.nice-table tr:hover {
    background: var(--primary-soft);
}

/* TABLE ACTION BUTTONS */
.table-actions {
    display: flex;
    gap: 8px;
}

/* BUTTONS */
.btn-primary {
    background: var(--primary);
    padding: 10px 16px;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border);
    padding: 10px 16px;
    color: var(--text-main);
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-warning {
    background: #ffc107;
    color: black;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-small {
    padding: 6px 10px !important;
}

/* ---------------------------------------------------------
   MODAL SYSTEM
--------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    width: 90%;
    max-width: 700px;
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    animation: modalIn 0.25s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: white;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Filter Row */
.modal-filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.modal-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* PRODUCT LIST INSIDE MODAL */
.modal-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-product-list .product-item,
.modal-product-list .available-product-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
}

.product-item label,
.available-product-item label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-name {
    font-weight: 600;
}

.product-price,
.product-stock,
.product-uom {
    font-size: 12px;
    color: var(--text-muted);
}


.search-bar {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    background: white;
}

/* ---------------------------------------------------------
   PAGINATION (matches webshop theme)
--------------------------------------------------------- */

.pagination-bar {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    color: var(--text-main);
    transition: 0.15s ease;
}

.pagination-btn:hover {
    background: var(--primary);
    color: white;
}

.pagination-number {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

.pagination-number:hover {
    background: var(--primary-soft);
}

.pagination-number.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-color: var(--primary-dark);
}

.pagination-dots {
    padding: 8px 10px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    background: white;
    border: 1px solid #d3d9e4;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
    color: #1d2b53;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #2b6fff;
    box-shadow: 0 0 0 3px rgba(43, 111, 255, 0.2);
}

/* Mapped Dealers Badge Box */
.dealer-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f8faff;
    border: 1px solid #d8e1f0;
    border-radius: 12px;
    min-height: 48px;
}

/* Individual Dealer Badge */
.dealer-badge {
    background: #e8f0ff;
    color: #1d2b53;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #c5d8ff;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
