/* =====================================================
   PARINHALL — MOBILE RESPONSIVE STYLES
   All @media (max-width: 768px) overrides in one file

   Design tokens (edit here, all values cascade):
   --ph-bottom-nav-height : bottom nav bar height
   --ph-mobile-bp         : mobile breakpoint (must match media queries)
   ===================================================== */
:root {
  --ph-bottom-nav-height: 88px;
  --ph-mobile-bp: 768;
}

/* =====================================================
   BOTTOM NAVIGATION BAR
   ===================================================== */
.ph-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Body clearance for fixed bottom nav */
  body {
    padding-bottom: var(--ph-bottom-nav-height);
  }

  /* Checkout & custom-header pages: no bottom nav clearance needed */
  body.woocommerce-checkout,
  body.search,
  body.page-template-page-compare {
    padding-bottom: 0;
  }

  /* Bottom nav */
  .ph-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(251, 249, 245, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1.5px solid rgba(226, 115, 74, 0.28);
    border-radius: 22px 22px 0 0;
    padding: 10px 8px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 28px rgba(226, 115, 74, 0.13), 0 -3px 12px rgba(27, 122, 140, 0.09);
    justify-content: space-around;
    align-items: flex-start;
  }

  /* Hide bottom nav on checkout */
  body.woocommerce-checkout .ph-bottom-nav {
    display: none;
  }

  .ph-bottom-nav__tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
  }

  .ph-bottom-nav__icon {
    width: 42px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
  }

  .ph-bottom-nav__tab--active .ph-bottom-nav__icon {
    background: rgba(27, 122, 140, 0.12);
  }

  .ph-bottom-nav__label {
    font-size: 10px;
    color: #8A9382;
    font-family: var(--font-body);
  }

  .ph-bottom-nav__tab--active .ph-bottom-nav__label {
    color: #1B7A8C;
    font-weight: 600;
  }

  .ph-bottom-nav__tab--active svg {
    stroke: #1B7A8C;
  }
}

/* =====================================================
   HEADER — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Announcement bar: auto-scrolling marquee on mobile */
  .ph-announcement {
    height: 32px;
    direction: ltr !important;
    overflow: hidden;
    position: relative;
    /* contain:layout paint stops the wide inner track from extending
       the html scroll range in Chrome Android RTL mode */
    contain: layout paint;
  }
  .ph-announcement__track {
    justify-content: flex-start !important;
    padding: 0 !important;
    gap: 16px;
    direction: ltr;
    width: max-content;
    animation: none !important; /* JS handles movement — see header.php inline script */
  }
  /* Show duplicated spans on mobile */
  .ph-announcement__track span[aria-hidden] { display: inline !important; }
  .ph-announcement span {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11.5px;
  }

  /* Header top: hamburger RIGHT, logo CENTER, search+cart LEFT */
  .ph-header__top-inner {
    padding-block: 10px;
    gap: 6px;
    position: relative;
  }

  /* Neutralize the flex:1 spacer div */
  .ph-header__top-inner > div:not([class]) {
    display: none !important;
  }

  /* Hide wishlist from mobile header (it lives in bottom nav) */
  .ph-header__wishlist {
    display: none !important;
  }

  /* Hide account, search form, and nav on mobile */
  .ph-header__search,
  .ph-header__account,
  .ph-header__nav {
    display: none !important;
  }

  /* Reorder flex items — in RTL: lower order = more to the RIGHT */
  .ph-mobile-toggle {
    display: flex;
    order: 1; /* hamburger → rightmost */
  }

  .ph-logo {
    order: 2; /* logo → center */
    margin-inline-start: auto;
    margin-inline-end: auto;
  }

  /* Logo text smaller on mobile */
  .ph-logo__parin,
  .ph-logo__hall {
    font-size: 18px;
  }
  .ph-logo__sub {
    font-size: 10px;
  }

  /* Mobile search icon button */
  .ph-mobile-search-icon {
    display: flex !important;
    order: 3; /* search → left side */
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid rgba(32,38,31,0.1);
    background: var(--ph-white);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ph-dark);
    flex-shrink: 0;
  }

  /* Cart button: icon only on mobile, min 44px touch target */
  .ph-header__cart {
    order: 4; /* cart → leftmost */
    padding: 12px 13px;
    min-height: 44px;
    min-width: 44px;
  }
  .ph-header__cart-label {
    display: none;
  }
  /* Remove "سبد خرید" text from cart button text span */
  .ph-header__cart span:first-of-type {
    display: none;
  }

  /* Mobile menu panel animation */
  .ph-mobile-menu__panel {
    animation: phSlideIn 0.3s ease;
    overflow: hidden; /* prevent body scroll from leaking */
  }

  /* Nav strip & mega menu: hidden on mobile */
  .ph-header__nav,
  .ph-mega {
    display: none !important;
  }

  /* ---- Mobile menu redesign ---- */
  .ph-mobile-menu__header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(32,38,31,0.07);
  }

  .ph-mobile-menu__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F1EBE0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: var(--ph-dark);
    flex-shrink: 0;
  }

  .ph-mobile-menu__body {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0;
  }

  /* "همه دسته‌ها" button */
  .ph-mobile-menu__all-cats {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ph-dark);
    text-decoration: none;
    background: rgba(27,122,140,0.06);
    margin: 8px 12px;
    border-radius: 12px;
    border: 1.5px solid rgba(27,122,140,0.15);
  }

  /* Category links */
  .ph-mobile-menu__cat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    font-size: 14.5px;
    color: var(--ph-dark);
    text-decoration: none;
    border-bottom: 1px solid rgba(32,38,31,0.055);
  }
  .ph-mobile-menu__cat:active {
    background: rgba(32,38,31,0.04);
  }
  .ph-mobile-menu__cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .ph-mobile-menu__cat-name {
    flex: 1;
  }

  /* Static pages (مجله / حراج) */
  .ph-mobile-menu__page {
    display: block;
    padding: 13px 20px;
    font-size: 14.5px;
    color: var(--ph-mid-green);
    text-decoration: none;
    border-bottom: 1px solid rgba(32,38,31,0.055);
  }
  .ph-mobile-menu__page--sale {
    color: var(--ph-orange);
    font-weight: 600;
  }

  /* Shortcuts row (account + wishlist) */
  .ph-mobile-menu__shortcuts {
    display: flex;
    border-top: 1px solid rgba(32,38,31,0.08);
    border-bottom: 1px solid rgba(32,38,31,0.08);
  }
  .ph-mobile-menu__shortcut {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 8px;
    font-size: 13px;
    color: var(--ph-dark);
    text-decoration: none;
    font-weight: 500;
  }
  .ph-mobile-menu__shortcut + .ph-mobile-menu__shortcut {
    border-inline-start: 1px solid rgba(32,38,31,0.08);
  }

  /* Promo footer */
  .ph-mobile-menu__promo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #F5EFE4;
    margin: 0;
  }
  .ph-mobile-menu__promo-badge {
    background: var(--ph-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .ph-mobile-menu__promo-text {
    flex: 1;
    min-width: 0;
  }
  .ph-mobile-menu__promo-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ph-dark);
  }
  .ph-mobile-menu__promo-sub {
    font-size: 11.5px;
    color: var(--ph-mid-green);
    margin-top: 2px;
  }
  .ph-mobile-menu__promo-cta {
    flex-shrink: 0;
    background: var(--ph-dark);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 10px;
    text-decoration: none;
  }
}

