/* ═════════════════════════════════════════════════════════════════════
   PakMeds — storefront design layer  (public/css/pm-ui.css)

   Loaded by the store layout AFTER the compiled Vite bundle, so it refines
   the existing components without rebuilding resources/css/app.css.
   Plain CSS only: no Tailwind directives, no new utility classes.

   Contents
     1. Tokens & base typography
     2. Urdu typography
     3. Navigation progress loader
     4. Header & mega menu
     5. Home hero
     6. Section headings, tabs, carousels
     7. Product card
     8. Category placards
     9. "How it works" — home + how-it-works page
    10. Final CTA, footer
    11. Popups & toasts
    12. Scroll reveal
    13. Reduced motion
═════════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens & base typography ─────────────────────────────────────── */
:root {
    --pm-pink: #d1185a;
    --pm-pink-soft: #fdf0f5;
    --pm-green: #6DC422;
    --pm-green-ink: #3f7d10;
    --pm-navy: #2D3F59;
    --pm-ink: #1c2a3f;          /* navy, one step darker: footer + deep panels */
    --pm-muted: #5f6b7d;
    --pm-line: #e7eaf0;
    --pm-surface: #ffffff;
    --pm-canvas: #f8f6f3;       /* warm off-white page background */

    --pm-font: 'Plus Jakarta Sans', 'Jost', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pm-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

    --pm-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --pm-ease-io: cubic-bezier(0.65, 0, 0.35, 1);
    --pm-radius: 1.25rem;
    --pm-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.04);
    --pm-shadow-lg: 0 24px 48px -16px rgba(28, 42, 63, 0.22), 0 4px 12px rgba(28, 42, 63, 0.06);

    /* Flux / Tailwind `font-sans` follows the storefront font on these pages. */
    --font-sans: var(--pm-font);
}

body.store-page {
    font-family: var(--pm-font);
    background: var(--pm-canvas);
    color: var(--pm-navy);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis-weight: none;
}
.store-page button, .store-page input, .store-page select, .store-page textarea { font-family: inherit; }

.store-page h1, .store-page h2, .store-page h3 { letter-spacing: -0.02em; text-wrap: balance; }
.store-page p { text-wrap: pretty; }
/* Solid brand pink + white text: readable on light AND dark sections (footer, hero, CTAs). */
.store-page ::selection { background: #d1185a; color: #fff; -webkit-text-fill-color: #fff; text-shadow: none; }
.store-page img::selection { background: transparent; }

/* Prices and counters line up digit-for-digit. */
.prod-card-now, .prod-card-was, .pm-hero-stats b, .pmcs-stat-val, .price-current, .price-original { font-variant-numeric: tabular-nums; }

/* Eyebrow label + display heading (used by the redesigned sections). */
.pm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pm-pink);
}
.pm-eyebrow::before { content: ''; width: 1.25rem; height: 1.5px; background: currentColor; border-radius: 2px; }
.pm-display {
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.85rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--pm-ink);
}

/* ── 2. Urdu typography ──────────────────────────────────────────────────
   Latin glyphs (prices, brand names, numbers) stay in Plus Jakarta Sans; Urdu
   letters fall through to Noto Naskh Arabic for UI text and Noto Nastaliq Urdu
   — the traditional Urdu script — for headings, which need extra line height. */
html[lang="ur"] {
    --pm-font: 'Plus Jakarta Sans', 'Noto Naskh Arabic', 'Noto Sans Arabic', ui-sans-serif, system-ui, sans-serif;
    --pm-nastaliq: 'Plus Jakarta Sans', 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif;
}
/* Letter-spacing breaks the joins between Urdu letters. */
html[lang="ur"] body.store-page, html[lang="ur"] body.store-page * { letter-spacing: 0 !important; }
html[lang="ur"] body.store-page { line-height: 1.7; text-align: left; }
/* The site layout stays left-to-right, but each Urdu sentence must read right-to-left:
   "plaintext" lets every paragraph take its direction from its own first letter, so a
   line such as "2,600+ اصل ادویات …" starts on the right as it should. The body's absolute
   `text-align: left` (instead of the default `start`) keeps those lines aligned with the
   layout; text-center / text-right set on an element still win. */
html[lang="ur"] .store-page :is(h1, h2, h3, h4, p, li, blockquote, figcaption, label) { unicode-bidi: plaintext; }
html[lang="ur"] .store-page h1,
html[lang="ur"] .store-page main h2,
html[lang="ur"] .pm-display,
html[lang="ur"] .pm-hero-title,
html[lang="ur"] .pm-page-hero-title,
html[lang="ur"] .pm-steps-heading,
html[lang="ur"] .pm-howto-title {
    font-family: var(--pm-nastaliq);
    font-weight: 700;
    line-height: 1.85;
}
html[lang="ur"] .pm-hero-title { line-height: 1.75; font-size: clamp(1.6rem, 1rem + 3.2vw, 3rem); }
/* The serif accent has no Urdu letters: keep the Nastaliq upright and unslanted. */
html[lang="ur"] .pm-hero-pink { font-family: var(--pm-nastaliq); font-style: normal; font-size: 1em; }
html[lang="ur"] .prod-card-name { line-height: 1.75; min-height: 3.5em; }
html[lang="ur"] .pm-eyebrow::before { display: none; }

/* ── 3. Navigation progress loader ───────────────────────────────────────
   A slim bar at the very top while the next page loads. It never covers the
   page, so content and Core Web Vitals are untouched. Driven by pm-ui.js. */
#pm-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10001;
    pointer-events: none;
    transform-origin: 0 50%;
    transform: scaleX(0);
    opacity: 0;
    background: linear-gradient(90deg, var(--pm-pink) 0%, #ff5c93 60%, #ffd1e1 100%);
    box-shadow: 0 0 12px rgba(209, 24, 90, 0.55);
}
#pm-progress.is-loading { opacity: 1; animation: pm-progress-crawl 9s cubic-bezier(0.08, 0.7, 0.2, 1) forwards; }
#pm-progress.is-done { opacity: 0; transform: scaleX(1); transition: transform 0.25s var(--pm-ease), opacity 0.35s ease 0.2s; }
@keyframes pm-progress-crawl {
    0%   { transform: scaleX(0); }
    12%  { transform: scaleX(0.35); }
    40%  { transform: scaleX(0.66); }
    100% { transform: scaleX(0.92); }
}

