/**
 * Layer 3/3 mobile (C.1) — esperienza app-like su smartphone (≤900px).
 * Attivo con body.pana-mobile-xp (PANA_MOBILE_EXPERIENCE = true).
 * Variabili --xp-* sovrascrivono fallback in pana-wp.css :root.
 */
@media (max-width: 900px) {
  body.pana-theme.pana-mobile-xp {
    --xp-pad: 16px;
    --xp-radius: 16px;
    --xp-radius-sm: 12px;
    --xp-shadow: 0 4px 24px rgba(13, 71, 161, 0.1);
    --xp-shadow-lg: 0 12px 40px rgba(13, 71, 161, 0.14);
    --xp-header-h: 118px;
    --xp-shop-sticky: calc(var(--xp-header-h) + 8px);
    --xp-bottom-nav-h: 64px;
    --xp-sticky-atc-h: 56px;
    --xp-z-bottom-nav: 130;
    --xp-z-cookie: 122;
    --xp-z-wa-fab: 125;
    --xp-z-sticky-atc: 128;
    --xp-z-checkout-bar: 128;
    background: #eef2f6;
    padding-bottom: calc(var(--xp-bottom-nav-h) + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  html:has(body.pana-theme.pana-mobile-xp) {
    overflow-x: hidden !important;
  }

  body.pana-theme.pana-mobile-xp.single-product {
    padding-bottom: calc(var(--xp-bottom-nav-h) + var(--xp-sticky-atc-h) + 12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.pana-theme.pana-mobile-xp.pana-checkout-page {
    padding-bottom: calc(var(--xp-bottom-nav-h) + var(--xp-sticky-atc-h) + 24px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* —— Topbar: una riga centrata, mai scroll orizzontale (no “uita”) —— */
  body.pana-theme.pana-mobile-xp > .topbar {
    padding: 8px var(--xp-pad);
    font-size: 11px;
    line-height: 1.35;
    border-bottom: none;
    background: linear-gradient(90deg, var(--primary-dark) 0%, #1565c0 100%);
    overflow: hidden;
  }
  body.pana-theme.pana-mobile-xp .topbar-inner,
  body.pana-theme.pana-mobile-xp .topbar-inner--xp {
    max-width: none !important;
    display: block !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    text-align: center;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: none;
  }
  body.pana-theme.pana-mobile-xp .topbar-inner span {
    display: block;
    white-space: normal;
    flex: none !important;
  }
  body.pana-theme.pana-mobile-xp .topbar-inner--xp span:not(.topbar-xp-msg):not(:first-child),
  body.pana-theme.pana-mobile-xp .topbar-inner--xp span:nth-child(n + 2) {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .topbar-inner--xp .topbar-xp-msg,
  body.pana-theme.pana-mobile-xp .topbar-inner--xp span:first-child {
    display: block !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    max-width: 100%;
    padding: 0 4px;
  }
  body.pana-theme.pana-mobile-xp .topbar strong {
    color: #fff;
    font-weight: 800;
  }

  /* —— Header app: logo + carrello, vetro —— */
  body.pana-theme.pana-mobile-xp > .header {
    position: sticky;
    top: 0;
    z-index: 110;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: none;
    box-shadow: 0 1px 0 rgba(13, 71, 161, 0.06);
  }
  body.pana-theme.pana-mobile-xp.admin-bar > .header {
    top: 46px;
  }
  body.pana-theme.pana-mobile-xp .header-inner > .pana-search-wrap:not(.pana-search-wrap--mobile) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }
  body.pana-theme.pana-mobile-xp .header-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    grid-template-columns: unset !important;
    gap: 10px;
    padding: 10px var(--xp-pad) 6px !important;
  }
  body.pana-theme.pana-mobile-xp .logo {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
  }
  body.pana-theme.pana-mobile-xp .header-actions {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
  }
  body.pana-theme.pana-mobile-xp .logo .logo-name {
    font-size: clamp(16px, 4.5vw, 19px);
    letter-spacing: -0.02em;
  }
  body.pana-theme.pana-mobile-xp .logo .logo-tagline {
    display: inline;
    font-size: 9px;
    letter-spacing: 0.12em;
    margin: 0 0 0 6px;
    vertical-align: middle;
    opacity: 0.85;
  }
  body.pana-theme.pana-mobile-xp .logo .logo-name {
    display: inline;
    vertical-align: middle;
  }
  body.pana-theme.pana-mobile-xp .header-actions .tel {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .cart-btn {
    border-radius: 999px;
    padding: 10px 14px !important;
    font-size: 12px !important;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.28);
  }
  body.pana-theme.pana-mobile-xp .cart-count {
    background: rgba(255, 255, 255, 0.95);
    font-weight: 800;
  }

  /* —— Ricerca pill (sempre visibile) —— */
  body.pana-theme.pana-mobile-xp .pana-header-search-row {
    display: block !important;
    padding: 0 var(--xp-pad) 12px !important;
    border: none !important;
    background: transparent !important;
  }
  body.pana-theme.pana-mobile-xp form.search-mobile--bar {
    display: flex !important;
    width: 100%;
    margin: 0;
    border: none !important;
    border-radius: 999px !important;
    background: #fff;
    box-shadow: var(--xp-shadow), 0 0 0 1px rgba(21, 101, 192, 0.08);
    overflow: hidden;
    position: relative;
  }
  body.pana-theme.pana-mobile-xp form.search-mobile--bar::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    opacity: 0.45;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231565c0' stroke-width='2'%3E%3Cpath stroke-linecap='round' d='M21 21l-4.35-4.35M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14z'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
  }
  body.pana-theme.pana-mobile-xp form.search-mobile--bar input[type="search"] {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    padding: 13px 12px 13px 42px;
    border: 0;
    background: transparent;
  }
  body.pana-theme.pana-mobile-xp form.search-mobile--bar button[type="submit"] {
    flex: 0 0 auto;
    margin: 5px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px !important;
    background: var(--primary) !important;
    color: #fff !important;
    border: 0 !important;
  }

  /* Nav orizzontale sostituita dalla bottom bar */
  body.pana-theme.pana-mobile-xp > .nav,
  body.pana-theme.pana-mobile-xp #pana-nav,
  body.pana-theme.pana-mobile-xp #page #pana-nav,
  body.pana-theme.pana-mobile-xp #page > .nav {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
  }

  /* —— Bottom navigation —— */
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--xp-z-bottom-nav, 120);
    gap: 2px;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: none;
    box-shadow: 0 -6px 28px rgba(13, 71, 161, 0.12);
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 4px;
    border-radius: var(--xp-radius-sm);
    text-decoration: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 0.15s, color 0.15s, transform 0.15s;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a .ico {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: no-repeat center / contain;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a .ico--home {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c6570'%3E%3Cpath d='M12 3 3 10.5V20a1 1 0 0 0 1 1h5v-8h6v8h5a1 1 0 0 0 1-1v-9.5L12 3z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a .ico--cat {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c6570'%3E%3Cpath d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a .ico--shop {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 4h10l1 3H6l1-3zm-2 5h14l-1.2 9H6.2L5 9zm6 3v5h2v-5h-2z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a .ico--tel {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c6570'%3E%3Cpath d='M6.6 10.8c1.5 2.9 3.7 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.3 1l-2.2 2.2z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a .ico--cart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c6570'%3E%3Cpath d='M7 18c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM7.2 14h9.7c.8 0 1.5-.5 1.8-1.2l2.4-6.5H6.1L5 4H2v2h2l3.2 8z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--home,
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--cat,
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--tel,
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--cart {
    filter: none;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--home {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M12 3 3 10.5V20a1 1 0 0 0 1 1h5v-8h6v8h5a1 1 0 0 0 1-1v-9.5L12 3z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--cat {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--tel {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M6.6 10.8c1.5 2.9 3.7 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.3 1l-2.2 2.2z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active .ico--cart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M7 18c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM7.2 14h9.7c.8 0 1.5-.5 1.8-1.2l2.4-6.5H6.1L5 4H2v2h2l3.2 8z'/%3E%3C/svg%3E");
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.is-active {
    color: var(--primary);
    background: linear-gradient(180deg, #e3f2fd 0%, rgba(227, 242, 253, 0.4) 100%);
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.nav-shop--fab {
    transform: translateY(-6px);
    min-height: 52px;
    color: var(--primary) !important;
    background: #fff !important;
    border: 2px solid var(--border) !important;
    box-shadow: 0 4px 14px rgba(13, 71, 161, 0.12);
    border-radius: 16px;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.nav-shop--fab .ico {
    width: 22px;
    height: 22px;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.nav-shop--fab.is-active {
    color: #fff !important;
    background: linear-gradient(145deg, #1976d2, var(--primary-dark)) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 22px rgba(21, 101, 192, 0.4);
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp .nav-cart-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    border-radius: 99px;
    background: var(--sale, #d32f2f);
    color: #fff;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp a.nav-cart-wrap {
    position: relative;
  }

  /* —— Contenuto principale —— */
  body.pana-theme.pana-mobile-xp .container {
    padding: 16px var(--xp-pad) 36px;
  }
  body.pana-theme.pana-mobile-xp #page .site-content,
  body.pana-theme.pana-mobile-xp .site-main {
    background: transparent;
  }

  /* Hero homepage */
  body.pana-theme.pana-mobile-xp .hero {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: var(--xp-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--xp-shadow-lg);
    background: #fff;
  }
  body.pana-theme.pana-mobile-xp .hero-visual {
    order: -1;
    min-height: 200px;
  }
  body.pana-theme.pana-mobile-xp .hero-visual.has-image {
    min-height: 220px;
  }
  body.pana-theme.pana-mobile-xp .hero-copy {
    padding: 22px 18px 26px;
  }
  body.pana-theme.pana-mobile-xp .hero-copy h1 {
    font-size: clamp(24px, 6.5vw, 32px);
    margin-bottom: 12px;
  }
  body.pana-theme.pana-mobile-xp .hero-copy .btn-primary {
    width: 100%;
    text-align: center;
    border-radius: 999px;
    padding: 14px 20px;
  }
  body.pana-theme.pana-mobile-xp .hero-copy .btn-outline {
    display: block;
    width: 100%;
    margin: 10px 0 0;
    text-align: center;
    border-radius: 999px;
    padding: 12px 20px;
  }

  /* Trust: griglia 2×2 (niente card tagliate a metà) */
  body.pana-theme.pana-mobile-xp .trust-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 24px;
  }
  body.pana-theme.pana-mobile-xp .trust-row > * {
    flex: unset;
    max-width: none;
    border-radius: var(--xp-radius-sm);
    box-shadow: var(--xp-shadow);
    background: #fff;
    border: none;
  }
  /* Campagne/categorie: scroll orizzontale contenuto nel padding */
  body.pana-theme.pana-mobile-xp .campaigns,
  body.pana-theme.pana-mobile-xp .categories {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    scroll-padding-inline: var(--xp-pad);
  }
  body.pana-theme.pana-mobile-xp .campaigns > a.campaign,
  body.pana-theme.pana-mobile-xp .campaigns > .campaign {
    flex: 0 0 calc(100% - 8px) !important;
    width: calc(100% - 8px) !important;
    scroll-snap-align: center;
  }
  body.pana-theme.pana-mobile-xp .services {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-bottom: 28px;
    scrollbar-width: none;
  }
  body.pana-theme.pana-mobile-xp .services .service {
    flex: 0 0 78%;
    scroll-snap-align: start;
    border-radius: var(--xp-radius-sm);
    box-shadow: var(--xp-shadow);
    border: none;
  }

  /* Griglia prodotti home */
  body.pana-theme.pana-mobile-xp .pana-home-products.product-grid,
  body.pana-theme.pana-mobile-xp .pana-home-products {
    gap: 12px !important;
    margin-bottom: 28px;
  }
  body.pana-theme.pana-mobile-xp .product-card {
    border: none;
    border-radius: var(--xp-radius-sm);
    box-shadow: var(--xp-shadow);
    background: #fff;
    overflow: hidden;
  }
  body.pana-theme.pana-mobile-xp .product-card .body {
    padding: 10px 12px 14px;
  }
  body.pana-theme.pana-mobile-xp .product-card h3 {
    font-size: 12px;
    line-height: 1.35;
  }
  body.pana-theme.pana-mobile-xp .section-title {
    font-size: 1.25rem;
    margin-bottom: 14px;
  }

  /* Campaign / CTA */
  body.pana-theme.pana-mobile-xp .campaign {
    border-radius: var(--xp-radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--xp-shadow);
  }

  /* Recensioni */
  body.pana-theme.pana-mobile-xp .pana-reviews-section {
    margin: 28px 0 0;
    padding: 22px 16px;
    background: #fff;
    border-radius: var(--xp-radius);
    border: none;
    box-shadow: var(--xp-shadow);
  }

  /* Page hero (pagine statiche, non catalogo XP) */
  body.pana-theme.pana-mobile-xp .page-hero-simple {
    margin: 0 calc(-1 * var(--xp-pad)) 20px;
    padding: 22px var(--xp-pad) 20px;
    border: none;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(165deg, #e3f2fd 0%, #eef2f6 70%);
  }
  body.pana-theme.pana-mobile-xp .page-hero-simple h1 {
    font-size: 26px;
    line-height: 1.15;
  }

  /* —— Negozio: hero compatto, prodotti subito sotto la ricerca —— */
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-page {
    padding-top: 0 !important;
    padding-bottom: 32px !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-page > .page-hero-simple {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .pana-shop-hero-xp {
    margin: 0 0 8px;
    padding: 10px 0 0;
  }
  body.pana-theme.pana-mobile-xp .pana-shop-hero-xp__title,
  body.pana-theme.pana-mobile-xp h1.pana-shop-hero-xp__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.25;
  }
  body.pana-theme.pana-mobile-xp .pana-shop-hero-xp__sub {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-hero-xp__sub,
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-catalog-intro {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-sidebar-wrap {
    order: 0;
    position: sticky;
    top: var(--xp-shop-sticky);
    z-index: 94;
    margin: 0 !important;
    padding: 0 0 8px !important;
    background: linear-gradient(180deg, #eef2f6 75%, rgba(238, 242, 246, 0.92) 100%);
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main {
    order: 1;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main .woocommerce-breadcrumb {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main .woocommerce-result-count,
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main .woocommerce-ordering {
    font-size: 12px;
    margin: 0 !important;
    width: 100%;
    max-width: 100%;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main .woocommerce-ordering select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main .woocommerce-before-shop-loop {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-search-toolbar {
    margin: 0 0 8px !important;
    padding: 0;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-search-toolbar .pana-search-clear {
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--xp-shadow);
  }

  /* Negozio: barra azioni compatta */
  body.pana-theme.pana-mobile-xp .pana-shop-sidebar-wrap .shop-mobile-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    position: static;
    top: auto;
    z-index: 1;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
    border: none !important;
  }
  body.pana-theme.pana-mobile-xp .shop-mobile-bar .shop-bar-btn {
    min-height: 36px !important;
    padding: 8px 6px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    border: 1px solid var(--border) !important;
    background: #fff !important;
    color: var(--text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
  body.pana-theme.pana-mobile-xp .shop-mobile-bar [data-pana-filter-open],
  body.pana-theme.pana-mobile-xp .shop-mobile-bar .shop-bar-btn:first-child {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.25);
  }
  body.pana-theme.pana-mobile-xp .shop-main ul.products {
    gap: 14px !important;
    padding: 4px 0 8px !important;
  }

  /* Negozio mobile — card prodotto premium */
  body.pana-theme.pana-mobile-xp.pana-catalog .woocommerce-breadcrumb,
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-page .woocommerce-breadcrumb {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-chips-wrap {
    margin: 0 0 12px !important;
    padding: 8px 0 10px !important;
    overflow-x: clip;
    max-width: 100%;
    background: linear-gradient(180deg, #eef2f6 0%, rgba(238, 242, 246, 0.85) 100%);
    border-bottom: 1px solid rgba(13, 71, 161, 0.08);
    position: sticky;
    top: var(--xp-shop-sticky);
    z-index: 93;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-chips {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-chip {
    width: 100% !important;
    max-width: 100% !important;
    flex: unset !important;
    padding: 8px 6px !important;
    font-size: 11px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    text-align: center !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    border-radius: 999px !important;
    border: 1.5px solid var(--border) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-chip.is-active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.28);
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main {
    padding-left: var(--xp-pad) !important;
    padding-right: var(--xp-pad) !important;
    overflow-x: clip;
    max-width: 100%;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .pana-shop-page,
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-layout,
  body.pana-theme.pana-mobile-xp.pana-catalog .ast-container,
  body.pana-theme.pana-mobile-xp.pana-catalog #content,
  body.pana-theme.pana-mobile-xp.pana-catalog .site-content {
    overflow-x: clip;
    max-width: 100%;
  }
  body.pana-theme.pana-mobile-xp.pana-catalog .shop-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product,
  body.pana-theme.pana-mobile-xp ul.products.pana-shop-grid li.product {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 18px rgba(13, 71, 161, 0.1) !important;
    background: #fff !important;
    border: none !important;
    padding: 0 !important;
    min-width: 0 !important;
  }
  /* Astra: box immagine dedicato (cat/badge fuori dal flusso foto) */
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    display: block !important;
    aspect-ratio: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2f6 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap > .onsale {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .woocommerce-LoopProduct-link {
    display: block !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .pana-loop-cat,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .pana-delivery-badge,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .pana-loop-cat--summary {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .attachment-woocommerce_thumbnail {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
    object-position: center !important;
    aspect-ratio: unset !important;
    border-radius: 0 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .pana-sale-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 3 !important;
    margin: 0 !important;
    font-size: 10px !important;
    min-width: 38px !important;
    padding: 4px 7px !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .pana-loop-cat--summary {
    display: block !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--primary) !important;
    padding: 10px 12px 0 !important;
    line-height: 1.2 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .woocommerce-loop-product__title,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product h2 {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    padding: 6px 12px 0 !important;
    margin: 0 !important;
    min-height: 2.6em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .woocommerce-loop-product__title a,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product h2 a {
    color: var(--text) !important;
    text-decoration: none !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .screen-reader-text,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product [id^="woocommerce_loop_add_to_cart_link_describedby"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce-pagination {
    margin: 20px 0 8px !important;
    padding: 0 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce-pagination ul.page-numbers {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 12px 8px !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: var(--xp-shadow) !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce-pagination ul.page-numbers li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .price {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    padding: 6px 12px 0 !important;
    margin: 0 !important;
    line-height: 1.25 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .price del {
    display: inline !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    opacity: 0.55 !important;
    margin-right: 4px !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .price ins {
    text-decoration: none !important;
    font-weight: 800 !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .pana-delivery-badge {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product a.button,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .pana-loop-btn,
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .add_to_cart_button {
    margin: 10px 10px 12px !important;
    width: calc(100% - 20px) !important;
    min-height: 40px !important;
    padding: 10px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    text-align: center !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.22);
    margin-top: auto !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .pana-loop-leads {
    margin: 8px 10px 12px !important;
    gap: 6px !important;
  }
  body.pana-theme.pana-mobile-xp .woocommerce ul.products li.product .pana-loop-leads .button {
    margin: 0 !important;
    width: 100% !important;
    font-size: 10px !important;
    min-height: 36px !important;
  }

  /* Pannello filtri: bottom sheet full-width */
  body.pana-theme.pana-mobile-xp .pana-filter-overlay {
    z-index: 235 !important;
  }
  body.pana-theme.pana-mobile-xp .filters-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    z-index: 240 !important;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(110%);
    transition: transform 0.28s ease;
  }
  body.pana-theme.pana-mobile-xp .filters-panel.is-open,
  body.pana-theme.pana-mobile-xp.pana-shop-page.filters-open .filters-panel,
  body.pana-theme.pana-mobile-xp.filters-open .filters-panel {
    transform: translateY(0) !important;
  }
  body.pana-theme.pana-mobile-xp .filters-panel-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
  }
  body.pana-theme.pana-mobile-xp .filters-panel-foot {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Hub categorie */
  body.pana-theme.pana-mobile-xp .cat-hub-grid {
    gap: 12px;
  }
  body.pana-theme.pana-mobile-xp .cat-hub-card {
    border-radius: var(--xp-radius-sm);
    box-shadow: var(--xp-shadow);
    border: none;
  }
  body.pana-theme.pana-mobile-xp .cat-tile {
    border-radius: var(--xp-radius-sm);
    min-height: 120px;
  }

  /* Footer compatto */
  body.pana-theme.pana-mobile-xp .footer.pana-footer {
    margin-top: 24px;
    padding: 32px var(--xp-pad) 20px;
    border-radius: var(--xp-radius) var(--xp-radius) 0 0;
  }
  body.pana-theme.pana-mobile-xp .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  @media (min-width: 768px) and (max-width: 900px) {
    body.pana-theme.pana-mobile-xp .footer.pana-footer .footer-inner {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 20px 24px !important;
    }
  }

  /* Header scrolled (classe da JS) */
  body.pana-theme.pana-mobile-xp.pana-header-scrolled > .header {
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.1);
  }

  /* Avacy / OIL: sopra la bottom bar a destra (mai sopra Home a sinistra) */
  body.pana-theme.pana-mobile-xp #avacy-floating-resurface,
  body.pana-theme.pana-mobile-xp .as-oil__floating-banner-resurface-wrapper,
  body.pana-theme.pana-mobile-xp #oil-preview,
  body.pana-theme.pana-mobile-xp #oil-preview-wrapper,
  body.pana-theme.pana-mobile-xp .oil-preview,
  body.pana-theme.pana-mobile-xp [id^="oil-"],
  body.pana-theme.pana-mobile-xp [class*="oil-preview"],
  body.pana-theme.pana-mobile-xp [class*="avacy"],
  body.pana-theme.pana-mobile-xp .iubenda-tp-btn,
  body.pana-theme.pana-mobile-xp #iubenda-cs-banner {
    left: auto !important;
    right: 12px !important;
    top: auto !important;
    bottom: calc(var(--xp-bottom-nav-h, 64px) + 72px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: var(--xp-z-cookie, 122) !important;
  }
  body.pana-theme.pana-mobile-xp #oil-preview-btn,
  body.pana-theme.pana-mobile-xp button.oil-preview-btn,
  body.pana-theme.pana-mobile-xp .oil-preview-button {
    margin: 0 !important;
    transform: scale(0.88);
    transform-origin: top right;
  }

  /* FAB WhatsApp: sinistra, sopra bottom bar (non copre CTA/filtri a destra) */
  body.pana-theme.pana-mobile-xp .pana-wa-fab {
    left: 12px !important;
    right: auto !important;
    bottom: calc(var(--xp-bottom-nav-h, 64px) + 12px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: var(--xp-z-wa-fab, 125) !important;
    width: 52px !important;
    height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #25d366 !important;
  }
  body.pana-theme.pana-mobile-xp.filters-open .pana-wa-fab,
  body.pana-theme.pana-mobile-xp.pana-shop-page.filters-open .pana-wa-fab {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.pana-theme.pana-mobile-xp .pana-wa-fab .pana-wa-icon {
    width: 30px !important;
    height: 30px !important;
    color: #fff !important;
  }
  body.pana-theme.pana-mobile-xp .pana-sticky-atc {
    bottom: calc(var(--xp-bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px)) !important;
    z-index: var(--xp-z-sticky-atc, 128) !important;
  }
  body.pana-theme.pana-mobile-xp.pana-checkout-page .woocommerce-checkout-review-order {
    bottom: calc(var(--xp-bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px)) !important;
    z-index: var(--xp-z-checkout-bar, 128) !important;
  }
}

@media (min-width: 901px) {
  /* Desktop: layout classico (niente duplicati ricerca / menu) */
  body.pana-theme.pana-mobile-xp .pana-header-search-row,
  body.pana-theme.pana-mobile-xp .pana-search-wrap--mobile {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp > .header {
    position: sticky;
    top: 0;
  }
  body.pana-theme.pana-mobile-xp.admin-bar > .header {
    top: 32px;
  }
  body.pana-theme.pana-mobile-xp .header-inner {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    flex-wrap: unset !important;
    align-items: center !important;
    justify-content: unset !important;
    gap: 16px !important;
    padding: 14px 16px !important;
  }
  body.pana-theme.pana-mobile-xp .header-inner > .pana-search-wrap:not(.pana-search-wrap--mobile) {
    display: block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    pointer-events: auto !important;
  }
  body.pana-theme.pana-mobile-xp .logo {
    flex: unset;
    font-size: 18px;
  }
  body.pana-theme.pana-mobile-xp .logo .logo-name {
    display: block !important;
    font-size: 18px;
    letter-spacing: normal;
  }
  body.pana-theme.pana-mobile-xp .logo .logo-tagline {
    display: block !important;
    font-size: 10px;
    margin: 0;
    opacity: 1;
    vertical-align: baseline;
  }
  body.pana-theme.pana-mobile-xp .header-actions .tel {
    display: inline !important;
  }
  body.pana-theme.pana-mobile-xp .cart-btn {
    border-radius: var(--radius, 8px);
    padding: 8px 14px !important;
    font-size: 14px !important;
    box-shadow: none;
  }
  body.pana-theme.pana-mobile-xp > .nav,
  body.pana-theme.pana-mobile-xp #pana-nav {
    display: block !important;
  }
  body.pana-theme.pana-mobile-xp #pana-nav .nav-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    overflow: visible !important;
    gap: 4px !important;
    padding: 0 16px !important;
  }
  body.pana-theme.pana-mobile-xp #pana-nav a {
    flex: 0 0 auto !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    letter-spacing: normal;
  }
  body.pana-theme.pana-mobile-xp .nav-label--long {
    display: inline;
  }
  body.pana-theme.pana-mobile-xp .nav-label--short {
    display: none;
  }
  body.pana-theme.pana-mobile-xp .mobile-bottom-nav--xp {
    display: none !important;
  }
  body.pana-theme.pana-mobile-xp .footer.pana-footer {
    margin-top: 48px;
    padding: 40px 16px 24px;
  }
  body.pana-theme.pana-mobile-xp .footer.pana-footer .footer-inner {
    display: grid !important;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr)) !important;
    gap: 24px 32px !important;
    max-width: var(--max, 1200px);
    margin: 0 auto;
    align-items: start;
  }
  body.pana-theme.pana-mobile-xp .footer.pana-footer .footer-bottom {
    max-width: var(--max, 1200px);
    margin: 24px auto 0;
    padding: 16px 16px 0;
  }
}