/* =====================================================
   HOME PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Hero: teal gradient, compact */
  .ph-hero {
    padding-block-start: 8px;
  }

  .ph-hero__inner {
    grid-template-columns: 1fr;
    min-height: 220px;
    border-radius: var(--radius-2xl);
    padding: 12px 16px 0;
    background: linear-gradient(200deg, #1B7A8C 0%, #2E8FA0 58%, #7ABCC8 100%);
    position: relative;
    overflow: hidden;
  }

  /* Teal radial highlight overlay */
  .ph-hero__inner::before {
    content: '';
    position: absolute;
    top: -30%;
    inset-inline-end: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 70%);
    pointer-events: none;
  }

  /* Hide full decorative placeholder, show only the chip */
  .ph-hero__visual {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 8px 0 0;
    min-height: 80px;
    position: relative;
    z-index: 1;
  }

  .ph-hero__visual-placeholder {
    display: none;
  }

  /* Chip card — visible on mobile hero */
  .ph-hero__chip {
    position: relative;
    animation: phFloat 6s ease-in-out infinite;
    background: rgba(255,255,255,0.95);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    max-width: 200px;
  }

  .ph-hero__chip-img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .ph-hero__chip-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Hero text — white on teal background */
  .ph-hero__content {
    padding: 10px 0 14px;
    text-align: center;
    align-items: center;
    position: relative;
    z-index: 1;
  }

  .ph-hero__content .ph-eyebrow {
    text-align: center;
  }

  .ph-hero__eyebrow-text {
    color: rgba(255,255,255,0.8);
  }

  .ph-hero__eyebrow-line {
    background: rgba(255,255,255,0.3);
  }

  .ph-hero__title {
    font-size: clamp(24px, 7.5vw, 36px);
    line-height: 1.2;
    color: #fff;
    margin-bottom: 6px;
  }

  .ph-hero__desc,
  .ph-hero__subtitle {
    font-size: 12.5px;
    max-width: 100%;
    color: rgba(255,255,255,0.8);
  }

  .ph-hero__actions {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  /* Full-width CTA button on mobile */
  .ph-hero__actions .ph-btn {
    width: 100%;
    justify-content: center;
  }

  /* Hide secondary CTA on mobile */
  .ph-hero__actions .ph-btn:nth-child(2) {
    display: none;
  }

  /* Stats bar — white text on teal */
  .ph-hero__stats {
    justify-content: space-around;
    padding: 10px 0;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    position: relative;
    z-index: 1;
  }

  .ph-hero__stat {
    flex: 1;
    text-align: center;
    padding: 0;
    color: #fff;
  }

  .ph-hero__stat .ph-hero__stat-number {
    color: #fff;
    font-size: 18px;
  }

  .ph-hero__stat .ph-hero__stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
  }

  .ph-hero__stat + .ph-hero__stat {
    border-right: 1px solid rgba(255,255,255,0.15);
  }

  /* Stories strip: smaller circles, auto-scroll only */
  .ph-stories-strip {
    padding: 14px 0;
  }
  .ph-stories-track {
    gap: 14px;
    padding: 0 14px;
  }
  .ph-story-circle {
    width: 58px;
    height: 58px;
  }
  .ph-story-label {
    font-size: 10px;
  }

  /* Section header */
  .ph-section-header {
    margin-bottom: 14px;
  }

  /* =====================================================
     SECTIONS: HORIZONTAL SCROLL ON MOBILE
     ===================================================== */

  /* Offers: horizontal scroll cards (override desktop grid) */
  .ph-offers-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 10px;
    padding-bottom: 4px;
    padding-inline: 2px;
    grid-template-columns: unset;
  }
  .ph-offers-grid::-webkit-scrollbar { display: none; }
  .ph-offer-card {
    flex: 0 0 155px;
    min-height: 190px;
    border-radius: 14px;
  }

  /* "سه دنیا" category grid: horizontal scroll (override desktop grid) */
  .ph-cat-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 10px;
    padding-bottom: 4px;
    padding-inline: 2px;
    grid-template-columns: unset;
  }
  .ph-cat-grid::-webkit-scrollbar { display: none; }
  .ph-cat-card {
    flex: 0 0 140px;
    height: 180px;
    min-height: unset;
    border-radius: 14px;
  }

  /* Newest & popular product rows: ensure horizontal scroll */
  .ph-scroller,
  .ph-products-row {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }
  .ph-scroller::-webkit-scrollbar,
  .ph-products-row::-webkit-scrollbar { display: none; }

  /* Product cards in scroll rows: fixed width */
  .ph-products-row .ph-product-card,
  .ph-scroller .ph-product-card {
    flex: 0 0 150px;
  }

  /* Recs scroller cards: tighter */
  .ph-recs-scroller {
    padding-bottom: 4px;
  }
  .ph-rec-card {
    flex: 0 0 138px;
  }

  /* =====================================================
     MEMBERSHIP PROMO: two-panel, minimal, very rounded
     ===================================================== */
  .ph-membership {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: unset;
    align-items: unset;
    text-align: unset;
    border-radius: 28px;
    overflow: hidden;
    padding: 8px;          /* gap shows warm bg between panels */
    gap: 6px;
    background: #E8DDD5;   /* warm separator between panels */
    min-height: auto;
  }
  .ph-membership__content {
    border-radius: 20px;   /* inner panel softened */
    padding: 14px 12px;
    align-items: flex-start;
    text-align: right;
    gap: 6px;
  }
  .ph-membership__content h2 {
    font-size: 13px;
    line-height: 1.3;
  }
  .ph-membership__content p {
    font-size: 10.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ph-membership__content .ph-btn {
    font-size: 11px;
    padding: 7px 12px;
    align-self: flex-start;
    width: auto;
  }
  .ph-membership__visual {
    display: flex;          /* restore % number panel */
    border-radius: 20px;    /* inner panel softened */
    min-height: 0;
  }
  .ph-membership__discount-num {
    font-size: 44px;
  }
  .ph-membership__discount-label {
    font-size: 10px;
  }

  /* =====================================================
     PHILOSOPHY: compact on mobile
     ===================================================== */
  .ph-philosophy__inner {
    flex-direction: column;
    gap: 18px;
  }
  .ph-philosophy__visual {
    width: 100%;
    aspect-ratio: 5/3;
  }
  .ph-philosophy__img-placeholder {
    height: 180px;
    border-radius: 16px;
  }
  .ph-philosophy__content h2 {
    font-size: 20px;
  }
  .ph-philosophy__content p {
    font-size: 13.5px;
  }
  .ph-philosophy__pillars {
    flex-direction: column;
    gap: 10px;
  }

  /* =====================================================
     PRODUCT REQUEST BANNER: compact
     ===================================================== */
  .ph-product-request-banner {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
    border-radius: 16px;
  }
  .ph-product-request-banner__title {
    font-size: 14px;
  }
  .ph-product-request-banner__sub {
    font-size: 12px;
  }
  .ph-product-request-banner__cta {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* =====================================================
     TRUST GRID: 2×2
     ===================================================== */
  .ph-trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ph-trust-item {
    padding: 14px 12px;
    border-radius: 14px;
  }

  /* =====================================================
     NEWSLETTER: compact minimal card
     ===================================================== */
  .ph-newsletter {
    border-radius: 20px;
    padding: 22px 16px;
  }
  .ph-newsletter__inner {
    gap: 12px;
    align-items: center;
    text-align: center;
  }
  .ph-newsletter h2,
  .ph-newsletter__inner h2 {
    font-size: 18px;
  }
  .ph-newsletter p,
  .ph-newsletter__inner p {
    font-size: 13px;
  }
  .ph-newsletter__form {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .ph-newsletter__form .ph-btn {
    width: 100%;
    justify-content: center;
  }
  .ph-newsletter__note {
    font-size: 11.5px;
    text-align: center;
  }

  /* Marquee strip: slightly smaller */
  .ph-marquee-item {
    font-size: 15px;
    padding: 9px 18px;
  }
}

/* =====================================================
   SHOP / CATEGORY PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Category header: back + title + icons */
  .ph-shop-header {
    height: 52px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Subcategory pills: horizontal scroll */
  .ph-shop__subcat-bar {
    padding: 0 14px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .ph-shop__subcat-bar::-webkit-scrollbar {
    display: none;
  }

  /* Filter/sort bar: always visible, sticky */
  .ph-shop__filter-bar {
    position: sticky;
    top: 52px;
    z-index: 20;
    background: var(--ph-white);
    border-bottom: 1px solid rgba(32, 38, 31, 0.07);
    display: flex;
    gap: 8px;
    padding: 10px 14px;
  }

  /* Hide desktop sidebar + sort-bar — replaced by bottom sheets */
  .ph-sidebar { display: none; }
  .ph-sort-bar { display: none; }
  .ph-shop-layout { display: block; }

  /* Filter/sort trigger buttons */
  .ph-shop__filter-btn,
  .ph-shop__sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid rgba(32, 38, 31, 0.14);
    border-radius: 20px;
    background: var(--ph-white);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--ph-dark);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
  }

  .ph-shop__filter-dot {
    position: absolute;
    top: 5px;
    left: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ph-orange);
    border: 1.5px solid var(--ph-white);
  }

  .ph-shop__sort-btn {
    border-color: var(--ph-teal);
    color: var(--ph-teal);
    background: var(--ph-teal-light, #EAF5F7);
  }

  /* Active filter pills: horizontal scroll */
  .ph-shop__active-filters {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
  }

  .ph-shop__active-filters::-webkit-scrollbar { display: none; }

  /* Filter sheet: close button */
  .ph-filter-sheet__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--ph-mid-green);
    font-size: 20px;
    line-height: 1;
  }

  /* Filter sheet footer buttons */
  .ph-filter-sheet__clear {
    flex: 1;
    padding: 12px;
    border: 1.5px solid rgba(32, 38, 31, 0.14);
    border-radius: 12px;
    background: none;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ph-mid-green);
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ph-filter-sheet__apply {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--ph-orange);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ph-white);
    cursor: pointer;
  }

  /* Sort sheet handle */
  .ph-sort-sheet__handle {
    display: flex;
    justify-content: center;
    padding: 9px 0 0;
  }

  /* Product grid: 2-col */
  .ph-product-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 11px;
    padding: 12px 14px 0;
  }

  /* Product grid: 2-col */
  .ph-shop__grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    padding: 12px 14px 0;
  }

  /* Product card in grid: tighter */
  .ph-shop__grid .ph-product-card {
    flex: unset;
  }

  .ph-shop__grid .ph-product-card__name {
    font-size: 16px;
  }

  .ph-shop__grid .ph-product-card__price {
    font-size: 12.5px;
  }

  /* Add to cart circle button in 2-col */
  .ph-shop__grid .ph-product-card__add-btn {
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    right: 10px;
    bottom: 10px;
    left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: none;
    background: var(--ph-dark);
    font-size: 0;
  }

  .ph-shop__grid .ph-product-card__add-btn::after {
    content: '+';
    font-size: 18px;
    color: var(--ph-white);
    line-height: 1;
  }

  /* Filter bottom sheet */
  .ph-filter-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
  }

  .ph-filter-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 38, 31, 0.45);
  }

  .ph-filter-sheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ph-bg);
    border-radius: 22px 22px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: phUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ph-filter-sheet__handle {
    display: flex;
    justify-content: center;
    padding: 9px 0 0;
  }

  .ph-filter-sheet__handle::before {
    content: '';
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: rgba(32, 38, 31, 0.18);
    display: block;
  }

  .ph-filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 14px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(32, 38, 31, 0.07);
  }

  .ph-filter-sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
  }

  .ph-filter-sheet__footer {
    padding: 14px 18px 24px;
    border-top: 1px solid rgba(32, 38, 31, 0.07);
    display: flex;
    gap: 10px;
  }

  /* Sort bottom sheet */
  .ph-sort-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
  }

  .ph-sort-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 38, 31, 0.45);
  }

  .ph-sort-sheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ph-bg);
    border-radius: 22px 22px 0 0;
    animation: phUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ph-sort-sheet__handle {
    display: flex;
    justify-content: center;
    padding: 9px 0 0;
  }

  .ph-sort-sheet__handle::before {
    content: '';
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: rgba(32, 38, 31, 0.18);
    display: block;
  }

  .ph-sort-sheet__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    font-size: 14px;
    color: var(--ph-dark);
    border-bottom: 1px solid rgba(32, 38, 31, 0.05);
    cursor: pointer;
    transition: background 0.15s;
  }

  .ph-sort-sheet__item:hover,
  .ph-sort-sheet__item--active {
    background: var(--ph-teal-light);
    color: var(--ph-teal);
  }
}