/* Skeleton cards: a soft sweep instead of a blink. */
.pm-skel { animation: none !important; }
.pm-skel .bg-gray-100 {
    background: linear-gradient(100deg, #eef1f5 30%, #f8f9fb 50%, #eef1f5 70%) !important;
    background-size: 220% 100% !important;
    animation: pm-shimmer 1.4s linear infinite;
}
@keyframes pm-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ── 4. Header & mega menu ───────────────────────────────────────────── */
.pm-header {
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06);
    transition: box-shadow 0.35s var(--pm-ease), background-color 0.35s var(--pm-ease);
}
.pm-header.is-scrolled { box-shadow: 0 1px 0 rgba(16, 24, 40, 0.05), 0 12px 32px -18px rgba(28, 42, 63, 0.35); }
/* Frosted glass only where there is GPU headroom (phones keep the solid fill). */
@media (min-width: 1024px) {
    .pm-header.is-scrolled {
        background-color: rgba(255, 255, 255, 0.82);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        backdrop-filter: saturate(180%) blur(16px);
    }
}
/* Desktop nav: a quiet underline that grows from the centre. */
.pm-header nav > a,
.pm-header nav > div > a,
.pm-header nav > div > button { position: relative; font-weight: 600; letter-spacing: -0.005em; }
.pm-header nav > a::after,
.pm-header nav > div > a::after,
.pm-header nav > div > button::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 2px;
    background: var(--pm-pink);
    transform: scaleX(0);
    transition: transform 0.35s var(--pm-ease);
}
.pm-header nav > a:hover::after,
.pm-header nav > div:hover > a::after,
.pm-header nav > div:hover > button::after { transform: scaleX(1); }

.mega-menu {
    border-radius: 1.5rem;
    border-color: rgba(16, 24, 40, 0.06);
    box-shadow: 0 32px 64px -24px rgba(28, 42, 63, 0.35), 0 8px 20px rgba(28, 42, 63, 0.06);
    margin-top: 0.35rem;
}
.search-dropdown { border-radius: 1.25rem; box-shadow: var(--pm-shadow-lg); }

/* Top announcement strip */
.animate-marquee { font-weight: 500; letter-spacing: 0.01em; }

/* ── 5. Home hero ────────────────────────────────────────────────────── */
.pm-hero { border-radius: 0 0 1.75rem 1.75rem; }
@media (min-width: 768px) {
    .pm-hero { margin: 0.75rem 0.75rem 0; border-radius: 2rem; }
}
/* Slow-drifting brand light. Radial gradients (no blur filter) keep it cheap to paint. */
.pm-hero-aura { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.pm-hero-aura span {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform;
}
.pm-hero-aura span:nth-child(1) {
    top: -38vmax;
    right: -22vmax;
    background: radial-gradient(closest-side, rgba(209, 24, 90, 0.32), rgba(209, 24, 90, 0) 72%);
    animation: pm-drift-a 24s var(--pm-ease-io) infinite alternate;
}
.pm-hero-aura span:nth-child(2) {
    bottom: -44vmax;
    left: -26vmax;
    /* Kept soft: at full strength the lime reads harsh against navy (screen blend). */
    background: radial-gradient(closest-side, rgba(109, 196, 34, 0.15), rgba(109, 196, 34, 0) 75%);
    animation: pm-drift-b 30s var(--pm-ease-io) infinite alternate;
}
@keyframes pm-drift-a { to { transform: translate3d(-9vmax, 7vmax, 0) scale(1.08); } }
@keyframes pm-drift-b { to { transform: translate3d(10vmax, -6vmax, 0) scale(1.12); } }
/* Film grain: takes the flat, rendered edge off the gradients. */
.pm-hero-grain {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.09;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.pm-hero-inner { position: relative; z-index: 1; }

.pm-hero-badge {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.85rem 0.4rem 0.7rem;
}
.pm-hero-title {
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.04em;
}
/* Editorial accent: one word set in a serif italic. */
.pm-hero-pink {
    font-family: var(--pm-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.12em;
    letter-spacing: -0.015em;
    line-height: 0.9;
    padding-right: 0.04em;
    font-synthesis: none;
}
.pm-hero-sub { color: rgba(255, 255, 255, 0.78); font-size: clamp(0.92rem, 0.85rem + 0.3vw, 1.08rem); line-height: 1.65; }

.pm-hero-search {
    margin-top: 1.5rem;
    padding: 0.35rem 0.35rem 0.35rem 2.85rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 40px -12px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.3s var(--pm-ease), transform 0.3s var(--pm-ease);
}
.pm-hero-search:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.35), 0 22px 48px -12px rgba(0, 0, 0, 0.5);
}
.pm-hero-search-ico { left: 1.15rem; }
.pm-hero-search input { padding: 0.7rem 0.25rem; }
.pm-hero-search button { padding: 0.75rem 1.5rem; letter-spacing: 0.01em; transition: background 0.25s var(--pm-ease), transform 0.25s var(--pm-ease); }
.pm-hero-search button:active { transform: scale(0.97); }

.pm-hero-actions { margin-top: 1.1rem; }
.pm-hero-btn { padding: 0.75rem 1.6rem; }
.pm-hero-ghost { border-width: 1.5px; border-color: rgba(255, 255, 255, 0.3); padding: 0.68rem 1.4rem; }
.pm-hero-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.7); }
.pm-hero-chip { background: transparent; border-color: rgba(255, 255, 255, 0.12); font-weight: 500; color: rgba(255, 255, 255, 0.85); }

@media (min-width: 1024px) {
    .pm-hero-inner { padding-top: 4.25rem; padding-bottom: 4.5rem; }
    .pm-hero-panel {
        border-radius: 1.75rem;
        padding: 1.35rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 40px 80px -30px rgba(0, 0, 0, 0.6);
    }
}
.pm-hero-panel-title { font-size: 0.7rem; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.7); }
.pm-hero-action {
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.97);
    transition: transform 0.35s var(--pm-ease), box-shadow 0.35s var(--pm-ease), background 0.35s var(--pm-ease);
}
.pm-hero-action:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.45); }
.pm-hero-action-text b { font-weight: 700; letter-spacing: -0.01em; }
.pm-hero-stats div { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); border-radius: 1.1rem; padding: 0.8rem 0.4rem; }
.pm-hero-stats b { font-size: 1.5rem; letter-spacing: -0.03em; }

