/* Source: assets/css/variables.css */
/* ═══════════════════════════════════════════════════════════════
   PPN Network v3 — "Crystalline Amethyst" Design System
   Variables, Tokens & Custom Properties
   ═══════════════════════════════════════════════════════════════ */



:root {
    /* ── Core Purple Palette ── */
    --amethyst-50:  #faf5ff;
    --amethyst-100: #f3e8ff;
    --amethyst-200: #e9d5ff;
    --amethyst-300: #d8b4fe;
    --amethyst-400: #c084fc;
    --amethyst-500: #a855f7;
    --amethyst-600: #9333ea;
    --amethyst-700: #7e22ce;
    --amethyst-800: #6b21a8;
    --amethyst-900: #581c87;
    --amethyst-950: #3b0764;

    /* ── Lavender Accent ── */
    --lavender-50:  #f5f3ff;
    --lavender-100: #ede9fe;
    --lavender-200: #ddd6fe;
    --lavender-300: #c4b5fd;
    --lavender-400: #a78bfa;

    /* ── Neutral (cool silver) ── */
    --n-0:    #ffffff;
    --n-25:   #fafbfc;
    --n-50:   #f4f5f7;
    --n-100:  #ebedf0;
    --n-150:  #dfe2e6;
    --n-200:  #d1d5db;
    --n-300:  #b0b7c0;
    --n-400:  #8a94a0;
    --n-500:  #687280;
    --n-600:  #4f5966;
    --n-700:  #3a424d;
    --n-800:  #262d36;
    --n-900:  #151a21;

    /* ── Status Colors ── */
    --emerald:       #10b981;
    --emerald-50:    #ecfdf5;
    --emerald-100:   #d1fae5;
    --scarlet:       #ef4444;
    --scarlet-50:    #fef2f2;
    --scarlet-100:   #fee2e2;
    --gold:          #f59e0b;
    --gold-50:       #fffbeb;
    --gold-100:      #fef3c7;
    --sky:           #3b82f6;
    --sky-50:        #eff6ff;
    --sky-100:       #dbeafe;

    /* ── Semantic Aliases ── */
    --bg:            #f8f6fc;
    --bg-glass:      rgba(255, 255, 255, 0.72);
    --surface:       var(--n-0);
    --surface-glass:  rgba(255, 255, 255, 0.6);
    --surface-hover:  rgba(255, 255, 255, 0.85);
    --border:        rgba(147, 51, 234, 0.08);
    --border-strong:  rgba(147, 51, 234, 0.15);
    --border-focus:  var(--amethyst-400);
    --text:          var(--n-900);
    --text-secondary: var(--n-500);
    --text-muted:    var(--n-400);
    --primary:       var(--amethyst-600);
    --primary-soft:  var(--amethyst-50);
    --primary-hover: var(--amethyst-700);

    /* ── Typography ── */
    --font-display: 'Outfit', 'Noto Sans Thai', sans-serif;
    --font-body:    'Noto Sans Thai', 'Outfit', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* ── Spacing scale ── */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;  --sp-10: 40px;
    --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

    /* ── Border radius ── */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-pill: 9999px;

    /* ── Elevation (glass style) ── */
    --shadow-xs: 0 1px 3px rgba(88, 28, 135, 0.04);
    --shadow-sm: 0 2px 8px rgba(88, 28, 135, 0.06);
    --shadow-md: 0 4px 16px rgba(88, 28, 135, 0.08);
    --shadow-lg: 0 8px 32px rgba(88, 28, 135, 0.10);
    --shadow-xl: 0 16px 48px rgba(88, 28, 135, 0.14);
    --shadow-glow: 0 4px 20px rgba(147, 51, 234, 0.25);
    --shadow-glow-lg: 0 8px 36px rgba(147, 51, 234, 0.30);
    --shadow-inner: inset 0 2px 4px rgba(88, 28, 135, 0.06);

    /* ── Backdrop blur ── */
    --blur-sm: blur(8px);
    --blur-md: blur(16px);
    --blur-lg: blur(24px);
    --blur-xl: blur(40px);

    /* ── Motion ── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration: 0.25s;
    --duration-slow: 0.4s;

    /* ── Layout ── */
    --nav-height: 68px;
    --sidebar-width: 260px;
    --container-max: 920px;
    --container-sm: 560px;
    --container-md: 720px;

    /* ── Gradients ── */
    --gradient-hero: linear-gradient(135deg, var(--amethyst-700) 0%, var(--amethyst-500) 50%, var(--lavender-400) 100%);
    --gradient-hero-soft: linear-gradient(135deg, var(--amethyst-50) 0%, var(--lavender-100) 50%, #fff 100%);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(196, 181, 253, 0.10) 0%, transparent 50%),
                     radial-gradient(ellipse at 50% 100%, rgba(233, 213, 255, 0.06) 0%, transparent 50%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 100%);
    --gradient-gold: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #f59e0b 100%);
}

/* Source: assets/css/base.css */
/* ═══════════════════════════════════════════════════════════════
   PPN v3 — Base: Reset · Typography · Layout · Grid
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); background-image: var(--gradient-mesh); background-attachment: fixed; color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.25; }
.t-xs   { font-size: 0.6875rem; }
.t-sm   { font-size: 0.8125rem; }
.t-base { font-size: 0.9375rem; }
.t-lg   { font-size: 1.125rem; }
.t-xl   { font-size: 1.25rem; }
.t-2xl  { font-size: 1.5rem; }
.t-3xl  { font-size: 1.875rem; }
.t-4xl  { font-size: 2.25rem; }
.t-display { font-family: var(--font-display); }
.t-mono { font-family: var(--font-mono); }

.fw-light    { font-weight: 300; }
.fw-normal   { font-weight: 400; }
.fw-medium   { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold     { font-weight: 700; }
.fw-heavy    { font-weight: 800; }

.tc-primary   { color: var(--primary); }
.tc-secondary { color: var(--text-secondary); }
.tc-muted     { color: var(--text-muted); }
.tc-emerald   { color: var(--emerald); }
.tc-scarlet   { color: var(--scarlet); }
.tc-gold      { color: var(--gold); }
.tc-sky       { color: var(--sky); }
.tc-white     { color: #fff; }
.tc-center    { text-align: center; }
.tc-right     { text-align: right; }

/* ── Layout Containers ── */
.container    { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--sp-4); }
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 var(--sp-4); }
.container-md { max-width: var(--container-md); margin: 0 auto; padding: 0 var(--sp-4); }

/* ── Flexbox ── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.flex-1     { flex: 1; }
.items-center { align-items: center; }
.items-end    { align-items: flex-end; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* ── Grid ── */
.grid   { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .md-hide { display: none !important; }
}
@media (max-width: 480px) {
    .grid-2 { grid-template-columns: 1fr; }
    .sm-hide { display: none !important; }
}

/* ── Spacing ── */
.mb-1 { margin-bottom: var(--sp-1); } .mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.p-4  { padding: var(--sp-4); } .p-5  { padding: var(--sp-5); }
.p-6  { padding: var(--sp-6); }
.py-4 { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }

/* ── Page Body (accounts for bottom nav) ── */
.page-body { padding: var(--sp-5) var(--sp-4); padding-bottom: calc(var(--nav-height) + var(--sp-8)); }

/* ── Animation ── */
.fade-in { animation: ppnFadeIn 0.45s var(--ease-out); }
@keyframes ppnFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hidden { display: none !important; }

/* ── Backwards-compatible aliases ── */
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.6875rem; }
.text-base { font-size: 0.9375rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-secondary); }
.text-brand { color: var(--primary); }
.text-green { color: var(--emerald); }
.text-red { color: var(--scarlet); }
.text-mono { font-family: var(--font-mono); }

/* Source: assets/css/components.css */
/* ═══════════════════════════════════════════════════════════════
   PPN v3 — Components: Glass Cards · Buttons · Forms · Nav · etc.
   "Crystalline Amethyst" theme
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────
   TOP NAVIGATION — frosted glass
   ────────────────────────────── */
.topnav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 12px rgba(88, 28, 135, 0.03);
}
.topnav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 var(--sp-4);
    max-width: var(--container-max); margin: 0 auto;
}
.topnav-title {
    font-family: var(--font-display);
    font-weight: 700; font-size: 0.9375rem;
    display: flex; align-items: center; gap: var(--sp-3);
    color: var(--amethyst-800);
}
.topnav-back {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    color: var(--primary); transition: all var(--duration) var(--ease-out);
    background: var(--amethyst-50);
}
.topnav-back:hover { background: var(--amethyst-100); transform: translateX(-2px); }

/* ──────────────────────────────
   BOTTOM NAVIGATION — frosted
   ────────────────────────────── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: var(--blur-lg); -webkit-backdrop-filter: var(--blur-lg);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 20px rgba(88, 28, 135, 0.05);
}
.bottom-nav-inner {
    display: flex; justify-content: space-around; align-items: center;
    max-width: 520px; margin: 0 auto; height: var(--nav-height);
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 14px; border-radius: var(--radius-md);
    transition: all var(--duration) var(--ease-out); min-width: 56px;
    position: relative;
}
/* ★ v2.49: 6 รายการในมือถือเล็ก — ลด padding เพื่อให้พอดีจอ 320–380px */
@media (max-width: 420px) {
    .bottom-nav a { padding: 8px 6px; min-width: 48px; }
    .bottom-nav a .nav-lbl { font-size: 0.58rem; }
}
@media (max-width: 360px) {
    .bottom-nav a { padding: 8px 4px; min-width: 44px; }
    .bottom-nav a .nav-ico { font-size: 1.2rem; }
    .bottom-nav a .nav-lbl { font-size: 0.55rem; }
}
.bottom-nav a .nav-ico { font-size: 1.3rem; line-height: 1; transition: transform var(--duration) var(--ease-spring); }
.bottom-nav a .nav-lbl { font-size: 0.6rem; font-weight: 600; color: var(--n-400); transition: color var(--duration); letter-spacing: 0.02em; }
.bottom-nav a:hover .nav-lbl { color: var(--text-secondary); }
.bottom-nav a.active {
    background: linear-gradient(135deg, var(--amethyst-50) 0%, rgba(168,85,247,0.08) 100%);
}
.bottom-nav a.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--gradient-hero);
}
.bottom-nav a.active .nav-ico { transform: scale(1.12); }
.bottom-nav a.active .nav-lbl { color: var(--amethyst-700); font-weight: 700; }

/* ──────────────────────────────
   GLASS CARD
   ────────────────────────────── */
.card {
    background: var(--gradient-card);
    backdrop-filter: var(--blur-sm); -webkit-backdrop-filter: var(--blur-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration) var(--ease-out);
    box-shadow: var(--shadow-xs);
}
.card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.card-body { padding: var(--sp-5); }
.card-header {
    padding: var(--sp-3) var(--sp-5);
    border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: 0.8125rem;
    color: var(--text-secondary);
    background: rgba(250, 245, 255, 0.5);
}

/* ──────────────────────────────
   HERO CARD — vivid gradient
   ────────────────────────────── */
.hero-card {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl); padding: var(--sp-6); color: #fff;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-glow);
}
.hero-card::before {
    content: ''; position: absolute; top: -60%; right: -30%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.hero-card::after {
    content: ''; position: absolute; bottom: -40%; left: -20%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(196,181,253,0.15) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.hero-card .label { color: rgba(255,255,255,0.6); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; }
.hero-card .value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; margin-top: 2px; }

/* ──────────────────────────────
   STAT CARD — floating glass
   ────────────────────────────── */
.stat-card {
    background: var(--gradient-card);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4) var(--sp-5);
    transition: all var(--duration) var(--ease-out);
    box-shadow: var(--shadow-xs);
}
.stat-card:hover {
    border-color: var(--amethyst-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; margin-bottom: var(--sp-3);
}
.stat-icon.green   { background: var(--emerald-50); color: var(--emerald); }
.stat-icon.blue    { background: var(--sky-50); color: var(--sky); }
.stat-icon.amber   { background: var(--gold-50); color: var(--gold); }
.stat-icon.brand   { background: var(--amethyst-50); color: var(--primary); }
.stat-label { font-size: 0.6875rem; color: var(--text-muted); margin-bottom: 2px; font-weight: 500; letter-spacing: 0.01em; }
.stat-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--text); }

/* ──────────────────────────────
   BUTTONS — pill-style glass
   ────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5); font-size: 0.875rem; font-weight: 600;
    border-radius: var(--radius-md); transition: all var(--duration) var(--ease-out);
    white-space: nowrap; font-family: var(--font-body);
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--gradient-hero); color: #fff;
    box-shadow: var(--shadow-glow); border: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
    filter: brightness(1.08);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: var(--bg-glass);
    backdrop-filter: var(--blur-sm);
    color: var(--n-600);
    border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
    border-color: var(--amethyst-300);
    color: var(--primary); background: var(--amethyst-50);
}
.btn-danger {
    background: var(--scarlet-50); color: var(--scarlet);
    border: 1px solid rgba(239, 68, 68, 0.15);
}
.btn-danger:hover { background: var(--scarlet-100); }
.btn-ghost {
    background: transparent; color: var(--text-secondary);
    padding: var(--sp-2) var(--sp-3);
}
.btn-ghost:hover { background: var(--amethyst-50); color: var(--primary); }
.btn-lg   { padding: 14px var(--sp-6); font-size: 0.9375rem; border-radius: var(--radius-lg); }
.btn-sm   { padding: 5px var(--sp-3); font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ──────────────────────────────
   FORMS — glass input
   ────────────────────────────── */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
    display: block; font-size: 0.75rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.form-input {
    width: 100%; padding: 11px 16px; font-size: 0.9375rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: var(--blur-sm);
    border: 1.5px solid var(--n-150);
    border-radius: var(--radius-md); color: var(--text);
    transition: all var(--duration) var(--ease-out); outline: none;
}
.form-input:focus {
    border-color: var(--amethyst-400);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.08);
    background: rgba(255,255,255,0.9);
}
.form-input::placeholder { color: var(--n-300); }
.form-input.invalid {
    border-color: var(--scarlet);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06);
}
.form-input.valid {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.06);
}
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238a94a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
textarea.form-input { resize: vertical; min-height: 80px; }