/* =====================================================
   PRODUCT PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Product page: single column */
  .ph-product__layout {
    display: block;
  }

  .ph-product__gallery {
    margin-bottom: 0;
  }

  /* Gallery: full-width, swipeable */
  .ph-product__main-image {
    border-radius: 0;
    aspect-ratio: 1 / 1.05;
    width: 100%;
  }

  /* Thumbnails: horizontal scroll strip */
  .ph-product__thumbs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
    padding: 10px 16px;
  }

  .ph-product__thumbs::-webkit-scrollbar {
    display: none;
  }

  .ph-product__thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 9px;
  }

  /* Product info: padded */
  .ph-product__info {
    padding: 18px 16px 0;
  }

  .ph-product__title {
    font-size: 32px;
  }

  /* Price box */
  .ph-product__price-box {
    background: var(--ph-bg-card);
    border-radius: 13px;
    padding: 14px 16px;
    margin: 14px 0;
  }

  /* Color swatches: 34px circles */
  .ph-product__swatch {
    width: 34px;
    height: 34px;
  }

  /* Volume selector: horizontal scroll pills */
  .ph-product__volumes {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .ph-product__volumes::-webkit-scrollbar {
    display: none;
  }

  /* Delivery info: 3-col card */
  .ph-product__delivery {
    grid-template-columns: 1fr 1fr 1fr;
    background: var(--ph-teal-light);
    border-radius: 10px;
    padding: 12px 0;
    margin: 14px 0;
  }

  .ph-product__delivery-item {
    text-align: center;
    padding: 4px 8px;
    border-right: 1px solid rgba(27, 122, 140, 0.2);
  }

  .ph-product__delivery-item:last-child {
    border-right: none;
  }

  /* Add to cart: fixed bottom bar */
  .ph-product__cta {
    display: none; /* Hidden — replaced by fixed bottom bar */
  }

  /* Fixed bottom bar for product page */
  .ph-product-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(251, 249, 245, 0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(32, 38, 31, 0.08);
    padding: 10px 16px calc(22px + env(safe-area-inset-bottom, 0px));
    display: none;
  }

  body.single-product .ph-product-bottom-bar {
    display: block;
  }

  body.single-product .ph-bottom-nav {
    display: none; /* Bottom bar replaces bottom nav on product page */
  }

  .ph-product-bottom-bar__inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ph-product-bottom-bar__price {
    flex-shrink: 0;
  }

  .ph-product-bottom-bar__orig {
    font-size: 10px;
    color: var(--ph-text-muted);
    text-decoration: line-through;
    line-height: 1.3;
  }

  .ph-product-bottom-bar__current {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 20px;
    color: var(--ph-teal);
    line-height: 1.2;
  }

  /* Qty stepper */
  .ph-product-bottom-bar__qty {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(32, 38, 31, 0.14);
    border-radius: 11px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .ph-product-bottom-bar__qty-btn {
    padding: 8px 13px;
    font-size: 16px;
    color: var(--ph-mid-green);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
  }

  .ph-product-bottom-bar__qty-val {
    padding: 8px 4px;
    font-size: 14px;
    min-width: 26px;
    text-align: center;
    color: var(--ph-dark);
    font-weight: 500;
  }

  /* Add to cart button */
  .ph-product-bottom-bar__add {
    flex: 1;
    background: var(--ph-orange);
    color: var(--ph-white);
    border: none;
    border-radius: 12px;
    padding: 13px 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s;
    text-align: center;
  }

  .ph-product-bottom-bar__add:hover {
    background: var(--ph-orange-dark);
  }

  /* Accordions */
  .ph-product__tab-content {
    padding: 0 16px;
  }

  .ph-product__accordion {
    border-bottom: 1px solid rgba(32, 38, 31, 0.07);
  }

  .ph-product__accordion-toggle {
    padding: 15px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--ph-dark);
    width: 100%;
    background: none;
    border: none;
    text-align: right;
  }

  /* Related rail */
  .ph-product__related {
    padding: 24px 0 0;
  }

  .ph-product__related-rail {
    display: flex;
    gap: 12px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ph-product__related-rail::-webkit-scrollbar {
    display: none;
  }

  .ph-product__related-card {
    flex: 0 0 140px;
  }
}

/* =====================================================
   PRODUCT PAGE — MOBILE BOTTOM BAR (.ph-mob-bar)
   ===================================================== */

/* Hide accordion headers on desktop */
.ph-tab-acc { display: none; }

/* Hide mobile filter bar on desktop */
.ph-shop__filter-bar { display: none; }

/* Hide mobile-only fixed bars on desktop */
.ph-cart-checkout-bar { display: none; }
.ph-checkout-cta-bar  { display: none; }
.ph-checkout__steps   { display: none; }
.ph-acc-mob-hero      { display: none; }

@media (max-width: 768px) {
  /* ── Fixed bottom bar ─────────────────────────────── */
  .ph-mob-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(251, 249, 245, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(32, 38, 31, 0.08);
    padding: 10px 16px calc(22px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ph-mob-bar__price-wrap {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 0;
  }

  .ph-mob-bar__orig {
    font-size: 10px;
    color: var(--ph-text-muted);
    text-decoration: line-through;
    line-height: 1.3;
  }

  .ph-mob-bar__price {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    color: var(--ph-teal);
    line-height: 1.2;
  }

  .ph-mob-bar__stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(32, 38, 31, 0.14);
    border-radius: 11px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .ph-mob-bar__step-btn {
    padding: 8px 13px;
    font-size: 16px;
    color: var(--ph-mid-green);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
    line-height: 1;
  }

  .ph-mob-bar__step-num {
    padding: 8px 4px;
    font-size: 14px;
    min-width: 26px;
    text-align: center;
    color: var(--ph-dark);
    font-weight: 500;
  }

  .ph-mob-bar__add {
    flex: 1;
    background: var(--ph-orange);
    color: var(--ph-white);
    border: none;
    border-radius: 12px;
    padding: 13px 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s;
    text-align: center;
    text-decoration: none;
    display: block;
  }

  .ph-mob-bar__add:hover {
    background: var(--ph-orange-dark, #c5633a);
    color: var(--ph-white);
  }

  /* Hide bottom nav on product page (replaced by mob-bar) */
  body.single-product .ph-bottom-nav { display: none; }

  /* ── Tab → Accordion ──────────────────────────────── */
  .ph-tabs-section .ph-tab-nav { display: none; }

  .ph-tab-acc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(32, 38, 31, 0.07);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ph-dark);
    text-align: right;
  }

  .ph-tab-acc.active {
    color: var(--ph-teal);
    border-bottom-color: transparent;
  }

  .ph-tab-acc__ico {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: var(--ph-olive);
  }

  .ph-tab-acc__ico--open {
    transform: rotate(180deg);
    color: var(--ph-teal);
  }

  .ph-tab-panel {
    padding: 0 16px;
    overflow: hidden;
  }

  .ph-tab-panel.active {
    padding: 4px 16px 20px;
  }
}

/* =====================================================
   CART PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Cart layout: single column */
  .ph-cart__layout {
    grid-template-columns: 1fr;
  }

  /* Free shipping bar */
  .ph-cart__ship-bar {
    background: var(--ph-teal-light);
    padding: 13px 16px;
    margin-bottom: 0;
  }

  .ph-cart__ship-progress {
    height: 5px;
    border-radius: 5px;
    background: rgba(27, 122, 140, 0.2);
    overflow: hidden;
    margin-top: 7px;
  }

  .ph-cart__ship-fill {
    height: 100%;
    background: linear-gradient(to left, var(--ph-teal), #7ABCC8);
    border-radius: 5px;
    transition: width 0.4s ease;
  }

  /* Cart items: tighter */
  .ph-cart-item {
    gap: 12px;
  }

  .ph-cart-item__img {
    width: 80px;
    height: 92px;
  }

  /* Qty stepper in cart */
  .ph-cart-item__stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(32, 38, 31, 0.12);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
  }

  .ph-cart-item__stepper-btn {
    padding: 5px 12px;
    cursor: pointer;
    color: var(--ph-mid-green);
    background: none;
    border: none;
    font-size: 15px;
  }

  .ph-cart-item__stepper-val {
    padding: 5px 6px;
    font-size: 13px;
    min-width: 22px;
    text-align: center;
  }

  /* Order summary card */
  .ph-cart__summary {
    background: var(--ph-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 16px;
  }

  /* Suggestions rail */
  .ph-cart__suggestions {
    padding: 0 0 16px;
  }

  .ph-cart__suggestions-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 16px;
  }

  .ph-cart__suggestions-rail::-webkit-scrollbar {
    display: none;
  }

  /* Fixed checkout bar (replaces bottom nav) */
  .ph-cart-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(251, 249, 245, 0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(32, 38, 31, 0.08);
    padding: 12px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  }

  .ph-cart-checkout-bar__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
  }

  .ph-cart-checkout-bar__total {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 24px;
    color: var(--ph-teal);
    line-height: 1.2;
  }

  .ph-cart-checkout-bar__btn {
    width: 100%;
    background: var(--ph-orange);
    color: var(--ph-white);
    border: none;
    border-radius: 13px;
    padding: 15px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s;
    display: block;
    text-align: center;
    text-decoration: none;
  }

  .ph-cart-checkout-bar__btn:hover {
    background: var(--ph-orange-dark);
    color: var(--ph-white);
  }

  /* On cart page: hide main bottom nav, show checkout bar instead */
  body.woocommerce-cart .ph-bottom-nav {
    display: none;
  }

  body.woocommerce-cart {
    padding-bottom: 0;
  }

  /* Show checkout bar on cart page */
  body.woocommerce-cart .ph-cart-checkout-bar {
    display: block;
  }
}

