/* Shared mobile shell; all colors come from the current Theme settings. */
.pg-personal-bottom-nav,
.pg-mobile-login,
.pg-mobile-theme-control,
.pg-mobile-editor-actions { display: none; }
.pg-mobile-back { display: none; }
.pg-header-cart { align-items: center; color: var(--pg-header-text-strong, var(--pg-text)); display: inline-flex; justify-content: center; min-width: 44px; min-height: 44px; position: relative; text-decoration: none; }
.pg-header-cart__count { align-items: center; background: var(--pg-primary); border-radius: 999px; color: var(--pg-primary-contrast, #fff); display: inline-flex; font-size: 11px; font-weight: 800; justify-content: center; min-width: 18px; min-height: 18px; padding: 1px 4px; position: absolute; right: 0; top: 0; }
.pg-management-sheet { background: linear-gradient(var(--pg-surface-strong), var(--pg-surface-strong)), var(--pg-bg); border: 1px solid var(--pg-border); border-radius: 20px 20px 0 0; color: var(--pg-text); font-family: var(--pg-font-sans, sans-serif); inset: auto 0 0; margin: auto auto 0; max-height: min(85dvh, 44rem); max-width: 36rem; overflow-y: auto; overscroll-behavior: contain; padding: 0 1rem calc(1rem + env(safe-area-inset-bottom)); width: 100%; }
.pg-management-sheet:not([open]) { display: none; }
.pg-management-sheet::backdrop { background: color-mix(in srgb, var(--pg-dark) 55%, transparent); }
.pg-management-sheet__head { align-items: center; background: linear-gradient(var(--pg-surface-strong), var(--pg-surface-strong)), var(--pg-bg); border-bottom: 1px solid var(--pg-border); display: flex; gap: 0.75rem; justify-content: space-between; padding: 0.75rem 0; position: sticky; top: 0; z-index: 1; }
.pg-management-sheet h2 { color: var(--pg-dark); font-size: 1.1rem; line-height: 1.4; margin: 0; }
.pg-management-sheet__head button { background: var(--pg-bg-soft); border: 1px solid var(--pg-border); border-radius: 50%; color: var(--pg-text); flex-shrink: 0; font-size: 1.5rem; height: 44px; width: 44px; }
.pg-management-sheet nav { display: grid; gap: 0.35rem; padding-top: 0.6rem; }
.pg-management-sheet nav a { align-items: center; border-radius: 0.7rem; color: var(--pg-text); display: flex; gap: 0.75rem; min-height: 52px; padding: 0.6rem 0.75rem; text-decoration: none; }
.pg-management-sheet nav a span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pg-management-sheet nav a svg { flex-shrink: 0; }
.pg-management-sheet nav a[aria-current="page"] { background: color-mix(in srgb, var(--pg-primary) 12%, var(--pg-bg)); color: var(--pg-primary-deep); font-weight: 800; }
.pg-management-sheet :focus-visible,
.pg-personal-bottom-nav :focus-visible { outline: 2px solid var(--pg-primary); outline-offset: -3px; }
body.pg-management-open { overflow: hidden; }
@media (max-width: 767.98px) {
  body.pg-personal-surface:not(.pg-has-personal-nav):not(.pg-mobile-editor):not(.pg-mobile-cart):not(.pg-mobile-checkout) { padding-bottom: env(safe-area-inset-bottom); }
  body.pg-has-personal-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.pg-mobile-editor,
  body.pg-mobile-cart,
  body.pg-mobile-checkout { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  body .pg-site-header { height: 56px !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  body .pg-site-header__inner { height: 56px !important; min-height: 56px !important; gap: 4px !important; padding: 6px max(6px, env(safe-area-inset-right)) 6px max(6px, env(safe-area-inset-left)) !important; }
  body .pg-site-header-spacer { height: 56px !important; }
  body .pg-site-header__left { flex: 1; gap: 4px; min-width: 0; }
  body .pg-site-header__right { flex-shrink: 0; gap: 2px; }
  body .pg-site-header .pg-btn-icon,
  .pg-mobile-login { align-items: center; display: inline-flex; flex: 0 0 44px; height: 44px !important; justify-content: center; min-width: 44px !important; padding: 0 !important; width: 44px !important; }
  body .pg-site-header #pg-theme-toggle { display: none; }
  body .pg-site-header :is(#pg-sidebar-toggle, #pg-search-toggle, #pg-header-account-toggle) { height: 44px !important; min-height: 44px !important; max-height: 44px !important; width: 44px !important; min-width: 44px !important; max-width: 44px !important; padding: 0 !important; }
  body .pg-site-header #pg-header-account-toggle > .pg-account-fallback { display: block !important; }
  body:has(.pg-header-account.is-open) :is(.pg-mobile-bottom-bar, .pg-personal-bottom-nav, .pg-mobile-editor-actions, .wc-proceed-to-checkout, #place_order) { visibility: hidden; }
  .pg-mobile-theme-control { align-items: center; background: transparent; border: 0; color: var(--pg-text); display: flex; gap: 0.75rem; min-height: 44px; text-align: left; }
  .pg-header-account__links .pg-mobile-theme-control { padding: 0.75rem; width: 100%; }
  body .pg-logo-link { gap: 5px; min-width: 0; overflow: hidden; }
  body .pg-logo-icon { border-radius: 8px; flex: 0 0 28px; height: 28px; width: 28px; }
  body .pg-logo-img { max-height: 32px; max-width: 108px; object-fit: contain; }
  body .pg-logo-text { min-width: 0; }
  body .pg-logo-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body .pg-logo-desc,
  body .pg-site-header__center,
  body .pg-header-account__label,
  body .pg-header-account__chevron { display: none !important; }
  body .pg-header-account__menu { max-height: calc(100dvh - 70px); max-width: calc(100vw - 20px); overflow-y: auto; overscroll-behavior: contain; right: 0; width: min(320px, calc(100vw - 20px)); }
  body .pg-header-account__links a,
  body .pg-header-account__logout { min-height: 44px; }
  body .pg-sidebar-overlay { z-index: 120; }
  body .pg-sidebar-drawer { background: linear-gradient(var(--pg-surface-strong), var(--pg-surface-strong)), var(--pg-bg) !important; max-width: 85vw; overscroll-behavior: contain; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); transition: transform 180ms ease-out; width: 85vw; z-index: 121; }
  body .pg-sidebar-drawer :where(a, button, select) { min-height: 44px; }
  body.logged-in .pg-sidebar-drawer .pg-mobile-theme-control,
  body .pg-sidebar-rank-form { display: none; }
  body.pg-personal-surface .pg-onboarding-portal-launcher { display: none; }
  .pg-mobile-back { align-items: center; color: var(--pg-primary-deep); display: inline-flex; gap: 0.6rem; font-size: 0.875rem; font-weight: 700; min-height: 44px; padding-inline: 0.4rem; text-decoration: none; }
  .pg-mobile-back > span:first-child { font-size: 1.3rem; }
  body.pg-personal-surface .pg-portal-sidebar { display: none !important; }
  body.pg-personal-surface .pg-portal { gap: 0; padding-inline: max(12px, env(safe-area-inset-left)); width: 100%; }
  body.pg-personal-surface .pg-portal-main { padding: 1rem 0 !important; }
  .pg-personal-bottom-nav { align-items: stretch; background: linear-gradient(var(--pg-surface-strong), var(--pg-surface-strong)), var(--pg-bg); border-top: 1px solid var(--pg-border); bottom: 0; display: flex; inset-inline: 0; min-height: calc(64px + env(safe-area-inset-bottom)); padding: 3px max(6px, env(safe-area-inset-right)) calc(3px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); position: fixed; z-index: 80; }
  .pg-personal-bottom-nav a,
  .pg-personal-bottom-nav button { align-items: center; background: transparent; border: 0; border-radius: 10px; color: var(--pg-muted); display: flex; flex: 1; flex-direction: column; font: inherit; font-size: 11px; font-weight: 700; gap: 5px; justify-content: center; line-height: 1.3; min-height: 52px; min-width: 44px; padding: 4px; text-decoration: none; touch-action: manipulation; }
  .pg-personal-bottom-nav [aria-current="page"],
  .pg-personal-bottom-nav .is-active { background: color-mix(in srgb, var(--pg-primary) 9%, transparent); color: var(--pg-primary-deep); }
  .pg-personal-bottom-nav svg { flex-shrink: 0; }
  body.pg-has-personal-nav #pg-scroll-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .pg-mobile-editor-actions { align-items: stretch; background: linear-gradient(var(--pg-surface-strong), var(--pg-surface-strong)), var(--pg-bg); border-top: 1px solid var(--pg-border); bottom: 0; display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); inset-inline: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); position: fixed; z-index: 80; }
  .pg-mobile-editor-actions .pg-btn { font-size: 12px !important; line-height: 1.3; min-height: 44px; min-width: 0; padding: 8px 4px !important; white-space: normal; width: 100%; }
  .pg-mobile-editor .pg-publish-split__toggle { display: none; }
  body.pg-mobile-editor :where(.pg-portal, .pg-portal-main, #pg-frontend-editor, .pg-editor-layout-column),
  body.pg-shopping-surface :where(.pg-portal, .pg-portal-main, .pg-portal-commerce) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; filter: none !important; transform: none !important; }
  body.pg-mobile-cart .wc-proceed-to-checkout { background: linear-gradient(var(--pg-surface-strong), var(--pg-surface-strong)), var(--pg-bg); border-top: 1px solid var(--pg-border); bottom: 0; inset-inline: 0; margin: 0 !important; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important; position: fixed; z-index: 80; }
  body.pg-mobile-cart .wc-proceed-to-checkout .checkout-button { align-items: center; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; min-height: 44px; padding: 10px !important; width: 100%; }
  body.pg-mobile-checkout #place_order { bottom: max(10px, env(safe-area-inset-bottom)); box-sizing: border-box !important; float: none; inset-inline: 12px; margin: 0; min-height: 48px; padding: 12px; position: fixed; width: auto !important; z-index: 80; }
  body.pg-shopping-surface .pg-portal-commerce .button,
  body.pg-shopping-surface .pg-portal-commerce input.qty { min-height: 44px; min-width: 44px; }
  body.pg-mobile-cart .woocommerce a.remove { align-items: center; display: inline-flex; height: 44px; justify-content: center; width: 44px; }
  body.pg-mobile-cart .woocommerce tr.woocommerce-cart-form__cart-item { background: var(--pg-bg-soft); border-bottom: 1px solid var(--pg-border); display: grid !important; gap: 8px 12px; grid-template-areas: "image name remove" "image price remove" "image quantity quantity" "subtotal subtotal subtotal"; grid-template-columns: 64px minmax(0, 1fr) 44px; margin: 0; padding: 12px; }
  body.pg-mobile-cart .woocommerce tr.woocommerce-cart-form__cart-item td { background: transparent !important; border: 0; display: block !important; float: none; min-width: 0; overflow-wrap: anywhere; padding: 0 !important; text-align: left !important; }
  body.pg-mobile-cart .woocommerce td.product-thumbnail { grid-area: image; }
  body.pg-mobile-cart .woocommerce td.product-thumbnail img { height: 64px; object-fit: contain; width: 64px; }
  body.pg-mobile-cart .woocommerce td.product-thumbnail::before,
  body.pg-mobile-cart .woocommerce td.product-name::before,
  body.pg-mobile-cart .woocommerce td.product-price::before { display: none !important; }
  body.pg-mobile-cart .woocommerce td.product-name { font-size: 15px; font-weight: 700; grid-area: name; line-height: 1.5; }
  body.pg-mobile-cart .woocommerce td.product-price { grid-area: price; }
  body.pg-mobile-cart .woocommerce td.product-remove { grid-area: remove; }
  body.pg-mobile-cart .woocommerce td.product-quantity { align-items: center; display: flex !important; gap: 8px; grid-area: quantity; }
  body.pg-mobile-cart .woocommerce td.product-quantity input.qty { max-width: 70px; }
  body.pg-mobile-cart .woocommerce td.product-subtotal { border-top: 1px solid var(--pg-border); grid-area: subtotal; padding-top: 8px !important; text-align: right !important; }
  body.pg-mobile-cart .woocommerce .coupon { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  body.pg-mobile-cart .woocommerce .coupon::before,
  body.pg-mobile-cart .woocommerce .coupon::after { display: none !important; }
  body.pg-mobile-cart .woocommerce .coupon label { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
  body.pg-mobile-cart .woocommerce .coupon input.input-text { background: var(--pg-bg); border: 1px solid var(--pg-border); border-radius: 8px; box-sizing: border-box; color: var(--pg-text); font: inherit; min-height: 44px; padding: 10px; width: 100% !important; }
  body.pg-mobile-cart .woocommerce .coupon .button { margin: 0; padding-inline: 14px; white-space: nowrap; width: auto !important; }
  body.pg-mobile-cart .woocommerce :is(td.product-quantity, td.product-subtotal, .cart_totals td)::before { margin-right: 6px; }
  body.pg-mobile-checkout #pg-scroll-top,
  body.pg-mobile-editor #pg-scroll-top { display: none; }
  body.pg-mobile-checkout .pg-mobile-bottom-bar { display: none; }
}
@media (max-width: 359px) {
  body.pg-shopping-surface .pg-logo-icon { display: none; }
  body.pg-shopping-surface .pg-logo-title { font-size: 14px; }
  body.pg-mobile-cart .woocommerce .coupon { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body .pg-sidebar-drawer { transition: none; }
}
