/* ==========================================================================
   MKShop Commerce UX — Phase 1 (v0.6.0)
   Header, catalogue cards, filters, product detail, checkout and mobile.
   ========================================================================== */

/* Compact, purchase-focused header */
.mk-header {
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 1px 0 rgba(17, 24, 39, .05);
}

.mk-header__main {
    min-height: 70px;
    grid-template-columns: auto minmax(320px, 1fr) auto;
    gap: 22px;
}

.mk-brand {
    min-width: 0;
}

.mk-brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.mk-brand .custom-logo {
    display: block;
    width: auto;
    max-width: 400px;
    max-height: 108px;
}

.mk-search-form input[type="search"] {
    height: 44px;
    padding: 0 108px 0 18px;
    background: #f6f7f8;
}

.mk-search-form button {
    top: 4px;
    right: 4px;
    height: 36px;
    padding: 0 18px;
}

.mk-header-actions {
    gap: 8px;
}

.mk-header-action {
    min-width: 44px;
    width: auto;
    height: 44px;
    padding: 0 12px;
    gap: 7px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
}

.mk-header-action svg,
.mk-menu-toggle svg,
.mk-checkout-header__secure svg,
.mkshop-filter-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.mk-search-toggle {
    display: none;
}

.mk-header-action .mk-cart-count {
    top: -7px;
    right: -7px;
    min-width: 20px;
    width: auto;
    height: 20px;
    padding: 0 5px;
    font-size: 11px;
}

.mk-nav__inner {
    min-height: 44px;
    justify-content: center;
}

.mk-nav ul {
    justify-content: center;
    gap: 8px;
}

.mk-nav a {
    padding: 11px 13px;
    font-size: 15px;
}

.mk-nav__mobile-head {
    display: none;
}

/* Simplified checkout header */
.mk-header--checkout {
    position: static;
}

.mk-checkout-header__main {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mk-checkout-header__secure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #166534;
    font-weight: 700;
}

/* Catalogue header and toolbar */
.woocommerce-products-header {
    max-width: 940px;
    margin: 0 auto 28px !important;
    text-align: center;
}

.woocommerce-products-header__title.page-title {
    margin-bottom: 10px;
    font-size: clamp(28px, 3vw, 38px);
}

.term-description {
    max-width: 860px;
    margin: 0 auto;
    line-height: 1.6;
}

.term-description p {
    margin: 0 0 7px;
}

.mkshop-catalog-tools {
    margin: 0 0 22px;
    border: 1px solid var(--mk-border);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: opacity .2s ease;
}

.mkshop-catalog-tools.is-loading {
    opacity: .55;
    pointer-events: none;
}

.mkshop-catalog-toolbar {
    min-height: 58px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--mk-border);
}

.mkshop-catalog-count {
    margin-right: auto;
    color: var(--mk-muted);
    font-weight: 600;
}

.mkshop-catalog-count .woocommerce-result-count {
    margin: 0 !important;
    float: none !important;
}

.mkshop-catalog-ordering .woocommerce-ordering {
    float: none !important;
    margin: 0 !important;
}

.mkshop-catalog-ordering select {
    min-width: 190px;
    height: 40px;
    padding: 0 36px 0 12px;
    background-color: #fff;
}

.mkshop-filter-toggle {
    display: none;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--mk-border);
    border-radius: 10px;
    background: #fff;
    color: var(--mk-black);
    font-weight: 700;
}

.mkshop-filter-count {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mk-red);
    color: #fff;
    font-size: 11px;
}

.mkshop-filter-panel {
    padding: 16px 18px 10px;
    background: #fafafa;
}

.mkshop-filter-panel__head,
.mkshop-filter-panel__actions {
    display: none;
}

.mkshop-filter-panel__body {
    display: grid;
    gap: 12px;
}

.mkshop-filter-group {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.mkshop-filter-label {
    font-size: 14px;
}

.mkshop-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    overflow: visible;
}

.mkshop-filter-pill {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 13px;
    box-shadow: none;
}

.mkshop-active-filters {
    padding: 10px 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mkshop-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 10px;
}

.mkshop-active-filter span {
    font-size: 17px;
    line-height: 1;
}

.mkshop-clear-filters {
    border: 0;
    background: transparent;
    color: var(--mk-red);
    padding: 7px 4px;
    font-weight: 700;
}

.mkshop-filter-overlay {
    display: none;
}

/* Product cards: stable height, clear hierarchy and useful condition details */
ul.products {
    align-items: stretch;
}

ul.products li.product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 14px !important;
}