/* =====================================================
   CHECKOUT PAGE — MOBILE (step progress + CTA bar)
   ===================================================== */
@media (max-width: 768px) {
  .ph-checkout__steps {
    display: flex;
    gap: 4px;
    padding: 10px 16px 0;
  }

  .ph-checkout-cta-bar {
    display: block;
    padding: 12px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  }

  /* On checkout page: add bottom padding for fixed bar */
  body.woocommerce-checkout .ph-co-left {
    padding-bottom: 90px;
  }

  body.woocommerce-checkout .ph-bottom-nav {
    display: none;
  }
}

/* =====================================================
   CHECKOUT PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Step progress bar */
  .ph-checkout__steps {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    background: var(--ph-white);
    border-bottom: 1px solid rgba(32, 38, 31, 0.06);
  }

  .ph-checkout__step-bar {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: rgba(32, 38, 31, 0.1);
    transition: background 0.3s;
  }

  .ph-checkout__step-bar--active {
    background: var(--ph-teal);
  }

  .ph-checkout__step-bar--done {
    background: var(--ph-teal);
    opacity: 0.5;
  }

  /* Single column checkout */
  .ph-checkout__layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ph-checkout__sidebar {
    display: none; /* order summary shown inline in step 3 instead */
  }

  /* Checkout fields: tighter */
  .ph-checkout__section-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 26px;
    color: var(--ph-dark);
    margin-bottom: 16px;
  }

  /* Address cards */
  .ph-checkout__address-card {
    border-radius: 13px;
    padding: 14px 16px;
    border: 1.5px solid rgba(32, 38, 31, 0.1);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }

  .ph-checkout__address-card--selected {
    border-color: var(--ph-teal);
    background: var(--ph-teal-light);
  }

  /* Fixed bottom CTA */
  .ph-checkout-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(251, 249, 245, 0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(32, 38, 31, 0.08);
    padding: 12px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  }

  .ph-checkout-cta-bar__btn {
    width: 100%;
    background: var(--ph-orange);
    color: var(--ph-white);
    border: none;
    border-radius: 13px;
    padding: 15px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
  }

  /* Success state */
  .ph-checkout__success {
    text-align: center;
    padding: 48px 24px;
    animation: phPop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ph-checkout__success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ph-teal), #7ABCC8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
  }
}

