/* Shop "Lens" (live 2026-11-18, phones only; shop and category pages). Ported from the local preview
   (mu-plugins/deeps-shop-looks: looks.css sticky tabs + lens.css), unchanged in look.
   The homepage ring spins over the grid as clear glass; everything behind it bends through it. The page keeps its own
   cards; a transparent canvas above them (js/shop-lens-glass.js) draws only the glass. Loaded by functions.php
   (deeps_shop_lens_on). Desktop is unchanged: no canvas, no 3D. */

/* any width above phones (desktop, or a phone turned sideways past 767px): no glass. The renderer sizes the canvas
   with inline width/height, so without this it would sit under the footer as a big block. */
canvas.deeps-lens-canvas {
    display: none !important;
}

@media (max-width: 767px) {
    /* the theme forces every canvas to `height: 600px !important; mix-blend-mode: hard-light !important` (main.css) */
    canvas.deeps-lens-canvas {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1; /* over the products, under the sticky tabs (2) and the logo bar (3) */
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        mix-blend-mode: normal !important;
        pointer-events: none; /* taps go straight to the products underneath */
        opacity: 0;
        transition: opacity 0.4s ease;
    }
    body.deeps-lens-on canvas.deeps-lens-canvas {
        opacity: 1;
    }

    /* Sticky category tabs (owner: "the filter has to stick to top"). */
    body.deeps-shop-lens .category-before-content-widget-area {
        position: sticky;
        top: 48px;
        z-index: 2;
        background: #fff;
    }
    body.deeps-shop-lens #masthead {
        z-index: 3; /* logo, cart and menu stay above the tab bar's white */
    }
    /* once stuck (js/shop-lens.js marks it), plain white reaches up behind the logo bar. Nothing is added below the
       tabs, so the gap under them stays the same stuck or not (owner, 2026-11-17: "on scroll the margins and gaps
       change size"). */
    body.deeps-shop-lens .category-before-content-widget-area.is-stuck::before {
        content: "";
        position: absolute;
        left: -12px;
        right: -12px;
        bottom: 100%;
        height: 48px;
        background: #fff;
        pointer-events: none;
    }

    /* The category tabs sit right under the logo bar (owner, 2026-11-17: "this gap is too big"): the page's own top
       spacing (main 40px + shop section 30px) is dropped, so only the tab bar's own 20px stays — the same place the
       tabs stick to when you scroll. */
    body.deeps-shop-lens main#main,
    body.deeps-shop-lens main#main > section {
        padding-top: 0 !important; /* the section's own spacing class (py-4) is !important */
    }
}