/* ── Radio Cards ── */
.radio-group { display: flex; gap: var(--sp-3); }
.radio-card { flex: 1; position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card .radio-body {
    padding: var(--sp-4); border: 2px solid var(--n-150);
    border-radius: var(--radius-lg); text-align: center;
    transition: all var(--duration); background: rgba(255,255,255,0.6);
}
.radio-card input:checked + .radio-body {
    border-color: var(--amethyst-400);
    background: var(--amethyst-50);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.06);
}
.radio-card .radio-title { font-weight: 600; font-size: 0.875rem; }
.radio-card .radio-desc { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* ──────────────────────────────
   BADGES — crystalline
   ────────────────────────────── */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 11px; font-size: 0.625rem;
    font-weight: 700; border-radius: var(--radius-pill); letter-spacing: 0.03em;
}
.badge-brand   { background: var(--amethyst-50); color: var(--amethyst-700); }
.badge-green   { background: var(--emerald-50); color: #059669; }
.badge-red     { background: var(--scarlet-50); color: var(--scarlet); }
.badge-amber   { background: var(--gold-50); color: #d97706; }
.badge-neutral { background: var(--n-100); color: var(--n-500); }
.badge-star {
    background: var(--gradient-gold); color: #78350f;
    font-weight: 700; box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
}

/* ──────────────────────────────
   TABLE — clean with hover
   ────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: 0.8125rem; }
.table th {
    padding: var(--sp-3) var(--sp-4); font-size: 0.625rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--amethyst-600); background: rgba(250, 245, 255, 0.6);
    text-align: left; white-space: nowrap;
}
.table td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr { transition: background var(--duration-fast); }
.table tbody tr:hover { background: rgba(168, 85, 247, 0.03); }

/* ──────────────────────────────
   TABS — underline style
   ────────────────────────────── */
.tabs {
    display: flex; gap: 0;
    border-bottom: 2px solid var(--n-100);
    margin-bottom: var(--sp-5);
}
.tab {
    padding: var(--sp-3) var(--sp-5); font-size: 0.8125rem; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all var(--duration);
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ──────────────────────────────
   PILLS — filter chips
   ────────────────────────────── */
.pills { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.pill {
    padding: 7px var(--sp-4); font-size: 0.75rem; font-weight: 500;
    border-radius: var(--radius-pill);
    color: var(--n-500); background: rgba(255,255,255,0.7);
    border: 1px solid var(--border-strong);
    transition: all var(--duration) var(--ease-out);
    backdrop-filter: var(--blur-sm);
}
.pill:hover { border-color: var(--amethyst-300); background: var(--amethyst-50); }
.pill.active { background: var(--gradient-hero); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }

/* ──────────────────────────────
   PROGRESS BAR
   ────────────────────────────── */
.progress { height: 6px; background: rgba(255,255,255,0.2); border-radius: var(--radius-pill); overflow: hidden; }
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.9));
    border-radius: var(--radius-pill);
    transition: width 0.6s var(--ease-out);
}

/* ──────────────────────────────
   MODAL — frosted overlay
   ────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(59, 7, 100, 0.25);
    backdrop-filter: var(--blur-sm); -webkit-backdrop-filter: var(--blur-sm);
    z-index: 500; display: flex; align-items: center; justify-content: center;
    padding: var(--sp-4);
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open, .modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal, .modal-box {
    background: var(--surface); border-radius: var(--radius-xl);
    width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(8px);
    transition: transform 0.3s var(--ease-spring);
}
.modal-overlay.open .modal, .modal-overlay.active .modal-box { transform: scale(1) translateY(0); }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border);
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
}
.modal-close {
    width: 32px; height: 32px; border: 1px solid var(--n-150);
    background: var(--n-50); border-radius: var(--radius-sm);
    cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    color: var(--n-400); transition: all var(--duration);
}
.modal-close:hover { border-color: var(--amethyst-300); color: var(--primary); background: var(--amethyst-50); }
.modal-body   { padding: var(--sp-5) var(--sp-6); }
.modal-footer { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); display: flex; gap: var(--sp-3); }

/* ──────────────────────────────
   TOAST — floating notifications
   ────────────────────────────── */
.toast-container {
    position: fixed; top: var(--sp-4); right: var(--sp-4); z-index: 9999;
    display: flex; flex-direction: column; gap: var(--sp-2);
    max-width: 400px; width: calc(100% - 32px);
}
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500;
    box-shadow: var(--shadow-lg); animation: toastSlide 0.35s var(--ease-out);
    backdrop-filter: var(--blur-md);
    border: 1px solid;
}
.toast-success { background: rgba(255,255,255,0.92); color: var(--emerald); border-color: rgba(16,185,129,0.2); }
.toast-error   { background: rgba(255,255,255,0.92); color: var(--scarlet); border-color: rgba(239,68,68,0.2); }
.toast-warning { background: rgba(255,255,255,0.92); color: var(--gold); border-color: rgba(245,158,11,0.2); }
.toast-info    { background: rgba(255,255,255,0.92); color: var(--sky); border-color: rgba(59,130,246,0.2); }
@keyframes toastSlide {
    from { opacity: 0; transform: translateX(30px) scale(0.96); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ──────────────────────────────
   ACTION CARD — quick links
   ────────────────────────────── */
.action-card {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
    padding: var(--sp-4); background: rgba(255,255,255,0.65);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: all var(--duration) var(--ease-out); text-align: center;
}
.action-card:hover {
    border-color: var(--amethyst-200);
    box-shadow: var(--shadow-md); transform: translateY(-3px);
    background: rgba(255,255,255,0.85);
}
.action-icon {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.action-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }

/* ──────────────────────────────
   LIST ITEM
   ────────────────────────────── */
.list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--border);
    transition: background var(--duration-fast);
}
.list-item:hover { background: rgba(168, 85, 247, 0.02); }
.list-item:last-child { border-bottom: none; }
.list-avatar {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.6875rem; color: #fff; flex-shrink: 0;
}

/* ──────────────────────────────
   TX ICON (transaction)
   ────────────────────────────── */
.tx-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; font-size: 0.8125rem;
}
.tx-icon.income  { background: var(--emerald-50); color: var(--emerald); }
.tx-icon.expense { background: var(--scarlet-50); color: var(--scarlet); }

/* ──────────────────────────────
   STEPS (registration etc.)
   ────────────────────────────── */
.steps {
    display: flex; align-items: center; gap: var(--sp-2);
    justify-content: center; margin-bottom: var(--sp-8);
}
.step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6875rem; font-weight: 700;
    transition: all 0.35s var(--ease-spring);
}
.step-dot.done    { background: var(--emerald); color: #fff; }
.step-dot.current { background: var(--gradient-hero); color: #fff; box-shadow: var(--shadow-glow); }
.step-dot.pending { background: var(--n-100); color: var(--n-400); }
.step-line { width: 30px; height: 2px; background: var(--n-150); }
.step-line.done   { background: var(--emerald); }

/* ──────────────────────────────
   AUTH — login/register layout
   ────────────────────────────── */
.auth-bg {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--gradient-hero-soft); background-attachment: fixed;
    position: relative; overflow: hidden;
}
.auth-bg::before {
    content: ''; position: absolute; top: -30%; right: -25%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 440px; margin: var(--sp-4); }
.auth-header { text-align: center; margin-bottom: var(--sp-6); }
.auth-title { font-family: var(--font-display); font-size: 1.625rem; font-weight: 700; color: var(--amethyst-900); }
.auth-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-top: 4px; }
.auth-form {
    background: rgba(255,255,255,0.75);
    backdrop-filter: var(--blur-lg); -webkit-backdrop-filter: var(--blur-lg);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-xl); padding: var(--sp-8);
    box-shadow: var(--shadow-xl);
}
.auth-link {
    color: var(--text-muted); font-size: 0.875rem; text-align: center;
    display: block; margin-top: var(--sp-5); transition: color var(--duration);
}
.auth-link:hover { color: var(--primary); }
.logo-img-lg { height: 60px; width: auto; object-fit: contain; border-radius: var(--radius-md); }

/* ──────────────────────────────
   ALERT
   ────────────────────────────── */
.alert {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md);
    font-size: 0.8125rem; margin-bottom: var(--sp-4);
}
.alert-error   { background: var(--scarlet-50); color: var(--scarlet); border: 1px solid rgba(239,68,68,0.15); }
.alert-success { background: var(--emerald-50); color: #059669; border: 1px solid rgba(16,185,129,0.15); }
.alert-info    { background: var(--sky-50); color: var(--sky); border: 1px solid rgba(59,130,246,0.15); }

/* ──────────────────────────────
   SPINNER
   ────────────────────────────── */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--amethyst-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ppnSpin 0.65s linear infinite;
}
@keyframes ppnSpin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; padding: var(--sp-10) 0; }

/* ──────────────────────────────
   EMPTY STATE
   ────────────────────────────── */
.empty-state { text-align: center; padding: var(--sp-10) var(--sp-6); color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: var(--sp-3); opacity: 0.4; }
.empty-state .empty-text { font-size: 0.8125rem; }

/* ──────────────────────────────
   PROFILE HERO
   ────────────────────────────── */
.profile-hero {
    text-align: center; padding: var(--sp-8) var(--sp-6);
    background: var(--gradient-hero);
    border-radius: var(--radius-xl); color: #fff;
    margin-bottom: var(--sp-6); position: relative; overflow: hidden;
    box-shadow: var(--shadow-glow);
}
.profile-hero::after {
    content: ''; position: absolute; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
    top: -70px; right: -50px; border-radius: 50%;
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,0.15); border: 3px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.875rem; font-weight: 700;
    margin: 0 auto var(--sp-3);
    backdrop-filter: var(--blur-sm);
}
.profile-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.profile-username { font-size: 0.8125rem; color: rgba(255,255,255,0.6); }

/* ──────────────────────────────
   DETAIL ROW
   ────────────────────────────── */
.detail-row { display: flex; padding: 11px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 105px; flex-shrink: 0; color: var(--text-muted); font-size: 0.75rem; font-weight: 500; }
.detail-value { flex: 1; font-size: 0.875rem; font-weight: 500; }