/* =====================================================
   ACCOUNT PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Account layout: single column */
  .ph-account__layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Sidebar nav: hidden, replaced by menu in dashboard */
  .ph-account__sidebar {
    display: none;
  }

  /* Profile hero: full-width teal gradient */
  .ph-account__profile-hero {
    background: linear-gradient(135deg, var(--ph-teal), #2E8FA0);
    padding: 28px 20px 24px;
  }

  .ph-account__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.6);
  }

  /* Quick stats: 3-col */
  .ph-account__stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 14px;
  }

  /* Menu items: card style */
  .ph-account__menu-card {
    background: var(--ph-white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(32, 38, 31, 0.07);
    margin: 0 14px;
  }

  .ph-account__menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(32, 38, 31, 0.05);
    cursor: pointer;
    transition: background 0.18s;
    text-decoration: none;
    color: var(--ph-dark);
  }

  .ph-account__menu-item:hover {
    background: var(--ph-bg-card);
  }

  .ph-account__menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Orders: filter tabs horizontal scroll */
  .ph-orders__tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }

  .ph-orders__tabs::-webkit-scrollbar {
    display: none;
  }

  /* Order card */
  .ph-order-card {
    border-radius: 15px;
    background: var(--ph-white);
    border: 1px solid rgba(32, 38, 31, 0.07);
    overflow: hidden;
    margin-bottom: 12px;
  }

  .ph-order-card__header {
    padding: 13px 15px;
    border-bottom: 1px solid rgba(32, 38, 31, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ph-order-card__body {
    padding: 12px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
  }

  /* ── Actual account page class overrides ──────────── */

  /* Show mobile hero (hidden globally, shown here) */
  .ph-acc-mob-hero {
    display: block;
    background: linear-gradient(135deg, var(--ph-teal), #2E8FA0);
    padding: 28px 20px 24px;
    color: #fff;
    text-align: center;
  }

  .ph-acc-mob-hero__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 10px;
    border: 2.5px solid rgba(255, 255, 255, 0.6);
    font-family: var(--font-heading);
  }

  .ph-acc-mob-hero__name {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-heading);
    line-height: 1.3;
  }

  .ph-acc-mob-hero__email {
    font-size: 12px;
    opacity: 0.75;
    margin: 4px 0 18px;
  }

  .ph-acc-mob-hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
  }

  .ph-acc-mob-hero__stat {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 6px;
    backdrop-filter: blur(4px);
  }

  .ph-acc-mob-hero__stat-val {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
  }

  .ph-acc-mob-hero__stat-lbl {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
  }

  /* Hide glass header + desktop profile card on mobile account */
  .ph-acc-header { display: none; }
  .ph-acc-profile-card { display: none; }

  /* Single column layout */
  .ph-acc-layout { display: block; }
  .ph-acc-sidebar { width: 100%; min-width: 0; padding: 0; }

  /* Nav: iOS settings card style */
  .ph-acc-nav {
    background: var(--ph-white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(32, 38, 31, 0.07);
    margin: 14px;
  }

  .ph-acc-nav__item {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(32, 38, 31, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.18s;
  }

  .ph-acc-nav__item:hover {
    background: var(--ph-bg-card);
  }

  .ph-acc-nav__item--active {
    background: var(--ph-teal-light, #EAF5F7);
  }

  .ph-acc-nav__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .ph-acc-content {
    padding: 0 14px 100px;
  }

  /* Stats: 2×2 grid on mobile */
  .ph-acc-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Bottom nav: hidden on account page */
  body.woocommerce-account .ph-bottom-nav {
    display: none;
  }
}

/* =====================================================
   SEARCH PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Search header: back + search bar */
  .ph-search-header {
    height: 52px;
    padding: 0 14px;
    gap: 10px;
    display: flex;
    align-items: center;
  }

  .ph-search-input-wrap {
    flex: 1;
    border-radius: 12px;
  }

  /* Filter pills row: horizontal scroll */
  .ph-search-filter-pills {
    padding: 0 14px 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ph-search-filter-pills::-webkit-scrollbar {
    display: none;
  }

  /* Empty state: category grid 3-col */
  .ph-search-cat-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 9px;
  }

  /* Results: 2-col grid */
  .ph-search-results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    padding: 12px 14px 0;
  }

  /* 3-col on search becomes 1-col on mobile */
  .ph-search-empty-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ph-search-recents {
    margin-bottom: 22px;
  }

  /* Trending pills: wrap */
  .ph-search-trending {
    flex-wrap: wrap;
  }
}

