/* The native table is the fallback. No layout change without successful JS validation. */
.hb-varianttabell-wrap .me-mb-owned { display: none; }
.me-dim-nav__actions-group > .me-mb-accessories-toggle { display: none; }

@media (max-width: 768px) {
  /* The original summary, tabs, Navigator and purchase table remain siblings.
     Only a validated product summary receives this mobile presentation. */
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .woocommerce-breadcrumb {
    order: 10;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 10px;
    padding: 0 0 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.5;
    scrollbar-width: thin;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .single-product-category { display: none; }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > h1.product_title {
    order: 20;
    margin: 0 0 8px;
    padding: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    overflow-wrap: anywhere;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > p.price {
    order: 30;
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.4;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .me-dim-nav-slot {
    order: 40;
    width: 100%;
    min-width: 0;
    margin: 12px 0 16px;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .hb-varianttabell-wrap {
    order: 50;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .woocommerce-tabs {
    order: 60;
    min-width: 0;
    margin-top: 24px;
  }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .product_meta { order: 70; }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .hb-varianttabell-wrap.me-mb-active .me-mb-title { display: none; }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary > .me-dim-nav-slot > .me-dim-nav {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__product-context {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.4;
  }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__row { gap: 8px; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__dimensions,
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__actions-group {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__title { margin: 0 0 7px; font-size: 14px; line-height: 1.4; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__list { gap: 6px; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__link {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 2px;
    font-size: 14px;
  }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__actions-group[data-me-mb-accessories-open] > .me-dim-nav__actions-title { display: none; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__actions-group[data-me-mb-accessories-open='false'] > .me-dim-nav__actions { display: none; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__actions-group > .me-mb-accessories-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #dfe1d9;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #21231e;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    cursor: pointer;
  }
  .woocommerce div.product .me-mb-product-summary .me-mb-accessories-toggle::after {
    content: '';
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: -3px 4px 0 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
  }
  .woocommerce div.product .me-mb-product-summary .me-mb-accessories-toggle[aria-expanded='true']::after {
    margin-top: 3px;
    transform: rotate(225deg);
  }
  .woocommerce div.product .me-mb-product-summary .me-mb-accessories-toggle:focus-visible { outline: 2px solid #925500; outline-offset: 3px; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__actions-group[data-me-mb-accessories-open='true'] > .me-dim-nav__actions { margin-top: 8px; }
  .woocommerce div.product .me-mb-product-summary .me-dim-nav__context { margin-top: 8px; font-size: 12px; }
  .woocommerce div.product > .summary.entry-summary.me-mb-product-summary.me-mb-nav-linked > .me-dim-nav-slot .me-dim-nav__context { display: none; }

  .hb-varianttabell-wrap.me-mb-ready > .me-mb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #dfe1d9;
    margin-top: 18px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    color: #21231e;
    font: inherit;
  }
  .hb-varianttabell-wrap.me-mb-ready .me-mb-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: #21231e;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }
  .hb-varianttabell-wrap.me-mb-ready .me-mb-preview { color: #64675e; font-size: 11px; }
  .hb-varianttabell-wrap.me-mb-active {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    color: #21231e;
    background: #fff;
    font: inherit;
    line-height: 1.4;
  }
  .hb-varianttabell-wrap.me-mb-active > .me-mb-panel { display: block; padding: 0; margin: 0 0 10px; }
  .hb-varianttabell-wrap.me-mb-active.me-mb-choice-redundant > .me-mb-panel { display: none; margin: 0; }
  .hb-varianttabell-wrap.me-mb-active > .me-mb-dimension-note {
    display: block;
    padding: 0;
    margin: 0 0 10px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .hb-varianttabell-wrap.me-mb-active > .me-mb-dimension-note[hidden] { display: none; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-title {
    padding: 0;
    margin: 0 0 16px;
    color: #21231e;
    font: inherit;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-title[hidden] { display: none; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-choice {
    display: grid;
    grid-template-columns: minmax(45px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-choice[hidden] { display: none; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-label { margin: 0; font: inherit; font-size: 15px; font-weight: 600; }
  .hb-varianttabell-wrap.me-mb-active select.me-mb-select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 8px 28px 8px 10px;
    border: 1px solid #aeb2a4;
    border-radius: 2px;
    box-shadow: none;
    background-color: #fff;
    color: #21231e;
    font: inherit;
    font-size: 16px;
    line-height: 1.3;
    text-overflow: ellipsis;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-status { margin: 7px 0 0; color: #64675e; font-size: 12px; line-height: 1.4; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-status:empty { display: none; }

  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
  }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > thead { display: none; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody { display: block; width: 100%; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row { display: none; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-selected {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: 'sku sku stock' 'price price price' 'total total total' 'quantity buy buy' 'unavailable unavailable unavailable';
    column-gap: 12px;
    row-gap: 0;
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 0;
    background: transparent;
  }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > td {
    display: block;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: inherit;
    white-space: normal;
    vertical-align: baseline;
    font: inherit;
  }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > .me-mb-dimension { display: none; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > .me-mb-sku {
    grid-area: sku;
    padding: 0 0 17px;
    color: #64675e;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-sku::before { content: 'Art.nr '; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > .me-mb-stock {
    grid-area: stock;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 3px 5px;
    padding: 0 0 17px;
    text-align: right;
    color: #64675e;
    font-size: 12px;
    line-height: 1.4;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-stock > .hb-vt-dot { order: 1; flex: 0 0 9px; width: 9px; height: 9px; border-radius: 1px; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-stock-text { display: inline; order: 2; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-stock > .hb-vt-restnotis { order: 3; flex-basis: 100%; max-width: none; margin-top: 5px; font-size: 12px; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-price { grid-area: price; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-has-prices > .hb-vt-stpris-varde,
  .hb-varianttabell-wrap.me-mb-active .me-mb-has-prices > .hb-vt-trappa { display: none; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-prices { display: block; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-price-title { margin: 0 0 9px; color: #21231e; font-size: 15px; font-weight: 600; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-price-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0 9px 7px 31px;
    border-bottom: 1px solid #dfe1d9;
    color: #64675e;
    font-size: 13px;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-price-head > span:last-child { text-align: right; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 8px 9px;
    border: 0;
    border-bottom: 1px solid #dfe1d9;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: #21231e;
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    cursor: pointer;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier::before { content: ''; box-sizing: border-box; width: 14px; height: 14px; border: 1px solid #85897e; border-radius: 50%; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier[aria-pressed='true'] { background: #f3f4ef; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier[aria-pressed='true']::before { border: 4px solid #363a31; background: #fff; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier:disabled { cursor: default; opacity: 1; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier:disabled::before { border-color: #c4c7bf; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier-readonly { cursor: default; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier-readonly::before { border: 0; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier-price { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier-price .woocommerce-Price-amount { color: inherit; font: inherit; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier[aria-pressed='true'] .me-mb-tier-price { font-weight: 600; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-presented-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0 10px;
    color: #21231e;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-presented-total[hidden] { display: none !important; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-total-label { font-size: 14px; font-weight: 400; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-total-value { text-align: right; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-total-value .woocommerce-Price-amount { color: inherit; font: inherit; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-quantity-help { margin: 10px 0; color: #64675e; font-size: 12px; line-height: 1.45; }

  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > .me-mb-total {
    grid-area: total;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0 10px;
    color: #21231e;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-total::before { content: 'Summa'; color: #21231e; font-size: 14px; font-weight: 400; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-total[data-me-mb-total-mode='excl']::before,
  html.hb-moms-excl .hb-varianttabell-wrap.me-mb-active .me-mb-total[data-me-mb-total-mode='dual']::before { content: 'Summa exkl. moms'; }
  html.hb-moms-incl .hb-varianttabell-wrap.me-mb-active .me-mb-total[data-me-mb-total-mode='dual']::before { content: 'Summa inkl. moms'; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-total > .hb-moms-pris { text-align: right; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > .me-mb-total[data-me-mb-presented='true'] { display: none; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-quantity { grid-area: quantity; align-self: end; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-quantity-label { display: block; margin: 0 0 5px; color: #21231e; font-size: 13px; line-height: 1.4; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-quantity form.hb-vt-form { margin: 0; padding: 0; border: 0; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > td input.hb-vt-antal[type='number'] {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid #aeb2a4 !important;
    border-radius: 2px !important;
    background: #fff !important;
    color: #21231e !important;
    -webkit-text-fill-color: #21231e !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-buy { grid-area: buy; align-self: end; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-buy button.hb-vt-kop {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 2px;
    box-shadow: none;
    background: #f39200;
    color: #171717;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
  }
  .hb-varianttabell-wrap.me-mb-active .me-mb-buy button.hb-vt-kop:disabled { opacity: .55; }
  .hb-varianttabell-wrap.me-mb-active > table.hb-varianttabell > tbody > tr.me-mb-row > .me-mb-unavailable { grid-area: unavailable; margin: 16px 0 0; color: #64675e; font-size: 15px; }
  .hb-varianttabell-wrap.me-mb-active .me-mb-select:focus-visible,
  .hb-varianttabell-wrap.me-mb-active .me-mb-tier:focus-visible,
  .hb-varianttabell-wrap.me-mb-ready .me-mb-toggle:focus-visible,
  .hb-varianttabell-wrap.me-mb-active .hb-vt-antal:focus-visible,
  .hb-varianttabell-wrap.me-mb-active .hb-vt-kop:focus-visible { outline: 2px solid #925500; outline-offset: 3px; }
  .me-sf-original.me-mb-finder-active > .me-sf-original__matches,
  .me-sf-original.me-mb-finder-active > .me-sf-original__table > .me-sf-original__swipe { display: none; }
}