ul.products li.product>.woocommerce-LoopProduct-link {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

ul.products li.product img {
    aspect-ratio: 4 / 3;
    margin-bottom: 12px !important;
    transition: transform .25s ease;
}

ul.products li.product:hover img {
    transform: scale(1.015);
}

ul.products li.product .woocommerce-loop-product__title {
    min-height: 0;
    margin-bottom: 8px !important;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

ul.products li.product .price {
    margin-top: auto !important;
    margin-bottom: 7px !important;
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

ul.products li.product .price ins {
    text-decoration: none;
}

.mk-loop-brand {
    min-height: 17px;
}

.mk-loop-condition {
    align-self: flex-start;
    margin: 0 14px 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff4f4;
    color: #a61b20;
    font-size: 11px;
    font-weight: 800;
}

.mk-loop-stock,
.mk-loop-warranty {
    padding: 0 14px;
    font-size: 12px;
}

.mk-loop-stock {
    margin: 0 0 3px;
}

.mk-loop-stock.is-low {
    color: #b45309;
}

.mk-loop-warranty {
    margin-bottom: 6px;
    color: var(--mk-muted);
}

ul.products li.product .button {
    flex: 0 0 auto;
    margin-top: 8px !important;
    border-radius: 11px;
    font-weight: 800;
}

.mk-sale-badge {
    top: 9px;
    left: 9px;
    padding: 5px 8px;
}

/* Single-product purchase layout */
.single-product .site-content {
    padding-top: 22px;
}

.single-product div.product {
    display: flow-root;
}

.single-product div.product .woocommerce-product-gallery {
    margin-bottom: 30px;
}

.single-product div.product .summary {
    background: #fff;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(17, 24, 39, .05);
}

.single-product div.product .product_title {
    font-size: clamp(25px, 2.4vw, 34px);
    line-height: 1.25;
}

.single-product div.product .price {
    margin: 14px 0;
}

.single-product .woocommerce-product-gallery__wrapper {
    border: 1px solid var(--mk-border);
    background: #fff;
}

.single-product .woocommerce-product-gallery__image img {
    aspect-ratio: 4 / 3 !important;
    object-fit: contain !important;
    background: #fff !important;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    gap: 9px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 2px 1px 7px !important;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 calc(20% - 8px);
    scroll-snap-align: start;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
}

.mk-single-meta-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.mk-single-meta-chip {
    min-width: 108px;
    padding: 8px 10px;
    border: 1px solid var(--mk-border);
    border-radius: 10px;
    background: #fafafa;
    text-decoration: none;
}

.mk-single-meta-chip span,
.mk-single-meta-chip strong {
    display: block;
}

.mk-single-meta-chip span {
    color: var(--mk-muted);
    font-size: 11px;
}

.mk-single-meta-chip strong {
    margin-top: 2px;
    color: var(--mk-black);
    font-size: 13px;
}

.mk-single-assurance {
    margin-top: 16px;
    border: 1px solid var(--mk-border);
    border-radius: 14px;
    overflow: hidden;
}

.mk-single-assurance__item {
    padding: 12px 13px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fafafa;
}

.mk-single-assurance__item+.mk-single-assurance__item {
    border-top: 1px solid var(--mk-border);
}

.mk-single-assurance__icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf7ee;
    color: #15803d;
    font-weight: 900;
}

.mk-single-assurance__item strong,
.mk-single-assurance__item span:not(.mk-single-assurance__icon) {
    display: block;
}

.mk-single-assurance__item strong {
    margin-bottom: 2px;
    font-size: 13px;
}

.mk-single-assurance__item div>span {
    color: var(--mk-muted);
    font-size: 12px;
    line-height: 1.45;
}

.single-product div.product form.cart:not(.variations_form):not(.grouped_form),
.single-product div.product form.cart .woocommerce-variation-add-to-cart {
    align-items: stretch;
}

.single-product div.product form.cart .quantity {
    flex-basis: 88px;
}

.single-product div.product form.cart .quantity .qty {
    height: 50px;
    width: 100%;
}

.single-product div.product form.cart .button {
    font-weight: 800;
}

.mkshop-buy-now {
    background: var(--mk-red) !important;
}

.mkshop-sticky-atc__action {
    display: flex;
    gap: 8px;
}

.mkshop-sticky-atc__action .button {
    min-width: 130px;
}

.mkshop-sticky-atc__add-to-cart {
    background: var(--mk-black) !important;
}

.mkshop-sticky-atc__product img {
    object-fit: contain;
    background: #fff;
}

/* Desktop gallery / summary columns */
@media (min-width: 900px) {
    .single-product div.product .woocommerce-product-gallery {
        width: 53% !important;
        float: left !important;
    }

    .single-product div.product .summary {
        width: 43.5% !important;
        float: right !important;
        position: sticky;
        top: 128px;
    }
}

/* Remove distractions during checkout */
body.mkshop-modern-checkout .mk-topbar,
body.mkshop-modern-checkout .mk-nav,
body.mkshop-modern-checkout .mkshop-chat-balloon-wrapper,
body.mkshop-modern-checkout .mkshop-bottom-nav,
body.mkshop-modern-checkout .mk-footer,
body.mkshop-modern-checkout .mkshop-site-banner {
    display: none !important;
}

body.mkshop-modern-checkout {
    padding-bottom: 0 !important;
}

body.mkshop-modern-checkout .site-content {
    padding-top: 24px;
}

/* Responsive purchase UX */
@media (max-width: 1024px) {
    .mk-header__main {
        grid-template-columns: minmax(110px, 140px) minmax(240px, 1fr) auto;
        gap: 14px;
    }

    .mk-header-action__label {
        display: none;
    }

    .mk-header-action {
        width: 44px;
        padding: 0;
    }
}

@media (max-width: 782px) {
    .mk-header {
        top: 0;
    }

    .admin-bar .mk-header {
        top: 46px;
    }

    .mk-header__main {
        position: relative;
        min-height: 60px;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .mk-brand {
        position: absolute;
        z-index: 1;
        left: 50%;
        justify-content: center;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .mk-brand a {
        pointer-events: auto;
    }

    .mk-brand .custom-logo {
        max-width: 108px;
        max-height: 44px;
    }

    .mk-search-toggle {
        display: inline-flex;
    }

    .mk-header-actions {
        gap: 5px;
    }

    .mk-header-action {
        width: 40px;
        min-width: 40px;
        height: 40px;
        border-color: transparent;
        background: transparent;
    }

    .mk-header-action--account {
        display: none;
    }

    .mk-search-wrap {
        grid-column: 1 / -1;
        margin: 0 -2px;
        padding: 0 0 10px;
    }

    .mk-search-wrap.is-open {
        display: block;
    }

    .mk-search-form input[type="search"] {
        height: 42px;
        padding-right: 96px;
    }

    .mk-search-form button {
        height: 34px;
        padding: 0 14px;
    }

    .mk-nav {
        width: min(86vw, 340px);
    }

    .mk-nav__mobile-head {
        min-height: 60px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--mk-border);
    }

    .mk-nav__close {
        display: inline-flex;
        width: 38px;
        height: 38px;
        border: 0;
        align-items: center;
        justify-content: center;
        background: transparent;
        font-size: 28px;
    }

    .mk-nav__inner {
        padding: 6px 0 20px;
    }

    .mk-nav a {
        padding: 13px 18px;
        font-size: 15px;
    }

    .woocommerce-products-header {
        margin-bottom: 20px !important;
    }

    .term-description {
        font-size: 13px;
        line-height: 1.55;
    }

    .term-description p:nth-child(n+3) {
        display: none;
    }

    .mkshop-catalog-toolbar {
        padding: 9px 10px;
        gap: 8px;
    }

    .mkshop-catalog-count {
        display: none;
    }

    .mkshop-filter-toggle {
        display: inline-flex;
        margin-right: auto;
    }

    .mkshop-catalog-ordering {
        min-width: 0;
        flex: 1;
    }

    .mkshop-catalog-ordering .woocommerce-ordering,
    .mkshop-catalog-ordering select {
        width: 100%;
        min-width: 0;
    }

    .mkshop-active-filters {
        padding-bottom: 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .mkshop-active-filter {
        flex: 0 0 auto;
    }

    .mkshop-filter-panel {
        position: fixed;
        z-index: 10002;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(78vh, 620px);
        padding: 0;
        border-radius: 18px 18px 0 0;
        background: #fff;
        transform: translateY(105%);
        transition: transform .25s ease;
        overflow: hidden;
    }

    .mkshop-filter-open .mkshop-filter-panel {
        transform: translateY(0);
    }

    .mkshop-filter-panel__head {
        min-height: 56px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--mk-border);
    }

    .mkshop-filter-close {
        width: 38px;
        height: 38px;
        border: 0;
        background: transparent;
        font-size: 28px;
    }

    .mkshop-filter-panel__body {
        max-height: calc(78vh - 120px);
        padding: 15px 16px;
        overflow-y: auto;
    }

    .mkshop-filter-group {
        display: block;
    }

    .mkshop-filter-label {
        display: block;
        margin-bottom: 9px;
    }

    .mkshop-filter-pills {
        flex-wrap: wrap;
    }

    .mkshop-filter-panel__actions {
        min-height: 64px;
        padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
        display: grid;
        grid-template-columns: .8fr 1.2fr;
        gap: 9px;
        border-top: 1px solid var(--mk-border);
        background: #fff;
    }

    .mkshop-filter-panel__actions button {
        min-height: 44px;
        border-radius: 10px;
        font-weight: 800;
    }

    .mkshop-filter-panel__actions .mkshop-clear-filters {
        border: 1px solid var(--mk-border);
    }

    .mkshop-filter-done {
        border: 0;
        background: var(--mk-red);
        color: #fff;
    }

    .mkshop-filter-overlay {
        position: fixed;
        z-index: 10001;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, .48);
        opacity: 0;
        visibility: hidden;
        transition: .2s ease;
    }

    .mkshop-filter-open .mkshop-filter-overlay {
        opacity: 1;
        visibility: visible;
    }

    body.mkshop-filter-open {
        overflow: hidden;
    }

    ul.products {
        gap: 11px;
    }

    ul.products li.product {
        border-radius: 12px;
    }

    ul.products li.product img {
        margin-bottom: 9px !important;
    }

    ul.products li.product .woocommerce-loop-product__title {
        min-height: 53px;
        padding: 0 10px !important;
        font-size: 13px !important;
        line-height: 1.35;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .mk-loop-brand,
    ul.products li.product .price,
    .mk-loop-stock,
    .mk-loop-warranty {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mk-loop-condition {
        margin-left: 10px;
        margin-right: 10px;
    }

    .mk-loop-warranty {
        display: none;
    }

    ul.products li.product .price {
        font-size: 15px !important;
    }

    ul.products li.product .price del {
        width: 100%;
        font-size: 11px;
    }

    ul.products li.product .button {
        min-height: 40px;
        margin: 6px 9px 0 !important;
        width: calc(100% - 18px);
        padding: 9px 6px;
        font-size: 12px;
    }

    .single-product div.product .summary {
        padding: 17px;
        border-radius: 15px;
    }

    .single-product .woocommerce-product-gallery .flex-control-thumbs li {
        flex-basis: 72px;
    }

    .single-product div.product form.cart .quantity {
        flex: 0 0 74px;
    }

    .single-product div.product form.cart .button,
    .mkshop-buy-now {
        flex: 1 1 calc(50% - 45px);
        min-width: 120px;
    }

    .mkshop-sticky-add-to-cart {
        bottom: 64px;
        padding: 8px 0;
        z-index: 9998;
    }

    .mkshop-sticky-atc__inner {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mkshop-sticky-atc__action {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .mkshop-sticky-atc__action .button {
        width: 100%;
        min-width: 0;
        padding: 0 10px !important;
    }

    .mkshop-sticky-atc__action .mkshop-sticky-atc__select-options {
        grid-column: 1 / -1;
    }

    body.mkshop-sticky-atc-visible .mkshop-chat-balloon-wrapper {
        bottom: 138px;
    }
}

@media (max-width: 420px) {
    .col-full {
        padding-left: 12px;
        padding-right: 12px;
    }

    ul.products {
        gap: 8px;
    }

    .mk-loop-condition {
        font-size: 10px;
        padding: 3px 6px;
    }

    .mk-loop-stock {
        font-size: 11px;
    }

    .single-product div.product form.cart .quantity,
    .single-product div.product form.cart .button,
    .mkshop-buy-now {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {

    .mk-header,
    .mk-nav,
    .mkshop-filter-panel,
    ul.products li.product,
    ul.products li.product img,
    .mkshop-sticky-add-to-cart {
        transition: none !important;
    }
}

.mk-header--checkout,
.mk-header--checkout.mk-header--pinned,
.mk-header--checkout.mk-header--unpinned {
    transform: none !important;
}

body.mkshop-filter-open .site {
    overflow: visible;
}

/* Keep long taxonomy copy available without pushing products below the fold. */
.mkshop-category-description {
    margin: 34px 0 0;
    padding: 0 18px;
    border: 1px solid var(--mk-border);
    border-radius: 14px;
    background: #fafafa;
    color: var(--mk-muted);
}

.mkshop-category-description summary {
    padding: 16px 0;
    color: var(--mk-black);
    cursor: pointer;
    font-weight: 800;
}

.mkshop-category-description__content {
    padding: 0 0 18px;
    line-height: 1.65;
}

.mkshop-category-description__content> :last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   MKShop v0.6.1 — Header and single-product layout hotfix
   ========================================================================== */

/* --------------------------------------------------------------------------
   Desktop header: force one predictable row
   -------------------------------------------------------------------------- */
@media (min-width: 783px) {
    body:not(.mkshop-modern-checkout) .mk-header__main {
        display: grid !important;
        grid-template-columns: minmax(100px, 130px) minmax(0, 1fr) auto !important;
        grid-template-areas: "brand search actions";
        align-items: center !important;
        column-gap: 18px !important;
        row-gap: 0 !important;
        min-height: 64px !important;
    }

    /* The mobile menu button must not occupy a desktop grid cell. */
    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-menu-toggle {
        display: none !important;
        grid-area: none !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-brand {
        grid-area: brand;
        justify-self: start;
        min-width: 0 !important;
        margin: 0 !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-brand .custom-logo {
        display: block;
        width: auto !important;
        max-width: 110px !important;
        max-height: 44px !important;
        margin: 0 !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-search-wrap {
        grid-area: search;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main .mk-search-form {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-header-actions {
        grid-area: actions;
        justify-self: end;
        flex-wrap: nowrap !important;
        margin: 0 !important;
    }
}

/* --------------------------------------------------------------------------
   Single product: remove Storefront float conflicts
   -------------------------------------------------------------------------- */
body.single-product #primary,
body.single-product .content-area {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    clear: both !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.single-product .site-main {
    width: 100%;
    max-width: none;
}

@media (min-width: 900px) {
    body.single-product .site-main>div.product {
        display: grid !important;
        grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
        column-gap: 34px;
        row-gap: 34px;
        align-items: start;
        width: 100%;
        max-width: none;
        margin-top: 0 !important;
    }

    body.single-product .site-main>div.product>.woocommerce-product-gallery {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
        margin: 0 !important;
    }

    body.single-product .site-main>div.product>.summary {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
        margin: 0 !important;
        position: sticky !important;
        top: 122px;
    }

    body.single-product .site-main>div.product>.woocommerce-tabs,
    body.single-product .site-main>div.product>.related,
    body.single-product .site-main>div.product>.upsells,
    body.single-product .site-main>div.product>section.products {
        grid-column: 1 / -1;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
    }
}

/* Tablet and mobile must never inherit desktop floats or sticky positioning. */
@media (max-width: 899px) {
    body.single-product .site-main>div.product {
        display: block !important;
    }

    body.single-product .site-main>div.product>.woocommerce-product-gallery,
    body.single-product .site-main>div.product>.summary {
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        position: static !important;
        margin: 0 0 24px !important;
    }
}

/* ========================================================================== 
   MKShop 0.6.2 — Custom logo sizing fix
   WordPress outputs the logo with intrinsic width/height attributes. Using
   only max-width/max-height does not enlarge a small source image, therefore
   an explicit rendered height is required.
   ========================================================================== */
:root {
    --mkshop-logo-height-desktop: 120px;
    --mkshop-logo-height-tablet: 50px;
    --mkshop-logo-height-mobile: 38px;
}

@media (min-width: 1081px) {
    body:not(.mkshop-modern-checkout) .mk-header__main {
        grid-template-columns: auto minmax(320px, 1fr) auto !important;
        min-height: calc(var(--mkshop-logo-height-desktop) + 16px) !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-brand,
    .mk-header--checkout .mk-brand {
        min-width: 140px !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-brand img.custom-logo,
    .mk-header--checkout .mk-brand img.custom-logo {
        display: block !important;
        width: auto !important;
        height: var(--mkshop-logo-height-desktop) !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important;
        object-position: left center !important;
    }
}

@media (min-width: 783px) and (max-width: 1080px) {
    body:not(.mkshop-modern-checkout) .mk-header__main {
        grid-template-columns: auto minmax(220px, 1fr) auto !important;
        min-height: calc(var(--mkshop-logo-height-tablet) + 16px) !important;
    }

    body:not(.mkshop-modern-checkout) .mk-header__main>.mk-brand img.custom-logo,
    .mk-header--checkout .mk-brand img.custom-logo {
        display: block !important;
        width: auto !important;
        height: var(--mkshop-logo-height-tablet) !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important;
        object-position: left center !important;
    }
}

@media (max-width: 782px) {

    .mk-header__main>.mk-brand img.custom-logo,
    .mk-header--checkout .mk-brand img.custom-logo {
        display: block !important;
        width: auto !important;
        height: var(--mkshop-logo-height-mobile) !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important;
    }
}