/* VD Cart Page – cart page design. Everything scoped to .vdcart */
.vdcart {
  --c-navy: #1f2a44; --c-text: #5b6577; --c-muted: #8a94a6; --c-line: #e6eaf0; --c-bg: #f6f8fb;
  --c-soft: #eef3f8; --c-blue: #577aa0; --c-blue-dark: #46698f; --c-green: #1a8a4a; --c-radius: 14px;
  max-width: 1120px; margin: 0 auto; padding: 8px 20px 56px; color: var(--c-text); font-size: 14px; line-height: 1.5;
}
.vdcart *, .vdcart *::before, .vdcart *::after { box-sizing: border-box; }
.vdcart a { text-decoration: none; }
.vdcart h1, .vdcart h2 { color: var(--c-navy); }
.vdcart-ico { flex: 0 0 auto; }

/* Hide the theme's own page title on the cart page (the design has its own) */
.vdcart-page .entry-title, .vdcart-page .page-title, .vdcart-page h1.title { display: none; }

/* Breadcrumb + header */
.vdcart-crumbs { font-size: 12px; color: var(--c-muted); margin-bottom: 14px; display: flex; gap: 8px; }
.vdcart-crumbs a { color: var(--c-muted); }
.vdcart-crumbs a:hover { color: var(--c-navy); }
.vdcart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.vdcart-title { font-size: 30px; line-height: 1.2; margin: 0 0 6px; font-weight: 600; }
.vdcart-sub { margin: 0; color: var(--c-text); }
.vdcart-continue { display: inline-flex; align-items: center; gap: 8px; color: var(--c-navy); font-size: 13px; white-space: nowrap; }
.vdcart-continue:hover { color: var(--c-blue); }

/* Banner */
.vdcart-banner { display: flex; align-items: center; gap: 14px; background: var(--c-soft); border-radius: var(--c-radius); padding: 16px 18px; margin-bottom: 24px; }
.vdcart-banner-ico { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--c-navy); flex: 0 0 36px; }
.vdcart-banner strong { display: block; color: var(--c-navy); font-weight: 600; font-size: 13px; }
.vdcart-banner span { font-size: 12px; }

/* Grid */
.vdcart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.vdcart-main, .vdcart-aside { min-width: 0; }