/* Entrance: copy rises in sequence. The headline only moves (never fades) so it is
   painted immediately and Largest Contentful Paint is not delayed. */
@keyframes pm-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes pm-lift { from { transform: translate3d(0, 14px, 0); } to { transform: none; } }
/* On the first page of a visit the intro loader covers the page for ~0.7s: start after it.
   (A fixed delay, not a JS-controlled pause, so the hero can never be left hidden.) */
:root { --pm-intro: 0s; }
html.pm-boot { --pm-intro: 0.7s; }
.pm-hero-badge   { animation: pm-rise 0.9s var(--pm-ease) calc(var(--pm-intro) + 0.05s) both; }
.pm-hero-title   { animation: pm-lift 1s var(--pm-ease) var(--pm-intro) both; }
.pm-hero-sub     { animation: pm-rise 0.9s var(--pm-ease) calc(var(--pm-intro) + 0.16s) both; }
.pm-hero-search  { animation: pm-rise 0.9s var(--pm-ease) calc(var(--pm-intro) + 0.24s) both; }
.pm-hero-actions { animation: pm-rise 0.9s var(--pm-ease) calc(var(--pm-intro) + 0.32s) both; }
.pm-hero-chips   { animation: pm-rise 0.9s var(--pm-ease) calc(var(--pm-intro) + 0.4s) both; }
.pm-hero-panel   { animation: pm-rise 1.1s var(--pm-ease) calc(var(--pm-intro) + 0.28s) both; }

/* Inner-page hero (How it works) shares the same light. */
.pm-page-hero { isolation: isolate; }
.pm-page-hero-inner { position: relative; z-index: 1; }
.pm-page-hero-title { letter-spacing: -0.04em; line-height: 1.04; }
@media (min-width: 768px) { .pm-page-hero { margin: 0.75rem 0.75rem 0; border-radius: 2rem; } }

