/* =========================================================
   DE DWERG SHOP — RESPONSIVE POLISH
   Eén laatste laag voor alle door de plugin gebouwde frontendonderdelen.
   Breakpoints: tablet <=1024, mobiel <=767, compact <=480.
========================================================= */

:root {
  --dw-mobile-gutter: 18px;
  --dw-touch: 44px;
}

/* Altijd voorkomen dat plugincomponenten zelf horizontaal uit de viewport lopen. */
.dwerg-archive-page,
.dwerg-cart-shortcode,
.dwerg-checkout-shortcode,
.dw-look-page,
.dw-look-shortcode,
.dwerg-complete-look-products,
.elementor-menu-cart__main {
  max-width: 100%;
}

.dwerg-archive-page *,
.dwerg-cart-shortcode *,
.dwerg-checkout-shortcode *,
.dw-look-page *,
.dw-look-shortcode *,
.elementor-menu-cart__main * {
  min-width: 0;
}

/* Touch controls: visueel mag een icoon klein zijn, het klikvlak niet. */
@media (hover: none), (pointer: coarse) {
  .dwerg-filter-toggle,
  .dwerg-filters-close,
  .dwerg-filter-group-head,
  .dwerg-size-option,
  .dwerg-archive-load,
  .dw-cart-qty-btn,
  .dw-cart-remove,
  .dw-cart-continue,
  .dw-checkout-coupon-toggle,
  .dw-checkout-coupon-apply,
  .dw-look-option__button,
  .dw-look-add-button,
  .dwerg-product-qty-btn,
  .elementor-menu-cart__close-button,
  .elementor-menu-toggle {
    min-height: var(--dw-touch) !important;
    touch-action: manipulation;
  }
}

/* =========================================================
   ARCHIEF + FILTERS
========================================================= */
@media (max-width: 1024px) {
  .dwerg-archive-head,
  .dwerg-archive-layout {
    width: min(100% - 36px, 1320px) !important;
  }

  .dwerg-archive-toolbar {
    width: 100% !important;
  }

  .dwerg-archive-title {
    font-size: clamp(2.15rem, 7vw, 3.6rem) !important;
  }
}

