/*
 * 11.5.2 — final storefront polish + mobile auto-load correction.
 * Micro-refinements only: spacing, alignment, states, image containment,
 * form consistency and responsive finishing. No layout/design-system rewrite.
 */

/* ---------- Base finishing ---------- */
html { scrollbar-gutter: stable; }
body { overflow-x: clip; }
img { max-width: 100%; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, .nt-btn, .bm-btn, a.button { touch-action: manipulation; }

/* Keep the existing type scale, but improve wrapping on headings and labels. */
:where(h1,h2,h3) { text-wrap: balance; }
:where(p,.nt-section-heading__aside) { text-wrap: pretty; }

/* ---------- Header ---------- */
.nt-floating-header__inner {
    min-height: 68px;
    gap: 18px;
}
.nt-floating-header__brand,
.site-logo {
    min-width: 0;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}
.site-custom-logo img,
.custom-logo {
    display: block;
    width: auto;
    height: 38px;
    object-fit: contain;
}
.nt-desktop-nav { gap: 4px; }
.nt-desktop-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding-inline: 10px;
    border-radius: 8px;
    transition: color .16s ease, background-color .16s ease;
}
.nt-desktop-nav a:hover,
.nt-desktop-nav a:focus-visible {
    background: rgba(255,255,255,.045);
}
.nt-header-actions { align-items: center; gap: 8px; }
.nt-header-icon,
.nt-header-cart-badge,
.mobile-nav-toggle {
    flex: 0 0 auto;
}
.header-cart-btn { position: relative; }
.cart-count,
.nt-header-cart-badge .cart-count {
    font-variant-numeric: tabular-nums;
}

/* ---------- Buttons & controls ---------- */
.nt-btn,
.bm-btn,
.woocommerce a.button,
.woocommerce button.button,
button.single_add_to_cart_button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
}
.nt-btn i,
.bm-btn i { flex: 0 0 auto; }
.nt-btn:active,
.bm-btn:active,
.woocommerce a.button:active,
.woocommerce button.button:active {
    transform: translateY(0) scale(.985) !important;
}
.nt-btn[disabled],
.nt-btn[aria-disabled="true"],
.bm-btn[disabled],
.woocommerce button.button:disabled {
    cursor: not-allowed !important;
    opacity: .58 !important;
    transform: none !important;
}