/* Star badge variants */
.star-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 14px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600; }
.star-badge.s0 { background: var(--n-100); color: var(--n-500); }
.star-badge.s1 { background: #fef3c7; color: #b45309; }
.star-badge.s2 { background: #ffedd5; color: #c2410c; }
.star-badge.s3 { background: #fee2e2; color: #dc2626; }
.star-badge.s4 { background: #fae8ff; color: #a21caf; }
.star-badge.s5 { background: var(--amethyst-100); color: var(--amethyst-700); }

/* ──────────────────────────────
   PAGINATION
   ────────────────────────────── */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--sp-4); border-top: 1px solid var(--border);
}

/* ──────────────────────────────
   REFERRAL BAR
   ────────────────────────────── */
.referral-bar {
    background: rgba(250,245,255,0.6); backdrop-filter: var(--blur-sm);
    border: 1px solid var(--amethyst-200);
    border-radius: var(--radius-lg); padding: var(--sp-3) var(--sp-4);
    display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
}
.referral-bar input {
    flex: 1; min-width: 180px; background: rgba(255,255,255,0.8);
    border: 1px solid var(--n-150); border-radius: var(--radius-sm);
    padding: 8px 12px; font-size: 0.75rem; color: var(--primary);
}

/* ──────────────────────────────
   SIDEBAR COMPAT — hidden
   ────────────────────────────── */
.layout { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar, .sidebar-overlay { display: none; }
.main-content { flex: 1; }
.hamburger { display: none; }
.sidebar-logo-icon img { height: 36px; width: auto; border-radius: var(--radius-sm); }

/* Source: assets/css/pages/market.css */
/* ═══════════════════════════════════════════════════════════════
   PPN Markets — "Vibrant Bazaar" Design System
   สีสดใส ดึงดูด premium marketplace feel
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Market Brand Colors ── */
    --mk-primary: #FF6B35;
    --mk-primary-light: #FF8A5C;
    --mk-primary-dark: #E55A25;
    --mk-secondary: #004E98;
    --mk-secondary-light: #1A6FBF;
    --mk-accent: #FFC107;
    --mk-accent-light: #FFD54F;
    --mk-success: #00C853;
    --mk-danger: #FF1744;

    /* ── Gradients ── */
    --mk-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8A5C 50%, #FFC107 100%);
    --mk-gradient-cool: linear-gradient(135deg, #004E98 0%, #1A6FBF 50%, #00BCD4 100%);
    --mk-gradient-hero: linear-gradient(135deg, #FF6B35 0%, #E55A25 30%, #004E98 100%);
    --mk-gradient-card: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255,248,240,0.8) 100%);
    --mk-gradient-soft: linear-gradient(135deg, #FFF8F0 0%, #FFF3E8 50%, #FFFBF5 100%);

    /* ── Surface ── */
    --mk-bg: #FFFAF5;
    --mk-surface: #FFFFFF;
    --mk-surface-warm: #FFF8F0;
    --mk-border: rgba(255, 107, 53, 0.1);
    --mk-border-strong: rgba(255, 107, 53, 0.2);

    /* ── Shadow ── */
    --mk-shadow-sm: 0 2px 8px rgba(255, 107, 53, 0.08);
    --mk-shadow-md: 0 4px 20px rgba(255, 107, 53, 0.12);
    --mk-shadow-lg: 0 8px 32px rgba(255, 107, 53, 0.16);
    --mk-shadow-glow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

/* ═══ Market Layout ═══ */
.mk-page { background: var(--mk-bg); min-height: 100vh; }
.mk-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.mk-section { padding: 24px 0; }

/* ═══ Market Header / Hero ═══ */
.mk-hero {
    background: var(--mk-gradient-hero);
    padding: 32px 16px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mk-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,193,7,0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0,188,212,0.15) 0%, transparent 50%);
}
.mk-hero-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.mk-hero h1 {
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    font-size: 2rem; font-weight: 800;
    margin: 0 0 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mk-hero p { opacity: 0.9; font-size: 1rem; margin: 0 0 20px; }

/* ═══ Search Bar ═══ */
.mk-search-wrap {
    display: flex; gap: 8px; max-width: 560px; margin: 0 auto;
}
.mk-search-input {
    flex: 1; padding: 12px 16px; border: none; border-radius: 12px;
    font-size: 15px; background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    outline: none; font-family: 'Noto Sans Thai', sans-serif;
}
.mk-search-input:focus { box-shadow: 0 4px 20px rgba(255,107,53,0.25); }
.mk-search-btn {
    padding: 12px 24px; border: none; border-radius: 12px;
    background: var(--mk-accent); color: #333; font-weight: 600;
    cursor: pointer; font-size: 15px; white-space: nowrap;
    transition: all 0.2s;
}
.mk-search-btn:hover { background: var(--mk-accent-light); transform: translateY(-1px); }

/* ═══ Topbar for Market pages ═══ */
.mk-topbar {
    background: white; border-bottom: 1px solid var(--mk-border);
    padding: 12px 16px; display: flex; align-items: center;
    justify-content: space-between; position: sticky; top: 0; z-index: 100;
    box-shadow: var(--mk-shadow-sm);
}
.mk-topbar-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--mk-primary);
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.2rem;
}
.mk-topbar-brand img { width: 36px; height: 36px; border-radius: 8px; }
.mk-topbar-nav { display: flex; gap: 4px; align-items: center; }
.mk-topbar-nav a {
    padding: 8px 14px; border-radius: 8px; text-decoration: none;
    color: #555; font-size: 14px; font-weight: 500;
    transition: all 0.2s;
}
.mk-topbar-nav a:hover, .mk-topbar-nav a.active {
    background: var(--mk-primary); color: white;
}
.mk-topbar-right { display: flex; align-items: center; gap: 8px; }

/* ═══ Category Chips ═══ */
.mk-cats-section {
    position: relative;
    background: white;
    border-bottom: 1px solid var(--mk-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.mk-cats-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0 6px; font-size: 13px; color: #888;
}
.mk-cats-toggle {
    background: none; border: none; color: var(--mk-primary); cursor: pointer;
    font-size: 13px; font-weight: 500; padding: 4px 8px; border-radius: 6px;
    display: none; /* shown via JS when collapsed */
}
.mk-cats-toggle:hover { background: rgba(255,107,53,0.08); }

/* Desktop: wrap into rows */
.mk-cats {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 0 0 12px; position: relative;
    overflow: hidden;
    max-height: 88px; /* ~2 rows collapsed */
    transition: max-height 0.35s ease;
}
.mk-cats.expanded {
    max-height: 2000px; /* unlimited */
}
.mk-cat-chip {
    padding: 7px 14px; border-radius: 20px; white-space: nowrap;
    background: white; border: 1.5px solid #e8e8e8;
    cursor: pointer; font-size: 13px; font-weight: 500; color: #555;
    transition: all 0.2s; user-select: none;
    flex-shrink: 0;
}
.mk-cat-chip:hover {
    border-color: var(--mk-primary); color: var(--mk-primary);
    background: #FFF5F0;
}
.mk-cat-chip.active {
    background: var(--mk-primary); color: white; border-color: var(--mk-primary);
    box-shadow: 0 2px 8px rgba(255,107,53,0.25);
}

/* Mobile: horizontal scroll strip */
@media (max-width: 768px) {
    .mk-cats {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        max-height: none;
        padding: 0 0 12px;
        gap: 6px;
        /* Scroll padding so first/last chip aren't at edge */
        scroll-padding: 0 16px;
    }
    /* Hide scrollbar but keep functional */
    .mk-cats { scrollbar-width: none; -ms-overflow-style: none; }
    .mk-cats::-webkit-scrollbar { display: none; }

    .mk-cat-chip {
        padding: 6px 12px; font-size: 12px;
    }

    /* Fade edges to hint "there's more" */
    .mk-cats-scroll-wrap {
        position: relative;
    }
    .mk-cats-scroll-wrap::before,
    .mk-cats-scroll-wrap::after {
        content: '';
        position: absolute; top: 0; bottom: 0; width: 28px;
        z-index: 2; pointer-events: none;
        transition: opacity 0.2s;
    }
    .mk-cats-scroll-wrap::before {
        left: 0;
        background: linear-gradient(to right, white 0%, transparent 100%);
        opacity: 0; /* hidden when at start */
    }
    .mk-cats-scroll-wrap::after {
        right: 0;
        background: linear-gradient(to left, white 0%, transparent 100%);
    }
    .mk-cats-scroll-wrap.scrolled-start::before { opacity: 1; }
    .mk-cats-scroll-wrap.scrolled-end::after { opacity: 0; }

    /* Toggle not needed on mobile (horizontal scroll is natural) */
    .mk-cats-toggle { display: none !important; }
}

/* Desktop: show toggle when categories overflow 2 rows */
@media (min-width: 769px) {
    .mk-cats-toggle.visible { display: inline-block; }
    .mk-cats-scroll-wrap::before,
    .mk-cats-scroll-wrap::after { display: none; }
}

/* ═══ Product Grid ═══ */
.mk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; padding: 8px 0;
}
@media (max-width: 480px) {
    .mk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ═══ Product Card ═══ */
.mk-card {
    background: white; border-radius: 16px; overflow: hidden;
    box-shadow: var(--mk-shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer; text-decoration: none; color: inherit;
    display: block;
}
.mk-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mk-shadow-lg);
}
.mk-card-img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: #f5f5f5;
}
.mk-card-img-placeholder {
    width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #ffecd2, #fcb69f);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: rgba(255,255,255,0.7);
}
.mk-card-body { padding: 12px; }
.mk-card-name {
    font-size: 14px; font-weight: 600; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.4; min-height: 2.8em; margin: 0 0 6px;
}
.mk-card-shop {
    font-size: 12px; color: #888; margin: 0 0 6px;
    display: flex; align-items: center; gap: 4px;
}
.mk-card-price {
    display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.mk-card-price .price-now {
    font-size: 18px; font-weight: 700; color: var(--mk-primary);
}
.mk-card-price .price-was {
    font-size: 13px; color: #999; text-decoration: line-through;
}
.mk-card-price .discount-badge {
    font-size: 11px; padding: 2px 6px; border-radius: 4px;
    background: #FFF0E5; color: var(--mk-primary); font-weight: 600;
}
.mk-card-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px; font-size: 12px; color: #888;
}
.mk-card-rating { display: flex; align-items: center; gap: 2px; color: #FFC107; }
.mk-card-sold { color: #aaa; }

/* ═══ Shop Card ═══ */
.mk-shop-card {
    background: white; border-radius: 16px; padding: 20px;
    box-shadow: var(--mk-shadow-sm); display: flex; gap: 16px;
    align-items: center; transition: all 0.2s; cursor: pointer;
    text-decoration: none; color: inherit;
}
.mk-shop-card:hover { box-shadow: var(--mk-shadow-md); }
.mk-shop-logo {
    width: 64px; height: 64px; border-radius: 14px; object-fit: cover;
    background: var(--mk-gradient); flex-shrink: 0;
}
.mk-shop-logo-placeholder {
    width: 64px; height: 64px; border-radius: 14px;
    background: var(--mk-gradient); display: flex; align-items: center;
    justify-content: center; font-size: 1.6rem; color: white; flex-shrink: 0;
}
.mk-shop-info { flex: 1; min-width: 0; }
.mk-shop-name { font-weight: 700; font-size: 16px; color: #333; margin: 0 0 4px; }
.mk-shop-desc {
    font-size: 13px; color: #777; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-shop-stats { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: #999; }

/* ═══ Buttons ═══ */
.mk-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 20px; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; text-decoration: none;
    font-family: 'Noto Sans Thai', 'Outfit', sans-serif;
}
.mk-btn-primary { background: var(--mk-primary); color: white; }
.mk-btn-primary:hover { background: var(--mk-primary-dark); transform: translateY(-1px); box-shadow: var(--mk-shadow-glow); }
.mk-btn-secondary { background: var(--mk-secondary); color: white; }
.mk-btn-secondary:hover { background: var(--mk-secondary-light); }
.mk-btn-outline { background: transparent; border: 2px solid var(--mk-primary); color: var(--mk-primary); }
.mk-btn-outline:hover { background: var(--mk-primary); color: white; }
.mk-btn-ghost { background: rgba(255,107,53,0.08); color: var(--mk-primary); }
.mk-btn-ghost:hover { background: rgba(255,107,53,0.15); }
.mk-btn-success { background: var(--mk-success); color: white; }
.mk-btn-danger { background: var(--mk-danger); color: white; }
.mk-btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.mk-btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.mk-btn-block { display: flex; width: 100%; }
.mk-btn:disabled { opacity: 0.5; pointer-events: none; }

/* ═══ Forms ═══ */
.mk-form-group { margin-bottom: 16px; }
.mk-label {
    display: block; font-size: 13px; font-weight: 600;
    color: #555; margin-bottom: 6px;
}
.mk-input, .mk-textarea, .mk-select {
    width: 100%; padding: 10px 14px; border: 1.5px solid #e0e0e0;
    border-radius: 10px; font-size: 14px; background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Noto Sans Thai', sans-serif; box-sizing: border-box;
}
.mk-input:focus, .mk-textarea:focus, .mk-select:focus {
    border-color: var(--mk-primary); outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.mk-textarea { min-height: 80px; resize: vertical; }

/* ═══ Image Upload ═══ */
.mk-upload-zone {
    border: 2px dashed #ddd; border-radius: 14px; padding: 24px;
    text-align: center; cursor: pointer; transition: all 0.2s;
    background: #fafafa;
}
.mk-upload-zone:hover { border-color: var(--mk-primary); background: #FFF8F0; }
.mk-upload-zone.dragover { border-color: var(--mk-primary); background: rgba(255,107,53,0.05); }
.mk-upload-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mk-upload-thumb {
    width: 80px; height: 80px; border-radius: 8px; object-fit: cover;
    position: relative;
}
.mk-upload-thumb-wrap {
    position: relative; display: inline-block;
}
.mk-upload-thumb-del {
    position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
    border-radius: 50%; background: var(--mk-danger); color: white; border: none;
    font-size: 12px; cursor: pointer; display: flex; align-items: center;
    justify-content: center; line-height: 1;
}

/* ═══ Detail Page ═══ */
.mk-detail-wrap {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
    max-width: 1000px; margin: 0 auto; padding: 24px 16px;
}
@media (max-width: 768px) {
    .mk-detail-wrap { grid-template-columns: 1fr; gap: 16px; }
}
.mk-detail-gallery {
    display: flex; flex-direction: column; gap: 8px;
}
.mk-detail-main-img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 16px; background: #f5f5f5;
}
.mk-detail-thumbs { display: flex; gap: 6px; overflow-x: auto; }
.mk-detail-thumb {
    width: 64px; height: 64px; border-radius: 8px; object-fit: cover;
    cursor: pointer; opacity: 0.6; transition: opacity 0.2s;
    border: 2px solid transparent;
}
.mk-detail-thumb:hover, .mk-detail-thumb.active { opacity: 1; border-color: var(--mk-primary); }

.mk-detail-info h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 12px; color: #222; }
.mk-detail-price {
    font-size: 2rem; font-weight: 800; color: var(--mk-primary); margin: 0 0 4px;
}
.mk-detail-price-was { font-size: 1rem; color: #999; text-decoration: line-through; }
.mk-detail-desc { color: #555; line-height: 1.7; margin: 16px 0; white-space: pre-wrap; }
.mk-qty-wrap {
    display: flex; align-items: center; gap: 12px; margin: 16px 0;
}
.mk-qty-btn {
    width: 36px; height: 36px; border: 1.5px solid #ddd; border-radius: 8px;
    background: white; font-size: 18px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: all 0.15s;
}
.mk-qty-btn:hover { border-color: var(--mk-primary); color: var(--mk-primary); }
.mk-qty-val { font-size: 18px; font-weight: 600; min-width: 40px; text-align: center; }

/* ═══ Reviews ═══ */
.mk-review {
    padding: 16px 0; border-bottom: 1px solid #f0f0f0;
}
.mk-review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mk-review-user { font-weight: 600; font-size: 14px; }
.mk-review-date { font-size: 12px; color: #999; }
.mk-review-stars { color: #FFC107; font-size: 14px; margin-bottom: 4px; }
.mk-review-text { font-size: 14px; color: #555; line-height: 1.5; }

/* ═══ Receipt ═══ */
.mk-receipt {
    max-width: 700px; margin: 24px auto; background: white;
    border-radius: 16px; padding: 32px; box-shadow: var(--mk-shadow-md);
}
.mk-receipt-header { text-align: center; margin-bottom: 24px; border-bottom: 2px solid #eee; padding-bottom: 16px; }
.mk-receipt-header h2 { font-size: 1.3rem; color: #333; margin: 0 0 4px; }
.mk-receipt-no { font-size: 14px; color: #888; }
.mk-receipt table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.mk-receipt th { text-align: left; padding: 8px 0; border-bottom: 1px solid #ddd; font-size: 13px; color: #888; }
.mk-receipt td { padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.mk-receipt .receipt-total td { font-weight: 700; font-size: 16px; border-top: 2px solid #333; }

/* ═══ Empty State ═══ */
.mk-empty {
    text-align: center; padding: 60px 20px; color: #999;
}
.mk-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.mk-empty-text { font-size: 15px; }

/* ═══ Badge / Tag ═══ */
.mk-badge {
    display: inline-flex; padding: 3px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
}
.mk-badge-success { background: #e8f5e9; color: #2e7d32; }
.mk-badge-warning { background: #fff3e0; color: #e65100; }
.mk-badge-danger { background: #ffebee; color: #c62828; }
.mk-badge-info { background: #e3f2fd; color: #1565c0; }
.mk-badge-neutral { background: #f5f5f5; color: #666; }

/* ═══ Tabs ═══ */
.mk-tabs { display: flex; gap: 0; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.mk-tab {
    padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: 500;
    color: #888; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.2s;
}
.mk-tab:hover { color: var(--mk-primary); }
.mk-tab.active { color: var(--mk-primary); border-bottom-color: var(--mk-primary); font-weight: 600; }

/* ═══ ★ v2.92 แท็บแบบเลื่อนแนวนอน — กันข้อความตัดคำบนมือถือ ═══
   เดิม .mk-tabs เป็น flex ธรรมดา พอมี 5 แท็บบนจอ 360px จะบีบจนคำแตกบรรทัด
   ("ร้าน / ค้า", "ออ / เด / อร์") — แก้เป็นเลื่อนแนวนอนแทนการบีบ */
.mk-tabs-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    /* เงาจางขอบขวา บอกใบ้ว่ายังเลื่อนได้ */
    background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 24px 100% no-repeat,
        linear-gradient(to left,  #fff 30%, rgba(255,255,255,0)) right / 24px 100% no-repeat;
    background-attachment: local, local;
}
.mk-tabs-scroll::-webkit-scrollbar { display: none; }
.mk-tabs-scroll .mk-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mk-tabs-scroll .mk-tab .ic { font-size: 15px; line-height: 1; }

/* ═══ ★ v2.92 การ์ดชวนเปิดร้าน — ย่อ/ขยายได้ ไม่กินพื้นที่ทั้งจอ ═══ */
.mk-ref-card {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 50%, #FFA87A 100%);
    border-radius: 16px; color: #fff; overflow: hidden;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
}
.mk-ref-toggle {
    width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; background: none; border: none; color: inherit;
    text-align: left; cursor: pointer; font: inherit;
}
.mk-ref-icon { font-size: 1.6rem; flex: 0 0 auto; line-height: 1; }
.mk-ref-titles { flex: 1; min-width: 0; }
.mk-ref-title { display: block; font-weight: 700; font-size: 15px; line-height: 1.35; }
.mk-ref-sub {
    display: block; font-size: 12px; opacity: .85; margin-top: 2px; line-height: 1.45;
}
.mk-ref-caret {
    flex: 0 0 auto; font-size: 18px; opacity: .9; transition: transform .25s;
}
.mk-ref-card.collapsed .mk-ref-caret { transform: rotate(-90deg); }
.mk-ref-card.collapsed .mk-ref-body { display: none; }

.mk-ref-body { padding: 0 18px 16px; }
.mk-ref-copy { display: flex; gap: 8px; margin-bottom: 10px; }
.mk-ref-copy input {
    flex: 1 1 auto; min-width: 0;            /* ★ กันปุ่มดันล้นขอบจอ */
    padding: 11px 14px; border-radius: 10px; border: none; font-size: 13px;
    background: rgba(255, 255, 255, .95); color: #333; outline: none;
    text-overflow: ellipsis;
}
.mk-ref-copy button {
    flex: 0 0 auto; padding: 11px 16px; border-radius: 10px; border: none;
    background: #fff; color: #FF6B35; font-weight: 700; font-size: 13px;
    cursor: pointer; white-space: nowrap;
}
.mk-ref-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-ref-share > * {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 8px; border-radius: 10px; font-size: 13px; font-weight: 500;
    background: rgba(255, 255, 255, .18); color: #fff; text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .3); cursor: pointer;
    transition: background .2s; min-width: 0;
}
.mk-ref-share > *:hover { background: rgba(255, 255, 255, .32); }
.mk-ref-share svg { width: 16px; height: 16px; flex: 0 0 auto; }
.mk-ref-share span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
    .mk-tabs-scroll { margin-bottom: 16px; }
    .mk-tabs-scroll .mk-tab { padding: 10px 14px; font-size: 13.5px; }
}
@media (max-width: 480px) {
    .mk-tabs-scroll .mk-tab { padding: 9px 12px; font-size: 13px; gap: 5px; }
    .mk-tabs-scroll .mk-tab .ic { font-size: 14px; }

    .mk-ref-toggle { padding: 13px 14px; gap: 10px; }
    .mk-ref-icon { font-size: 1.35rem; }
    .mk-ref-title { font-size: 14px; }
    .mk-ref-sub { font-size: 11.5px; }
    .mk-ref-body { padding: 0 14px 14px; }
    .mk-ref-copy input { padding: 10px 12px; font-size: 12.5px; }
    .mk-ref-copy button { padding: 10px 13px; font-size: 12.5px; }
    .mk-ref-share { gap: 6px; }
    .mk-ref-share > * { padding: 9px 4px; font-size: 12px; gap: 4px; }
    .mk-ref-share svg { width: 14px; height: 14px; }
}

/* ═══ Modal ═══ */
.mk-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 1000; display: none; align-items: center; justify-content: center;
    padding: 16px;
}
.mk-modal-overlay.active { display: flex; }
.mk-modal {
    background: white; border-radius: 20px; max-width: 560px; width: 100%;
    max-height: 90vh; overflow-y: auto; padding: 24px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.mk-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mk-modal-header h3 { margin: 0; font-size: 1.2rem; }
.mk-modal-close {
    width: 32px; height: 32px; border: none; background: #f5f5f5;
    border-radius: 8px; cursor: pointer; font-size: 18px; display: flex;
    align-items: center; justify-content: center;
}

/* ═══ Stats Cards ═══ */
.mk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mk-stat-card {
    background: white; border-radius: 14px; padding: 16px;
    box-shadow: var(--mk-shadow-sm);
}
.mk-stat-label { font-size: 12px; color: #888; margin: 0 0 4px; }
.mk-stat-value { font-size: 1.5rem; font-weight: 700; color: #333; }
.mk-stat-value.orange { color: var(--mk-primary); }

/* ═══ Order Status ═══ */
.mk-order-card {
    background: white; border-radius: 14px; padding: 16px;
    box-shadow: var(--mk-shadow-sm); margin-bottom: 12px;
}
.mk-order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mk-order-no { font-weight: 700; color: #333; }
.mk-order-items { font-size: 13px; color: #666; }
.mk-order-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.mk-order-total { font-weight: 700; color: var(--mk-primary); }

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
    .mk-hero h1 { font-size: 1.5rem; }
    .mk-hero { padding: 24px 16px; }
    .mk-hero p { font-size: 0.9rem; }
    .mk-topbar-nav a { padding: 6px 10px; font-size: 13px; }
    .mk-detail-price { font-size: 1.6rem; }
    .mk-container { padding: 0 12px; }
    .mk-search-wrap { flex-direction: row; }
    .mk-search-input { font-size: 14px; padding: 10px 14px; }
    .mk-search-btn { padding: 10px 18px; font-size: 14px; }
}
@media (max-width: 480px) {
    .mk-topbar { padding: 8px 10px; gap: 4px; }
    .mk-topbar-brand { font-size: 0.95rem; gap: 6px; }
    .mk-topbar-brand img { width: 30px; height: 30px; }
    .mk-topbar-brand span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mk-topbar-nav { gap: 2px; }
    .mk-topbar-nav a { padding: 5px 8px; font-size: 12px; }
    .mk-topbar-nav a span.nav-text { display: none; }
    .mk-topbar-right .mk-btn { padding: 5px 8px; font-size: 11px; }
    .mk-hero h1 { font-size: 1.25rem; }
    .mk-hero p { font-size: 0.82rem; margin-bottom: 14px; }
    .mk-hero { padding: 20px 12px; }
    .mk-search-input { padding: 10px 12px; font-size: 13px; }
    .mk-search-btn { padding: 10px 14px; font-size: 13px; }
    .mk-detail-wrap { padding: 16px 12px; }
}

/* ═══ Loading Skeleton ═══ */
.mk-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%; animation: mk-shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes mk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ═══ Animate ═══ */
.mk-fade-in { animation: mkFadeIn 0.4s ease-out; }
@keyframes mkFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ═══ Footer ═══ */
.mk-footer {
    background: white; border-top: 1px solid #eee;
    margin-top: 40px; padding: 32px 16px 20px;
}
.mk-footer-inner { max-width: 1200px; margin: 0 auto; }
.mk-footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.mk-footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; margin-bottom: 24px; }
.mk-footer-col { display: flex; flex-direction: column; gap: 6px; }
.mk-footer-title { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 4px; }
.mk-footer-col a { font-size: 13px; color: #888; text-decoration: none; transition: color 0.2s; }
.mk-footer-col a:hover { color: var(--mk-primary); }
.mk-footer-bottom { border-top: 1px solid #f0f0f0; padding-top: 16px; font-size: 11px; color: #bbb; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   ★ v2.52 (restored v2.74): Featured Sections — Bestsellers + New Arrivals
   ═══════════════════════════════════════════════════════════════ */

.mk-feat-section {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 16px;
}
.mk-feat-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.mk-feat-title {
    font-size: 18px; font-weight: 700; color: #333;
    display: flex; align-items: center; gap: 8px;
    margin: 0;
}
.mk-feat-title .mk-feat-icon { font-size: 22px; }
.mk-feat-link {
    font-size: 13px; color: var(--mk-primary); text-decoration: none;
    font-weight: 600;
}
.mk-feat-link:hover { text-decoration: underline; }

/* ── Bestsellers carousel (horizontal scroll) ── */
.mk-bs-scroll {
    display: flex; gap: 14px;
    overflow-x: auto; overflow-y: visible;
    padding: 6px 4px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.mk-bs-scroll::-webkit-scrollbar { height: 6px; }
.mk-bs-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,107,53,0.3); border-radius: 3px;
}
.mk-bs-scroll::-webkit-scrollbar-track { background: transparent; }

.mk-bs-card {
    flex: 0 0 180px; scroll-snap-align: start;
    background: white; border-radius: 14px;
    box-shadow: var(--mk-shadow-sm);
    cursor: pointer; text-decoration: none; color: inherit;
    position: relative;
    transition: all .25s cubic-bezier(.16,1,.3,1);
    overflow: hidden;
}
.mk-bs-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mk-shadow-lg);
}
.mk-bs-card-img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: #f5f5f5;
}
.mk-bs-rank {
    position: absolute; top: 8px; left: 8px;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1;
}
.mk-bs-rank-1 { background: linear-gradient(135deg,#FFD700,#FFA500); color: #fff; }
.mk-bs-rank-2 { background: linear-gradient(135deg,#C0C0C0,#A8A8A8); color: #fff; }
.mk-bs-rank-3 { background: linear-gradient(135deg,#CD7F32,#A0522D); color: #fff; }
.mk-bs-rank-other { background: rgba(255,255,255,0.95); color: #FF6B35; font-size: 12px; }

.mk-bs-card-body { padding: 10px 12px 12px; }
.mk-bs-card-name {
    font-size: 13px; font-weight: 600; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.35; min-height: 2.7em; margin: 0 0 6px;
}
.mk-bs-card-price {
    font-size: 16px; font-weight: 800; color: var(--mk-primary);
    margin-bottom: 4px;
    display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
/* ★ v2.93 ราคาเดิมขีดฆ่า + ดาวรีวิว + ป้ายส่วนลด (ให้เหมือนการ์ด "สินค้าทั้งหมด") */
.mk-bs-card-price .now { line-height: 1.2; }
.mk-bs-card-price .was {
    font-size: 12px; font-weight: 500; color: #aaa;
    text-decoration: line-through;
}
.mk-bs-card-rate {
    display: flex; align-items: center; gap: 4px;
    font-size: 11.5px; margin-bottom: 6px; line-height: 1.2;
}
.mk-bs-card-rate .stars { color: #FFC107; letter-spacing: .5px; }
.mk-bs-card-rate .cnt { color: #999; }
.mk-bs-off {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: #ef4444; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 7px; border-radius: 8px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, .35);
}
.mk-bs-card-sold {
    font-size: 11px; color: #fff;
    background: linear-gradient(90deg,#FF6B35,#FF8C5A);
    padding: 3px 8px; border-radius: 10px;
    display: inline-flex; align-items: center; gap: 3px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .mk-bs-card { flex-basis: 150px; }
    .mk-bs-card-name { font-size: 12px; }
    .mk-bs-card-price { font-size: 14px; gap: 5px; }
    .mk-bs-card-price .was { font-size: 11px; }
    .mk-bs-card-rate { font-size: 11px; }
    .mk-bs-off { font-size: 10px; padding: 2px 6px; top: 6px; right: 6px; }
    .mk-feat-title { font-size: 16px; }
    .mk-feat-title .mk-feat-icon { font-size: 18px; }
}

/* ── New Arrivals row (responsive grid) ── */
.mk-new-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 768px) {
    .mk-new-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .mk-new-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
.mk-new-card {
    background: white; border-radius: 12px;
    box-shadow: var(--mk-shadow-sm);
    cursor: pointer; text-decoration: none; color: inherit;
    overflow: hidden; position: relative;
    transition: all .2s ease;
}
.mk-new-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mk-shadow-md);
}
.mk-new-card-img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: #f5f5f5;
}
.mk-new-badge {
    position: absolute; top: 8px; right: 8px;
    font-size: 10px; font-weight: 700;
    background: linear-gradient(90deg,#10b981,#059669);
    color: white; padding: 3px 8px; border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.mk-new-card-body { padding: 8px 10px 10px; }
.mk-new-card-name {
    font-size: 12px; font-weight: 600; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.3; min-height: 2.6em; margin: 0 0 4px;
}
.mk-new-card-price {
    font-size: 14px; font-weight: 700; color: var(--mk-primary);
    display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap;
}
.mk-new-card-price .was {
    font-size: 11.5px; font-weight: 500; color: #aaa; text-decoration: line-through;
}
/* การ์ด "มาใหม่" มีป้าย "ใหม่" อยู่มุมขวาบนแล้ว → ย้ายป้ายส่วนลดไปมุมซ้าย กันทับกัน */
.mk-new-card .mk-bs-off { left: 8px; right: auto; }


/* ═══ ★ v2.92 กริดในฟอร์ม — ยุบเป็นคอลัมน์เดียวบนมือถือ ═══
   เดิม 3 ช่องราคาเรียงกันบนจอ 360px จะแคบจนพิมพ์ตัวเลขไม่เห็น */
.mk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 560px) {
    .mk-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .mk-grid-2 { grid-template-columns: 1fr; }
}

/* ═══ ★ v2.92 กันล้นขอบจอทั้งหน้า ═══ */
@media (max-width: 768px) {
    .mk-modal { max-width: 100% !important; }
    .mk-stats { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
    /* ตารางยาวๆ ให้เลื่อนในกรอบ แทนที่จะดันหน้าเว็บกว้างเกินจอ */
    .tab-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 420px) {
    .mk-stats { grid-template-columns: 1fr 1fr; }
}

/* Source: assets/css/pages/market-next.css */
/* PPN Market Next Generation | Scope strictly to the public Market UI. */
.mk-page.mk-next,
.mk-page.mk-next-secondary {
  --mk-primary: #087c86;
  --mk-primary-light: #119aa3;
  --mk-primary-dark: #076975;
  --mk-secondary: #153a54;
  --mk-secondary-light: #285a79;
  --mk-accent: #ffbd67;
  --mk-bg: #f6f8fb;
  --mk-border: #e6edf2;
  --mk-shadow-sm: 0 2px 10px rgba(17,44,67,.035);
  --mk-shadow-md: 0 12px 34px rgba(17,44,67,.065);
  --mk-shadow-lg: 0 20px 50px rgba(17,44,67,.10);
  background: var(--mk-bg);
  color: #1b3041;
  font-family: 'Noto Sans Thai', Tahoma, Arial, sans-serif;
}
.mk-page.mk-next *, .mk-page.mk-next-secondary * { box-sizing: border-box; }
.mk-page.mk-next a, .mk-page.mk-next-secondary a { -webkit-tap-highlight-color: transparent; }
.mk-page.mk-next :focus-visible, .mk-page.mk-next-secondary :focus-visible { outline: 3px solid #fdac52; outline-offset: 3px; }
.mk-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mk-skip-link { position: fixed; left: 15px; top: -120px; z-index: 999; background: white; color: #12344b; padding: 12px 16px; border-radius: 12px; }
.mk-skip-link:focus { top: 12px; }
.mk-page.mk-next .mk-container, .mk-page.mk-next-secondary .mk-container { max-width: 1200px; padding-inline: 24px; }
.mk-next-header { height: 76px; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-bottom: 1px solid #e6eef3; padding: 10px max(22px,calc((100vw - 1232px)/2)); gap: 12px; }
.mk-next-header .mk-topbar-brand { font-family: 'Outfit','Noto Sans Thai', sans-serif; color: #10324b; font-size: 18px; gap: 10px; flex-shrink: 0; }
.mk-next-header .mk-topbar-brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 13px; }
.mk-next-header .mk-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.mk-next-header .mk-wordmark strong { letter-spacing: -.4px; white-space: nowrap; }
.mk-next-header .mk-wordmark strong span { color: #087c86; }
.mk-next-header .mk-wordmark small { font-size: 9px; font-weight: 700; letter-spacing: 2px; color: #8a9ca8; margin-top: 5px; }
.mk-next-header .mk-topbar-nav { margin: auto; gap: 3px; }
.mk-next-header .mk-topbar-nav a { font-size: 13px; font-weight: 600; color: #476275; padding: 10px 12px; border-radius: 10px; white-space: nowrap; }
.mk-next-header .mk-topbar-nav a:is(:hover,.active,[aria-current="page"]) { background: #e9f5f5; color: #087c86; }
.mk-next-header #topRight a { border-radius: 10px; text-decoration: none; white-space: nowrap; }
.mk-signin-link { padding: 10px 16px; background: #0d364c; color: #fff!important; font-size: 13px; font-weight: 700; }
.mk-page.mk-next .mk-btn-primary, .mk-page.mk-next-secondary .mk-btn-primary { background: #087c86; color: #fff; }
.mk-page.mk-next .mk-btn-primary:hover, .mk-page.mk-next-secondary .mk-btn-primary:hover { background: #076975; }
/* Hero */
.mk-next-hero { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(circle at 77% 23%,#1f6072 0,#102f48 40%,#102b40 76%); color: #fff; }
.mk-next-hero::before { content: ''; position: absolute; width: 560px; height: 560px; right: -110px; top: -290px; border-radius: 100%; border: 90px solid rgba(110,214,203,.06); }
.mk-next-hero-inner { max-width: 1200px; min-height: 490px; margin: auto; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 14px; align-items: center; padding: 48px 24px 56px; }
.mk-next-hero-copy { max-width: 670px; position: relative; z-index: 1; }
.mk-next-eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13); border-radius: 99px; letter-spacing: 1.6px; font: 700 10px 'Outfit','Noto Sans Thai',sans-serif; color: #bbf0e8; }
.mk-next-spark { height: 7px; width: 7px; background: #f7b05a; border-radius: 100%; box-shadow: 0 0 0 4px rgba(247,176,90,.15); }
.mk-next-hero h1 { font-size: clamp(28px,4vw,53px); line-height: 1.30; letter-spacing: -.7px; max-width: 710px; margin: 24px 0 14px; font-weight: 800; color: #fff; }
.mk-next-lead { max-width: 600px; font-size: 15px; color: #d0e5eb; line-height: 1.9; margin-bottom: 25px; }
.mk-next-search { display: flex; align-items: center; gap: 11px; height: 60px; width: 100%; max-width: 590px; border-radius: 16px; padding: 6px 6px 6px 17px; background: #fff; box-shadow: 0 16px 45px rgba(0,0,0,.15); }
.mk-next-search svg { width: 22px; height: 22px; flex-shrink: 0; color: #8fa2b0; }
.mk-next-search input { min-width: 0; width: 100%; flex: 1; border: 0; padding: 0; background: transparent; color: #18344a; font: 500 14px 'Noto Sans Thai',Tahoma,sans-serif; outline: 0; }
.mk-next-search input::placeholder { color: #8598a7; }
.mk-next-search button { align-self: stretch; padding: 0 28px; border: 0; background: #0d8993; color: #fff; border-radius: 12px; font: 700 14px 'Noto Sans Thai',Tahoma,sans-serif; cursor: pointer; }
.mk-next-search button:hover { background: #086b75; }
.mk-next-hero-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 22px 0 24px; }
.mk-next-hero-link, .mk-next-open-link { color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.mk-next-hero-link { padding-bottom: 4px; border-bottom: 1px solid #5cbebd; }
.mk-next-open-link { color: #bfe0e4; }
.mk-next-trust { display: flex; flex-wrap: wrap; column-gap: 18px; row-gap: 8px; font-size: 11px; color: #b4d3da; }
.mk-next-trust span::before { content: '✓'; color: #7ee0c3; margin-right: 7px; font-weight: 800; }
.mk-next-hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.mk-next-hero-art img { display: block; width: 100%; max-height: 390px; object-fit: contain; z-index: 1; filter: drop-shadow(0 28px 40px rgba(0,0,0,.18)); }
.mk-next-art-glow { background: radial-gradient(closest-side,rgba(51,190,179,.30),transparent); position: absolute; inset: -25%; }
.mk-next-art-label { position: absolute; bottom: -12px; z-index: 2; color: #d2f4eb; border: 1px solid rgba(255,255,255,.20); background: rgba(255,255,255,.09); border-radius: 99px; padding: 10px 22px; font: 700 10px 'Outfit',sans-serif; letter-spacing: 2px; }
/* Type cards */
.mk-next-type-section { position: relative; margin-top: -23px!important; z-index: 3; }
.mk-next-type-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.mk-next-type-card { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; color: #17354a; background: #fff; border: 1px solid #e6edf2; box-shadow: 0 12px 40px rgba(12,44,65,.075); border-radius: 20px; padding: 19px 20px; transition: transform .18s,box-shadow .18s; }
.mk-next-type-card:hover { transform: translateY(-3px); box-shadow: 0 20px 38px rgba(12,44,65,.12); }
.mk-next-type-card[aria-current=page] { border-color: #75c9c8; box-shadow: 0 8px 27px rgba(8,124,134,.11); }
.mk-next-type-icon { flex-shrink: 0; width: 56px; height: 56px; border-radius: 17px; display: flex; justify-content: center; align-items: center; }
.mk-next-type-icon svg { width: 29px; height: 29px; }
.mk-next-icon-product { background: #eaf2ff; color: #3471bd; }
.mk-next-icon-food { background: #fff2e7; color: #d98738; }
.mk-next-icon-service { background: #e4f8f5; color: #0d9288; }
.mk-next-type-card strong { display: block; font-size: 15px; margin-bottom: 5px; }
.mk-next-type-card small { color: #6b8293; font-size: 11px; line-height: 1.5; }
.mk-next-type-arrow { margin-left: auto; color: #8eabba; font-size: 20px; }
/* Seller banner */
.mk-next-discovery { padding-top: 30px!important; }
.mk-next-discovery-banner { border: 1px solid #dcebed; background: linear-gradient(108deg,#e7f4f5,#f0f9f7 60%,#e1edf5); border-radius: 22px; padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mk-next-label,.mk-next-section-kicker { display: block; letter-spacing: 2px; font: 700 10px 'Outfit','Noto Sans Thai',sans-serif; color: #12878c; }
.mk-next-discovery h2 { font-size: 20px; color: #173a4e; margin: 6px 0; }
.mk-next-discovery p { font-size: 12px; color: #587284; margin: 0; }
.mk-next-discovery-cta { flex-shrink: 0; display: inline-flex; gap: 13px; background: #103d54; color: #fff; padding: 12px 20px; border-radius: 12px; text-decoration: none; font-size: 12px; font-weight: 700; }
/* Category chips and listing */
.mk-page.mk-next .mk-feat-section { max-width: 1200px; margin: 22px auto; padding: 20px 24px; }
.mk-page.mk-next .mk-feat-title { color: #173a4e; font-size: 21px; }
.mk-page.mk-next .mk-cats-section { margin-top: 25px; border-block: 1px solid #edf0f5; background: rgba(255,255,255,.85); }
.mk-page.mk-next .mk-cats-header strong { font-size: 13px; color: #344e61; }
.mk-page.mk-next .mk-cat-chip { background: #f3f7f9; color: #557082; border: 1px solid #dfebef; }
.mk-page.mk-next .mk-cat-chip.active, .mk-page.mk-next .mk-cat-chip:hover { background: #e6f5f2; color: #077c86; border-color: #afe0d9; }
.mk-next-results { padding-top: 48px!important; padding-bottom: 48px!important; }
.mk-next-results-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.mk-next-results-head h2 { font-size: clamp(21px,2.6vw,28px); line-height: 1.4; margin: 7px 0 4px; color: #14344a; }
.mk-next-count, .mk-search-result { margin: 0; color: #688294; font-size: 13px; }
.mk-next-sort { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.mk-next-sort label { color: #698192; font-size: 12px; }
.mk-next-sort select { width: auto; background: #fff; border: 1px solid #dce5ea; border-radius: 11px; font-size: 12px; }
.mk-next-filter-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mk-next-filter-links a { text-decoration: none; color: #506a7b; padding: 8px 16px; border-radius: 99px; background: #fff; border: 1px solid #e0e8ed; font-size: 12px; font-weight: 700; }
.mk-next-filter-links a[aria-current=page], .mk-next-filter-links a:hover { background: #103d54; border-color: #103d54; color: #fff; }
.mk-page.mk-next .mk-grid, .mk-page.mk-next-secondary .mk-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.mk-page.mk-next .mk-card, .mk-page.mk-next-secondary .mk-card { display: block; border: 1px solid #e5edf2; background: #fff; border-radius: 17px; overflow: hidden; box-shadow: 0 5px 18px rgba(21,54,75,.035); text-decoration: none; transition: transform .18s,box-shadow .18s; min-width: 0; }
.mk-page.mk-next .mk-card:hover, .mk-page.mk-next-secondary .mk-card:hover { transform: translateY(-4px); box-shadow: 0 17px 32px rgba(21,54,75,.12); }
.mk-next-card-media { position: relative; background: #e8f1f2; aspect-ratio: 1.12; overflow: hidden; }
.mk-next-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mk-next-placeholder { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; min-height: 190px; background: linear-gradient(135deg,#d4e8e8,#e9eff4); color: #6fa5ae; font: 700 28px 'Outfit',sans-serif; }
.mk-next-type { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.94); color: #267282; border-radius: 8px; padding: 5px 9px; font-size: 10px; font-weight: 700; }
.mk-page.mk-next .mk-card-body, .mk-page.mk-next-secondary .mk-card-body { padding: 15px 15px 18px; }
.mk-page.mk-next .mk-card-name, .mk-page.mk-next-secondary .mk-card-name { margin: 0 0 8px; font-size: 14px; line-height: 1.65; font-weight: 700; color: #203f53; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-page.mk-next .mk-card-shop, .mk-page.mk-next-secondary .mk-card-shop { font-size: 11px; color: #6b8293; }
.mk-page.mk-next .price-now, .mk-page.mk-next-secondary .price-now { font: 800 18px 'Outfit','Noto Sans Thai',sans-serif; color: #087c86; }
.mk-page.mk-next .mk-card-price, .mk-page.mk-next-secondary .mk-card-price { margin-top: 10px; }
.mk-next-load-more { text-align: center; padding: 25px 0; }
/* Explanations + FAQ */
.mk-next-explain { padding-block: 54px 70px!important; }
.mk-next-explain-head { max-width: 720px; margin-bottom: 27px; }
.mk-next-explain-head h2 { color: #16374b; font-size: clamp(22px,2.8vw,30px); line-height: 1.5; margin: 9px 0; }
.mk-next-explain-head p { color: #687f8e; font-size: 14px; line-height: 1.9; }
.mk-next-how-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.mk-next-how-grid article { background: #fff; border: 1px solid #e6edf1; border-radius: 20px; padding: 26px; }
.mk-next-how-grid article>span { color: #0e8991; font: 700 14px 'Outfit',sans-serif; letter-spacing: 1px; }
.mk-next-how-grid h3 { font-size: 16px; margin: 14px 0 9px; color: #183a4e; }
.mk-next-how-grid p { font-size: 12px; line-height: 1.9; color: #688294; margin: 0; }
.mk-next-faq { padding-block: 20px 75px!important; max-width: 980px!important; }
.mk-next-faq-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 19px; }
.mk-next-faq-heading h2 { font-size: 24px; color: #193c51; margin: 0; }
.mk-next-faq-heading a { font-size: 12px; color: #13808c; text-decoration: none; }
.mk-next-faq details { border-radius: 13px; background: #fff; border: 1px solid #e5edf2; margin-bottom: 9px; padding: 16px 19px; }
.mk-next-faq summary { cursor: pointer; font-size: 14px; color: #2c495d; font-weight: 700; }
.mk-next-faq details p { color: #637c8d; font-size: 12px; line-height: 1.9; margin: 11px 0 0; }
/* Secondary listing/detail pages */
.mk-page.mk-next-secondary .mk-hero { padding: 45px 24px; background: linear-gradient(110deg,#15394f,#0b797e); }
.mk-page.mk-next-secondary .mk-hero h1 { font: 800 clamp(23px,3vw,33px) 'Noto Sans Thai',Tahoma,sans-serif; }
.mk-page.mk-next-secondary .mk-hero .mk-hero-inner { max-width: 780px; }
.mk-page.mk-next-secondary .mk-hero .mk-search-input { border: 1px solid #d4e2e6; }
.mk-page.mk-next-secondary .mk-search-btn { background: #ffbd67; color: #183b4e; }
.mk-page.mk-next-secondary .mk-detail-wrap { padding-block: 28px; }
.mk-next-ssr-detail { font-size: 13px; color: #506c7c; }
.mk-next-ssr-detail h1 { font-size: clamp(22px,3vw,30px); color: #18394e; line-height: 1.45; margin: 10px 0; }
.mk-next-price { font-size: 25px; color: #087c86; font-weight: 800; }
.mk-next-kicker { color: #087c86; font-size: 12px; font-weight: 700; }
.mk-next-description { color: #587183; font-size: 13px; margin-top: 18px; line-height: 1.9; }
.mk-next-js-note { font-size: 11px; color: #8195a2; margin-top: 20px; }
.mk-next-unavailable { border: 1px solid #f0dbb1; background: #fff8e8; border-radius: 11px; padding: 10px 13px; color: #835c1e; font-weight: 700; }
.mk-page.mk-next-secondary .shop-header { background: linear-gradient(110deg,#15394f,#087c86); }
.mk-page.mk-next-secondary .shop-header h1 { color: #fff; margin: 0; font-size: 27px; }
.mk-page.mk-next-secondary .shop-header p { color: #d7edf1; line-height: 1.9; margin: 0; }
.mk-page.mk-next-secondary .shops-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.mk-next-shop { display: flex; align-items: flex-start; gap: 14px; background: #fff; border: 1px solid #e6edf2; border-radius: 17px; padding: 20px; text-decoration: none; color: #15364c; }
.mk-next-shop-logo img { width: 70px; height: 70px; border-radius: 15px; object-fit: cover; }
.mk-shop-letter { display: flex; align-items: center; justify-content: center; background: #e4f2f2; color: #087c86; border-radius: 15px; font-size: 26px; width: 70px; height: 70px; }
.mk-next-shop h2 { font-size: 15px; margin: 0 0 4px; }
.mk-next-shop p { font-size: 11px; color: #768c9b; margin: 0 0 8px; line-height: 1.6; }
.mk-next-shop span { font-size: 11px; color: #087c86; }
@media(max-width:1020px) {
  .mk-next-header .mk-topbar-nav { gap: 0; }
  .mk-next-header .mk-topbar-nav a { padding: 9px 8px; font-size: 12px; }
  .mk-next-hero-inner { min-height: 430px; }
  .mk-page.mk-next .mk-grid, .mk-page.mk-next-secondary .mk-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:780px) {
  .mk-next-header { height: auto; min-height: 70px; flex-wrap: wrap; justify-content: space-between; padding: 11px 16px 0; }
  .mk-next-header .mk-topbar-nav { width: 100%; order: 3; margin: 0; overflow-x: auto; scrollbar-width: none; padding: 5px 0 8px; }
  .mk-next-header .mk-topbar-nav::-webkit-scrollbar { display: none; }
  .mk-next-hero-inner { display: block; padding: 40px 22px 54px; min-height: unset; }
  .mk-next-hero h1 { font-size: clamp(28px,6.7vw,43px); }
  .mk-next-hero-art { display: none; }
  .mk-next-type-grid { grid-template-columns: 1fr; }
  .mk-next-type-section { margin-top: -16px!important; }
  .mk-next-type-card { padding: 15px 17px; }
  .mk-next-discovery-banner { align-items: flex-start; }
  .mk-page.mk-next .mk-grid, .mk-page.mk-next-secondary .mk-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mk-next-how-grid { grid-template-columns: 1fr; }
  .mk-page.mk-next-secondary .shops-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:520px) {
  .mk-page.mk-next .mk-container, .mk-page.mk-next-secondary .mk-container { padding-inline: 15px; }
  .mk-next-header { padding-inline: 13px; }
  .mk-next-header .mk-wordmark strong { font-size: 15px; }
  .mk-next-header .mk-topbar-brand img { width: 37px; height: 37px; }
  .mk-next-hero-inner { padding: 35px 17px 43px; }
  .mk-next-eyebrow { font-size: 9px; }
  .mk-next-hero h1 { font-size: 29px; margin-top: 18px; }
  .mk-next-lead { font-size: 13px; line-height: 1.85; }
  .mk-next-search { height: 54px; padding-left: 12px; border-radius: 12px; }
  .mk-next-search input { font-size: 12px; }
  .mk-next-search button { font-size: 12px; padding-inline: 16px; border-radius: 9px; }
  .mk-next-trust { column-gap: 12px; }
  .mk-next-type-section { padding-inline: 13px!important; }
  .mk-next-type-icon { width: 49px; height: 49px; border-radius: 14px; }
  .mk-next-type-card strong { font-size: 14px; }
  .mk-next-discovery { padding-top: 21px!important; }
  .mk-next-discovery-banner { padding: 20px; flex-direction: column; gap: 15px; }
  .mk-next-discovery h2 { font-size: 18px; }
  .mk-next-results { padding-top: 34px!important; }
  .mk-next-results-head { align-items: flex-start; flex-direction: column; }
  .mk-next-sort { width: 100%; justify-content: space-between; }
  .mk-page.mk-next .mk-grid, .mk-page.mk-next-secondary .mk-grid { gap: 10px; }
  .mk-page.mk-next .mk-card-name, .mk-page.mk-next-secondary .mk-card-name { font-size: 12px; }
  .mk-page.mk-next .mk-card-body, .mk-page.mk-next-secondary .mk-card-body { padding: 12px; }
  .mk-page.mk-next .price-now, .mk-page.mk-next-secondary .price-now { font-size: 16px; }
  .mk-page.mk-next-secondary .shops-grid { grid-template-columns: 1fr; }
  .mk-next-faq-heading h2 { font-size: 20px; }
  .mk-next-explain { padding-block: 40px!important; }
}
@media(prefers-reduced-motion:reduce) {
  .mk-next-type-card,.mk-page.mk-next .mk-card,.mk-page.mk-next-secondary .mk-card { transition: none; }
}
.mk-next-pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 30px 0 4px; color: #687f91; font-size: 12px; }
.mk-next-pager a { padding: 9px 15px; border: 1px solid #d5e4e8; border-radius: 10px; background: #fff; color: #0d7681; text-decoration: none; font-weight: 700; }
.mk-next-pager a:hover { background: #e8f6f4; }

.mk-next-card-sub { font-size: 11px; color: #8194a0; margin-top: 8px; line-height: 1.5; }
.mk-next-card-sub:first-letter { color: #cb984d; }

/* Source: assets/css/pages/market-next-unified.css */
/* PPN Market Next Generation v2.1 | The same design language across ALL market screens.
   Safely scoped to .mk-unified; preserves handlers and order/payment business logic. */

.mk-unified {
  --mk-primary: #087f88; --mk-primary-light: #0f9ba1; --mk-primary-dark:#075c69;
  --mk-accent:#f6b85f; --mk-secondary:#123650; --mk-border:#dfebef;
  --mk-shadow-sm:0 3px 13px rgba(18,54,80,.045);
  --mk-shadow-md:0 16px 46px rgba(18,54,80,.09);
  --mk-bg:#f4f8fa; --mk-text:#173447;
  color:var(--mk-text); background:#f4f8fa;
  font-family:'Noto Sans Thai',Tahoma,Arial,sans-serif;
  -webkit-font-smoothing:antialiased; min-height:100vh;
}
.mk-unified *{box-sizing:border-box}
.mk-unified :focus-visible {outline:3px solid #efb45e;outline-offset:3px}
.mk-unified a {text-decoration:none}
.mk-unified .mk-topbar.mk-unified-header {height:76px;min-height:76px;padding:9px max(20px,calc((100vw - 1220px)/2));background:rgba(255,255,255,.97);border-bottom:1px solid #dfeaf0;box-shadow:0 4px 25px rgba(18,54,80,.035);display:flex;align-items:center;gap:18px;position:relative;z-index:110}
.mk-unified-header .mk-topbar-brand{display:flex;align-items:center;flex-shrink:0;gap:11px;color:#16394e}
.mk-unified-header .mk-topbar-brand img{width:43px;height:43px;object-fit:contain;border-radius:13px;background:#fff;box-shadow:0 3px 15px rgba(0,0,0,.06)}
.mk-unified-header .mk-wordmark{display:grid;gap:2px;line-height:1.1}
.mk-unified-header .mk-wordmark strong{font:800 18px 'Outfit','Noto Sans Thai',sans-serif;letter-spacing:-.4px;white-space:nowrap}
.mk-unified-header .mk-wordmark strong span{color:#078b91}
/* Override legacy 90px brand clipping on small screens. */
.mk-unified-header .mk-wordmark,.mk-unified-header .mk-wordmark span{max-width:none;overflow:visible;text-overflow:clip}
.mk-unified-header .mk-wordmark strong span{white-space:nowrap}
.mk-unified-header .mk-wordmark small{font:700 9px 'Outfit',sans-serif;letter-spacing:1.65px;color:#879ca9;white-space:nowrap}
.mk-unified-header .mk-topbar-nav{margin-left:auto;display:flex;align-items:center;gap:3px;min-width:0}
.mk-unified-header .mk-topbar-nav a{color:#486578;padding:10px 11px;white-space:nowrap;font-size:12.5px;font-weight:700;border-radius:10px}
.mk-unified-header .mk-topbar-nav a:hover,.mk-unified-header .mk-topbar-nav a.active,.mk-unified-header .mk-topbar-nav a[aria-current=page]{color:#087d86;background:#eaf5f5}
.mk-unified-header #topRight{display:flex;align-items:center;gap:7px;flex-shrink:0}
.mk-unified-header #topRight .mk-btn{border-radius:11px;padding:10px 13px;font-size:12px}
.mk-unified-header .mk-nav-toggle{display:none;align-items:center;justify-content:center;flex:none;width:42px;height:42px;cursor:pointer;border:1px solid #dce9ec;background:#fff;color:#17384e;border-radius:11px;font-size:24px}
.mk-mobile-nav{display:none;padding:12px 20px;background:#fff;border-bottom:1px solid #e1ebf0;box-shadow:0 15px 28px rgba(12,45,64,.09)}
.mk-mobile-nav[hidden]{display:none!important}
.mk-mobile-nav a{display:block;color:#1d4458;font-size:14px;font-weight:650;padding:13px 12px;border-bottom:1px solid #f0f4f5;border-radius:8px}
.mk-mobile-nav a:last-child{border-bottom:0}
.mk-mobile-nav a.active,.mk-mobile-nav a[aria-current=page]{background:#eaf7f6;color:#077b83}
.mk-unified .mk-btn,.mk-unified button:not(.mk-nav-toggle){font-family:inherit;transition:background-color .17s,border-color .17s,box-shadow .17s}
.mk-unified .mk-btn-primary{background:#087f88!important;border-color:#087f88!important;color:#fff!important;box-shadow:none!important}
.mk-unified .mk-btn-primary:hover{background:#086974!important;border-color:#086974!important}
.mk-unified .mk-btn-outline,.mk-unified .mk-btn-ghost{color:#126c75;border-color:#bed6dc;background:#fff}
.mk-unified .mk-btn-outline:hover,.mk-unified .mk-btn-ghost:hover{background:#eff9f8}
.mk-unified .mk-input,.mk-unified .mk-select,.mk-unified .mk-textarea,.mk-unified input:not([type=checkbox]):not([type=radio]):not([type=file]),.mk-unified select,.mk-unified textarea{font:500 14px 'Noto Sans Thai',Tahoma,sans-serif;min-height:44px;border-radius:11px;border-color:#d8e4e9;color:#16364a;background:#fff;max-width:100%}
.mk-unified .mk-input:focus,.mk-unified .mk-select:focus,.mk-unified .mk-textarea:focus,.mk-unified input:focus,.mk-unified textarea:focus,.mk-unified select:focus{border-color:#15a0a1;box-shadow:0 0 0 3px rgba(9,147,151,.11)}
.mk-unified .mk-label{font-size:13px;font-weight:700;color:#254a5e;margin-bottom:7px}
.mk-unified input[type=checkbox],.mk-unified input[type=radio]{accent-color:#087f88}
.mk-unified .mk-modal-overlay.active{z-index:2000;background:rgba(13,37,54,.7);backdrop-filter:blur(5px);padding:16px}
.mk-unified .mk-modal{border:1px solid #dde9ef;border-radius:22px;box-shadow:0 24px 75px rgba(7,32,47,.2);max-height:min(92vh,940px);overflow-y:auto;background:#fff}
.mk-unified .mk-modal-header{position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #e8edf0;padding-bottom:16px;align-items:center}
.mk-unified .mk-modal-header h3{color:#11394d;font-size:19px}
.mk-unified .mk-upload-zone{border-radius:14px;border:1.5px dashed #91bfc3;background:#f4fbfb;color:#376d75;min-height:105px}
.mk-unified .mk-upload-zone:hover{background:#ebf8f7;border-color:#0d969a}
.mk-unified .mk-badge{border-radius:50px;padding:3px 10px}
.mk-unified .mk-footer{background:#122f45;color:#d4e6ed;border-top:0;margin-top:50px}
.mk-unified .mk-footer .mk-footer-inner{max-width:1220px}
.mk-unified .mk-footer .mk-footer-brand>div>div:first-child{color:#fff!important}
.mk-unified .mk-footer .mk-footer-col a,.mk-unified .mk-footer .mk-footer-col span{color:#d4e6ed!important}
.mk-unified .mk-footer .mk-footer-title{color:#fff}
.mk-unified .mk-footer .mk-footer-bottom{color:#b4ccd4;border-top-color:#2a5163}
/* Shared page intro, breadcrumbs, sectional surfaces */
.mk-unified .mk-page-intro{background:radial-gradient(circle at 84% 18%,#194c62 0,#113448 50%,#0d293b 100%);color:#fff;padding:29px 22px 33px;position:relative;overflow:hidden}
.mk-unified .mk-page-intro:before{content:'';position:absolute;right:-62px;top:-170px;width:410px;height:410px;border:65px solid rgba(115,217,205,.07);border-radius:50%;pointer-events:none}
.mk-unified .mk-page-intro-inner{position:relative;max-width:1180px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}
.mk-unified .mk-crumb{color:#c0d9df;font-size:11px;font-weight:600;display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.mk-unified .mk-crumb a{color:#bbe5de}.mk-unified .mk-crumb span{color:#8cadb7}
.mk-unified .mk-page-intro h1,.mk-unified .mk-page-intro .mk-page-intro-title{font-size:clamp(22px,3vw,31px);font-weight:800;line-height:1.4;margin:0 0 5px;color:#fff}
.mk-unified .mk-page-intro p{font-size:12.5px;color:#d0e2e6;line-height:1.8;margin:0;max-width:730px}
.mk-unified .mk-page-intro .mk-intro-aside{display:flex;gap:8px;align-items:center;flex-shrink:0}
.mk-unified .mk-intro-aside a{padding:10px 16px;border-radius:10px;background:#fff;color:#153b4f;font-size:12px;font-weight:750;white-space:nowrap}
.mk-unified .mk-intro-aside a:hover{background:#eaf5f5}
.mk-unified .mk-intro-aside a.mk-intro-soft{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.26)}
.mk-unified .mk-container{max-width:1220px}
.mk-unified .mk-card,.mk-unified .track-card,.mk-unified .pay-card,.mk-unified .doc-card,.mk-unified .product-list-item,.mk-unified .mk-shop-card{background:#fff;border:1px solid #e1ebef;border-radius:18px;box-shadow:0 6px 24px rgba(14,52,70,.035)}
.mk-unified .mk-empty{border:1px dashed #d5e4e8;background:#fff;border-radius:16px;padding:32px 16px}
.mk-unified .mk-tabs{background:#fff;border:1px solid #e4edf0;border-radius:14px;padding:5px;gap:5px;box-shadow:0 3px 16px rgba(14,52,70,.035)}
.mk-unified .mk-tab{border-radius:10px;font-weight:650;font-size:13px;white-space:nowrap;color:#50697a}
.mk-unified .mk-tab.active{background:#e6f5f4;color:#076c78;border-color:transparent}
.mk-unified .mk-receipt{border-radius:20px;border:1px solid #e1ecf0;box-shadow:0 12px 37px rgba(19,56,75,.08)}
/* Open shop: retain signup, referral handling and enrollment conditions */
.mk-unified .os-hero{background:radial-gradient(circle at 86% 0,#276473,#133b51 52%,#0d2c42);padding:62px 20px 64px}
.mk-unified .os-hero::after{height:0;display:none}
.mk-unified .os-hero::before{opacity:.3}
.mk-unified .os-hero h1{color:#fff;text-shadow:none;letter-spacing:-.35px;line-height:1.35}
.mk-unified .os-hero p{color:#d4e9ef;font-weight:400}
.mk-unified .os-hero-badge{font-size:12px;background:rgba(122,218,207,.12);border-color:rgba(167,240,226,.3);color:#bceae1}
.mk-unified .os-btn-hero.primary{background:#fff;color:#116774;box-shadow:0 9px 29px rgba(0,0,0,.13)}
.mk-unified .os-btn-hero.outline{border:1px solid rgba(255,255,255,.35);color:#fff}
.mk-unified .os-benefit{border:1px solid #e3edef;border-radius:18px;box-shadow:0 5px 18px rgba(15,51,67,.04);text-align:left}
.mk-unified .os-benefit:hover{box-shadow:0 14px 27px rgba(11,89,106,.08)}
.mk-unified .os-benefit h3,.mk-unified .os-section h2,.mk-unified .os-step-body h3{color:#193c50}
.mk-unified .os-stat-num{color:#067f88}
.mk-unified .os-stats{background:#e8f5f4}
.mk-unified .os-step-num.s1,.mk-unified .os-step-num.s2,.mk-unified .os-step-num.s3{background:#128d94}
.mk-unified .os-steps::before{background:#b5dedf}
.mk-unified .os-compare-card.ppn{background:#114458;box-shadow:0 12px 24px rgba(16,62,83,.16)}
.mk-unified .os-cta{background:#124257}
.mk-unified .os-section{max-width:1090px;padding-block:44px}
/* Track: easier search, timeline and identity of status */
.mk-unified .track-page{max-width:950px;margin:24px auto 60px;padding:0 18px;min-height:35vh}
.mk-unified .track-card{overflow:hidden;margin-bottom:16px}
.mk-unified .track-header{background:#f3f8fa;border-bottom:1px solid #e3edf1}
.mk-unified .track-header h2{font-size:16px;color:#193c50}
.mk-unified .track-card .search-card{padding:40px 26px}
.mk-unified .track-card .search-card h2{font-size:22px;font-weight:800;color:#183c51}
.mk-unified .search-form{max-width:430px}
.mk-unified .mk-search-tab{border-radius:10px 10px 0 0}
.mk-unified .timeline::before{background:#d6e8ec}
/* Payments: QR should be clearly visible, status not claimed before verified */
.mk-unified .pay-page{max-width:620px;padding:25px 18px;min-height:30vh}
.mk-unified .pay-card{overflow:hidden;border-radius:21px}
.mk-unified .pay-header{background:linear-gradient(130deg,#123b52,#087b86);padding:25px}
.mk-unified .pay-body{padding:27px 24px}
.mk-unified .pay-header h2{color:#fff}
.mk-unified .qr-wrap{width:min(250px,100%);height:auto;aspect-ratio:1;border:1px solid #dce8ed;border-radius:18px;padding:10px}
.mk-unified .pay-amount{color:#087d86;font-family:'Outfit','Noto Sans Thai',sans-serif}
.mk-unified .pay-copy-btn{border-color:#0b8990;color:#087b83;background:#fff}
.mk-unified .pay-copy-btn:hover{background:#087e87;color:#fff}
.mk-unified .pay-note{background:#f1f8f8;border:1px solid #d5ecec;border-radius:12px;color:#456879;padding:14px;margin:18px 0;line-height:1.8}
.mk-unified .pay-status{background:#fff;border-radius:12px;padding:12px}
.mk-unified .pay-expired,.mk-unified .pay-success{padding:40px 25px}
/* Seller dashboard, shop registration and all modals */
.mk-unified .myshop-wrap{max-width:1180px;padding:24px 20px 50px}
.mk-unified .myshop-wrap .mk-stats{gap:12px}
.mk-unified .myshop-wrap .mk-ref-card{border:1px solid #dfe9ed;border-radius:16px;box-shadow:0 6px 20px rgba(12,52,69,.045)}
.mk-unified #tab-shop>section,.mk-unified #shopForm,.mk-unified #tab-wallet>div,.mk-unified #tab-products>div:not(#productList),.mk-unified #tab-orders>div:not(#shopOrderList){border:1px solid #e2edf0;border-radius:17px;box-shadow:0 6px 24px rgba(16,52,71,.035)}
.mk-unified #sellerAgreementPanel{background:#fff}
.mk-unified #sellerAgreementPanel h3{color:#173c51!important}
.mk-unified #shopForm{max-width:100%;padding:25px 28px!important}
.mk-unified #shopForm h3{color:#173c51}
.mk-unified .product-list-item{padding:16px 18px;margin-bottom:12px;gap:15px;transition:border-color .15s,box-shadow .15s}
.mk-unified .product-list-item:hover{border-color:#badbdd;box-shadow:0 8px 26px rgba(17,74,90,.07)}
.mk-unified .product-list-img{width:80px;height:80px;border-radius:13px;object-fit:cover;background:#eef4f5}
.mk-unified .product-list-info{min-width:0}
.mk-unified .product-list-name{font-size:15px;font-weight:750;color:#173b4f;line-height:1.55}
.mk-unified .product-list-meta{font-size:12px;line-height:1.75;color:#647d8c;margin-top:5px}
.mk-unified .product-list-actions{align-items:center;flex-wrap:wrap}
.mk-unified .product-list-actions .mk-btn{border-radius:9px;padding:8px 10px}
.mk-unified .mk-seller-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 15px;padding:13px;background:#fff;border:1px solid #e4edf0;border-radius:14px}
.mk-unified .mk-seller-tools input{flex:1;min-width:160px}
.mk-unified .mk-seller-tools select{width:auto;max-width:235px}
.mk-unified .mk-modal .mk-form-group{margin-bottom:16px}
.mk-unified .mk-modal .mk-grid-3{gap:12px}
.mk-unified .mk-editor-section-header{border-left:4px solid #0d9499;background:#eff8f8;color:#245368;border-radius:0 9px 9px 0;padding:10px 13px;margin:6px 0 17px;font-size:13px;font-weight:800}
.mk-unified .mk-editor-section-header small{display:block;font-size:11px;font-weight:500;color:#698591;line-height:1.65}
.mk-unified #pMarketTypeHint{background:#edf7f7!important;border:1px solid #cce6e7!important;color:#245e69!important;border-radius:12px!important;font-size:12px!important;line-height:1.85}
.mk-unified #calcPreviewBox{background:#ecf7f3!important;border:1px solid #c5e5d8!important;color:#17694e!important}
.mk-unified #variantChoiceWrap>label{background:#f3f8fa!important;border-color:#dbe9ef!important}
.mk-unified #variantEditor{background:#f7fafb!important;border:1px solid #dfebef}
.mk-unified #productModal .mk-modal{max-width:790px!important}
.mk-unified #productModal .mk-modal-header{margin-bottom:20px}
.mk-unified #productModal .mk-modal-header h3{margin:0}
.mk-unified .mk-step-pill{display:inline-flex;align-items:center;gap:6px;background:#e8f5f3;border-radius:99px;padding:6px 12px;font-weight:800;color:#0a757b;font-size:11px;margin-bottom:10px}
.mk-unified #tab-wallet .mk-btn-block,.mk-unified #tab-shop .mk-btn-block{border-radius:12px;min-height:48px}
/* Legal articles and receipts */
.mk-unified .doc-page{max-width:990px;margin:28px auto 54px;padding:0 18px}
.mk-unified .doc-card{padding:clamp(22px,4vw,42px);box-shadow:0 8px 34px rgba(16,51,68,.05)}
.mk-unified .doc-card h1{color:#173d51;font-size:clamp(20px,3vw,27px)}
.mk-unified .doc-card h2,.mk-unified .faq-cat{color:#146d78}
.mk-unified .doc-card p,.mk-unified .doc-card li{color:#4a6374;line-height:1.9}
.mk-unified .faq-item{border-bottom-color:#e7eef1}
.mk-unified .faq-q{color:#1d465a;padding:4px 0}
.mk-unified .faq-a{color:#536d7e}
/* Information notice in checkout and track */
.mk-unified .mk-info-strip{max-width:900px;margin:18px auto 0;display:flex;gap:11px;align-items:flex-start;padding:12px 16px;background:#eaf5f4;border:1px solid #cfe7e5;border-radius:12px;color:#265e6b;font-size:12px;line-height:1.7}
.mk-unified .mk-info-strip b{color:#12566a}
.mk-unified .mk-info-strip .mk-info-icon{font-size:19px;line-height:1.2}
@media(max-width:1120px){
 .mk-unified-header .mk-topbar-nav a{padding:9px 7px;font-size:11px}
 .mk-unified-header .mk-topbar-brand img{width:39px;height:39px}
 .mk-unified-header .mk-wordmark strong{font-size:16px}
 .mk-unified-header .mk-wordmark small{font-size:8px}
}
@media(max-width:920px){
 .mk-unified .mk-topbar.mk-unified-header{padding:8px 16px;height:67px;min-height:67px;gap:10px}
 .mk-unified-header .mk-topbar-nav{display:none!important}
 .mk-unified-header .mk-nav-toggle{display:flex;margin-left:0}
 .mk-unified-header #topRight{margin-left:auto}
 .mk-mobile-nav:not([hidden]){display:block}
 .mk-unified .mk-page-intro-inner{flex-direction:column;align-items:flex-start}
}
@media(max-width:620px){
 .mk-unified .mk-topbar.mk-unified-header{padding:8px 12px}
 .mk-unified-header .mk-topbar-brand img{width:36px;height:36px;border-radius:10px}
 .mk-unified-header .mk-wordmark strong{font-size:15px}
 .mk-unified-header .mk-wordmark small{letter-spacing:1px;font-size:7px}
 .mk-unified-header #topRight a:not(.mk-btn-primary),.mk-unified-header #topRight #mkNotifBell{display:none!important}
 .mk-unified-header #topRight .mk-btn{padding:9px 11px;font-size:11px}
 .mk-unified .mk-page-intro{padding:22px 17px 24px}
 .mk-unified .mk-page-intro h1,.mk-unified .mk-page-intro .mk-page-intro-title{font-size:22px}
 .mk-unified .mk-page-intro p{font-size:12px}
 .mk-unified .mk-intro-aside a{padding:8px 12px}
 .mk-unified .myshop-wrap{padding:15px 12px 30px}
 .mk-unified #shopForm{padding:18px!important}
 .mk-unified .mk-tabs{overflow:auto;flex-wrap:nowrap}
 .mk-unified .mk-tab{min-width:89px;justify-content:center;font-size:12px;padding:10px 7px}
 .mk-unified .product-list-item{align-items:flex-start;display:grid;grid-template-columns:64px 1fr;gap:12px;padding:13px}
 .mk-unified .product-list-img{width:64px;height:64px}
 .mk-unified .product-list-actions{grid-column:2;justify-content:flex-start}
 .mk-unified .product-list-meta{font-size:11px}
 .mk-unified .mk-seller-tools input,.mk-unified .mk-seller-tools select{flex:1 1 100%;width:100%;max-width:none}
 .mk-unified .track-page{padding:0 12px;margin-top:16px}
 .mk-unified .track-card .search-card{padding:25px 16px}
 .mk-unified .pay-page{padding:15px 12px}
 .mk-unified .pay-body{padding:20px 15px}
 .mk-unified .os-hero{padding:50px 17px}
 .mk-unified .os-section{padding:30px 15px}
 .mk-unified .os-compare-card.ppn{transform:none}
 .mk-unified .os-btn-hero{padding:12px 22px;font-size:13px}
 .mk-unified .doc-page{padding:0 12px;margin-top:16px}
 .mk-unified .doc-card{padding:20px 18px}
 .mk-unified .mk-modal{border-radius:17px;padding:17px!important}
 .mk-unified .mk-grid-2,.mk-unified .mk-grid-3{grid-template-columns:1fr}
 .mk-unified .mk-info-strip{margin:12px 12px 0}
}
@media print{
 .mk-unified .mk-topbar,.mk-unified .mk-mobile-nav,.mk-unified .mk-page-intro,.mk-unified .mk-footer,.mk-unified .mk-info-strip{display:none!important}
 .mk-unified .mk-receipt{box-shadow:none;border:1px solid #ddd}
 .mk-unified{background:white!important}
}
@media(prefers-reduced-motion:reduce){.mk-unified *{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Seller onboarding and product editor extensions */
.mk-unified .mk-seller-journey{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:20px}
.mk-unified .mk-seller-journey>div{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid #dfebed;border-radius:13px;padding:14px 12px;font-size:11px;font-weight:700;line-height:1.6;color:#365b6b;min-height:67px}
.mk-unified .mk-seller-journey strong{height:29px;width:29px;display:grid;place-items:center;background:#e8f6f4;color:#087980;border-radius:9px;flex:none;font:800 13px 'Outfit',sans-serif}
.mk-unified .mk-seller-count{color:#678393;font-size:12px;margin:0 0 12px;padding-left:3px}
.mk-unified .mk-form-help{display:block;color:#6d8594;font-size:11px;line-height:1.65;margin-top:5px}
.mk-unified .mk-hero{background:radial-gradient(circle at 80% -10%,#236477 0,#153e56 54%,#112f43 100%);color:#fff}
.mk-unified .mk-hero h1{color:#fff;font-size:clamp(24px,3vw,34px)}
.mk-unified .mk-hero p{color:#d4e7ed}
.mk-unified .mk-hero .mk-hero-inner{max-width:1160px}
.mk-unified .mk-hero .mk-search-wrap{border-radius:14px;background:#fff}
.mk-unified .mk-section{max-width:1190px}
.mk-unified .mk-shop-card{transition:transform .17s,box-shadow .17s}
.mk-unified .mk-shop-card:hover{transform:translateY(-2px);box-shadow:var(--mk-shadow-md)}
.mk-unified .mk-detail-wrap{max-width:1160px;margin-inline:auto}
.mk-unified .mk-detail-info{color:#19394b}
@media(max-width:840px){.mk-unified .mk-seller-journey{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.mk-unified .mk-seller-journey{grid-template-columns:1fr 1fr;gap:6px}.mk-unified .mk-seller-journey>div{font-size:10px;padding:10px 8px;gap:6px}.mk-unified .mk-seller-journey strong{height:25px;width:25px}}

@media(max-width:350px){
 .mk-unified .mk-topbar.mk-unified-header{gap:6px;padding-inline:8px}
 .mk-unified-header .mk-topbar-brand{gap:7px}
 .mk-unified-header .mk-topbar-brand img{width:31px;height:31px}
 .mk-unified-header .mk-wordmark strong{font-size:13px}
 .mk-unified-header .mk-wordmark small{display:none}
 .mk-unified-header #topRight .mk-btn{padding:7px 8px;font-size:10px}
 .mk-unified-header .mk-nav-toggle{width:38px;height:38px}
}

/* Source: assets/css/pages/market-v22-experience.css */
/* PPN Market v2.2 — public catalog browsing only; no finance or checkout styles. */
.mk-page.mk-next .mk-next-hero {
  background-color: #0c3548;
  background-image: linear-gradient(90deg,rgba(7,30,46,.66),rgba(6,40,52,.38) 48%,rgba(6,45,48,.10)),url('/assets/images/market/market-hero-desktop.webp');
  background-size: cover;
  background-position: center center;
}
.mk-page.mk-next .mk-next-hero::before { display: none; }
.mk-page.mk-next .mk-next-hero-inner { grid-template-columns: minmax(0,670px) minmax(0,1fr); }
.mk-page.mk-next .mk-next-hero-art { display: none; }
.mk-page.mk-next .mk-next-search { position: relative; z-index: 2; }
.mk-page.mk-next .mk-next-search button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; min-width: 88px; }
.mk-page.mk-next .mk-search-button-spinner,.mk-ring { display: none; width: 15px; height: 15px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: mk-v22-spin .75s linear infinite; }
.mk-page.mk-next .mk-search-button-spinner { color:#fff; }
.mk-page.mk-next .mk-next-search button.is-searching .mk-search-button-spinner { display: inline-block; }
.mk-page.mk-next .mk-search-feedback { color: #d8fff4; background: rgba(5,30,46,.45); border:1px solid rgba(171,237,219,.20); padding: 8px 12px; margin-top: 11px; border-radius: 10px; width: fit-content; max-width: 100%; font-size: 12px; line-height: 1.7; }
.mk-page.mk-next .mk-search-feedback[hidden] { display:none!important; }
.mk-page.mk-next .mk-search-feedback.is-searching:before { content:''; display:inline-block; width:10px; height:10px; margin-right:8px; border:2px solid #bdfaf0; border-right-color:transparent; border-radius:50%; animation:mk-v22-spin .75s linear infinite; vertical-align:middle; }
.mk-page.mk-next .mk-next-results-head h2 { scroll-margin-top: 93px; }
.mk-page.mk-next .mk-result-status { font-size: 12px; color: #247581; font-weight: 600; line-height: 1.7; margin: 3px 0 0; }
.mk-page.mk-next .mk-result-status:empty { display: none; }
.mk-page.mk-next .mk-next-pager { margin-block: 24px; }
/* Progressive enhancement: server-side pagination remains available to crawlers and no-JS visitors. */
.mk-page.mk-next.mk-market-live .mk-next-pager { display: none!important; }
.mk-page.mk-next .mk-load-sentinel { height: 1px; pointer-events:none; }
.mk-page.mk-next .mk-infinite-status { display:flex; justify-content:center; align-items:center; gap:11px; text-align:center; color:#607f8e; min-height:26px; padding:15px 0; font-size:12px; }
.mk-page.mk-next .mk-infinite-status:empty { min-height:0; padding:0; }
.mk-page.mk-next .mk-infinite-status.is-busy .mk-ring { display:inline-block; color:#0d9098; }
.mk-page.mk-next .mk-load-error { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:13px; margin:15px auto; max-width:650px; background:#fff7eb; border:1px solid #efd2a7; padding:15px; border-radius:13px; color:#795126; font-weight:650; font-size:12px; }
.mk-page.mk-next .mk-load-error[hidden] { display:none!important; }
.mk-page.mk-next .mk-next-load-more button { border-radius:12px; min-height:44px; }
.mk-market-skeleton { background:#fff; border:1px solid #e7eef2; border-radius:14px; overflow:hidden; box-shadow:0 6px 15px rgba(17,51,67,.03); }
.mk-market-skeleton>div { aspect-ratio:1.14; background:linear-gradient(105deg,#edf3f5 20%,#dbe9ec 42%,#edf3f5 64%); background-size:220% 100%; animation:mk-v22-shimmer 1.25s linear infinite; }
.mk-market-skeleton>span { display:block; margin:13px 13px 0; height:12px; border-radius:8px; background:#e6f0f2; }
.mk-market-skeleton>span:last-child { width:49%; height:18px; margin-bottom:18px; }
/* Accessible carousel: usable with swipe, arrows, and keyboard even without autoplay. */
.mk-page.mk-next .mk-feat-header { gap:15px; align-items:end; }
.mk-page.mk-next .mk-feat-header .mk-next-section-kicker { display:block; margin-bottom:5px; }
.mk-page.mk-next .mk-feat-actions { display:flex; align-items:center; gap:8px; flex:none; }
.mk-page.mk-next .mk-carousel-counter { color:#6b8996; font-size:12px; font-weight:700; white-space:nowrap; }
.mk-page.mk-next .mk-carousel-arrow { display:grid; place-items:center; flex:none; width:37px; height:37px; color:#0b6e79; background:white; border:1px solid #cee2e6; border-radius:50%; cursor:pointer; font-size:27px; line-height:1; box-shadow:0 3px 12px rgba(12,53,66,.06); }
.mk-page.mk-next .mk-carousel-arrow:hover { background:#e9f7f7; border-color:#9bcdd1; }
.mk-page.mk-next .mk-carousel-arrow[hidden] { display:none!important; }
.mk-page.mk-next .mk-bs-scroll { scroll-padding-inline:4px; scrollbar-width:none; padding-block:9px 13px; }
.mk-page.mk-next .mk-bs-scroll::-webkit-scrollbar { display:none; }
.mk-page.mk-next .mk-bs-card { flex-basis:210px; box-shadow:0 5px 18px rgba(18,62,75,.07); border:1px solid #e3edef; }
.mk-page.mk-next .mk-bs-card:focus-visible { outline-offset:2px; }
.mk-page.mk-next .mk-carousel-hint { color:#8197a1; font-size:11px; margin:4px 0 0; text-align:right; }
@keyframes mk-v22-spin { to { transform:rotate(360deg) } }
@keyframes mk-v22-shimmer { to { background-position-x:-220% } }
@media(max-width:780px){
 .mk-page.mk-next .mk-next-hero { background-image:linear-gradient(180deg,rgba(6,31,47,.48),rgba(6,31,47,.79) 45%,rgba(6,31,47,.91) 85%),url('/assets/images/market/market-hero-mobile.webp'); background-position:right top; }
 .mk-page.mk-next .mk-next-hero-inner { display:block; }
}
@media(max-width:520px){
 .mk-page.mk-next .mk-next-search button { min-width:71px; padding-inline:12px; }
 .mk-page.mk-next .mk-next-search button.is-searching { min-width:97px; font-size:11px; }
 .mk-page.mk-next .mk-next-results-head h2 { scroll-margin-top:76px; }
 .mk-page.mk-next .mk-feat-header { align-items:center; }
 .mk-page.mk-next .mk-feat-title { font-size:17px; }
 .mk-page.mk-next .mk-bs-card { flex-basis:164px; }
 .mk-page.mk-next .mk-feat-actions { gap:5px; }
 .mk-page.mk-next .mk-carousel-arrow { width:31px; height:31px; font-size:21px; }
 .mk-page.mk-next .mk-carousel-hint { text-align:left; }
}
@media(prefers-reduced-motion:reduce){
 .mk-market-skeleton>div,.mk-page.mk-next .mk-search-button-spinner,.mk-page.mk-next .mk-search-feedback.is-searching:before,.mk-ring { animation:none!important; }
 .mk-page.mk-next .mk-bs-scroll { scroll-behavior:auto!important; }
}

/* Source: assets/css/pages/market-v23-performance.css */
/* PPN Market Next Gen v2.3 — fast public listing, no checkout/security overrides. */
.mk-page.mk-next .mk-append-skeleton { contain: layout paint; }
.mk-page.mk-next .mk-next-card-media img { object-fit: cover; }
/* Avoid paint/layout of far-off cards until they approach the viewport. */
@supports (content-visibility:auto) {
  .mk-page.mk-next #productGrid > .mk-card,
  .mk-page.mk-next #productGrid > .mk-market-skeleton {
    content-visibility: auto;
    contain-intrinsic-size: auto 330px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .mk-page.mk-next .mk-append-skeleton > div { animation: none !important; }
}

/* Market Home performance: no animated entry delay or backdrop repaint during scroll. */
.mk-page.mk-next.mk-home-fast { background-attachment: scroll; }
.mk-home-fast .mk-fade-in { animation: none; }
.mk-home-fast .mk-topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
.mk-home-fast .mk-featured-fold { margin-block: 18px 0; }
.mk-home-fast .mk-featured-fold > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; min-height:48px; padding:12px 16px; background:#fff; border:1px solid #d9e8ea; border-radius:14px; color:#176671; font-size:14px; font-weight:700; }
.mk-home-fast .mk-featured-fold > summary::-webkit-details-marker { display:none; }
.mk-home-fast .mk-featured-fold > summary::after { content:'＋'; }
.mk-home-fast .mk-featured-fold[open] > summary::after { content:'−'; }
.mk-home-fast .mk-featured-fold[open] .mk-feat-section { width:100%; padding-inline:0; }
.mk-home-fast .mk-featured-status { font-size:13px; padding:14px 4px; color:#53717d; }
.mk-home-fast .mk-featured-status[hidden] { display:none; }
.mk-home-fast .mk-featured-status button { text-decoration:underline; color:#087f88; margin-inline-start:8px; min-height:40px; }
.mk-home-fast .mk-next-card-media img,.mk-home-fast .mk-bs-card-img,.mk-home-fast .mk-new-card-img { max-width:100%; }
@media(max-width:780px) {
  .mk-home-fast .mk-next-hero-inner { padding-block:24px 34px; }
  .mk-home-fast .mk-next-hero h1 { margin-block:10px 9px; font-size:clamp(22px,6vw,30px); }
  .mk-home-fast .mk-next-lead { margin-bottom:14px; }
  .mk-home-fast .mk-next-hero-actions { margin-block:12px 14px; }
  .mk-home-fast .mk-next-discovery-banner { padding:14px 16px; }
}