@media (max-width: 767px) {
  .dwerg-archive-head,
  .dwerg-archive-layout {
    width: calc(100% - (var(--dw-mobile-gutter) * 2)) !important;
  }

  .dwerg-archive-head {
    padding-top: 16px !important;
  }

  .dwerg-archive-breadcrumb {
    margin-bottom: 16px !important;
  }

  .dwerg-archive-eyebrow {
    margin-bottom: 6px !important;
    font-size: .66rem !important;
  }

  .dwerg-archive-title {
    font-size: clamp(2rem, 10.5vw, 3rem) !important;
    line-height: 1.02 !important;
  }

  .dwerg-archive-description {
    max-width: none !important;
    font-size: .86rem !important;
    line-height: 1.55 !important;
  }

  /* Geen tweede sticky balk onder de mobiele header. */
  .dwerg-archive-toolbar {
    position: relative !important;
    top: auto !important;
    z-index: 2 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px var(--dw-mobile-gutter) 16px !important;
    background: var(--dw-archive-cream) !important;
  }

  .dwerg-archive-count {
    width: 100% !important;
    font-size: .8rem !important;
  }

  .dwerg-archive-toolbar-right {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .dwerg-filter-toggle,
  .dwerg-sort-select,
  .dwerg-sort-select select {
    width: 100% !important;
  }

  .dwerg-filter-toggle,
  .dwerg-sort-select select {
    min-height: 46px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .dwerg-filter-toggle {
    justify-content: center !important;
  }

  .dwerg-sort-select select {
    max-width: none !important;
    padding-left: 14px !important;
    padding-right: 34px !important;
    font-size: .76rem !important;
  }

  /* Mobiel als bottom sheet i.p.v. smalle zijlade. */
  .dwerg-archive-filters {
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: min(84dvh, 760px) !important;
    max-height: 84dvh !important;
    padding: 66px 20px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    border: 1px solid rgba(32, 28, 24, .10) !important;
    border-bottom: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    background: #FCF9F3 !important;
    box-shadow: 0 -22px 60px -24px rgba(32, 28, 24, .32) !important;
    transform: translateY(105%) !important;
    transition: transform .36s cubic-bezier(.16,1,.3,1) !important;
    overscroll-behavior: contain;
  }

  .dwerg-archive-filters.is-open {
    transform: translateY(0) !important;
  }

  .dwerg-archive-filters::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 99px;
    background: rgba(32,28,24,.16);
    transform: translateX(-50%);
  }

  .dwerg-filters-close {
    top: 18px !important;
    right: 16px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 999px !important;
    background: rgba(32,28,24,.05) !important;
  }

  .dwerg-filters-backdrop {
    z-index: 154 !important;
    background: rgba(32,28,24,.46) !important;
    backdrop-filter: blur(2px);
  }

  .dwerg-filter-group {
    padding: 3px 0 !important;
  }

  .dwerg-filter-group-head {
    min-height: 48px !important;
    padding: 12px 0 !important;
    font-size: .86rem !important;
  }

  .dwerg-filter-group-body {
    max-height: none !important;
    gap: 0 !important;
    padding-bottom: 12px !important;
  }

  .dwerg-filter-option {
    min-height: 44px !important;
    padding: 8px 0 !important;
    font-size: .86rem !important;
  }

  .dwerg-filter-option input {
    width: 20px !important;
    height: 20px !important;
  }

  .dwerg-size-options {
    gap: 8px !important;
  }

  .dwerg-size-option {
    min-width: 48px !important;
    min-height: 44px !important;
    padding: 8px 10px !important;
  }

  .dwerg-archive-layout {
    padding-top: 18px !important;
    padding-bottom: 64px !important;
  }

  .dwerg-archive-chips {
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin: 0 -18px 16px !important;
    padding: 0 18px 3px !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .dwerg-archive-chips::-webkit-scrollbar { display: none; }
  .dwerg-filter-chip,
  .dwerg-filter-clear {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .dwerg-archive-grid .elementor-loop-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 10px !important;
  }

  .dwerg-archive-load-wrap {
    margin-top: 28px !important;
  }

  .dwerg-archive-load {
    width: min(100%, 280px) !important;
    min-height: 48px !important;
  }
}

@media (max-width: 380px) {
  :root { --dw-mobile-gutter: 14px; }

  .dwerg-archive-toolbar-right {
    grid-template-columns: 1fr !important;
  }

  .dwerg-archive-grid .elementor-loop-container {
    gap: 18px 8px !important;
  }
}

/* =========================================================
   WINKELWAGEN
========================================================= */
@media (max-width: 980px) {
  body .dwerg-cart-shortcode .woocommerce {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  body .dwerg-cart-shortcode .cart_totals {
    position: relative !important;
    top: auto !important;
  }
}

@media (max-width: 767px) {
  body.woocommerce-cart .dwerg-cart-shortcode {
    width: 100% !important;
    overflow: visible !important;
  }

  body .dwerg-cart-shortcode .woocommerce {
    display: block !important;
    width: 100% !important;
  }

  body .dwerg-cart-shortcode table.shop_table,
  body .dwerg-cart-shortcode table.shop_table tbody {
    width: 100% !important;
  }

  /* WooCommerce zet op mobiel zelf labels via td::before. Die botsten met
     onze grid en veroorzaakten o.a. "Product:" en losse dubbele punten. */
  body .dwerg-cart-shortcode table.shop_table_responsive tr.cart_item > td::before,
  body .dwerg-cart-shortcode table.shop_table tr.cart_item > td::before {
    content: none !important;
    display: none !important;
  }

  body .dwerg-cart-shortcode table.shop_table tr.cart_item {
    display: grid !important;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    grid-template-areas:
      "thumb name"
      "thumb qty"
      "subtotal subtotal"
      "remove remove" !important;
    column-gap: 16px !important;
    row-gap: 10px !important;
    padding: 20px 0 !important;
  }

  body .dwerg-cart-shortcode td.product-thumbnail {
    grid-area: thumb !important;
    align-self: start !important;
  }

  body .dwerg-cart-shortcode td.product-thumbnail a,
  body .dwerg-cart-shortcode td.product-thumbnail img {
    width: 84px !important;
    height: 106px !important;
    border-radius: 12px !important;
  }

  body .dwerg-cart-shortcode td.product-name {
    grid-area: name !important;
    padding: 1px 0 0 !important;
  }

  body .dwerg-cart-shortcode .dw-cart-brand {
    margin-bottom: 4px !important;
    font-size: .7rem !important;
  }

  body .dwerg-cart-shortcode .dw-cart-name {
    font-size: .98rem !important;
    line-height: 1.28 !important;
  }

  body .dwerg-cart-shortcode .dw-cart-size {
    margin-top: 5px !important;
    font-size: .74rem !important;
  }

  body .dwerg-cart-shortcode td.product-quantity {
    grid-area: qty !important;
    display: flex !important;
    align-items: center !important;
    align-self: end !important;
    gap: 10px !important;
    min-height: 44px !important;
  }

  body .dwerg-cart-shortcode td.product-quantity::before {
    content: "Aantal" !important;
    display: block !important;
    flex: 0 0 auto !important;
    color: var(--dw-cc-ink-70) !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
  }

  body .dwerg-cart-shortcode .dw-cart-qty {
    height: 44px !important;
    margin: 0 !important;
    border-radius: 999px !important;
  }

  body .dwerg-cart-shortcode .dw-cart-qty-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  body .dwerg-cart-shortcode .dw-cart-qty input.qty {
    width: 34px !important;
    min-width: 34px !important;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 16px !important;
  }

  body .dwerg-cart-shortcode td.product-subtotal {
    grid-area: subtotal !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 0 0 !important;
    border-top: 1px solid var(--dw-cc-ink-08) !important;
    text-align: right !important;
    white-space: normal !important;
    font-size: .96rem !important;
  }

  body .dwerg-cart-shortcode td.product-subtotal::before {
    content: "Subtotaal" !important;
    display: block !important;
    color: var(--dw-cc-ink-70) !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
  }

  body .dwerg-cart-shortcode td.product-remove {
    grid-area: remove !important;
    display: flex !important;
    justify-content: flex-end !important;
    min-height: 44px !important;
  }

  body .dwerg-cart-shortcode a.dw-cart-remove,
  body .dwerg-cart-shortcode td.product-remove a.remove {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 44px !important;
    padding: 0 2px !important;
    border-bottom: 0 !important;
    text-decoration: underline !important;
    text-decoration-color: var(--dw-cc-ink-15) !important;
    text-underline-offset: 5px !important;
  }

  body .dwerg-cart-shortcode .dw-cart-continue {
    min-height: 44px !important;
    margin-top: 18px !important;
    padding: 0 4px !important;
  }

  body .dwerg-cart-shortcode .cart-collaterals {
    margin-top: 28px !important;
  }

  body .dwerg-cart-shortcode .cart_totals {
    padding: 24px 20px !important;
    border-radius: 20px !important;
  }

  body .dwerg-cart-shortcode .cart_totals > h2 {
    font-size: 1.75rem !important;
  }

  body .dwerg-cart-shortcode .cart_totals th,
  body .dwerg-cart-shortcode .cart_totals td {
    padding: 10px 0 !important;
    font-size: .86rem !important;
  }

  body .dwerg-cart-shortcode .cart_totals tr.order-total th,
  body .dwerg-cart-shortcode .cart_totals tr.order-total td {
    font-size: 1rem !important;
  }

  body .dwerg-cart-shortcode .checkout-button {
    min-height: 54px !important;
    padding-inline: 18px !important;
    font-size: .86rem !important;
  }

  body .dwerg-cart-shortcode .dw-cart-summary-note {
    font-size: .76rem !important;
    line-height: 1.55 !important;
  }

  body .dwerg-cart-shortcode .dw-cart-summary-usps > div {
    min-height: 36px !important;
    align-items: flex-start !important;
    font-size: .8rem !important;
    line-height: 1.45 !important;
  }
}

@media (max-width: 420px) {
  body .dwerg-cart-shortcode table.shop_table tr.cart_item {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    column-gap: 13px !important;
  }

  body .dwerg-cart-shortcode td.product-thumbnail a,
  body .dwerg-cart-shortcode td.product-thumbnail img {
    width: 74px !important;
    height: 94px !important;
  }

  body .dwerg-cart-shortcode td.product-quantity {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 5px !important;
  }
}

/* =========================================================
   CHECKOUT
========================================================= */
@media (max-width: 980px) {
  body .dwerg-checkout-shortcode form.checkout {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  body .dwerg-checkout-shortcode #customer_details,
  body .dwerg-checkout-shortcode .dw-checkout-summary-card,
  body .dwerg-checkout-shortcode #order_review,
  body .dwerg-checkout-shortcode #order_review_heading {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-summary-card {
    position: relative !important;
    top: auto !important;
  }
}

@media (max-width: 767px) {
  body .dwerg-checkout-shortcode {
    width: 100% !important;
  }

  body .dwerg-checkout-shortcode form.checkout {
    display: block !important;
  }

  body .dwerg-checkout-shortcode #customer_details,
  body .dwerg-checkout-shortcode #customer_details .col-1,
  body .dwerg-checkout-shortcode #customer_details .col-2,
  body .dwerg-checkout-shortcode .dw-checkout-sections,
  body .dwerg-checkout-shortcode .dw-checkout-summary-card {
    width: 100% !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-section {
    padding: 22px 0 !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-section-head {
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-section-number {
    flex-basis: 30px !important;
    width: 30px !important;
    height: 30px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-section-title {
    font-size: 1.3rem !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-section-body {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body .dwerg-checkout-shortcode .form-row,
  body .dwerg-checkout-shortcode .form-row-first,
  body .dwerg-checkout-shortcode .form-row-last,
  body .dwerg-checkout-shortcode .form-row-wide {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body .dwerg-checkout-shortcode input.input-text,
  body .dwerg-checkout-shortcode select,
  body .dwerg-checkout-shortcode textarea,
  body .dwerg-checkout-shortcode .select2-selection {
    min-height: 50px !important;
    font-size: 16px !important;
  }

  body .dwerg-checkout-shortcode textarea {
    min-height: 110px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-shipping-wrap .woocommerce-shipping-methods {
    gap: 10px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-shipping-wrap .woocommerce-shipping-methods label {
    min-height: 58px !important;
    padding: 14px 14px 14px 48px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-payment-section .wc_payment_method {
    min-height: 58px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-payment-section .wc_payment_method > label {
    min-height: 58px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-summary-card {
    margin-top: 28px !important;
    padding: 22px 18px !important;
    border-radius: 20px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-summary-card #order_review_heading {
    font-size: 1.65rem !important;
  }

  body .dwerg-checkout-shortcode #order_review table.shop_table th,
  body .dwerg-checkout-shortcode #order_review table.shop_table td {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-product {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-product-image {
    width: 62px !important;
    height: 78px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-coupon-toggle {
    min-height: 52px !important;
    padding: 12px 0 !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-coupon-input-row {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-coupon-apply,
  body .dwerg-checkout-shortcode #place_order {
    width: 100% !important;
    min-height: 54px !important;
  }

  body .dwerg-checkout-shortcode .dw-checkout-secure {
    align-items: flex-start !important;
    line-height: 1.45 !important;
  }
}

/* =========================================================
   BEDANKTPAGINA / ORDER RECEIVED
========================================================= */
@media (max-width: 767px) {
  body.woocommerce-order-received .woocommerce,
  body.woocommerce-order-received .woocommerce-order {
    width: 100% !important;
    max-width: none !important;
  }

  body.woocommerce-order-received .woocommerce-thankyou-order-received {
    margin-bottom: 18px !important;
    padding: 7px !important;
    border-radius: 20px !important;
  }

  body.woocommerce-order-received .dw-thankyou-inner {
    padding: 24px 16px !important;
    border-radius: 14px !important;
  }

  body.woocommerce-order-received .dw-thankyou-title {
    font-size: clamp(1.45rem, 7vw, 1.9rem) !important;
  }

  body.woocommerce-order-received .dw-thankyou-copy {
    margin-top: 9px !important;
    font-size: .86rem !important;
  }

  body.woocommerce-order-received ul.woocommerce-order-overview,
  body.woocommerce-order-received ul.order_details {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  body.woocommerce-order-received ul.woocommerce-order-overview li,
  body.woocommerce-order-received ul.order_details li {
    min-height: 80px !important;
    padding: 16px !important;
    border-right: 1px solid var(--dw-cc-ink-12) !important;
    border-bottom: 1px solid var(--dw-cc-ink-12) !important;
  }

  body.woocommerce-order-received ul.woocommerce-order-overview li:nth-child(2n),
  body.woocommerce-order-received ul.order_details li:nth-child(2n) {
    border-right: 0 !important;
  }

  body.woocommerce-order-received .woocommerce-order-details,
  body.woocommerce-order-received .woocommerce-customer-details,
  body.woocommerce-order-received .woocommerce-bacs-bank-details {
    margin-top: 20px !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }

  body.woocommerce-order-received .woocommerce-order h2 {
    font-size: clamp(1.65rem, 8vw, 2.15rem) !important;
  }

  body.woocommerce-order-received table.shop_table.order_details {
    width: 100% !important;
    table-layout: fixed !important;
    border-radius: 12px !important;
  }

  body.woocommerce-order-received table.shop_table.order_details th,
  body.woocommerce-order-received table.shop_table.order_details td {
    padding: 12px 10px !important;
    font-size: .78rem !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.woocommerce-order-received table.shop_table.order_details th:first-child,
  body.woocommerce-order-received table.shop_table.order_details td:first-child {
    width: 68% !important;
  }

  body.woocommerce-order-received table.shop_table.order_details th:last-child,
  body.woocommerce-order-received table.shop_table.order_details td:last-child {
    width: 32% !important;
  }

  body.woocommerce-order-received .woocommerce-customer-details .woocommerce-columns,
  body.woocommerce-order-received .woocommerce-customer-details .col2-set {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body.woocommerce-order-received .woocommerce-customer-details address {
    padding: 16px !important;
    font-size: .84rem !important;
    line-height: 1.55 !important;
  }
}

@media (max-width: 480px) {
  body.woocommerce-order-received ul.woocommerce-order-overview,
  body.woocommerce-order-received ul.order_details {
    grid-template-columns: 1fr !important;
  }

  body.woocommerce-order-received ul.woocommerce-order-overview li,
  body.woocommerce-order-received ul.order_details li,
  body.woocommerce-order-received ul.woocommerce-order-overview li:nth-child(2n),
  body.woocommerce-order-received ul.order_details li:nth-child(2n) {
    min-height: 0 !important;
    border-right: 0 !important;
  }

  body.woocommerce-order-received table.shop_table.order_details th,
  body.woocommerce-order-received table.shop_table.order_details td {
    padding: 11px 8px !important;
    font-size: .74rem !important;
  }
}

/* =========================================================
   SIDECART
========================================================= */
@media (max-width: 600px) {
  html body .elementor-menu-cart__main {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  html body .elementor-menu-cart__main::before {
    min-height: 68px !important;
    padding: 18px 64px 18px 18px !important;
    font-size: 1.25rem !important;
  }

  html body .elementor-menu-cart__close-button {
    top: 12px !important;
    right: 12px !important;
    width: 44px !important;
    height: 44px !important;
  }

  html body .elementor-menu-cart__products {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  html body .elementor-menu-cart__product {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  html body .elementor-menu-cart__product-image a,
  html body .elementor-menu-cart__product-image img {
    width: 68px !important;
    height: 86px !important;
  }

  html body .dwerg-sidecart-qty button,
  html body .dwerg-sidecart-qty .dwerg-sidecart-qty-btn {
    min-width: 40px !important;
    min-height: 40px !important;
  }

  html body .elementor-menu-cart__subtotal,
  html body .elementor-menu-cart__footer-buttons,
  html body .dwerg-sidecart-progress,
  html body .dwerg-sidecart-usps {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  html body .elementor-menu-cart__footer-buttons {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body .elementor-menu-cart__footer-buttons a {
    min-height: 50px !important;
  }
}

/* =========================================================
   SINGLE PRODUCT
========================================================= */
@media (max-width: 767px) {
  .single-product .dwerg-gallery {
    position: relative !important;
    top: auto !important;
  }

  .single-product .woocommerce-product-gallery__trigger,
  .single-product .dwerg-gallery-zoom-fallback {
    top: 10px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
  }

  .single-product .dwerg-sizes,
  .single-product .dwerg-colours {
    padding: 18px 0 !important;
  }

  .single-product .dwerg-sizes-top,
  .single-product .dwerg-colours-top {
    align-items: center !important;
    gap: 8px !important;
  }

  .single-product button.dwerg-size,
  .single-product button.dwerg-colour {
    min-height: 44px !important;
  }

  .single-product form.cart,
  .single-product .woocommerce-variation-add-to-cart {
    width: 100% !important;
    gap: 10px !important;
  }

  .single-product form.cart .quantity.dwerg-product-quantity {
    grid-template-columns: 40px 36px 40px !important;
    flex: 0 0 124px !important;
    width: 124px !important;
    min-width: 124px !important;
    height: 50px !important;
    margin-right: 0 !important;
  }

  .single-product .dwerg-product-qty-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .single-product .single_add_to_cart_button {
    min-height: 50px !important;
  }

  .single-product .dwerg-image-lightbox {
    padding: 12px !important;
  }

  .single-product .dwerg-image-lightbox img {
    max-width: 100% !important;
    max-height: calc(100dvh - 80px) !important;
  }

  .single-product .dwerg-image-lightbox__viewport {
    width: 100% !important;
    height: calc(100dvh - 92px) !important;
  }
  .single-product .dwerg-image-lightbox__controls {
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
  .single-product .dwerg-image-lightbox-close {
    top: max(12px, env(safe-area-inset-top)) !important;
    right: 12px !important;
  }

  .dwerg-card-colours {
    gap: 6px !important;
    margin-top: 8px !important;
  }
}

@media (max-width: 420px) {
  .single-product form.cart,
  .single-product .woocommerce-variation-add-to-cart {
    flex-wrap: wrap !important;
  }

  .single-product form.cart .quantity.dwerg-product-quantity {
    flex-basis: 118px !important;
    width: 118px !important;
    min-width: 118px !important;
  }

  .single-product .single_add_to_cart_button {
    flex: 1 1 190px !important;
    min-width: 0 !important;
  }
}

/* =========================================================
   MAAK DE LOOK COMPLEET / PRODUCTLOOPS
========================================================= */
@media (max-width: 767px) {
  .dwerg-complete-look-products .elementor-loop-container,
  .dw-look-shortcode__grid,
  .dw-look-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 10px !important;
  }

  .dw-look-detail {
    padding-top: 16px !important;
    padding-bottom: 72px !important;
  }

  .dw-look-detail__grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .dw-look-detail__photo {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
  }

  .dw-look-product {
    grid-template-columns: 84px minmax(0, 1fr) !important;
    gap: 13px !important;
    padding: 18px 0 !important;
  }

  .dw-look-product__topline {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  .dw-look-page button.dw-look-option__button {
    min-height: 44px !important;
    padding: 8px 11px !important;
  }

  .dw-look-add-bar {
    bottom: env(safe-area-inset-bottom, 0px) !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .dw-look-page button.dw-look-add-button {
    width: 100% !important;
    min-height: 50px !important;
  }
}

/* =========================================================
   MOBIEL MENU + ZOEKEN
========================================================= */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown .dddm-menu-root > a,
  .elementor-nav-menu--dropdown .dddm-category-item > a,
  .elementor-nav-menu--dropdown .dddm-audience-item > a,
  .elementor-nav-menu--dropdown .dddm-menu-root > .elementor-item,
  .elementor-nav-menu--dropdown .dddm-category-item > .elementor-sub-item,
  .elementor-nav-menu--dropdown .dddm-audience-item > .elementor-sub-item {
    min-height: 46px !important;
    display: flex !important;
    align-items: center !important;
  }

  .elementor-menu-toggle {
    min-width: 46px !important;
    min-height: 46px !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation;
  }
}

@media (max-width: 767px) {
  .elementor-search-form__input,
  input[type="search"].elementor-search-form__input,
  .e-search-form input[type="search"],
  input[name="s"] {
    font-size: 16px !important; /* voorkomt browser-zoom op iOS/Android */
  }

  .elementor-search-form__submit,
  .e-search-form button,
  .e-search-form__submit {
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

/* =========================================================
   ALGEMEEN: lange tekst en embeds nooit laten overlopen
========================================================= */
@media (max-width: 767px) {
  .dwerg-cart-shortcode,
  .dwerg-checkout-shortcode,
  .dwerg-archive-page,
  .dw-look-page,
  .dw-look-shortcode {
    overflow-wrap: anywhere;
  }

  .dwerg-cart-shortcode img,
  .dwerg-checkout-shortcode img,
  .dwerg-archive-page img,
  .dw-look-page img,
  .dw-look-shortcode img {
    max-width: 100%;
  }
}

/* =========================================================
   PRODUCTKAARTEN — mobiel ritme
========================================================= */
@media (max-width: 767px) {
  .dwerg-card-loop {
    min-width: 0 !important;
  }

  .dwerg-card-loop .dwerg-media {
    border-radius: 13px !important;
  }

  .dwerg-card-brand {
    margin-top: 10px !important;
    font-size: .68rem !important;
  }

  .dwerg-card-name,
  .dwerg-card-name a {
    font-size: .86rem !important;
    line-height: 1.32 !important;
  }

  .dwerg-card-price .price,
  .woocommerce .dwerg-card-price .price {
    font-size: .86rem !important;
  }

  .dwerg-card-colours {
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .dwerg-card-colour {
    flex-basis: 13px !important;
    width: 13px !important;
    min-width: 13px !important;
    height: 13px !important;
    min-height: 13px !important;
  }
}

/* WooCommerce mag ordertabellen op mobiel niet opnieuw naar losse block-cellen
   transformeren; dat zou onze twee nette kolommen weer uit elkaar trekken. */
@media (max-width: 767px) {
  body.woocommerce-order-received table.shop_table.order_details thead {
    display: table-header-group !important;
  }

  body.woocommerce-order-received table.shop_table.order_details tbody {
    display: table-row-group !important;
  }

  body.woocommerce-order-received table.shop_table.order_details tfoot {
    display: table-footer-group !important;
  }

  body.woocommerce-order-received table.shop_table.order_details tr {
    display: table-row !important;
  }

  body.woocommerce-order-received table.shop_table.order_details th,
  body.woocommerce-order-received table.shop_table.order_details td {
    display: table-cell !important;
    text-align: left !important;
  }

  body.woocommerce-order-received table.shop_table.order_details th:last-child,
  body.woocommerce-order-received table.shop_table.order_details td:last-child {
    text-align: right !important;
  }

  body.woocommerce-order-received table.shop_table.order_details td::before {
    content: none !important;
    display: none !important;
  }
}
@media (max-width: 600px) {
  html body .dw-sidecart-qty-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

/* =========================================================
   SINGLE PRODUCT — KLEURPALET v4.6.3
   Basis staat in size-picker.css; hier alleen mobiele begrenzing zodat
   de globale touchregel de swatches niet opnieuw naar 44px oprekt.
========================================================= */
@media (max-width: 767px) {
  .single-product .dwerg-colours {
    padding: 0 0 12px !important;
  }
  .single-product .dwerg-colour-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 36px) !important;
    grid-auto-rows: 36px !important;
    justify-content: start !important;
    gap: 7px !important;
    width: max-content !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .single-product button.dwerg-colour {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    padding: 4px !important;
    border-radius: 999px !important;
  }
  .single-product .dwerg-colour-swatch {
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px !important;
    border-radius: 999px !important;
  }
}


/* Kleurstalen zijn een compacte radiogroep; het visuele doelwit blijft bewust
   kleiner dan de gewone CTA's. De omringende 36px knop + 7px gap voorkomt
   dat het palet weer uitgroeit tot grote pillen. */
@media (max-width: 767px) {
  .single-product button.dwerg-colour {
    min-height: 36px !important;
  }
}


/* =========================================================
   SINGLE PRODUCT — safe responsive constraints v4.16.0
   Geen Elementor-kolommen herschikken: Elementor/Woo bepalen zelf de layout.
   Alleen onze eigen controls mogen nooit buiten hun kolom lopen.
========================================================= */
@media (max-width: 767px) {
  body.single-product { overflow-x: clip; }

  body.single-product .woocommerce-product-gallery,
  body.single-product form.cart,
  body.single-product .variations_form,
  body.single-product .dwerg-sizes,
  body.single-product .dwerg-colours {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.single-product .dwerg-sizes-top {
    align-items: center;
    flex-wrap: wrap;
  }
  body.single-product .dwerg-sizes-tabel {
    margin-left: auto;
  }

  body.single-product .dwerg-colour-grid {
    grid-template-columns: repeat(6, 36px) !important;
    width: min(100%, max-content) !important;
    max-width: 100% !important;
  }

  body.single-product form.cart,
  body.single-product .woocommerce-variation-add-to-cart {
    max-width: 100% !important;
  }
}

@media (max-width: 360px) {
  body.single-product .dwerg-colour-grid {
    grid-template-columns: repeat(5, 36px) !important;
  }
}


/* =========================================================
   PRODUCTKAART — kleurstalen globaal
   De shortcode wordt ook in Elementor Loop Grid gebruikt op de homepage.
   Deze basis mag daarom niet alleen in single-product CSS staan.
========================================================= */
.dwerg-card-colours {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  width: 100%;
  max-width: 100%;
  margin: 9px 0 0 !important;
  padding: 0 !important;
  line-height: 1;
  overflow: hidden;
}

.dwerg-card-colours a {
  text-decoration: none !important;
}

.dwerg-card-colour {
  display: inline-block !important;
  flex: 0 0 14px !important;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  padding: 0 !important;
  border: 1px solid rgba(32, 28, 24, .14) !important;
  border-radius: 999px !important;
  background: var(--dw-colour) !important;
  box-shadow: 0 1px 2px rgba(32, 28, 24, .06);
  line-height: 0;
  box-sizing: border-box;
}

.dwerg-card-colour:hover,
.dwerg-card-colour:focus-visible {
  border-color: rgba(32, 28, 24, .22) !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1fa06a;
  outline: none;
}

.dwerg-card-colour-more {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 25px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(32, 28, 24, .10);
  border-radius: 999px;
  background: rgba(245, 240, 231, .78);
  color: rgba(32, 28, 24, .62);
  font-family: "DM Sans", sans-serif;
  font-size: .65rem;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
}

/* =========================================================
   HOME — Nieuw binnen v4.16.5
   BELANGRIJK: kaartbreedte/flex-basis/0.75-mobile sizing blijft volledig
   van Elementor. Deze laag doet uitsluitend:
   1) kleurstalen direct onder de kaart houden;
   2) overbodige verticale ruimte verwijderen;
   3) compacte onderpadding instellen.
========================================================= */
body.home .dwerg-home-product-rail,
body.home .dwerg-home-product-rail .elementor-widget-container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.home .dwerg-home-product-rail-section {
  min-height: 0 !important;
  padding-bottom: 12px !important;
}

/*
 * Elementor Loop Item 779 heeft de klikbare .dwerg-card-loop en de
 * [dwerg_product_colors]-shortcode als twee siblings. Elementor kan die op
 * sommige breakpoints uit elkaar drukken. Alleen wanneer stalen aanwezig zijn
 * maken we het INTERIEUR van het item een compacte verticale stack. De breedte
 * van het item zelf wordt nergens aangeraakt.
 */
body.home .dwerg-home-product-rail__item.has-dwerg-colours {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  align-self: flex-start !important;
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

body.home .dwerg-home-product-rail__item.has-dwerg-colours > .dwerg-card-loop {
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-bottom: 0 !important;
}

body.home .dwerg-card-colours-host {
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 7px 0 0 !important;
  padding: 0 !important;
  align-self: stretch !important;
}

body.home .dwerg-card-colours-host > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

body.home .dwerg-card-colours {
  justify-content: flex-start !important;
  gap: 7px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
  body.home .dwerg-home-product-rail-section {
    padding-bottom: 10px !important;
  }

  body.home .dwerg-card-colours-host {
    margin-top: 6px !important;
  }
}

@media (max-width: 767px) {
  body.home .dwerg-home-product-rail-section {
    padding-bottom: 8px !important;
  }

  body.home .dwerg-card-colours-host {
    margin-top: 6px !important;
  }

  body.home .dwerg-card-colours {
    gap: 6px !important;
  }

  body.home .dwerg-card-colour {
    flex-basis: 13px !important;
    width: 13px !important;
    min-width: 13px !important;
    height: 13px !important;
    min-height: 13px !important;
  }
}
