.mg-family-table-view {
    clear: both;
    margin: 0 0 24px;
    font-family: Roboto, Arial, sans-serif;
}

.mg-family-table-view,
.mg-family-table-view *,
.mg-family-table-view *::before,
.mg-family-table-view *::after {
    font-family: Roboto, Arial, sans-serif !important;
}

.mg-family-table-view__bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    padding: 6px 0;
}

.mg-family-table-view__label {
    display: none;
}

.mg-family-table-view__switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow: visible;
    border: 0;
    background: transparent;
}

.mg-family-table-view__toggle {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 1px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #a8a8a8;
    cursor: pointer;
    transition: color .15s ease;
}

.mg-family-table-view__toggle svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mg-family-table-view__toggle:hover,
.mg-family-table-view__toggle:focus-visible {
    color: #737373;
}

.mg-family-table-view__toggle.is-active {
    color: #c9181e;
}

.mg-category-products-col.is-family-view-loading {
    overflow-anchor: none;
}

.mg-family-table-view__panel {
    padding-top: 0;
}

.mg-family-table-view__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    font: 600 15px/1.4 Roboto, Arial, sans-serif;
    color: #444;
}

.mg-family-table-view__status[hidden] {
    display: none;
}

.mg-family-table-view__status.is-error {
    flex-direction: column;
    color: #be1a1a;
}

.mg-family-table-view__status button {
    padding: 9px 16px;
    border: 1px solid #c9181e;
    border-radius: 6px;
    background: #fff;
    color: #be1a1a;
    font-weight: 700;
}