/* =====================================================
   COMPARE PAGE — MOBILE
   ===================================================== */
@media (max-width: 768px) {
  /* Compare header: back + title + add button */
  .ph-cmp-header {
    height: 52px;
    padding: 0 14px;
    gap: 8px;
    display: flex;
    align-items: center;
  }

  /* Comparison table: horizontal scroll */
  .ph-cmp-scroll-wrap {
    overflow-x: auto;
    scrollbar-width: none;
    padding: 16px 0 0;
  }

  .ph-cmp-scroll-wrap::-webkit-scrollbar {
    display: none;
  }

  .ph-cmp-inner {
    min-width: max-content;
    padding: 0 14px;
  }

  /* Label column: narrower */
  .ph-cmp-label-col {
    width: 110px;
  }

  /* Product column: narrower */
  .ph-cmp-product-col {
    width: 148px;
  }

  /* Product image: tighter */
  .ph-cmp-product-img {
    border-radius: 12px;
    margin-bottom: 10px;
  }

  /* Product name */
  .ph-cmp-product-name {
    font-size: 16px;
  }

  /* Add slot */
  .ph-cmp-add-slot {
    width: 148px;
  }

  /* Picker modal: bottom sheet on mobile */
  .ph-cmp-picker-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    border-radius: 22px 22px 0 0;
    max-height: 85vh;
    max-width: 100%;
    animation: phUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Picker grid: 2-col */
  .ph-cmp-picker-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =====================================================
   FOOTER — MOBILE (compact design)
   ===================================================== */
@media (max-width: 768px) {
  .ph-footer__main {
    padding: 28px 0 0;
  }

  /* Brand + 3 link columns: all in one compact layout */
  .ph-footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    padding-bottom: 16px;
  }

  /* Brand column: full width on top */
  .ph-footer__brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(244,241,232,0.1);
    flex-wrap: wrap;
  }

  .ph-footer__logo {
    flex-shrink: 0;
  }

  /* Tagline next to logo on mobile */
  .ph-footer__tagline {
    font-size: 12px;
    margin: 0;
  }

  /* Hide long description on mobile */
  .ph-footer__desc {
    display: none;
  }

  /* Socials row: compact, pushed to end */
  .ph-footer__socials {
    margin-top: 0;
    margin-inline-start: auto;
    gap: 7px;
  }

  .ph-footer__social-btn {
    width: 30px;
    height: 30px;
    font-size: 9.5px;
  }

  /* 3 link columns side-by-side */
  .ph-footer__col {
    padding: 0 6px;
  }

  .ph-footer__col-title {
    font-size: 10.5px;
    margin-bottom: 8px;
  }

  .ph-footer__col-list {
    list-style: none;
  }

  .ph-footer__link {
    font-size: 11.5px;
    padding: 4px 0;
    color: #8ABAC4;
  }

  .ph-footer__bottom-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding-block: 12px;
  }

  .ph-footer__copy {
    font-size: 11px;
    order: 2;
  }

  .ph-footer__payment {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    order: 1;
  }

  .ph-footer__payment-badge {
    font-size: 10.5px;
    padding: 3px 7px;
  }
}

/* =====================================================
   GLOBAL MOBILE UTILITIES
   ===================================================== */
@media (max-width: 768px) {
  /* Section spacing: tighter on mobile */
  .ph-section {
    padding-block-start: 32px;
  }

  .ph-container {
    padding-inline: 14px;
  }

  /* Prevent wide marquee/scroller children from extending
     the document scrollWidth in Chrome Android RTL mode */
  .ph-scroller,
  .ph-products-row,
  .ph-stories__track,
  .ph-announcement__track,
  .ph-marquee-track,
  .ph-recs-scroller,
  #ph-stories-track,
  #ph-recs-scroller {
    contain: layout style;
  }

  /* Buttons: full-width in stacked contexts */
  .ph-btn-block-mobile {
    width: 100%;
    justify-content: center;
  }

  /* Section title: smaller */
  h2.ph-section-title {
    font-size: clamp(26px, 7vw, 36px);
  }

  /* Modals/overlays: always full-screen bottom sheet on mobile */
  .ph-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    border-radius: 22px 22px 0 0;
    max-height: 90vh;
    animation: phUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* WooCommerce table: responsive */
  .woocommerce table.shop_table {
    font-size: 13px;
  }

  .woocommerce table.shop_table th,
  .woocommerce table.shop_table td {
    padding: 10px 12px;
  }
}