/* Products */
.vdcart-section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.vdcart-section-head h2 { font-size: 17px; margin: 0; font-weight: 600; }
.vdcart-section-head span { font-size: 12px; color: var(--c-muted); }
.vdcart-items { display: flex; flex-direction: column; gap: 12px; border: 0 !important; margin: 0 !important; }
.vdcart-item {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-radius); padding: 16px;
}
.vdcart-thumb { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--c-bg); }
.vdcart-thumb img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; margin: 0 !important; }
.vdcart-name { font-size: 15px; color: var(--c-navy); font-weight: 500; margin-bottom: 2px; }
.vdcart-name a { color: var(--c-navy); }
.vdcart-name a:hover { color: var(--c-blue); }
.vdcart-meta { font-size: 12px; color: var(--c-muted); margin-bottom: 8px; }
.vdcart-stock { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--c-green); margin-bottom: 10px; }
.vdcart-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vdcart-stock.is-backorder { color: #b45309; }
.vdcart-item .variation, .vdcart-item dl { font-size: 12px; margin: 0 0 6px; }

/* Quantity stepper */
.vdcart-qty { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: 10px; background: #fff; height: 38px; }
.vdcart-qty .quantity { margin: 0 !important; }
.vdcart-qty .quantity label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.vdcart-qty input.qty {
  width: 42px !important; height: 36px !important; border: 0 !important; box-shadow: none !important; background: transparent !important;
  text-align: center; font-size: 13px; color: var(--c-navy); padding: 0 !important; margin: 0 !important; -moz-appearance: textfield;
}
.vdcart-qty input.qty::-webkit-outer-spin-button, .vdcart-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vdcart .vdcart-step {
  width: 36px !important; height: 36px !important; padding: 0 !important; margin: 0 !important; border: 0 !important;
  background: transparent !important; color: var(--c-navy) !important; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px !important; box-shadow: none !important; min-width: 0 !important;
}
.vdcart .vdcart-step:hover { background: var(--c-soft) !important; }
.vdcart .vdcart-step .vdcart-ico { width: 14px; height: 14px; }
.vdcart-qty-single { padding: 0 16px; color: var(--c-navy); }

.vdcart-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; gap: 12px; }
.vdcart .vdcart-remove { color: var(--c-muted) !important; background: none !important; width: 30px; height: 30px; display: grid !important; place-items: center; border-radius: 8px; font-size: 0 !important; }
.vdcart .vdcart-remove:hover { color: #b91c1c !important; background: #fef2f2 !important; }
.vdcart-price { font-size: 16px; color: var(--c-navy); font-weight: 500; }

/* Hidden update button (quantities update automatically) */
.vdcart-actions { padding: 0 !important; border: 0 !important; }
.vdcart .vdcart-update { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0 !important; border: 0 !important; }

/* Accessories */
.vdcart-acc { margin-top: 30px; }
.vdcart-eyebrow { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.vdcart-acc h2 { font-size: 21px; margin: 2px 0 4px; font-weight: 600; }
.vdcart-acc-sub { margin: 0 0 14px; font-size: 13px; }
.vdcart-acc-list { display: flex; flex-direction: column; gap: 10px; }
.vdcart-acc-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-radius); padding: 10px 14px 10px 10px;
}
.vdcart-acc-img { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--c-bg); display: block; }
.vdcart-acc-img img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; margin: 0 !important; }
.vdcart-acc-info { display: flex; flex-direction: column; min-width: 0; }
.vdcart-acc-label { font-size: 10px; color: var(--c-blue); }
.vdcart-acc-name { color: var(--c-navy); font-weight: 500; font-size: 14px; }
.vdcart-acc-name:hover { color: var(--c-blue); }
.vdcart-acc-text { font-size: 11px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vdcart-acc-price { font-size: 13px; color: var(--c-navy); margin-top: 2px; }
.vdcart-acc-price em { color: #b91c1c; font-style: normal; font-weight: 600; font-size: 12px; }
.vdcart-acc-btns { display: flex; gap: 8px; align-items: center; }
.vdcart-acc-view {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px;
  background: var(--c-soft); color: var(--c-navy) !important; font-size: 12px;
}
.vdcart-acc-view .vdcart-ico { width: 13px; height: 13px; }
.vdcart-acc-view:hover { background: #e2eaf3; }
.vdcart-acc-add { width: 32px; height: 32px; border-radius: 8px; background: var(--c-blue); color: #fff !important; display: grid; place-items: center; }
.vdcart-acc-add:hover { background: var(--c-blue-dark); }
.vdcart-acc-row.is-oos .vdcart-acc-img img { opacity: .45; filter: grayscale(1); }

/* Summary */
.vdcart-summary { background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-radius); padding: 22px 20px; width: 100% !important; float: none !important; }
.vdcart-summary h2 { font-size: 17px; margin: 0 0 16px; font-weight: 600; }
.vdcart-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--c-text); padding: 6px 0; }
.vdcart-row > span:last-child { color: var(--c-navy); text-align: right; }
.vdcart-row .is-free, .vdcart-row > span.is-free { color: var(--c-green); }
.vdcart-row.is-discount > span:last-child { color: var(--c-green); }
.vdcart-row a.woocommerce-remove-coupon { font-size: 11px; color: var(--c-muted); margin-left: 4px; }
.vdcart-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--c-line); margin-top: 10px; padding-top: 16px; }
.vdcart-total > span:first-child { color: var(--c-navy); font-weight: 600; font-size: 14px; }
.vdcart-total-amount { font-size: 26px; color: var(--c-blue); font-weight: 600; text-align: right; }
.vdcart-total-amount small, .vdcart-total-amount .includes_tax { display: block; font-size: 11px; color: var(--c-muted); font-weight: 400; }
.vdcart-vat { font-size: 11px; color: var(--c-muted); margin: 4px 0 16px; }

.vdcart-coupon { margin-bottom: 14px; font-size: 12px; }
.vdcart-coupon summary { cursor: pointer; color: var(--c-blue); list-style: none; }
.vdcart-coupon summary::-webkit-details-marker { display: none; }
.vdcart-coupon .coupon { display: flex; gap: 8px; margin-top: 8px; }
.vdcart-coupon input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--c-line) !important; border-radius: 8px !important; padding: 0 10px !important; font-size: 13px; }
.vdcart-coupon .button { height: 38px; padding: 0 14px !important; border-radius: 8px !important; background: var(--c-soft) !important; color: var(--c-navy) !important; border: 0 !important; font-size: 12px !important; }

