/* Cross-cutting mobile-only additions: search overlay and the sticky
   single-product add-to-cart bar. Everything else is co-located with its
   component's own CSS file. */

/* Mobile search toggle: hidden on desktop, shown once .pf-search itself
   gets hidden (see header.css's 760px breakpoint). */
.pf-mobile-search-toggle { display: none; }

@media (max-width: 760px) {
    .pf-mobile-search-toggle { display: inline-flex; }
    .pf-mobile-search-toggle > i { font-size: 19px; }
}

.pf-mobile-search {
    background: rgba(36, 18, 95, 0.45);
    inset: 0;
    position: fixed;
    z-index: 100;
}

.pf-mobile-search[hidden] { display: none; }

.pf-mobile-search__inner {
    align-items: center;
    background: #fff;
    display: flex;
    gap: 10px;
    padding: 14px var(--page-gutter);
}

.pf-mobile-search .pf-search { flex: 1; }

.pf-mobile-search__close {
    background: transparent;
    border: 0;
    color: var(--text);
    flex: 0 0 auto;
    font-size: 20px;
    height: 40px;
    width: 40px;
}

.pf-mobile-search__close:hover { color: var(--primary); }

/* Sticky mobile add-to-cart bar (single product only, injected in wp_footer). */
.pf-sticky-cart { display: none; }

@media (max-width: 780px) {
    body.single-product { padding-bottom: 74px; }

    .pf-sticky-cart {
        align-items: center;
        background: #fff;
        border-top: 1px solid var(--border);
        bottom: 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
        display: flex;
        gap: 12px;
        justify-content: space-between;
        left: 0;
        padding: 10px var(--page-gutter);
        position: fixed;
        right: 0;
        z-index: 50;
    }

    .pf-sticky-cart__info { display: grid; gap: 2px; min-width: 0; }
    .pf-sticky-cart__title { color: var(--text); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pf-sticky-cart__price { color: var(--primary); font-size: 13px; font-weight: 700; }
    .pf-sticky-cart .pf-btn { flex: 0 0 auto; min-height: 42px; padding: 0 18px; }
}

/* Sticky header on scroll (class toggled by assets/js/app.js). */
.pf-header.is-stuck {
    box-shadow: 0 6px 20px rgba(43, 30, 120, 0.08);
    position: sticky;
    top: 0;
}