/* =====================================================
   ANIMATION: phUp (slide up from bottom)
   Matches phUp in search.css / compare.css
   ===================================================== */
@keyframes phUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes phPop {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

/* =====================================================
   MOBILE AUDIT PATCH — Class-name fixes + missing rules
   ===================================================== */

/* ── GLOBAL ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Section block spacing: tighter both ends */
  .ph-section {
    padding-block: 28px;
  }

  /* Marquee: compact on mobile */
  .ph-marquee-strip {
    padding: 0;
  }
  .ph-marquee-item {
    font-size: 13px;
    padding: 8px 16px;
  }
  .ph-marquee-dot {
    font-size: 13px;
    padding: 8px 0;
  }

  /* Support widget: show on mobile + clear bottom nav */
  .ph-support-widget {
    display: flex;                           /* overrides style.css display:none */
    bottom: calc(var(--ph-bottom-nav-height) + 8px);
    left: 14px;
  }
  .ph-support-toggle {
    bottom: calc(var(--ph-bottom-nav-height) + 8px);
  }

  /* Back-to-top: clear bottom nav */
  .ph-back-top {
    bottom: calc(var(--ph-bottom-nav-height) + 8px);
    right: 14px;
  }

  /* Footer links: bigger tap targets */
  .ph-footer__link {
    display: block;
    padding: 4px 0;
    min-height: 32px;
    line-height: 32px;
  }

  /* Section title size */
  h2.ph-section-title {
    font-size: clamp(22px, 6vw, 30px);
  }
}