.mg-family-table-view__spinner {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 50%;
    background: conic-gradient(from -90deg, #BE1A1A 0 82%, #FFCFCF 82% 94%, #BE1A1A 94% 100%);
    animation: mg-family-table-spin 1.15s linear infinite;
}

.mg-family-table-view__spinner::before {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.mg-family-table-view__spinner::after {
    position: absolute;
    inset: 25px 13px;
    background: url("mg-preloader-logo.png") center / contain no-repeat;
    content: "";
    animation: mg-family-table-spin-reverse 1.15s linear infinite;
}

.mg-family-table-view__loading-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

@keyframes mg-family-table-spin {
    to { transform: rotate(360deg); }
}

@keyframes mg-family-table-spin-reverse {
    to { transform: rotate(-360deg); }
}

/* Replace the BeRocket page loader with the same branded loader. */
.bapf_loader_page .bapf_lcontainer {
    width: 72px !important;
    height: 72px !important;
    margin-top: -36px !important;
    margin-left: -36px !important;
}

.bapf_loader_page .bapf_lcontainer .bapf_loader {
    position: relative !important;
    display: block !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: conic-gradient(from -90deg, #BE1A1A 0 82%, #FFCFCF 82% 94%, #BE1A1A 94% 100%) !important;
    animation: mg-family-table-spin 1.15s linear infinite !important;
}

.bapf_loader_page .bapf_lcontainer .bapf_loader > span {
    display: none !important;
}

.bapf_loader_page .bapf_lcontainer .bapf_loader::before {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.bapf_loader_page .bapf_lcontainer .bapf_loader::after {
    position: absolute;
    inset: 25px 13px;
    background: url("mg-preloader-logo.png") center / contain no-repeat;
    content: "";
    animation: mg-family-table-spin-reverse 1.15s linear infinite;
}

.mg-category-products-col.is-family-table-view > .products,
.mg-category-products-col.is-family-table-view > .woocommerce-pagination,
.mg-category-products-col.is-family-table-view > nav.woocommerce-pagination {
    display: none !important;
}

.mg-family-table-view__summary {
    margin: 0 0 16px;
    color: #6d6d6d;
    font: 400 14px/1.4 Roboto, Arial, sans-serif;
}

.mg-family-table-group {
    margin: 0;
    border-bottom: 1px solid #dedede;
}

.mg-family-table-group__toggle {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 14px;
    padding: 24px 38px 16px 0;
    border: 0;
    background: #fff;
    color: #171717;
    text-align: left;
    cursor: pointer;
}

.mg-family-table-group__media {
    display: none;
    width: 116px;
    height: 94px;
    flex: 0 0 116px;
    align-items: center;
    justify-content: center;
}

.mg-family-table-group__media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mg-family-table-group__heading {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
}

.mg-family-table-group__reviews {
    display: none;
    align-items: center;
    gap: 5px;
    color: #3979c6;
    font: 400 16px/1.2 Roboto, Arial, sans-serif;
}

.mg-family-table-group__stars {
    color: #f4a61d;
    font-size: 20px;
    letter-spacing: 1px;
}

.mg-family-table-group__title {
    display: block;
    margin: 0;
    color: #171717;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.mg-family-table-group__chevron {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #171717;
    border-bottom: 1.5px solid #171717;
    transform: translateY(-65%) rotate(45deg);
    transition: transform .2s ease;
}

.mg-family-table-group.is-open .mg-family-table-group__toggle {
    min-height: 118px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.mg-family-table-group.is-open .mg-family-table-group__media,
.mg-family-table-group.is-open .mg-family-table-group__reviews {
    display: flex;
}

.mg-family-table-group.is-open .mg-family-table-group__chevron {
    transform: translateY(-35%) rotate(225deg);
}

.mg-family-table-group__body[hidden] {
    display: none !important;
}

.mg-family-table-group__body {
    --mg-fixed-columns-width: 462px;
    position: relative;
    padding-bottom: 24px;
}

.mg-family-table-group__scroll {
    position: relative;
    overflow-x: auto;
    isolation: isolate;
    border: 1px solid #d7d7d7;
    border-radius: 7px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #BE1A1A #eeeeee;
}

.mg-family-table-group__scroll::-webkit-scrollbar {
    display: none;
}

.mg-family-table-group__scroll::-webkit-scrollbar-track {
    background: #eeeeee;
}

.mg-family-table-group__scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #BE1A1A;
}

@media (min-width: 768px) {
    .mg-family-table-group__scroll {
        scrollbar-width: none;
    }

    .mg-family-table-scrollbar {
        position: relative;
        width: calc(100% - var(--mg-fixed-columns-width));
        height: 7px;
        margin-left: var(--mg-fixed-columns-width);
        overflow: hidden;
        border-radius: 999px;
        background: #eeeeee;
        cursor: pointer;
        touch-action: none;
    }

    .mg-family-table-scrollbar__thumb {
        position: absolute;
        top: 1px;
        left: 0;
        height: 5px;
        border-radius: 999px;
        background: #BE1A1A;
        cursor: grab;
        touch-action: none;
    }

    .mg-family-table-scrollbar__thumb:active {
        cursor: grabbing;
    }
}

.mg-family-table {
    --mg-sticky-sku-width: 210px;
    --mg-sticky-price-width: 120px;
    --mg-sticky-cart-width: 132px;
    width: 100%;
    min-width: 1080px;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    font: 400 13px/1.35 Roboto, Arial, sans-serif;
}

.mg-family-table th,
.mg-family-table td {
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;

    font-family: Roboto;
font-weight: 400;
font-size: 16px;
line-height: 140%;
letter-spacing: 0%;

}

.mg-family-table tr > :nth-child(1) {
    left: 0;
    width: var(--mg-sticky-sku-width);
    min-width: var(--mg-sticky-sku-width);
    max-width: var(--mg-sticky-sku-width);
}

.mg-family-table tr > :nth-child(2) {
    left: var(--mg-sticky-sku-width);
    width: var(--mg-sticky-price-width);
    min-width: var(--mg-sticky-price-width);
    max-width: var(--mg-sticky-price-width);
}

.mg-family-table tr > :nth-child(3) {
    left: calc(var(--mg-sticky-sku-width) + var(--mg-sticky-price-width));
    width: var(--mg-sticky-cart-width);
    min-width: var(--mg-sticky-cart-width);
    max-width: var(--mg-sticky-cart-width);
    text-align: center;
}

.mg-family-table tr > :nth-child(-n+3) {
    position: sticky;
    z-index: 2;
    background: #fff;
}

.mg-family-table thead tr > :nth-child(-n+3) {
    z-index: 4;
    background: #f4f4f4;
}

.mg-family-table tbody tr:nth-child(even) > :nth-child(-n+3) {
    background: #fafafa;
}

.mg-family-table tr:last-child th,
.mg-family-table tr:last-child td {
    border-bottom: 0;
}

.mg-family-table th:last-child,
.mg-family-table td:last-child {
    border-right: 0;
}

.mg-family-table thead th {
    background: #f4f4f4;
    color: #202020;
    font-family: Roboto;
font-weight: 700;
padding: 8px !important;
font-size: 16px;
line-height: 140%;
letter-spacing: 0%;

}

.mg-family-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.mg-family-table tbody th[data-label="SKU"] > a,
.mg-family-table tbody th[data-label="SKU"] > a:visited {
    color: #171717;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: 0;
    text-decoration: underline solid currentColor !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 1px !important;
    text-decoration-skip-ink: auto !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mg-family-table tbody th[data-label="SKU"] > a:hover,
.mg-family-table tbody th[data-label="SKU"] > a:focus-visible {
    color: #be1a1a;
    text-decoration: underline solid currentColor !important;
}

.mg-family-table__price del {
    display: block;
    color: #777;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: 0;
    text-decoration: line-through;
}

.mg-family-table__price ins {
    color: #be1a1a;
    text-decoration: none;
}

.mg-family-table__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    min-height: 40px;
    padding: 9px 12px !important;
    border: 1px solid #c9181e !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #171717 !important;
    font: 400 16px/1 Roboto, Arial, sans-serif !important;
    font-style: normal !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.mg-family-table__button > span {
    display: inline !important;
    font-family: Roboto, Arial, sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-transform: none !important;
}

.mg-family-table__button > span::before,
.mg-family-table__button > span::after {
    display: none !important;
    content: none !important;
}

.mg-family-table__button:hover,
.mg-family-table__button:focus-visible {
    border-color: #BE1A1A !important;
    background: #BE1A1A !important;
    color: #fff !important;
}

.mg-family-table__button:hover > span,
.mg-family-table__button:focus-visible > span {
    color: #fff !important;
}

.mg-family-table__button.is-disabled {
    border-color: #c8c8c8 !important;
    background: #c8c8c8 !important;
    color: #fff !important;
    cursor: not-allowed;
}

.mg-family-table__button.is-loading {
    opacity: .65;
    pointer-events: none;
}

.mg-family-table__button.is-added {
    background: #c9181e !important;
    border-color: #c9181e !important;
    color: #fff !important;
}

.mg-family-table__button.is-added > span {
    color: #fff !important;
    font-weight: 400 !important;
}

.mg-family-table__button.is-added > span::before {
    display: inline !important;
    margin-right: 4px;
    content: "✓" !important;
}

.mg-family-table__button::before,
.mg-family-table__button::after,
.mg-family-table__button.is-added::before,
.mg-family-table__button.is-added::after,
.mg-family-table__button.added::before,
.mg-family-table__button.added::after {
    display: none !important;
    content: none !important;
}

.mg-family-table-view__empty {
    margin: 20px 0;
    padding: 22px;
    border: 1px solid #e3e3e3;
    border-radius: 7px;
    background: #fafafa;
}

/* The category toolbar already communicates the selected results; hide Woo's duplicate counter. */
body.tax-product_cat .mg-category-products-col > .woocommerce-result-count {
    display: none !important;
}

@media (max-width: 767px) {
    .mg-family-table-view {
        display: none !important;
    }
}