/* ── 6. Section headings, tabs, carousels ────────────────────────────── */
.pm-section { padding: 2rem 0; }
@media (min-width: 768px) { .pm-section { padding: 2.75rem 0; } }
.pm-sec-head { margin-bottom: 1.25rem; align-items: flex-end; }
.pm-sec-head .sec-title {
    font-size: clamp(1.35rem, 1.05rem + 1.15vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    color: var(--pm-ink);
}
/* The gradient bar beside every title reads as template; the type carries it now. */
.sec-title::before { display: none; }
.pm-sec-sub { padding-left: 0; margin-top: 0.35rem; font-size: 0.86rem; color: var(--pm-muted); }
.pm-sec-link {
    gap: 0.45rem;
    color: var(--pm-ink);
    background: var(--pm-surface);
    border: 1px solid var(--pm-line);
    padding: 0.5rem 0.6rem 0.5rem 1rem;
    font-weight: 600;
    transition: color 0.25s var(--pm-ease), border-color 0.25s var(--pm-ease), background 0.25s var(--pm-ease);
}
.pm-sec-link svg {
    width: 1.35rem;
    height: 1.35rem;
    padding: 0.32rem;
    border-radius: 9999px;
    background: var(--pm-pink-soft);
    color: var(--pm-pink);
    transition: transform 0.3s var(--pm-ease), background 0.25s, color 0.25s;
}
.pm-sec-link:hover { background: var(--pm-surface); color: var(--pm-pink); border-color: rgba(209, 24, 90, 0.35); }
.pm-sec-link:hover svg { background: var(--pm-pink); color: #fff; transform: translateX(2px); }

.pm-tab {
    font-weight: 600;
    border-width: 1px;
    border-color: var(--pm-line);
    padding: 0.5rem 1.05rem;
    color: #4b5565;
    transition: color 0.25s var(--pm-ease), border-color 0.25s var(--pm-ease), background 0.25s var(--pm-ease), box-shadow 0.25s var(--pm-ease);
}
.pm-tab.is-active { box-shadow: 0 8px 18px -8px rgba(209, 24, 90, 0.55); }

.product-carousel { gap: 1rem; padding: 0.25rem 0.1rem 0.75rem; scroll-padding-left: 0.1rem; }
.product-carousel > * { width: calc(50% - 0.5rem); }
@media (min-width: 480px)  { .product-carousel > * { width: calc(33.333% - 0.67rem); } }
@media (min-width: 768px)  { .product-carousel > * { width: calc(25% - 0.75rem); } }
@media (min-width: 1024px) { .product-carousel > * { width: calc(20% - 0.8rem); } }

.carousel-arrow {
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--pm-line);
    box-shadow: 0 10px 24px -10px rgba(28, 42, 63, 0.35);
    transition: background 0.25s var(--pm-ease), color 0.25s var(--pm-ease), border-color 0.25s var(--pm-ease), box-shadow 0.25s var(--pm-ease);
}

.cat-cta { border: 1px solid var(--pm-line); background: var(--pm-surface); border-radius: 1.5rem; box-shadow: var(--pm-shadow-sm); }
.cat-cta::before { display: none; }

.btn-pk, .btn-pk-outline { font-weight: 700; letter-spacing: 0.005em; transition: background 0.3s var(--pm-ease), border-color 0.3s var(--pm-ease), color 0.3s var(--pm-ease), box-shadow 0.3s var(--pm-ease), transform 0.3s var(--pm-ease); }
.btn-pk:active, .btn-pk-outline:active { transform: scale(0.97); }

/* ── 7. Product card ─────────────────────────────────────────────────────
   Card-in-card: the pack sits on its own rounded plinth with breathing room,
   the details below in a tight typographic stack. */
.prod-card {
    border: 1px solid #eceff4;
    border-radius: 1.35rem;
    box-shadow: var(--pm-shadow-sm);
    transition: transform 0.45s var(--pm-ease), box-shadow 0.45s var(--pm-ease), border-color 0.45s var(--pm-ease);
}
.prod-card:hover {
    transform: translateY(-4px);
    border-color: #e3e7ee;
    box-shadow: 0 28px 48px -22px rgba(28, 42, 63, 0.3), 0 4px 12px rgba(28, 42, 63, 0.05);
}
.prod-card-media {
    margin: 0.45rem 0.45rem 0;
    border-radius: 1rem;
    overflow: hidden;
    background: radial-gradient(120% 90% at 50% 15%, #ffffff 0%, #f3f5f8 70%, #eceff4 100%);
}
/* Photos fill the plinth edge to edge: many packs are shot on grey, so padding would frame them. */
.prod-card-img { transition: transform 0.7s var(--pm-ease); }
.prod-card:hover .prod-card-img { transform: scale(1.06); }
.prod-card-flags { top: 0.6rem; left: 0.6rem; }
.prod-flag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.26rem 0.55rem;
    box-shadow: none;
}
.prod-card-fab {
    width: 2.1rem;
    height: 2.1rem;
    box-shadow: 0 6px 16px -6px rgba(28, 42, 63, 0.35);
    transition: background-color 0.25s var(--pm-ease), color 0.25s var(--pm-ease), opacity 0.3s var(--pm-ease), transform 0.3s var(--pm-ease);
}
.prod-card-fab-top { top: 0.6rem; right: 0.6rem; }
.prod-card-fab-view { right: 0.6rem; bottom: 0.6rem; }
.prod-card-fab:active { transform: scale(0.9); }
.prod-card-body { padding: 0.8rem 0.95rem 0.95rem; }
.prod-card-cat { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.09em; color: var(--pm-green-ink); margin-bottom: 0.3rem; }
.prod-card-name { font-size: 0.875rem; font-weight: 600; line-height: 1.4; min-height: 2.8em; color: var(--pm-ink); letter-spacing: -0.01em; }
.prod-card-price { margin: 0.5rem 0 0.8rem; gap: 0.1rem 0.5rem; }
.prod-card-now { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.025em; }
.prod-card-was { font-size: 0.75rem; font-weight: 500; }
.btn-cart {
    padding: 0.6rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: background 0.3s var(--pm-ease), box-shadow 0.3s var(--pm-ease), transform 0.2s var(--pm-ease);
}
.btn-cart:active:not(:disabled) { transform: scale(0.97); }
.btn-cart > span svg { transition: transform 0.35s var(--pm-ease); }
.btn-cart:hover > span svg { transform: translateX(2px) rotate(-6deg); }
/* Tiny spinner shown while an item is being added. */
.pm-spin {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: pm-spin 0.7s linear infinite;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }

/* ── 8. Category placards ────────────────────────────────────────────── */
.pm-placard {
    border-color: #eceff4;
    border-radius: 1.35rem;
    box-shadow: var(--pm-shadow-sm);
    transition: transform 0.45s var(--pm-ease), box-shadow 0.45s var(--pm-ease), border-color 0.45s var(--pm-ease);
}
.pm-placard:hover { transform: translateY(-4px); border-color: #e3e7ee; box-shadow: 0 28px 48px -22px rgba(28, 42, 63, 0.3); }
.pm-placard-media { margin: 0.45rem 0.45rem 0; border-radius: 1rem; }
.pm-placard-name { font-weight: 700; letter-spacing: -0.01em; color: var(--pm-ink); }

/* ── 9. "How it works" ───────────────────────────────────────────────── */
/* Home: a warm panel with five steps on one rail (desktop) / a vertical timeline (phones).
   When the list scrolls into view the rail draws itself step by step, and each number lights
   up as the line reaches it. The rail is made of one segment per step, drawn BENEATH the
   numbers, and the numbers are never transparent — so the line can never cross them.
   Timing: step i starts at i × --hw-beat. Without pm-ui.js everything is simply shown. */
.pm-hw-section {
    --hw-beat: 0.36s;
    --hw-panel: #fff7f3;
    position: relative;
    padding: 3.5rem 0 3rem;
    margin: 1.5rem 0 0;
    background:
        radial-gradient(70% 55% at 50% 0%, rgba(209, 24, 90, 0.07) 0%, rgba(209, 24, 90, 0) 70%),
        radial-gradient(50% 45% at 100% 100%, rgba(109, 196, 34, 0.06) 0%, rgba(109, 196, 34, 0) 70%),
        linear-gradient(180deg, #fff9f6 0%, var(--hw-panel) 100%);
}
@media (min-width: 768px) {
    .pm-hw-section { padding: 4.5rem 0 4rem; margin: 2rem 0.75rem 0; border-radius: 2rem; border: 1px solid #f6e7e2; }
}
.pm-hw-head { text-align: center; max-width: 40rem; margin: 0 auto 2.75rem; }
.pm-hw-head .pm-display { margin: 0.75rem 0 0.75rem; }
.pm-hw-lead { font-size: 0.95rem; line-height: 1.65; color: var(--pm-muted); }

.pm-hw { position: relative; isolation: isolate; display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.pm-hw-step {
    position: relative;
    display: grid;
    grid-template-columns: 3rem 1fr;
    column-gap: 1rem;
    align-items: start;
    padding: 0.25rem 0;
}
/* Rail segment from this number to the next: ::before = track, ::after = coloured fill.
   Phones: vertical, from this circle's centre down to the next circle's centre. */
.pm-hw-step:not(:last-child)::before,
.pm-hw-step:not(:last-child)::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: calc(1.5rem - 1px);
    top: 1.75rem;
    bottom: calc(-0.75rem - 1.75rem);
    width: 2px;
    border-radius: 2px;
}
.pm-hw-step:not(:last-child)::before { background: #efe2dc; }
.pm-hw-step:not(:last-child)::after {
    background: linear-gradient(180deg, var(--c, var(--pm-pink)), var(--c2, var(--pm-green)));
    transform-origin: 50% 0;
}
.pm-hw-num {
    position: relative;
    z-index: 2;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Upright, tabular numerals sit optically centred in the badge (italic serif leaned off-centre). */
    font-family: var(--pm-font);
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #fff;
    background: var(--c, var(--pm-pink));
    border: 1px solid transparent;
    /* panel-coloured gap + hairline ring + soft coloured glow: a crisp "seal" */
    box-shadow: 0 0 0 5px var(--hw-panel), 0 0 0 6px rgba(45, 63, 89, 0.08), 0 12px 24px -10px var(--c, rgba(209, 24, 90, 0.55));
    transition: transform 0.4s var(--pm-ease), box-shadow 0.4s var(--pm-ease);
}
.pm-hw-card {
    position: relative;
    z-index: 1;
    background: var(--pm-surface);
    border: 1px solid rgba(45, 63, 89, 0.08);
    border-radius: 1.35rem;
    padding: 1rem 1.1rem 1.05rem;
    box-shadow: 0 1px 2px rgba(28, 42, 63, 0.03), 0 10px 24px -14px rgba(28, 42, 63, 0.12);
    transition: transform 0.45s var(--pm-ease), box-shadow 0.45s var(--pm-ease), border-color 0.45s var(--pm-ease);
}
.pm-hw-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    color: var(--c, var(--pm-pink));
    background: #f5f6f8;
    background: color-mix(in srgb, var(--c, #d1185a) 10%, white);
    transition: transform 0.35s var(--pm-ease);
}
.pm-hw-icon svg { width: 1.25rem; height: 1.25rem; }
.pm-hw-title { font-size: 1rem; font-weight: 700; color: var(--pm-ink); letter-spacing: -0.015em; }
.pm-hw-desc { margin-top: 0.25rem; font-size: 0.84rem; line-height: 1.55; color: var(--pm-muted); }
.pm-hw-step:hover .pm-hw-card {
    transform: translateY(-4px);
    border-color: rgba(45, 63, 89, 0.12);
    border-color: color-mix(in srgb, var(--c, #d1185a) 28%, rgba(45, 63, 89, 0.08));
    box-shadow: 0 2px 4px rgba(28, 42, 63, 0.03), 0 22px 34px -18px rgba(28, 42, 63, 0.18);
}
.pm-hw-step:hover .pm-hw-num { transform: scale(1.07); box-shadow: 0 0 0 5px var(--hw-panel), 0 0 0 7px var(--c, #d1185a), 0 16px 28px -10px var(--c, rgba(209, 24, 90, 0.6)); }
.pm-hw-step:hover .pm-hw-icon { transform: scale(1.06); }

@media (min-width: 900px) {
    .pm-hw { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
    .pm-hw-step { grid-template-columns: 1fr; grid-template-rows: auto 1fr; row-gap: 1.25rem; justify-items: center; padding: 0; }
    .pm-hw-card { width: 100%; height: 100%; text-align: center; padding: 1.35rem 1.1rem 1.4rem; }
    /* Desktop rail: horizontal, centre of this circle to the centre of the next (one column + gap). */
    .pm-hw-step:not(:last-child)::before,
    .pm-hw-step:not(:last-child)::after { left: 50%; top: calc(1.5rem - 1px); bottom: auto; width: calc(100% + 1rem); height: 2px; }
    .pm-hw-step:not(:last-child)::after { background: linear-gradient(90deg, var(--c, var(--pm-pink)), var(--c2, var(--pm-green))); transform-origin: 0 50%; }
}

/* Entrance (only while pm-ui.js runs; it adds .is-in when the list scrolls into view).
   Animations use "backwards" fill, so once finished every element is back on its normal
   styles and hover effects keep working. */
.pm-reveal-on .pm-hw:not(.is-in) .pm-hw-card { opacity: 0; }
.pm-reveal-on .pm-hw:not(.is-in) .pm-hw-num { transform: scale(0.55); background: #fff; color: var(--c, var(--pm-pink)); }
.pm-reveal-on .pm-hw:not(.is-in) .pm-hw-step::after { transform: scale(0); }
.pm-reveal-on .pm-hw.is-in .pm-hw-num {
    animation: pm-hw-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i, 0) * var(--hw-beat)) backwards,
               pm-hw-light 0.45s ease calc(var(--i, 0) * var(--hw-beat) + 0.12s) backwards;
}
.pm-reveal-on .pm-hw.is-in .pm-hw-card { animation: pm-rise 0.8s var(--pm-ease) calc(var(--i, 0) * var(--hw-beat) + 0.08s) backwards; }
/* Each segment glides in and eases into the next number, like a pen stroke. The numbers only
   scale (never fade), so the line beneath can never show through them. */
.pm-reveal-on .pm-hw.is-in .pm-hw-step::after { animation: pm-hw-draw-y var(--hw-beat) cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * var(--hw-beat) + 0.15s) backwards; }
@media (min-width: 900px) {
    .pm-reveal-on .pm-hw.is-in .pm-hw-step::after { animation-name: pm-hw-draw-x; }
}
@keyframes pm-hw-pop   { from { transform: scale(0.55); } to { transform: scale(1); } }
@keyframes pm-hw-light { from { background: #fff; color: var(--c, #d1185a); } to { background: var(--c, #d1185a); color: #fff; } }
@keyframes pm-hw-draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pm-hw-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pm-hw-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2.75rem; }

/* How-it-works page: the timeline fills as you scroll (--pm-p set by pm-ui.js). */
.pm-steps::after {
    content: '';
    position: absolute;
    left: 1.35rem;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, #d1185a, #118c7e);
    transform-origin: 50% 0;
    transform: scaleY(var(--pm-p, 1));
}
.pm-steps-heading { letter-spacing: -0.035em; color: var(--pm-ink); }
.pm-step-marker { transition: transform 0.5s var(--pm-ease), box-shadow 0.5s var(--pm-ease); }
.pm-step.is-in .pm-step-marker { transform: scale(1.06); box-shadow: 0 0 0 5px #fff, 0 0 0 9px color-mix(in srgb, var(--step, #d1185a) 18%, transparent), 0 6px 16px rgba(16, 24, 40, 0.18); }
.pm-step-card { border-color: #eceff4; transition: transform 0.45s var(--pm-ease), box-shadow 0.45s var(--pm-ease); }
.pm-step-title { letter-spacing: -0.02em; color: var(--pm-ink); }
.pm-video { border-radius: 1.5rem; }
.pm-trust-tile { background: var(--pm-surface); border-color: #eceff4; transition: transform 0.45s var(--pm-ease), box-shadow 0.45s var(--pm-ease); }
.pm-trust-tile:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -22px rgba(28, 42, 63, 0.3); }

/* ── 10. Final CTA & footer ──────────────────────────────────────────── */
.pm-final-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1.75rem;
    color: #fff;
    background:
        radial-gradient(60% 120% at 0% 0%, rgba(209, 24, 90, 0.55) 0%, rgba(209, 24, 90, 0) 60%),
        radial-gradient(50% 110% at 100% 100%, rgba(109, 196, 34, 0.32) 0%, rgba(109, 196, 34, 0) 60%),
        var(--pm-ink);
}
.pm-final-cta .pm-hero-grain { z-index: -1; }
.pm-final-cta h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }

.pm-footer {
    margin-top: 4rem;
    background:
        radial-gradient(50% 60% at 100% 0%, rgba(209, 24, 90, 0.16) 0%, rgba(209, 24, 90, 0) 70%),
        var(--pm-ink);
}
@media (min-width: 768px) { .pm-footer { border-radius: 2rem 2rem 0 0; } }
.pm-footer-stat { color: #fff; font-weight: 800; letter-spacing: -0.03em; }
.pm-footer h2 { letter-spacing: 0.14em; font-size: 0.72rem; }
.pm-footer ul a { transition: color 0.25s var(--pm-ease); }

/* ── 11. Popups & toasts ─────────────────────────────────────────────── */
.cart-toast { border-radius: 1.25rem; border-color: rgba(16, 24, 40, 0.06); box-shadow: var(--pm-shadow-lg); }
.pm-howto-card { border-radius: 1.6rem; border-color: rgba(16, 24, 40, 0.06); animation-timing-function: var(--pm-ease); }
.pm-howto-title { letter-spacing: -0.025em; color: var(--pm-ink); }
@media (min-width: 768px) {
    .pm-howto-backdrop { background: rgba(28, 42, 63, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
    .pm-howto-card { padding: 2.25rem 2rem 1.75rem; }
}

/* ── 12. Scroll reveal ───────────────────────────────────────────────────
   Only active once pm-ui.js has run (it adds .pm-reveal-on to <html> and
   marks on-screen blocks first), so without JS everything is simply visible. */
.pm-reveal-on [data-pm-reveal]:not(.is-in) { opacity: 0; transform: translate3d(0, 22px, 0); }
.pm-reveal-on [data-pm-reveal] {
    transition: opacity 0.9s var(--pm-ease), transform 0.9s var(--pm-ease);
    transition-delay: var(--pm-d, 0s);
}

/* ── 14. Top announcement bar ────────────────────────────────────────── */
/* Normal capitalisation reads more easily in motion than all-caps; diamond separators. */
.pm-topbar {
    position: relative;
    background: linear-gradient(90deg, #b8144b 0%, #d1185a 45%, #b8144b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.pm-topbar .animate-marquee { gap: 0; padding: 0.55rem 0; }
.pm-topbar-group { margin: 0 !important; gap: 2rem !important; padding-right: 2rem; }
.pm-topbar-item {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1.2;
    color: #fff;
    gap: 0.55rem !important;
}
.pm-topbar-item svg { width: 0.88rem; height: 0.88rem; opacity: 0.9; }
.pm-topbar-dot { width: 4px; height: 4px; border-radius: 1px; transform: rotate(45deg); background: rgba(255, 255, 255, 0.55); flex-shrink: 0; }
@media (hover: hover) { .pm-topbar:hover .animate-marquee { animation-play-state: paused; } }
html[lang="ur"] .pm-topbar-item { font-size: 0.86rem; line-height: 1.4; }

/* ── 15. Intro loader (first page of a visit only) ────────────────────────
   Shown only when the inline head script adds .pm-boot (once per browser session).
   The markup carries style="display:none", so without this stylesheet or without
   JS it never appears. pm-ui.js lifts it as soon as the page is ready; the CSS
   animation below lifts it anyway after 2.4s, so it can never get stuck.
   One calm motion only: the logo settles in once and a single brand-pink arc turns. */
html.pm-boot .pm-boot-screen {
    display: flex !important;
    animation: pm-boot-out 0.45s var(--pm-ease) 2.4s forwards;
}
.pm-boot-screen {
    position: fixed;
    inset: 0;
    z-index: 10002;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background:
        radial-gradient(circle at 50% 46%, rgba(209, 24, 90, 0.08) 0, rgba(209, 24, 90, 0) 30vmax),
        #fffaf7;
    will-change: opacity;
}
html.pm-booted .pm-boot-screen { animation: pm-boot-out 0.5s var(--pm-ease) forwards; }
.pm-boot-mark { position: relative; width: 6.25rem; height: 6.25rem; display: grid; place-items: center; }
.pm-boot-mark img {
    position: relative;
    z-index: 2;
    width: 3.7rem;
    height: auto;
    animation: pm-boot-settle 0.7s var(--pm-ease) both;
}
/* A thin arc chasing round the logo: reads instantly as "loading", without the rainbow. */
.pm-boot-ring {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: conic-gradient(from 0deg, rgba(209, 24, 90, 0) 0deg, rgba(209, 24, 90, 0.15) 120deg, #d1185a 330deg, rgba(209, 24, 90, 0) 331deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    animation: pm-spin 1.3s linear infinite;
}
.pm-boot-halo {
    position: absolute;
    inset: 0.55rem;
    z-index: 1;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(45, 63, 89, 0.05), 0 16px 36px -14px rgba(209, 24, 90, 0.3);
}
.pm-boot-text {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pm-navy);
    animation: pm-rise 0.7s var(--pm-ease) 0.12s both;
}
.pm-boot-text::before, .pm-boot-text::after { content: ''; width: 1rem; height: 1px; background: rgba(45, 63, 89, 0.22); }
html[lang="ur"] .pm-boot-text { font-size: 0.92rem; font-weight: 600; }
html[lang="ur"] .pm-boot-text::before, html[lang="ur"] .pm-boot-text::after { display: none; }
@keyframes pm-boot-settle { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
/* Opacity only on exit: scaling the full-screen layer can stutter on mid-range phones. */
@keyframes pm-boot-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* ── 16. Smooth page-to-page transitions ─────────────────────────────────
   Native cross-document View Transitions (Chrome / Edge 126+, Safari 18.2+): when you
   follow a link the old page dissolves and the new one fades up a few pixels, while the
   top bar, header, bottom bar and WhatsApp button stay put as one frame. Browsers
   without support just navigate normally — nothing breaks. */
@view-transition { navigation: auto; }
.pm-topbar   { view-transition-name: pm-topbar; }
.pm-header   { view-transition-name: pm-header; }
.mob-nav-bar { view-transition-name: pm-mobnav; }
.wa-widget   { view-transition-name: pm-wa; }
::view-transition-old(root),
::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-old(root) { animation: pm-vt-out 0.18s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: pm-vt-in 0.32s var(--pm-ease) 0.04s both; }
@keyframes pm-vt-out { to { opacity: 0; } }
@keyframes pm-vt-in  { from { opacity: 0; transform: translate3d(0, 4px, 0); } }

/* ── 17. Home "Why PakMeds" (affordability + safety) ─────────────────── */
.pm-why { padding: 3.5rem 1rem; }
@media (min-width: 768px) { .pm-why { padding: 5rem 1.5rem; } }
.pm-why-inner { max-width: 72rem; margin: 0 auto; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .pm-why-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4.5rem; } }
.pm-why-title { margin: 0.85rem 0 1rem; }
.pm-why-brand { color: var(--pm-pink); }
.pm-why-body { max-width: 34rem; font-size: 1rem; line-height: 1.75; color: var(--pm-muted); }
.pm-why-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.pm-why-btn { padding: 0.8rem 1.6rem; font-size: 0.9rem; }
@media (max-width: 479px) { .pm-why-btn { flex: 1 1 100%; justify-content: center; } }

.pm-why-panel {
    background: var(--pm-surface);
    border: 1px solid rgba(45, 63, 89, 0.08);
    border-radius: 1.75rem;
    padding: 1.5rem 1.35rem 0.5rem;
    box-shadow: 0 1px 2px rgba(28, 42, 63, 0.03), 0 30px 60px -36px rgba(28, 42, 63, 0.28);
}
@media (min-width: 768px) { .pm-why-panel { padding: 2rem 2rem 0.75rem; } }
.pm-why-panel-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pm-muted);
    margin-bottom: 0.5rem;
}
.pm-why-list { margin: 0; padding: 0; list-style: none; }
.pm-why-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1.15rem 0; }
.pm-why-item + .pm-why-item { border-top: 1px solid rgba(45, 63, 89, 0.08); }
.pm-why-ico {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pm-why-c, var(--pm-pink));
    background: #f5f6f8;
    background: color-mix(in srgb, var(--pm-why-c, #d1185a) 10%, white);
    transition: transform 0.35s var(--pm-ease);
}
.pm-why-ico svg { width: 1.3rem; height: 1.3rem; }
.pm-why-item:nth-child(1) { --pm-why-c: #d1185a; }
.pm-why-item:nth-child(2) { --pm-why-c: #4f9a12; }   /* brand green, one step darker for icon contrast */
.pm-why-item:nth-child(3) { --pm-why-c: #2D3F59; }
.pm-why-item:hover .pm-why-ico { transform: scale(1.06) rotate(-3deg); }
.pm-why-item-title { font-size: 1rem; font-weight: 700; color: var(--pm-ink); letter-spacing: -0.015em; }
.pm-why-item-text { margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.6; color: var(--pm-muted); }
html[lang="ur"] .pm-why-panel-title { font-size: 0.9rem; }
html[lang="ur"] .pm-eyebrow { font-size: 0.88rem; }

/* ── 19. Footer credit + Partners page ───────────────────────────────── */
.pm-footer-legal { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; }
@media (min-width: 640px) { .pm-footer-legal { align-items: flex-start; text-align: left; } }
.pm-credit { font-size: 0.68rem; color: rgba(255, 255, 255, 0.32); letter-spacing: 0.01em; transition: color 0.25s var(--pm-ease); }
.pm-credit:hover, .pm-credit:focus-visible { color: #c4b5fd; }

.pm-partners { position: relative; z-index: 1; max-width: 54rem; margin: -2.5rem auto 0; padding: 0 1rem 3.5rem; }
/* serpSign's own theme: violet (#8b5cf6) on dark zinc, as on serpsign.com. */
.pm-partner-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 2rem;
    color: #fafafa;
    background: linear-gradient(160deg, #1c1c21 0%, #18181b 55%, #141417 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -36px rgba(76, 29, 149, 0.55), 0 12px 30px -18px rgba(0, 0, 0, 0.5);
}
.pm-partner-glow {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 80%;
    aspect-ratio: 1;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.45), rgba(139, 92, 246, 0) 70%);
    animation: pm-drift-a 18s var(--pm-ease-io) infinite alternate;
    pointer-events: none;
}
.pm-partner-glow::after {
    content: '';
    position: absolute;
    left: -70%;
    top: 95%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(196, 181, 253, 0.16), rgba(196, 181, 253, 0) 70%);
}
.pm-partner-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(90% 80% at 85% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(90% 80% at 85% 0%, #000 0%, transparent 75%);
    pointer-events: none;
}
.pm-partner-body { position: relative; padding: 2rem 1.4rem 1.75rem; }
@media (min-width: 768px) { .pm-partner-body { padding: 3rem 3rem 2.75rem; } }
.pm-partner-role {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.35);
}
.pm-partner-dot { width: 6px; height: 6px; border-radius: 9999px; background: #a78bfa; box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.6); animation: pm-partner-ping 2.2s ease-out infinite; }
@keyframes pm-partner-ping { 0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(167, 139, 250, 0); } }
.pm-partner-name {
    margin: 1.1rem 0 0.6rem;
    font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
}
.pm-partner-name-a { color: #fafafa; }
.pm-partner-name-b {
    color: #a78bfa;
    background: linear-gradient(120deg, #c4b5fd 0%, #8b5cf6 60%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pm-partner-tagline { max-width: 32rem; font-size: clamp(1rem, 0.92rem + 0.4vw, 1.2rem); line-height: 1.55; color: #d4d4d8; }
.pm-partner-work {
    display: grid;
    gap: 0.25rem;
    margin: 1.6rem 0 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 640px) { .pm-partner-work { grid-template-columns: 9rem 1fr; align-items: baseline; gap: 1rem; } }
.pm-partner-work-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #a1a1aa; }
.pm-partner-work-text { font-size: 0.95rem; font-weight: 600; color: #fafafa; }
.pm-partner-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.pm-partner-tags li {
    padding: 0.42rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.25s var(--pm-ease), color 0.25s var(--pm-ease);
}
.pm-partner-card:hover .pm-partner-tags li { border-color: rgba(139, 92, 246, 0.35); }
.pm-partner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.45rem;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 12px 28px -10px rgba(139, 92, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.3s var(--pm-ease), box-shadow 0.3s var(--pm-ease);
}
.pm-partner-cta svg { transition: transform 0.3s var(--pm-ease); }
.pm-partner-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(139, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.pm-partner-cta:hover svg { transform: translate(2px, -2px); }
.pm-partner-cta:focus-visible { outline: 3px solid rgba(196, 181, 253, 0.7); outline-offset: 3px; }
.pm-partners-note { margin-top: 1.5rem; text-align: center; font-size: 0.9rem; color: var(--pm-muted); }
.pm-partners-note a { font-weight: 700; color: var(--pm-pink); }
.pm-partners-note a:hover { text-decoration: underline; }
html[lang="ur"] .pm-partner-role, html[lang="ur"] .pm-partner-work-label { font-size: 0.82rem; }

/* ── 18. Phones: lighter, tighter type ───────────────────────────────────
   Plus Jakarta Sans is a wide face; at desktop sizes and 800–900 weights it looks
   heavy on a 390px screen. Below 640px: headings drop to 700, display sizes step
   down, buttons get slimmer. Tailwind size classes are matched as exact tokens
   ([class~="text-3xl"] does not match "md:text-3xl"), so only the phone size changes
   and headings meant to be small are never enlarged. Inputs are not touched (iOS
   zooms into fields under 16px). */
@media (max-width: 640px) {
    /* Weight: black/extra-bold headings read as bold, not bloated. */
    .store-page main :is(h1, h2),
    .store-page .font-black,
    .store-page .font-extrabold,
    .store-page .pm-display,
    .store-page .pm-hero-title,
    .store-page .sec-title { font-weight: 700; }

    /* Tailwind display sizes, phone-only steps (desktop untouched). */
    .store-page [class~="text-5xl"] { font-size: 2.1rem; }
    .store-page [class~="text-4xl"] { font-size: 1.75rem; }
    .store-page [class~="text-3xl"] { font-size: 1.5rem; }
    .store-page [class~="text-2xl"] { font-size: 1.3rem; }
    .store-page [class~="text-xl"]  { font-size: 1.1rem; }
    .store-page [class~="text-lg"]  { font-size: 1rem; }
    .store-page :is([class~="text-5xl"], [class~="text-4xl"], [class~="text-3xl"]) { line-height: 1.15; letter-spacing: -0.025em; }

    /* Storefront components. */
    .pm-hero-title { font-size: clamp(1.6rem, 1rem + 2.6vw, 1.95rem); line-height: 1.08; letter-spacing: -0.035em; }
    .pm-hero-sub { font-size: 0.92rem; line-height: 1.6; }
    .pm-display { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 1.7rem); letter-spacing: -0.03em; }
    .pm-sec-head .sec-title { font-size: 1.22rem; letter-spacing: -0.025em; }
    .pm-sec-sub, .pm-hw-lead { font-size: 0.85rem; }
    .pm-why-body { font-size: 0.94rem; line-height: 1.7; }
    .pm-page-hero-title { font-size: 1.75rem; }
    .pm-page-hero-sub { font-size: 0.92rem; }
    .pm-steps-heading { font-size: 1.35rem; }
    .pm-step-title, .pm-hw-title, .pm-why-item-title { font-size: 0.95rem; }
    .pm-step-desc { font-size: 0.86rem; }
    .pm-final-cta h2 { font-size: 1.4rem; }

    /* Buttons: slimmer and a touch lighter, still a comfortable 44px+ tap target. */
    .btn-pk, .btn-pk-outline, .pm-hero-ghost, .pm-cta-light, .pm-cta-outline { font-weight: 650; font-size: 0.85rem; }
    .pm-hero-btn, .pm-hero-ghost { padding: 0.7rem 1.15rem; }
    .pm-hero-search button { padding: 0.68rem 1.1rem; font-size: 0.85rem; }
    .btn-cart { font-weight: 650; font-size: 0.78rem; padding: 0.55rem 0; }

    /* Home trust bar (the only .glass grid): smaller icon tiles so labels fit on one line. */
    .store-page .glass.grid { gap: 1rem 0.75rem; padding: 1rem; }
    .store-page .glass.grid .w-11 { width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; }
    .store-page .glass.grid .w-11 svg { width: 1.05rem; height: 1.05rem; }
    .store-page .glass.grid > div { gap: 0.6rem; }
    .store-page .glass.grid .text-sm { font-size: 0.8rem; line-height: 1.25; }
    .store-page .glass.grid .text-xs { font-size: 0.7rem; line-height: 1.35; }

    /* Product cards: two per row, so names and prices sit one step smaller. */
    .prod-card-name { font-size: 0.82rem; }
    .prod-card-now { font-size: 0.98rem; }
    .prod-card-body { padding: 0.7rem 0.75rem 0.8rem; }
}
/* Urdu keeps its larger Nastaliq/Naskh sizes: those scripts need the room. */
@media (max-width: 640px) {
    html[lang="ur"] .store-page main :is(h1, h2) { font-weight: 700; }
    html[lang="ur"] .pm-hero-title { font-size: clamp(1.5rem, 1rem + 2.8vw, 2rem); line-height: 1.75; }
}

/* ── 13. Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .pm-boot-screen { display: none !important; }
    .pm-hero-aura span,
    .pm-hero-badge, .pm-hero-title, .pm-hero-sub, .pm-hero-search,
    .pm-hero-actions, .pm-hero-chips, .pm-hero-panel { animation: none !important; }
    .pm-reveal-on [data-pm-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
    .pm-steps::after { display: none; }
    #pm-progress { display: none; }
}