.vdcart-checkout { padding: 0 !important; }
.vdcart .vdcart-checkout-btn {
  display: flex !important; align-items: center; justify-content: center; gap: 10px; width: 100%;
  height: 50px; border-radius: 10px; background: var(--c-blue) !important; color: #fff !important;
  font-size: 14px; font-weight: 500; transition: background .15s; margin: 0 0 10px !important; padding: 0 !important;
}
.vdcart .vdcart-checkout-btn:hover { background: var(--c-blue-dark) !important; }
.vdcart-secure { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 11px; color: var(--c-muted); margin: 0 0 16px; }
.vdcart-secure .vdcart-ico { width: 13px; height: 13px; color: var(--c-green); }

.vdcart-pay { border-top: 1px solid var(--c-line); padding-top: 14px; text-align: center; }
.vdcart-pay-title { display: block; font-size: 11px; color: var(--c-muted); margin-bottom: 10px; }
.vdcart-pay-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.vdcart-pay-item { width: 44px; height: 28px; background: #fff; border: 1px solid var(--c-line); border-radius: 6px; padding: 3px 4px; display: inline-flex; align-items: center; justify-content: center; }
.vdcart-pay-item img { max-width: 100%; max-height: 18px; width: auto; height: auto; object-fit: contain; }
.vdcart-pay-item .vdcp-pay-text { font-size: 9px; font-weight: 700; color: var(--c-navy); }

/* Trust list */
.vdcart-trust { list-style: none; margin: 14px 0 0; padding: 6px 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-radius); }
.vdcart-trust li { display: flex; align-items: center; gap: 12px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--c-line); }
.vdcart-trust li:last-child { border-bottom: 0; }
.vdcart-trust-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--c-soft); color: var(--c-navy); display: grid; place-items: center; flex: 0 0 30px; }
.vdcart-trust-ico .vdcart-ico { width: 15px; height: 15px; }
.vdcart-trust strong { display: block; color: var(--c-navy); font-weight: 500; font-size: 12px; }
.vdcart-trust small { display: block; font-size: 10px; color: var(--c-muted); }