/* ── CART DRAWER → BOTTOM SHEET ─────────────────────── */
@media (max-width: 768px) {
  .ph-cart-drawer__panel {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    border-right: none;
    overflow-y: auto;
    animation: phUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ── HOME PAGE ───────────────────────────────────────── */
@media (max-width: 768px) {
  /* Stories strip (category circles) — JS auto-scroll on mobile */
  .ph-stories { padding-block: 4px 8px; }
  .ph-stories a[aria-hidden="true"] { display: flex !important; } /* visible for seamless JS loop */
  .ph-stories__nav { display: none !important; } /* touch swipe handles navigation */
  .ph-stories .ph-container {
    overflow: hidden;
    padding-inline: 0;
    direction: ltr !important;         /* anchor at LEFT edge — overrides RTL dir attr */
    position: relative;
    contain: layout paint;
  }
  .ph-stories__track {
    display: flex;
    gap: 10px;
    overflow: visible !important;      /* JS moves via translateX, not scroll */
    animation: none !important;        /* CSS animation disabled, JS handles it */
    scrollbar-width: none;
    padding: 6px 14px 10px;
    flex-wrap: nowrap;
    direction: ltr !important;
    width: max-content !important;     /* expand to fit all circles — JS reads offsetWidth */
  }
  .ph-stories__track::-webkit-scrollbar { display: none; }
  .ph-story {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .ph-story__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
  .ph-story__label { font-size: 10px; margin-top: 5px; text-align: center; width: 68px; }

  /* Offers + Cat grid: horizontal scroll handled by FINAL POLISH section below */

  /* Popular tabs: horizontal scroll */
  .ph-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .ph-tabs::-webkit-scrollbar { display: none; }
  .ph-tab {
    flex-shrink: 0;
    font-size: 12.5px;
    padding: 7px 13px;
  }

  /* Recommendations scroller — compact: show 4 cards, smaller */
  .ph-recs-section {
    padding-block: 28px 20px;
  }
  .ph-recs-section .ph-section-header {
    margin-bottom: 14px;
  }
  .ph-recs-section .ph-eyebrow { font-size: 10px; }
  .ph-recs-section h2 { font-size: 16px; }
  .ph-recs-nav { display: none !important; } /* hide nav on mobile, use swipe */
  .ph-recs-scroller,
  #ph-recs-scroller {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
    padding: 0 14px 4px;
    flex-wrap: nowrap;
  }
  .ph-recs-scroller::-webkit-scrollbar,
  #ph-recs-scroller::-webkit-scrollbar { display: none; }
  .ph-rec-card {
    flex: 0 0 120px;
    min-width: 120px;
  }
  /* Show only first 4 cards on mobile */
  .ph-recs-scroller .ph-rec-card:nth-child(n+5),
  #ph-recs-scroller .ph-rec-card:nth-child(n+5) { display: none; }
  .ph-rec-card__name { font-size: 11.5px; line-height: 1.35; }
  .ph-rec-card__body { padding: 6px 7px; }
  .ph-rec-card__cat  { font-size: 9.5px; }
  .ph-rec-card__price { font-size: 11px; }
  .ph-rec-card__add  { font-size: 10px; padding: 3px 7px; }

  /* Membership promo — compact on mobile */
  .ph-membership {
    border-radius: 28px;
    padding: 14px 18px;
  }
  .ph-membership__visual { display: none; }

  /* Philosophy two-col */
  .ph-philosophy__inner { display: block; }
  .ph-philosophy__visual { display: none; }
  .ph-philosophy__content { padding: 0; }
  .ph-philosophy__pillars { grid-template-columns: 1fr; gap: 10px; }

  /* Testimonials: compact + horizontal scroll */
  .ph-testimonials {
    margin-top: 32px;
    padding: 28px 0;
  }
  .ph-testimonials__header {
    margin-bottom: 16px;
    padding-bottom: 0;
  }
  .ph-testimonials__header h2 {
    font-size: 22px;
    margin-bottom: 0;
  }
  .ph-testimonials__grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 12px;
    padding: 0 14px 4px;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
  }
  .ph-testimonials__grid::-webkit-scrollbar { display: none; }
  .ph-testimonial {
    flex: 0 0 260px;
    min-width: 260px;
    border-radius: 16px;
    background: #1B7A8C;
    border: none;
    color: #fff;
    padding: 18px;
    scroll-snap-align: start;
  }
  .ph-testimonial__stars {
    color: #E2734A;
    font-size: 14px;
    margin-bottom: 10px;
  }
  .ph-testimonial__quote {
    color: rgba(255,255,255,0.9);
    font-size: 13.5px;
    line-height: 1.7;
  }
  .ph-testimonial__name {
    color: #fff;
    font-weight: 600;
  }
  .ph-testimonial__meta {
    color: rgba(255,255,255,0.55);
    font-size: 11px;
  }
  .ph-testimonial__avatar {
    background: rgba(255,255,255,0.15);
    color: #fff;
  }

  /* Product request banner */
  .ph-product-request-banner {
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 18px;
    text-align: center;
  }
  .ph-product-request-banner__cta,
  .ph-banner-cta { width: 100%; justify-content: center; }
}

/* ── SHOP / CATEGORY PAGE ────────────────────────────── */
@media (max-width: 768px) {
  /* Hero section padding */
  .ph-cat-hero__inner { padding: 18px 16px; }
  .ph-cat-hero__body  { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ph-cat-hero__chip  { align-self: flex-start; padding: 8px 14px; }
  .ph-cat-hero__chip-count { font-size: 22px; }
  .ph-cat-hero__title { font-size: 26px; }

  /* Subcat pills bar padding */
  .ph-subcat-bar__inner {
    padding: 0 14px;
    padding-block: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .ph-subcat-bar__inner::-webkit-scrollbar { display: none; }

  /* Product cards: tighter text */
  .ph-card__name  { font-size: 13px; line-height: 1.4; }
  .ph-card__brand { font-size: 10px; }
  .ph-card__body  { padding: 9px 9px 7px; }
  .ph-card__price { font-size: 12.5px; }
  .ph-card__add   {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    min-width: unset;
    font-size: 18px;
  }

  /* Load more */
  .ph-load-more-wrap { padding: 16px 14px 80px; }
  .ph-load-more-btn  { width: 100%; text-align: center; padding: 13px; font-size: 14px; border-radius: 12px; }

  /* Empty state */
  .ph-empty-state { padding: 40px 16px; text-align: center; }
  .ph-empty-state__btn { width: 100%; }
}

/* ── PRODUCT PAGE ────────────────────────────────────── */
@media (max-width: 768px) {
  /* CRITICAL: actual layout class (not .ph-product__layout) */
  .ph-product-section {
    display: block !important;
  }

  /* Gallery: unstick */
  .ph-product-gallery {
    position: static !important;
    margin-bottom: 0;
  }

  /* Gallery thumbnails: horizontal strip */
  .ph-gallery-thumbs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
    padding: 10px 16px;
  }
  .ph-gallery-thumbs::-webkit-scrollbar { display: none; }
  .ph-gallery-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 9px;
    cursor: pointer;
  }

  /* Product info: padding */
  .ph-product-info { padding: 18px 16px 0; }

  /* Title */
  .ph-product-title { font-size: 24px; }

  /* Price box */
  .ph-price-box {
    background: var(--ph-bg-card);
    border-radius: 13px;
    padding: 12px 14px;
    margin: 12px 0;
  }

  /* Qty+Add to cart block: hide — replaced by .ph-mob-bar */
  .ph-qty-add      { display: none !important; }
  .ph-btn-buy-now  { display: none !important; }
  .ph-product-actions {
    justify-content: flex-start;
    gap: 10px;
    padding-block: 6px 0;
  }

  /* Sticky bar: hide on mobile (mob-bar replaces it) */
  .ph-sticky-bar { display: none !important; }

  /* Delivery badges: 3-col teal grid */
  .ph-delivery-badges {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    background: var(--ph-teal-light, #EAF5F7);
    border-radius: 10px;
    padding: 10px 0;
    margin: 12px 0;
    gap: 0;
  }
  .ph-delivery-badge {
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 10.5px;
    padding: 6px 4px;
    border-right: 1px solid rgba(27, 122, 140, 0.2);
  }
  .ph-delivery-badge:last-child { border-right: none; }
  .ph-delivery-badge svg { margin-bottom: 4px; }

  /* Volume selectors: horizontal scroll */
  .ph-volume-selectors {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 2px;
  }
  .ph-volume-selectors::-webkit-scrollbar { display: none; }
  .ph-volume-pill { flex-shrink: 0; }

  /* Tab section padding */
  .ph-tabs-section { padding: 0 0 80px; }

  /* Ingredient cards: 2-col */
  .ph-ingredient-cards {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
    margin-top: 14px;
  }
  .ph-ingredient-card { padding: 12px; }
  .ph-ingredient-card__name { font-size: 13px; }
  .ph-ingredient-card__desc { font-size: 11.5px; }

  /* Reviews: single column */
  .ph-reviews-layout { display: block !important; }
  .ph-score-card     { margin-bottom: 18px; }
  .ph-reviews-section { padding: 24px 16px 0; }

  /* Related carousel: horizontal scroll */
  .ph-related-carousel {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 12px;
    padding: 0 16px 4px;
    flex-wrap: nowrap;
  }
  .ph-related-carousel::-webkit-scrollbar { display: none; }
  .ph-rel-card { flex: 0 0 148px; min-width: 148px; }
  .ph-rel-card__name { font-size: 12.5px; }
}

/* ── CART PAGE ───────────────────────────────────────── */
@media (max-width: 768px) {
  /* CRITICAL: actual class (not .ph-cart__layout) */
  .ph-cart-layout { grid-template-columns: 1fr !important; }

  /* Page padding */
  .ph-cart-page { padding: 16px 14px 100px; }

  /* Title */
  .ph-cart-title { font-size: 24px; }

  /* Table header row: hide */
  .ph-cart-cols { display: none !important; }

  /* Cart row: stacked */
  .ph-cart-row {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(32, 38, 31, 0.07);
  }
  .ph-cart-row__unit,
  .ph-cart-row__qty-col,
  .ph-cart-row__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Order summary card */
  .ph-order-card { padding: 16px; border-radius: 16px; }
}

/* ── CHECKOUT PAGE ───────────────────────────────────── */
@media (max-width: 768px) {
  /* CRITICAL: actual class (not .ph-checkout__layout) */
  .ph-co-wrap   { display: block !important; }
  .ph-co-left   { padding: 16px 14px 100px; }
  .ph-co-right  { display: none !important; }

  /* Header */
  .ph-co-header { padding: 10px 14px; }
  .ph-co-header__logo { font-size: 18px; }

  /* Hide circle step indicator (replaced by bar progress) */
  .ph-co-steps  { display: none !important; }
  .ph-co-header__back { display: none !important; }

  /* Step titles */
  .ph-co-step-title { font-size: 20px; }

  /* Auth card inner padding */
  .ph-auth-card__top  { padding: 22px 18px 0; }
  .ph-auth-card__body { padding: 0 18px 24px; }
}

/* ── THANK-YOU (ORDER RECEIVED) PAGE ────────────────── */
@media (max-width: 768px) {
  .ph-thankyou-wrap { padding: 20px 14px; }
  .ph-thankyou-card { padding: 26px 18px; border-radius: 20px; }
  .ph-thankyou-actions {
    flex-direction: column;
    gap: 10px;
  }
  .ph-thankyou-btn {
    width: 100%;
    text-align: center;
    padding: 13px;
    display: block;
  }
}


/* Stories auto-scroll keyframe (right to left, seamless) */
@keyframes phStoriesScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Announcement bar marquee keyframe */
@keyframes phAnnouncementScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
