/* Only the public storefront uses these styles; Gutenberg editor is native. */
.sm-lite-collection .sm-lite-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--wp--custom--grid-gap) !important;
    padding: 0;
    margin: 0;
    list-style: none;
}
.sm-lite-collection .sm-lite-grid-item { min-width: 0; margin: 0; }
.sm-lite-collection .sm-lite-card {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--m);
    height: 100%;
    min-width: 0;
    padding: var(--wp--custom--card-block-padding) var(--wp--custom--card-padding);
    border: 1px solid var(--wp--preset--color--outline);
    border-radius: var(--wp--custom--card-radius);
    background: var(--wp--custom--card-background);
    box-shadow: var(--wp--custom--card-shadow);
    box-sizing: border-box;
}
.sm-lite-card > * { margin-block: 0 !important; }
.sm-lite-card .sm-product-image { width: calc(100% - var(--wp--preset--spacing--l)); align-self: center; }
.sm-lite-card .sm-product-image img { width: 100%; display: block; }
.sm-lite-card .sm-product-title {
    color: var(--wp--preset--color--white);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
}
.sm-lite-card .sm-product-description { flex: 1; }
.sm-lite-card .sm-lite-card-bottom {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: var(--wp--preset--spacing--s);
    margin-top: auto !important;
}
.sm-lite-card .sm-price { font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.sm-lite-card .sm-cart-button button { cursor: pointer; }
.sm-lite-card .sm-cart-button button:disabled { cursor: wait; opacity: .65; }
.sm-lite-notice { margin-block: var(--wp--preset--spacing--m); color: var(--wp--preset--color--accent); }
.sm-lite-notice[hidden] { display: none; }

.sm-lite-cart { display: inline-flex; align-items: center; }
.sm-lite-cart-toggle {
    appearance: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: var(--wp--custom--header-icon-size);
    height: var(--wp--custom--header-icon-size);
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}
.sm-lite-cart-icon {
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    -webkit-mask: url(/wp-content/themes/northern-mechanics/assets/icons/header-bag.svg) center/contain no-repeat;
    mask: url(/wp-content/themes/northern-mechanics/assets/icons/header-bag.svg) center/contain no-repeat;
}
.sm-lite-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -0.6em;
    right: -0.6em;
    min-width: 1.5em;
    height: 1.5em;
    padding: 0 .18em;
    background: var(--wp--preset--color--accent);
    border-radius: 50%;
    color: var(--wp--preset--color--ink);
    font-size: var(--wp--preset--font-size--small);
    line-height: 1;
}
.sm-lite-cart-count[hidden] { display: none; }
.sm-lite-cart-toggle:focus-visible,
.sm-lite-card .sm-cart-button button:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
}
.sm-site-header .sm-lite-cart { color: #fff !important; }
.sm-site-header .sm-lite-cart-count { background: #fff; color: #000; }

@media (max-width: 599px) {
    .sm-lite-collection .sm-lite-grid { grid-template-columns: minmax(0, 1fr) !important; gap: var(--wp--preset--spacing--s) !important; }
    .sm-lite-card { padding-block: var(--wp--preset--spacing--s) !important; }
    /* No reserved title lines on mobile: product descriptions follow the title. */
    .sm-lite-collection .sm-lite-card .sm-product-title { min-height: 0 !important; height: auto !important; }
    .sm-lite-card .sm-product-image { width: 100%; }
    .sm-lite-card .sm-cart-button { min-width: 0; }
    .sm-lite-card .sm-cart-button button { width: 100%; }
    .sm-lite-cart-toggle { width: var(--wp--preset--spacing--l); height: var(--wp--preset--spacing--l); }
}
/* Public header navigation: the Gutenberg block remains editable, but the
   storefront does not need the navigation Interactivity API module. */
.sm-lite-navigation { display: flex; align-items: center; min-width: 0; }
.sm-lite-navigation .sm-lite-nav-links {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--2-xl, 2rem);
    padding: 0;
    margin: 0;
    list-style: none;
}
.sm-lite-navigation .sm-lite-nav-item { list-style: none; margin: 0; padding: 0; }
.sm-lite-navigation .sm-lite-nav-link {
    display: inline-block;
    padding-block: .5rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
}
.sm-lite-navigation .sm-lite-nav-link:hover,
.sm-lite-navigation .sm-lite-nav-link:focus-visible { text-decoration: underline; text-underline-offset: .3em; }
.sm-lite-nav-open { display: none; }
.sm-lite-navigation .sm-lite-nav-popover:popover-open {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    padding: clamp(1.5rem, 6vw, 3rem);
    background: var(--wp--preset--color--night, #00151f);
    color: #fff;
    overflow: auto;
}
.sm-lite-navigation .sm-lite-nav-popover::backdrop { background: rgb(0 10 16 / 72%); }
.sm-lite-navigation .sm-lite-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-inline-start: auto;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.sm-lite-navigation .sm-lite-nav-mobile-links {
    display: grid;
    gap: 1.5rem;
    padding: 3rem 0;
    margin: 0;
    list-style: none;
    font-size: clamp(1.2rem, 5vw, 1.6rem);
}
.sm-lite-navigation .sm-lite-nav-mobile-links .sm-lite-nav-link { width: fit-content; }

@media (max-width: 599px) {
    .sm-lite-navigation { flex: 0 0 auto; margin-inline-start: auto; order: 2; }
    .sm-lite-navigation > .sm-lite-nav-links { display: none; }
    .sm-lite-navigation .sm-lite-nav-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        color: inherit;
        background: transparent;
        cursor: pointer;
    }
}