/* ---------- Forms / filters ---------- */
:where(.bm-shop,.nt-single-product-v6,.nt-search-modal-v6,.nt-page-shell-v84) input:not([type="checkbox"]):not([type="radio"]),
:where(.bm-shop,.nt-single-product-v6,.nt-search-modal-v6,.nt-page-shell-v84) select,
:where(.bm-shop,.nt-single-product-v6,.nt-search-modal-v6,.nt-page-shell-v84) textarea {
    border-radius: 10px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
:where(.bm-shop,.nt-single-product-v6,.nt-search-modal-v6,.nt-page-shell-v84) input:not([type="checkbox"]):not([type="radio"]):focus,
:where(.bm-shop,.nt-single-product-v6,.nt-search-modal-v6,.nt-page-shell-v84) select:focus,
:where(.bm-shop,.nt-single-product-v6,.nt-search-modal-v6,.nt-page-shell-v84) textarea:focus {
    border-color: color-mix(in srgb, var(--primary-color,#fd7702) 68%, white 4%);
    box-shadow: 0 0 0 3px rgba(253,119,2,.10);
}
::placeholder { color: color-mix(in srgb, var(--text-muted,#a1a1aa) 78%, transparent); opacity: 1; }

.bm-shop-toolbar {
    align-items: center;
    row-gap: 10px;
}
.bm-shop-result-count,
.woocommerce-result-count {
    margin: 0 !important;
    line-height: 1.5;
}

/* ---------- Service picker / live search ---------- */
.nt-service-picker__summary {
    transition: border-color .16s ease, background-color .16s ease;
}
.nt-service-picker__panel,
.nt-live-search-results {
    overscroll-behavior: contain;
}
.nt-service-picker__list,
.nt-live-search-results {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.20) transparent;
}
.nt-service-picker__list::-webkit-scrollbar,
.nt-live-search-results::-webkit-scrollbar { width: 8px; }
.nt-service-picker__list::-webkit-scrollbar-thumb,
.nt-live-search-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.16);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}
.nt-live-search-result {
    transition: background-color .14s ease;
}
.nt-live-search-result:hover,
.nt-live-search-result[aria-selected="true"] {
    background: rgba(255,255,255,.045);
}

/* ---------- Product-card finishing ---------- */
.nt-product-card-v6,
.nt-rate-card {
    isolation: isolate;
}
.nt-product-card-v6--compact .nt-product-card-v6__head {
    min-height: 56px;
}
.nt-product-card-v6__badge,
.nt-product-card-v6__media,
.nt-rate-card__media {
    transform: translateZ(0);
}
.nt-product-card-v6__badge img,
.nt-product-card-v6__media img,
.nt-rate-card__media img,
.nt-related-products-v92 .nt-product-card-v6__image img {
    image-rendering: auto;
}
.nt-product-card-v6--compact .nt-product-card-v6__body h3 {
    min-height: 2.6em;
}
.nt-product-card-v6--compact .nt-product-card-v6__body > p {
    min-height: 0;
}
.nt-product-card-v6__price-row {
    align-items: end;
    gap: 8px;
}
.nt-product-card-v6__price strong,
.nt-rate-card__price strong,
.woocommerce-Price-amount {
    font-variant-numeric: tabular-nums;
}
.nt-product-card-v6__actions--commerce {
    gap: 8px !important;
}
.nt-product-card-v6__actions--commerce > * {
    min-width: 0;
}
.nt-product-card-v6 a:focus-visible,
.nt-rate-card a:focus-visible {
    border-radius: 8px;
}

/* Avoid a sharp hover jump while retaining the established lift. */
.nt-product-card-v6,
.nt-rate-card,
.category-card,
.nt-category-directory-v6__item {
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

/* ---------- Auto-load finishing ---------- */
.nt-shop-autoload {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 26px;
}
.nt-autoload-control {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.nt-autoload-control__status {
    color: var(--text-muted,#a1a1aa);
    font-size: .8125rem;
}
.nt-autoload-control__sentinel {
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Single product ---------- */
.nt-product-gallery-v6 .woocommerce-product-gallery__image,
.nt-product-gallery-v6 .nt-curated-single-image,
.nt-auto-single-image {
    overflow: hidden;
}
.nt-product-gallery-v6 img {
    display: block;
    margin-inline: auto;
}
.nt-product-summary-v6 {
    min-width: 0;
}
.nt-product-summary-v6 h1 {
    overflow-wrap: anywhere;
}
.nt-product-price-v6__line {
    align-items: baseline;
    gap: 8px;
}
.nt-product-secondary-actions {
    flex-wrap: wrap;
    gap: 10px;
}
.nt-product-trust-micro {
    row-gap: 8px;
}
.nt-product-information__nav {
    scrollbar-width: none;
}
.nt-product-information__nav::-webkit-scrollbar { display: none; }

/* ---------- Footer ---------- */
.nt-footer-v6__groups { row-gap: 28px; }
.nt-footer-group__links a {
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.nt-footer-group__links a:hover {
    text-decoration: underline;
}
.nt-footer-v6__socials a {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    min-height: 40px;
}
.nt-footer-bottom {
    row-gap: 10px;
}

/* ---------- Small-screen finishing ---------- */
@media (max-width: 980px) {
    .nt-floating-header__inner { min-height: 62px; gap: 10px; }
    .site-custom-logo img,
    .custom-logo { height: 34px; }
    .bm-drawer__panel { overscroll-behavior: contain; }
}

@media (max-width: 639px) {
    .nt-product-card-v6--compact .nt-product-card-v6__head { min-height: 44px; }
    .nt-product-card-v6--compact .nt-product-card-v6__body h3 { min-height: 2.6em; }
    .nt-product-card-v6__actions--commerce .nt-btn { min-height: 42px !important; }
    .bm-shop-toolbar { align-items: stretch; }
    .nt-service-picker__summary { min-height: 54px; padding-inline: 12px; }
    .nt-service-picker__summary-hint { display: none; }
    .nt-footer-bottom { align-items: flex-start; }
}

@media (hover: none) {
    .nt-product-card-v6:hover,
    .nt-rate-card:hover,
    .category-card:hover,
    .nt-category-directory-v6__item:hover {
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nt-product-card-v6,
    .nt-rate-card,
    .category-card,
    .nt-category-directory-v6__item,
    .nt-btn,
    .bm-btn {
        transition: none !important;
    }
}


/* 11.5.2 — mobile catalog auto-load correction.
 * Keep the auto-load UI below the product grid. The 11.5.1 polish layer made
 * .nt-shop-autoload a horizontal flex row, which could place the loader beside
 * the WooCommerce grid on narrow screens and squeeze the catalog.
 */
.nt-shop-autoload{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    margin-top:26px;
}
.nt-shop-autoload > ul.products{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
}
.nt-shop-autoload .nt-autoload-control{
    width:100% !important;
    max-width:100% !important;
    min-height:48px;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px;
    clear:both;
    margin:20px 0 4px !important;
    padding:4px 12px;
    text-align:center;
}
.nt-shop-autoload .nt-autoload-control__status{
    max-width:100%;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
}
.nt-shop-autoload .nt-autoload-control__sentinel{
    left:50% !important;
    right:auto !important;
    width:1px !important;
    transform:translateX(-50%);
}

/* Do not let compact card header/status copy spill outside a two-column phone grid. */
@media (max-width: 639px){
    .nt-product-card-v6--compact .nt-product-card-v6__head{
        gap:9px;
    }
    .nt-product-card-v6--compact .nt-product-card-v6__headmeta{
        min-width:0;
        max-width:calc(100% - 53px);
        overflow:hidden;
    }
    .nt-product-card-v6--compact .nt-product-card-v6__status{
        width:auto !important;
        max-width:100% !important;
        min-width:0;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .nt-shop-autoload .nt-autoload-control{
        margin-top:14px !important;
        min-height:42px;
        padding-inline:6px;
    }
    .nt-shop-autoload .nt-autoload-control__status{
        font-size:.72rem;
        line-height:1.35;
    }
}

/* On very narrow phones, preserve readability instead of forcing crushed cards. */
@media (max-width: 360px){
    body .nt-shop-results-v84 ul.products,
    body .woocommerce ul.products{
        grid-template-columns:minmax(0,1fr) !important;
    }
}


/* 11.5.3 — resilient manual fallback for infinite loading */
.nt-shop-autoload .nt-autoload-control__button:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;margin:2px auto 0;min-width:170px}
.nt-shop-autoload .nt-autoload-control__button:disabled{opacity:.55;cursor:wait}
@media(max-width:639px){.nt-shop-autoload .nt-autoload-control__button:not([hidden]){width:min(100%,260px);min-height:44px}}


/* 11.5.4 — reliable hybrid catalog loading */
.nt-shop-autoload .nt-autoload-control{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;clear:both;width:100%!important;max-width:100%!important;margin:20px 0 4px!important}
.nt-shop-autoload .nt-autoload-control__button:not([hidden]){display:inline-flex!important;min-width:170px;align-items:center;justify-content:center}
.nt-shop-autoload .nt-autoload-control.is-complete .nt-autoload-control__button{display:none!important}
.nt-shop-autoload .nt-autoload-control__status{min-height:1.35em;text-align:center}
@media(max-width:639px){.nt-shop-autoload .nt-autoload-control__button:not([hidden]){width:min(100%,260px);min-height:44px}.nt-shop-autoload .nt-autoload-control{margin-top:14px!important}}


/* 11.5.5 — seamless auto-load: zero blank space during normal loading.
 * The loader/control is collapsed to a 1px sentinel unless automatic loading
 * actually fails. Only then does the Load more fallback expand into view.
 */
.nt-shop-autoload{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin-top:0!important;
}
.nt-shop-autoload > ul.products{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-bottom:0!important;
}
.nt-shop-autoload .nt-autoload-control{
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:1px!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    clear:both!important;
    text-align:center;
}
.nt-shop-autoload .nt-autoload-control__button,
.nt-shop-autoload .nt-autoload-control__status{
    display:none!important;
}
.nt-shop-autoload .nt-autoload-control__sentinel{
    position:absolute!important;
    left:50%!important;
    right:auto!important;
    top:0!important;
    bottom:auto!important;
    width:1px!important;
    height:1px!important;
    transform:translateX(-50%)!important;
    pointer-events:none!important;
}
.nt-shop-autoload.is-loading .nt-autoload-control__status::before{
    content:none!important;
    display:none!important;
}
.nt-shop-autoload .nt-autoload-control.is-fallback-visible{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    height:auto!important;
    min-height:56px!important;
    margin:16px 0 4px!important;
    padding:6px 8px!important;
    overflow:visible!important;
}
.nt-shop-autoload .nt-autoload-control.is-fallback-visible .nt-autoload-control__button:not([hidden]){
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:170px!important;
    margin:0 auto!important;
}
.nt-shop-autoload .nt-autoload-control.is-fallback-visible .nt-autoload-control__status{
    display:block!important;
    min-height:0!important;
    max-width:100%!important;
    color:var(--text-muted,#a1a1aa)!important;
    font-size:.76rem!important;
    line-height:1.35!important;
    text-align:center!important;
    white-space:normal!important;
}
.nt-shop-autoload .nt-autoload-control.is-complete{
    display:block!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
}
@media(max-width:639px){
    .nt-shop-autoload .nt-autoload-control.is-fallback-visible{
        min-height:50px!important;
        margin:12px 0 2px!important;
        padding-inline:4px!important;
    }
    .nt-shop-autoload .nt-autoload-control.is-fallback-visible .nt-autoload-control__button:not([hidden]){
        width:min(100%,260px)!important;
        min-height:44px!important;
    }
}


/* 11.5.7 — clear header Login/Panel + Shop actions, same existing visual language. */
.nt-header-primary-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}
.nt-header-login-cta,
.nt-header-shop-cta{
    min-height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:0 14px;
    border-radius:9px;
    font-size:.78rem;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
    text-decoration:none;
    transition:border-color .16s ease,background-color .16s ease,color .16s ease,transform .16s ease;
}
.nt-header-login-cta{
    border:1px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.035);
    color:var(--text-main);
}
.nt-header-login-cta:hover{
    border-color:rgba(253,119,2,.52);
    background:rgba(253,119,2,.08);
    color:#fff;
    transform:translateY(-1px);
}
.nt-header-shop-cta{
    border:1px solid var(--primary-color);
    background:var(--primary-color);
    color:#fff;
}
.nt-header-shop-cta:hover{
    border-color:var(--primary-strong,var(--primary-color));
    background:var(--primary-strong,var(--primary-color));
    color:#fff;
    transform:translateY(-1px);
}
.nt-header-login-cta .nt-icon-svg,
.nt-header-shop-cta .nt-icon-svg{width:16px;height:16px;flex:0 0 auto}

/* The new text buttons replace the duplicate desktop account icon/legacy CTA. */
@media(min-width:901px){
    .nt-account-link{display:none !important}
}

/* Mobile keeps the header uncluttered; Login/Shop are already first-class actions in the drawer. */
@media(max-width:900px){
    .nt-header-primary-actions{display:none}
}

@media(max-width:1080px) and (min-width:901px){
    .nt-header-login-cta,.nt-header-shop-cta{padding-inline:11px;font-size:.72rem}
    .nt-header-primary-actions{gap:6px}
}