/* Loading state during WooCommerce's cart update */
.vdcart .blockUI.blockOverlay { border-radius: var(--c-radius); }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .vdcart-grid { grid-template-columns: minmax(0, 1fr); }
  .vdcart-aside { max-width: 560px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .vdcart { padding: 4px 16px 40px; }
  .vdcart-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .vdcart-title { font-size: 24px; }
  .vdcart-banner { padding: 12px 14px; }
  .vdcart-item { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  .vdcart-thumb { width: 72px; height: 72px; }
  .vdcart-name { font-size: 14px; }
  .vdcart-price { font-size: 15px; }
  .vdcart-acc-row { grid-template-columns: 52px minmax(0, 1fr); row-gap: 10px; padding: 10px; }
  .vdcart-acc-img { width: 52px; height: 52px; }
  .vdcart-acc-btns { grid-column: 1 / -1; justify-content: flex-end; }
  .vdcart-aside { max-width: none; }
}

/* =====================================================
   v1.1 – Protect the layout from theme / WooCommerce CSS
   ===================================================== */
.vdcart a, .vdcart a:hover, .vdcart a:focus { text-decoration: none !important; box-shadow: none; }

/* The form wraps both columns: it must never be floated or narrowed */
.vdcart form.woocommerce-cart-form,
.woocommerce .vdcart form.woocommerce-cart-form,
.woocommerce-page .vdcart form.woocommerce-cart-form {
  display: block !important; float: none !important; width: 100% !important; max-width: none !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
}

/* Two columns, always */
.vdcart .vdcart-grid {
  display: grid !important; grid-template-columns: minmax(0, 1fr) 340px !important; gap: 22px !important;
  align-items: start !important; width: 100% !important;
}
.vdcart .vdcart-main { display: block !important; float: none !important; width: auto !important; min-width: 0 !important; }

/* Summary column: visible no matter what the theme does with sidebars / cart totals */
.vdcart .vdcart-aside {
  display: block !important; visibility: visible !important; opacity: 1 !important; position: static !important;
  float: none !important; width: auto !important; max-width: none !important; min-width: 0 !important;
  height: auto !important; overflow: visible !important; margin: 0 !important; transform: none !important;
}
.vdcart .vdcart-summary,
.woocommerce .vdcart .vdcart-summary,
.woocommerce-page .vdcart .vdcart-summary {
  display: block !important; visibility: visible !important; float: none !important;
  width: 100% !important; max-width: none !important; margin: 0 !important;
}
.vdcart .vdcart-checkout, .vdcart .wc-proceed-to-checkout { display: block !important; visibility: visible !important; }
.vdcart .vdcart-trust { display: block !important; }

/* Stack on tablets / phones */
@media (max-width: 960px) {
  .vdcart .vdcart-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .vdcart .vdcart-aside { max-width: 560px !important; }
}
@media (max-width: 600px) {
  .vdcart .vdcart-aside { max-width: none !important; }
}

/* v1.3 – Page background on the cart page */
body.vdcart-page,
body.vdcart-page #page, body.vdcart-page .site, body.vdcart-page #content, body.vdcart-page .site-content,
body.vdcart-page main, body.vdcart-page #main, body.vdcart-page .site-main, body.vdcart-page .content-area,
body.vdcart-page article.page, body.vdcart-page .entry-content, body.vdcart-page .woocommerce {
  background-color: #F8FAFB !important;
}

/* v1.3 – Cart page width 1215px (also breaks out of a narrower theme content area) */
@media (min-width: 961px) {
  .vdcart {
    --vdcart-w: min(1215px, calc(100vw - 48px));
    width: var(--vdcart-w) !important; max-width: none !important;
    margin-left: calc((100% - var(--vdcart-w)) / 2) !important;
    margin-right: 0 !important;
    padding-left: 0 !important; padding-right: 0 !important;
  }
}
/* the theme's wrappers must not cut off the wider cart */
body.vdcart-page .entry-content, body.vdcart-page .woocommerce, body.vdcart-page article.page { overflow: visible !important; }
body.vdcart-page { overflow-x: hidden; }

/* v1.4 – 20px between the accessories subheading and the product rows */
.vdcart .vdcart-acc-sub { margin-bottom: 20px !important; }

/* v1.4 – Sticky checkout bar, mobile only */
.vdcart-mbar { display: none; }
@media (max-width: 767px) {
  body .vdcart-mbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
    background: #fff; border-top: 1px solid #e6eaf0; box-shadow: 0 -6px 20px rgba(31, 42, 68, .08);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    transition: transform .2s ease; font-family: inherit;
  }
  body .vdcart-mbar.is-hidden { transform: translateY(110%); }
  .vdcart-mbar-total { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .vdcart-mbar-total > span { font-size: 11px; color: #8a94a6; }
  .vdcart-mbar-total strong .amount, .vdcart-mbar-total strong bdi { font-size: inherit; color: inherit; }
  .vdcart-mbar-total strong { font-size: 18px; color: #1f2a44; font-weight: 600; white-space: nowrap; }
  .vdcart-mbar-total strong small, .vdcart-mbar-total .includes_tax { display: none; }
  body .vdcart-mbar .vdcart-mbar-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
    border-radius: 10px; background: #577aa0; color: #fff !important; font-size: 14px; font-weight: 500;
    text-decoration: none !important;
  }
  body .vdcart-mbar .vdcart-mbar-btn:active { background: #46698f; }
  .vdcart-mbar .vdcart-ico { width: 16px; height: 16px; }
  /* room so the bar never covers the last content */
  .vdcart { padding-bottom: 96px !important; }
}

/* =====================================================
   v1.5 – Mobile checkout bar: "Totaalbedrag" + "Afrekenen", more space
   ===================================================== */
@media (max-width: 767px) {
  body .vdcart-mbar {
    gap: 20px; padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid #e6eaf0; box-shadow: 0 -8px 24px rgba(31, 42, 68, .10);
  }
  .vdcart-mbar .vdcart-mbar-total { gap: 4px; flex: 0 0 auto; }
  .vdcart-mbar .vdcart-mbar-total > span { font-size: 12px !important; color: #8a94a6 !important; line-height: 1.2; }
  .vdcart-mbar .vdcart-mbar-total strong { font-size: 24px !important; font-weight: 500 !important; color: #577aa0 !important; line-height: 1.1; letter-spacing: -.01em; }
  body .vdcart-mbar .vdcart-mbar-btn {
    flex: 1 1 auto; max-width: 280px; margin-left: auto; height: 52px; border-radius: 10px;
    font-size: 17px !important; font-weight: 500; gap: 10px;
  }
  .vdcart-mbar .vdcart-mbar-btn .vdcart-ico { width: 18px; height: 18px; }
  .vdcart { padding-bottom: 110px !important; } /* room for the taller bar */
}
