/* =============================================================================
   PIXEL MARKET — "Download it. Use it. Love it."
   Digital products & printables marketplace. Indigo-night, dark-first, soft-glow.
   A wholly distinct identity from atelier (warm light editorial): here we ship a
   creator-marketplace UI — app-card tiles with notched corners, mono file-type
   chips, a violet-blue signature gradient on hero/CTA/featured only, and a
   "download pulse" signature motion (stroke-dashoffset ring + tap ripple).
   Self-contained design system — no Tailwind utilities relied upon.
   ============================================================================= */

/* ---- 1. TOKENS ---------------------------------------------------------- */
:root {
    /* Palette — indigo-night */
    --pm-bg: var(--tk-bg, #0E0F1A);
    --pm-bg-2: color-mix(in srgb, var(--tk-bg, #0E0F1A), #000 22%);
    --pm-panel: color-mix(in srgb, var(--tk-bg, #0E0F1A), #fff 6%);
    --pm-panel-2: color-mix(in srgb, var(--tk-bg, #0E0F1A), #fff 10%);
    --pm-elev: color-mix(in srgb, var(--tk-bg, #0E0F1A), #fff 14%);
    --pm-txt: var(--tk-text, #ECEEF8);
    --pm-muted: color-mix(in srgb, var(--tk-text, #ECEEF8), var(--tk-bg, #0E0F1A) 42%);
    --pm-faint: color-mix(in srgb, var(--tk-text, #ECEEF8), var(--tk-bg, #0E0F1A) 62%);
    --pm-line: rgb(from var(--tk-primary, #6C8CFF) r g b / .16);
    --pm-line-2: rgb(from var(--tk-primary, #6C8CFF) r g b / .28);

    /* Accent — ONE disciplined gradient (hero + CTA + featured only) */
    --pm-accent: var(--tk-primary, #6C8CFF);
    --pm-accent-2: var(--tk-secondary, #B36CFF);
    --pm-grad: linear-gradient(120deg, var(--tk-primary, #6C8CFF) 0%, var(--tk-secondary, #B36CFF) 100%);
    --pm-grad-soft: linear-gradient(120deg, rgb(from var(--tk-primary, #6C8CFF) r g b / .18) 0%, rgb(from var(--tk-secondary, #B36CFF) r g b / .18) 100%);
    --pm-glow: 0 0 0 1px rgb(from var(--tk-primary, #6C8CFF) r g b / .25), 0 18px 50px -18px rgb(from var(--tk-primary, #6C8CFF) r g b / .55);

    /* Semantic */
    --pm-ok: var(--tk-success, #3ED598);
    --pm-warn: var(--tk-warning, #FFB454);

    /* Type */
    --pm-font-d: var(--tk-font-header, 'Space Grotesk'), 'Tajawal', system-ui, sans-serif;
    --pm-font-b: var(--tk-font-content, 'Inter'), 'Tajawal', system-ui, sans-serif;
    --pm-font-m: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

    /* Geometry — soft app-card radii + notch language */
    --pm-r-xs: 8px;
    --pm-r-sm: 12px;
    --pm-r-md: 16px;
    --pm-r-lg: 22px;
    --pm-r-pill: 999px;

    /* Spacing / layout */
    --pm-shell: 1180px;
    --pm-gap: 16px;

    /* Elevation */
    --pm-sh-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 24px -14px rgba(0, 0, 0, .7);
    --pm-sh-2: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 24px 60px -22px rgba(0, 0, 0, .8);
    --pm-catch: inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* ---- 2. RESET / BASE ---------------------------------------------------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(1100px 620px at 12% -8%, rgb(from var(--tk-primary, #6C8CFF) r g b / .14), transparent 60%),
        radial-gradient(900px 540px at 100% 0%, rgb(from var(--tk-secondary, #B36CFF) r g b / .12), transparent 58%),
        var(--pm-bg);
    color: var(--pm-txt);
    font-family: var(--pm-font-b);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* GLOBAL CONTAINMENT BASELINE — no diagonal-scroll wiggle */
html,
body {
    max-width: 100%;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--pm-font-d);
    font-weight: 600;
    margin: 0;
    letter-spacing: -.01em;
    line-height: 1.12;
}

.pm-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

.pm-shell {
    width: 100%;
    max-width: var(--pm-shell);
    margin-inline: auto;
    padding-inline: 18px;
}

.pm-main {
    flex: 1 0 auto;
    padding-bottom: 92px;
    /* room for mobile dock */
}

.pm-section {
    margin-top: 40px;
}

/* Preloader */
.preloader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--pm-bg);
}

.pm-loader {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid var(--pm-line-2);
    border-top-color: var(--pm-accent);
    border-right-color: var(--pm-accent-2);
    animation: pm-spin .8s linear infinite;
}

@keyframes pm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- 3. TYPE / ARABIC --------------------------------------------------- */
[dir="rtl"] {
    font-family: var(--pm-font-b);
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
    font-family: 'Tajawal', var(--pm-font-d);
    letter-spacing: 0;
}

.pm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pm-font-m);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--pm-accent);
}

.pm-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--pm-grad);
}

.pm-display {
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    font-weight: 700;
}

/* ---- 4. BUTTONS / CHIPS ------------------------------------------------- */
.pm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--pm-font-d);
    font-weight: 600;
    font-size: 14px;
    border: 0;
    border-radius: var(--pm-r-pill);
    padding: 12px 22px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pm-btn i {
    font-size: 17px;
}

.pm-btn-grad {
    color: #0B0C16;
    background: var(--pm-grad);
    box-shadow: var(--pm-glow);
}

.pm-btn-grad:hover {
    transform: translateY(-2px);
}

.pm-btn-ghost {
    color: var(--pm-txt);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--pm-line-2);
}

.pm-btn-ghost:hover {
    background: rgb(from var(--tk-primary, #6C8CFF) r g b / .12);
    border-color: var(--pm-accent);
}

.pm-btn-block {
    width: 100%;
}

/* "Get it" ripple — emitted on tap via .pm-rippling */
.pm-btn .pm-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, .5);
    pointer-events: none;
    z-index: -1;
    animation: pm-ripple .6s ease-out;
}

@keyframes pm-ripple {
    to {
        transform: scale(3.4);
        opacity: 0;
    }
}

/* Chips — mono file-type / format tags */
.pm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--pm-font-m);
    font-size: 11px;
    letter-spacing: .04em;
    padding: 5px 10px;
    border-radius: var(--pm-r-xs);
    background: rgb(from var(--tk-primary, #6C8CFF) r g b / .1);
    border: 1px solid var(--pm-line);
    color: var(--pm-muted);
    line-height: 1;
}

.pm-chip i {
    font-size: 13px;
    color: var(--pm-accent);
}

.pm-chip-accent {
    color: #0B0C16;
    background: var(--pm-grad);
    border-color: transparent;
    font-family: var(--pm-font-d);
    font-weight: 600;
}

.pm-chip-ok {
    color: var(--pm-ok);
    background: rgb(from var(--tk-success, #3ED598) r g b / .1);
    border-color: rgb(from var(--tk-success, #3ED598) r g b / .25);
}

.pm-chip-ok i {
    color: var(--pm-ok);
}

/* ---- 5. HEADER / TOPBAR ------------------------------------------------- */
.pm-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgb(from var(--tk-bg, #0E0F1A) r g b / .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--pm-line);
}

.pm-topbar-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 64px;
}

.pm-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.pm-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: var(--pm-r-sm);
    object-fit: cover;
    box-shadow: var(--pm-glow);
}

.pm-brand-name {
    font-family: var(--pm-font-d);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pm-cart-trigger {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--pm-r-sm);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--pm-line);
    color: var(--pm-txt);
    transition: border-color .2s ease, background-color .2s ease;
}

.pm-cart-trigger:hover {
    border-color: var(--pm-accent);
    background: rgb(from var(--tk-primary, #6C8CFF) r g b / .12);
}

.pm-cart-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--pm-grad);
    color: #0B0C16;
    font-family: var(--pm-font-m);
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

/* ---- 6. HERO ------------------------------------------------------------ */
.pm-hero {
    position: relative;
    margin-top: 24px;
    border-radius: var(--pm-r-lg);
    overflow: hidden;
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    box-shadow: var(--pm-sh-2);
    isolation: isolate;
}

.pm-hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.pm-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .42;
}

.pm-hero-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(520px 360px at 78% 18%, rgb(from var(--tk-secondary, #B36CFF) r g b / .42), transparent 62%),
        radial-gradient(560px 380px at 14% 96%, rgb(from var(--tk-primary, #6C8CFF) r g b / .42), transparent 60%),
        linear-gradient(180deg, rgb(from var(--tk-bg, #0B0C16) r g b / .35), rgb(from var(--tk-bg, #0B0C16) r g b / .86));
}

.pm-hero-cap {
    position: relative;
    padding: 38px 22px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.pm-hero-title {
    font-size: clamp(2rem, 8.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.03em;
    max-width: 14ch;
}

.pm-hero-title .pm-grad-txt {
    background: var(--pm-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pm-hero-sub {
    color: var(--pm-muted);
    font-size: 1rem;
    max-width: 42ch;
    margin: 0;
}

.pm-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

/* Floating UI mini-cards in hero (CSS only) */
.pm-hero-float {
    display: none;
}

/* Instant-delivery badge strip */
.pm-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.pm-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--pm-muted);
    padding: 9px 14px;
    border-radius: var(--pm-r-pill);
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    box-shadow: var(--pm-catch);
}

.pm-trust-item i {
    font-size: 16px;
    color: var(--pm-accent);
}

/* ---- 7. SECTION HEAD ---------------------------------------------------- */
.pm-sechead {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.pm-sechead-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pm-sechead-link {
    font-family: var(--pm-font-m);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--pm-accent);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pm-sechead-link:hover {
    color: var(--pm-accent-2);
}

.pm-count {
    font-family: var(--pm-font-m);
    font-size: 12px;
    color: var(--pm-faint);
    white-space: nowrap;
}

/* ---- 8. TYPE FILTER (pill rail) ----------------------------------------- */
.pm-typebar {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.pm-typebar::-webkit-scrollbar {
    display: none;
}

.pm-typechip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--pm-r-pill);
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    color: var(--pm-muted);
    font-family: var(--pm-font-d);
    font-weight: 500;
    font-size: 13.5px;
    white-space: nowrap;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.pm-typechip img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}

.pm-typechip:hover {
    color: var(--pm-txt);
    border-color: var(--pm-line-2);
}

.pm-typechip.is-active {
    color: #0B0C16;
    background: var(--pm-grad);
    border-color: transparent;
    box-shadow: var(--pm-glow);
}

/* ---- 9. PRODUCT CARD (app-card, notched) -------------------------------- */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pm-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 74%;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.pm-rail::-webkit-scrollbar {
    display: none;
}

.pm-rail .pm-card {
    scroll-snap-align: start;
}

.pm-card {
    position: relative;
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-r-md);
    overflow: hidden;
    box-shadow: var(--pm-sh-1);
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.pm-card:hover {
    transform: translateY(-4px);
    border-color: var(--pm-line-2);
    box-shadow: var(--pm-sh-2);
}

.pm-card-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--pm-bg-2);
}

.pm-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, opacity .35s ease;
}

.pm-card-img-alt {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.pm-card:hover .pm-card-img-alt {
    opacity: 1;
}

.pm-card:hover .pm-card-img {
    transform: scale(1.04);
}

/* Download-progress ring overlay (signature motion) */
.pm-ring {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-end: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(from var(--tk-bg, #0B0C16) r g b / .6);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    z-index: 2;
}

.pm-ring svg {
    width: 34px;
    height: 34px;
    transform: rotate(-90deg);
}

.pm-ring circle.track {
    fill: none;
    stroke: rgba(255, 255, 255, .14);
    stroke-width: 2.5;
}

.pm-ring circle.bar {
    fill: none;
    stroke: url(#pmRingGrad);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 88;
    stroke-dashoffset: 88;
}

.pm-ring i {
    position: absolute;
    font-size: 14px;
    color: var(--pm-accent);
    opacity: 0;
    transition: opacity .3s ease .4s;
}

/* play once when the card scrolls into view */
.pm-card.pm-revealed .pm-ring circle.bar {
    animation: pm-fill .6s ease forwards;
}

.pm-card.pm-revealed .pm-ring i {
    opacity: 1;
}

@keyframes pm-fill {
    to {
        stroke-dashoffset: 0;
    }
}

.pm-flag {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    font-family: var(--pm-font-d);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--pm-r-xs);
    color: #0B0C16;
    background: var(--pm-grad);
    box-shadow: 0 6px 18px -8px rgb(from var(--tk-primary, #6C8CFF) r g b / .7);
}

.pm-flag-out {
    color: var(--pm-txt);
    background: rgb(from var(--tk-bg, #0B0C16) r g b / .82);
    border: 1px solid var(--pm-line-2);
}

.pm-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}

.pm-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* .pm-getit is a JS hook only (ripple targeting) — visual style comes from .pm-add / .pm-btn-grad. */

.pm-card-name {
    font-size: .98rem;
    font-weight: 600;
    color: var(--pm-txt);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-card-meta {
    font-size: .8rem;
    color: var(--pm-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pm-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
}

.pm-price-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.pm-price {
    font-family: var(--pm-font-d);
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--pm-txt);
    unicode-bidi: isolate;
}

.pm-price-old {
    font-size: .82rem;
    color: var(--pm-faint);
    text-decoration: line-through;
    unicode-bidi: isolate;
}

.pm-add {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--pm-r-sm);
    color: #0B0C16;
    background: var(--pm-grad);
    cursor: pointer;
    box-shadow: 0 8px 22px -10px rgb(from var(--tk-primary, #6C8CFF) r g b / .8);
    transition: transform .15s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pm-add:hover {
    transform: translateY(-2px);
}

.pm-add i {
    font-size: 19px;
}

/* ---- 10. BUNDLE RAIL (featured gradient band) --------------------------- */
.pm-bundle {
    position: relative;
    border-radius: var(--pm-r-lg);
    overflow: hidden;
    padding: 26px 22px;
    background:
        radial-gradient(420px 280px at 88% 12%, rgb(from var(--tk-secondary, #B36CFF) r g b / .4), transparent 62%),
        radial-gradient(420px 280px at 8% 96%, rgb(from var(--tk-primary, #6C8CFF) r g b / .4), transparent 60%),
        var(--pm-panel-2);
    border: 1px solid var(--pm-line-2);
    box-shadow: var(--pm-sh-2);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.pm-bundle-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--pm-font-m);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #0B0C16;
    background: var(--pm-grad);
    padding: 6px 12px;
    border-radius: var(--pm-r-pill);
}

.pm-bundle-title {
    font-size: clamp(1.4rem, 5.5vw, 2rem);
    font-weight: 700;
}

.pm-bundle-sub {
    color: var(--pm-muted);
    margin: 0;
    max-width: 48ch;
}

/* ---- 11. TOOLBAR / FORMS ------------------------------------------------ */
.pm-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.pm-search,
.pm-pricef {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pm-search {
    flex: 1;
}

.pm-input {
    flex: 1;
    min-width: 0;
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-r-sm);
    color: var(--pm-txt);
    padding: 11px 14px;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pm-input::placeholder {
    color: var(--pm-faint);
}

.pm-input:focus {
    outline: none;
    border-color: var(--pm-accent);
    box-shadow: 0 0 0 3px rgb(from var(--tk-primary, #6C8CFF) r g b / .18);
}

.pm-pricef .pm-input {
    flex: 1 1 90px;
    max-width: 130px;
}

.pm-select {
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-r-sm);
    color: var(--pm-txt);
    padding: 11px 40px 11px 14px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239094B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

[dir="rtl"] .pm-select {
    padding: 11px 14px 11px 40px;
    background-position: left 14px center;
}

/* ---- 12. EMPTY STATES --------------------------------------------------- */
.pm-empty {
    text-align: center;
    padding: 52px 20px;
    border: 1px dashed var(--pm-line-2);
    border-radius: var(--pm-r-lg);
    background: rgb(from var(--tk-bg, #16182A) r g b / .5);
}

.pm-empty-mark {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: var(--pm-r-md);
    display: grid;
    place-items: center;
    background: var(--pm-grad-soft);
    border: 1px solid var(--pm-line-2);
    position: relative;
}

.pm-empty-mark::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2.5px solid var(--pm-accent);
    border-radius: 4px;
    border-top: 0;
    border-inline-end: 0;
    transform: rotate(-45deg) translateY(-3px);
}

.pm-empty-title {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.pm-empty-sub {
    color: var(--pm-muted);
    margin: 0 0 16px;
    font-size: .9rem;
}

/* ---- 13. PAGINATION ----------------------------------------------------- */
.pm-pagination {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

.pm-pagination .pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.pm-pagination .page-item .page-link {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--pm-r-sm);
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    color: var(--pm-txt);
    font-family: var(--pm-font-m);
    font-size: 13px;
}

.pm-pagination .page-item.active .page-link {
    color: #0B0C16;
    background: var(--pm-grad);
    border-color: transparent;
}

.pm-pagination .page-item.disabled .page-link {
    opacity: .4;
}

/* ---- 14. SINGLE PRODUCT ------------------------------------------------- */
.pm-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pm-font-m);
    font-size: 12px;
    color: var(--pm-faint);
    margin: 22px 0 4px;
    flex-wrap: wrap;
}

.pm-crumb a:hover {
    color: var(--pm-accent);
}

.pm-crumb-sep {
    color: var(--pm-line-2);
}

.pm-crumb-cur {
    color: var(--pm-muted);
}

.pm-product {
    display: grid;
    gap: 22px;
    margin-top: 18px;
}

.pm-gallery {
    min-width: 0;
}

.pm-gallery-main {
    display: block;
    border-radius: var(--pm-r-lg);
    overflow: hidden;
    border: 1px solid var(--pm-line);
    background: var(--pm-bg-2);
    box-shadow: var(--pm-sh-2);
    aspect-ratio: 1 / 1;
}

.pm-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-thumb-rail {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.pm-thumb-rail::-webkit-scrollbar {
    display: none;
}

.pm-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: var(--pm-r-sm);
    overflow: hidden;
    border: 1px solid var(--pm-line);
    cursor: pointer;
}

.pm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-product-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pm-product-name {
    font-size: clamp(1.5rem, 6vw, 2.1rem);
    font-weight: 700;
    line-height: 1.06;
}

.pm-product-sub {
    color: var(--pm-muted);
    margin: 0;
    font-size: 1rem;
}

.pm-product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.pm-product-price .pm-price {
    font-size: 1.8rem;
}

.pm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pm-concierge-hint {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .82rem;
    color: var(--pm-muted);
    background: rgb(from var(--tk-success, #3ED598) r g b / .07);
    border: 1px solid rgb(from var(--tk-success, #3ED598) r g b / .2);
    border-radius: var(--pm-r-sm);
    padding: 12px 14px;
    margin: 0;
}

.pm-concierge-hint i {
    color: var(--pm-ok);
    font-size: 17px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.pm-prose {
    color: var(--pm-muted);
    line-height: 1.75;
    font-size: .95rem;
}

.pm-prose h1,
.pm-prose h2,
.pm-prose h3 {
    color: var(--pm-txt);
    margin: 1.2em 0 .4em;
}

.pm-prose a {
    color: var(--pm-accent);
    text-decoration: underline;
}

.pm-prose img {
    border-radius: var(--pm-r-md);
    margin: 1em 0;
}

.pm-prose ul,
.pm-prose ol {
    padding-inline-start: 1.3em;
}

/* ---- 15. VARIANT PICKER (restyle of neutral sm-* contract) -------------- */
.sm-variants {
    margin: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sm-variant-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.sm-variant-label {
    font-family: var(--pm-font-d);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pm-muted);
}

[dir="rtl"] .sm-variant-label {
    text-align: right;
}

.sm-variant-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.sm-variant-opt {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 1px solid var(--pm-line-2);
    border-radius: var(--pm-r-sm);
    padding: 9px 16px;
    font-family: var(--pm-font-d);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    background: var(--pm-panel);
    color: var(--pm-muted);
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.sm-variant-opt:hover {
    color: var(--pm-txt);
    border-color: var(--pm-accent);
}

.sm-variant-opt.is-selected {
    color: #0B0C16;
    font-weight: 600;
    background: var(--pm-grad);
    border-color: transparent;
    box-shadow: var(--pm-glow);
}

.sm-variant-opt:focus-visible {
    outline: 2px solid var(--pm-accent);
    outline-offset: 2px;
}

/* ---- 16. SHARE (store share include) ------------------------------------ */
.pm-share,
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ---- 17. CART DRAWER ---------------------------------------------------- */
.pm-drawer {
    background: var(--pm-bg-2);
    color: var(--pm-txt);
    border-inline-start: 1px solid var(--pm-line-2);
    width: min(420px, 92vw);
}

.pm-drawer .offcanvas-header {
    border-bottom: 1px solid var(--pm-line);
    padding: 18px 20px;
}

.pm-drawer-title {
    font-family: var(--pm-font-d);
    font-weight: 700;
    font-size: 1.15rem;
}

.pm-drawer .btn-close {
    filter: invert(1) grayscale(1) brightness(1.6);
    opacity: .8;
}

.pm-drawer .offcanvas-body {
    padding: 16px 20px;
}

.pm-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--pm-r-md);
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    margin-bottom: 12px;
}

.pm-cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--pm-r-sm);
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--pm-bg-2);
}

.pm-cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pm-cart-item-name {
    font-family: var(--pm-font-d);
    font-size: .92rem;
    font-weight: 600;
    margin: 0;
}

.pm-cart-item-sub {
    font-size: .76rem;
    color: var(--pm-muted);
}

.sm-cart-variants {
    color: var(--pm-accent);
    font-family: var(--pm-font-m);
    font-size: .72rem;
}

.pm-cart-item-price {
    font-family: var(--pm-font-d);
    font-weight: 700;
    color: var(--pm-txt);
    margin: 2px 0 0;
    unicode-bidi: isolate;
}

.pm-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.pm-qty-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--pm-elev);
    border: 1px solid var(--pm-line);
    color: var(--pm-txt);
    cursor: pointer;
    padding: 0;
}

.pm-qty-btn svg {
    width: 17px;
    height: 17px;
}

.pm-qty-btn:hover {
    border-color: var(--pm-accent);
}

.pm-qty-remove {
    color: var(--tk-danger, #FF7A8A);
    margin-inline-start: auto;
}

.pm-qty-num {
    font-family: var(--pm-font-m);
    min-width: 22px;
    text-align: center;
    font-size: .9rem;
}

.pm-cart-empty {
    text-align: center;
    padding: 40px 16px;
}

.pm-cart-empty-text {
    color: var(--pm-muted);
    margin: 14px 0 18px;
}

.pm-empty-mark-light {
    margin-inline: auto;
}

.pm-drawer-foot {
    border-top: 1px solid var(--pm-line);
    padding: 16px 20px;
    background: var(--pm-bg-2);
}

.pm-cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-family: var(--pm-font-d);
    font-size: 1.05rem;
    margin: 0 0 14px;
}

.pm-cart-total-num {
    font-weight: 700;
    color: var(--pm-accent);
    unicode-bidi: isolate;
}

.pm-place-order {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #0B0C16;
    background: var(--pm-grad);
    border-radius: var(--pm-r-pill);
    padding: 14px;
    font-family: var(--pm-font-d);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--pm-glow);
}

.pm-place-order i {
    font-size: 19px;
}

/* ---- 18. MODAL ---------------------------------------------------------- */
.pm-modal .modal-content {
    background: var(--pm-panel);
    color: var(--pm-txt);
    border: 1px solid var(--pm-line-2);
    border-radius: var(--pm-r-lg);
    box-shadow: var(--pm-sh-2);
    position: relative;
}

.pm-modal .modal-header {
    border-bottom: 1px solid var(--pm-line);
    padding: 20px 22px;
}

.pm-modal .modal-title {
    font-family: var(--pm-font-d);
    font-weight: 700;
}

.pm-modal-sub {
    display: block;
    color: var(--pm-muted);
    font-size: .8rem;
    margin-top: 3px;
}

.pm-modal .btn-close {
    filter: invert(1) grayscale(1) brightness(1.6);
    opacity: .8;
    position: absolute;
    inset-block-start: 18px;
    inset-inline-end: 18px;
}

.pm-modal .modal-body {
    padding: 20px 22px;
}

.pm-modal .form-label {
    font-family: var(--pm-font-d);
    font-size: 13px;
    font-weight: 600;
    color: var(--pm-muted);
    margin-bottom: 6px;
}

.pm-modal .form-control {
    background: var(--pm-bg-2);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-r-sm);
    color: var(--pm-txt);
    padding: 11px 14px;
}

.pm-modal .form-control::placeholder {
    color: var(--pm-faint);
}

.pm-modal .form-control:focus {
    background: var(--pm-bg-2);
    border-color: var(--pm-accent);
    box-shadow: 0 0 0 3px rgb(from var(--tk-primary, #6C8CFF) r g b / .18);
    color: var(--pm-txt);
}

.pm-modal .form-check-input {
    background-color: var(--pm-bg-2);
    border-color: var(--pm-line-2);
}

.pm-modal .form-check-input:checked {
    background-color: var(--pm-accent);
    border-color: var(--pm-accent);
}

.pm-modal .form-check-label {
    color: var(--pm-txt);
}

.pm-modal .modal-footer {
    border-top: 1px solid var(--pm-line);
    padding: 16px 22px;
    gap: 10px;
}

.pm-modal .text-muted {
    color: var(--pm-faint) !important;
}

/* ---- 19. FOOTER --------------------------------------------------------- */
.pm-footer {
    margin-top: 56px;
    border-top: 1px solid var(--pm-line);
    background: var(--pm-bg-2);
    padding: 40px 0 30px;
}

.pm-footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.pm-footer-brand {
    min-width: 0;
}

.pm-footer-wordmark {
    font-family: var(--pm-font-d);
    font-weight: 700;
    font-size: 1.4rem;
    background: var(--pm-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pm-footer-tag {
    color: var(--pm-muted);
    margin: 4px 0 0;
    font-size: .9rem;
}

.pm-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pm-social a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--pm-r-sm);
    background: var(--pm-panel);
    border: 1px solid var(--pm-line);
    color: var(--pm-muted);
    font-size: 18px;
    transition: color .2s ease, border-color .2s ease;
}

.pm-social a:hover {
    color: var(--pm-accent);
    border-color: var(--pm-accent);
}

.pm-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 26px 0;
}

.pm-footer-links a {
    font-size: .85rem;
    color: var(--pm-muted);
}

.pm-footer-links a:hover {
    color: var(--pm-accent);
}

.pm-footer-base {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    padding-top: 22px;
    border-top: 1px solid var(--pm-line);
    color: var(--pm-faint);
    font-size: .82rem;
}

.pm-footer-base a {
    color: var(--pm-muted);
}

.pm-footer-base a:hover {
    color: var(--pm-accent);
}

.pm-footer-base i {
    color: var(--pm-accent-2);
}

/* ---- 20. MOBILE DOCK ---------------------------------------------------- */
.pm-dock {
    position: fixed;
    inset-block-end: 0;
    inset-inline: 0;
    z-index: 180;
    display: flex;
    background: rgb(from var(--tk-bg, #0B0C16) r g b / .9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--pm-line);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}

.pm-dock a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--pm-faint);
    font-size: 10.5px;
    font-family: var(--pm-font-m);
    letter-spacing: .03em;
    padding: 4px 0;
}

.pm-dock a i {
    font-size: 21px;
}

.pm-dock a.is-active {
    color: var(--pm-accent);
}

/* ---- 21. NOTES (session flash) ------------------------------------------ */
.pm-note {
    border-radius: var(--pm-r-md);
    padding: 14px 16px;
    margin-top: 18px;
    font-size: .9rem;
    border: 1px solid var(--pm-line-2);
}

.pm-note-success {
    color: var(--pm-ok);
    background: rgb(from var(--tk-success, #3ED598) r g b / .08);
    border-color: rgb(from var(--tk-success, #3ED598) r g b / .25);
}

.pm-note-danger {
    color: var(--tk-danger, #FF7A8A);
    background: rgb(from var(--tk-danger, #FF7A8A) r g b / .08);
    border-color: rgb(from var(--tk-danger, #FF7A8A) r g b / .25);
}

/* ---- 22. CART TOAST PILL (founder lesson #1) ---------------------------- */
.alert-float {
    position: fixed !important;
    top: 18px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(-18px);
    width: auto !important;
    max-width: 360px !important;
    margin: 0 !important;
    padding: 12px 20px !important;
    border-radius: var(--pm-r-pill) !important;
    font-family: var(--pm-font-d);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    display: none;
    box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .8);
    transition: opacity .25s ease, transform .25s ease;
}

.alert-float.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    display: block !important;
}

#successAlertContainer.alert-float {
    background: var(--pm-grad) !important;
    color: #0B0C16 !important;
    border: 0 !important;
}

#errorAlertContainer.alert-float {
    background: #2A1320 !important;
    color: #FF9AA8 !important;
    border: 1px solid rgb(from var(--tk-danger, #FF7A8A) r g b / .4) !important;
}

/* ---- 23. RESPONSIVE (>=760px) ------------------------------------------- */
@media (min-width: 760px) {
    body {
        font-size: 16px;
    }

    .pm-shell {
        padding-inline: 28px;
    }

    .pm-hero {
        margin-top: 30px;
    }

    .pm-hero-cap {
        padding: 64px 56px 56px;
        max-width: 68%;
    }

    .pm-hero-float {
        display: block;
        position: absolute;
        inset-block-start: 0;
        inset-inline-end: 0;
        width: 42%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
    }

    .pm-float-card {
        position: absolute;
        border-radius: var(--pm-r-md);
        background: rgb(from var(--tk-bg, #1C1F36) r g b / .7);
        border: 1px solid var(--pm-line-2);
        box-shadow: var(--pm-sh-2);
        backdrop-filter: blur(8px);
    }

    .pm-float-card.c1 {
        width: 150px;
        height: 96px;
        inset-block-start: 22%;
        inset-inline-end: 18%;
        animation: pm-drift 7s ease-in-out infinite;
    }

    .pm-float-card.c2 {
        width: 118px;
        height: 118px;
        inset-block-start: 50%;
        inset-inline-end: 44%;
        animation: pm-drift 9s ease-in-out infinite reverse;
    }

    .pm-float-card.c3 {
        width: 96px;
        height: 72px;
        inset-block-start: 14%;
        inset-inline-end: 48%;
        animation: pm-drift 8s ease-in-out infinite .5s;
    }

    @keyframes pm-drift {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-12px);
        }
    }

    .pm-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .pm-rail {
        grid-auto-columns: 30%;
        gap: 18px;
    }

    .pm-product {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
        align-items: start;
    }

    .pm-gallery {
        position: sticky;
        inset-block-start: 80px;
    }

    .pm-toolbar {
        flex-direction: row;
        align-items: center;
    }

    .pm-search {
        flex: 1 1 auto;
    }

    .pm-bundle {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 34px 38px;
    }

    .pm-bundle-text {
        max-width: 60%;
    }

    .pm-dock {
        display: none;
    }

    .pm-main {
        padding-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .pm-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .pm-rail {
        grid-auto-columns: 23%;
    }
}

/* ---- 24. REDUCED MOTION (kill layer) ------------------------------------ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    html {
        scroll-behavior: auto;
    }

    .pm-float-card {
        animation: none !important;
    }

    /* download ring shows COMPLETE (offset 0) instead of animating */
    .pm-ring circle.bar {
        stroke-dashoffset: 0 !important;
        animation: none !important;
    }

    .pm-ring i {
        opacity: 1 !important;
    }

    .pm-btn .pm-ripple {
        display: none !important;
    }
}
