/* =====================================================================
   PAWS & CARDS — Design System (Pokémon TCG)
   Re-skin of the Kame House app preserving all kh-* class names.
   Based on BrandBook_P&C.pdf (REV.1 Q4 2025 ~ Q1 2026)
   ===================================================================== */

/* Fonts: Aveton (display) local — single weight only.
   Nunito (body/strong — G2 stand-in via 800/900).
   JetBrains Mono for utility metadata. */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

@font-face {
    font-family: 'Aveton';
    src: url('/kame/assets/fonts/aveton/aveton.otf') format('opentype'),
         url('/kame/assets/fonts/aveton/aveton.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand core — brandbook p.9 */
    --kh-red:         #A31925;
    --kh-red-bright:  #BE1622;
    --kh-red-deep:    #651413;
    --kh-red-black:   #380F10;
    --kh-white:       #FFFFFF;
    --kh-cream:       #FAFAF9;

    /* Neutrals */
    --kh-n-900: #3C3C3B;
    --kh-n-700: #575756;
    --kh-n-500: #9D9D9C;
    --kh-n-200: #DADADA;
    --kh-n-100: #F4F4F3;
    --kh-n-050: #FAFAF9;

    /* Secondary accent */
    --kh-blue:  #9AD6F1;

    /* Legacy-compat aliases so existing admin/caja JS still paints sanely */
    --kh-orange: var(--kh-red);
    --kh-orange-dark: var(--kh-red-deep);
    --kh-orange-light: var(--kh-red-bright);
    --kh-orange-glow: rgba(163,25,37,.45);
    --kh-orange-glow-soft: rgba(163,25,37,.15);
    --kh-gold: #EEC24A;
    --kh-gold-dark: #CDA53E;
    --kh-gold-glow: rgba(238,194,74,.35);
    --kh-black: #3C3C3B;
    --kh-night: #F4F4F3;
    --kh-night-2: #FAFAF9;
    --kh-panel: #FFFFFF;
    --kh-panel-2: #FAFAF9;
    --kh-panel-3: #F4F4F3;
    --kh-white-pure: #FFFFFF;
    --kh-muted: #575756;
    --kh-muted-2: #9D9D9C;
    --kh-border: #DADADA;
    --kh-border-soft: rgba(56,15,16,.08);

    /* Alt palettes (Poké Ball) — brandbook p.10-12.
       USE ONLY for "casos excepcionales u eventos especiales". */
    /* Master Ball (morado) */
    --kh-alt-master-xd: #2C2151;
    --kh-alt-master-d:  #433172;
    --kh-alt-master:    #5C4491;
    --kh-alt-master-l:  #9375B3;
    /* Love Ball (rosa) */
    --kh-alt-love-xd:   #62113D;
    --kh-alt-love-d:    #B61F6A;
    --kh-alt-love:      #D2569A;
    /* Dive Ball (azul) */
    --kh-alt-dive-xd:   #01374C;
    --kh-alt-dive-d:    #12729F;
    --kh-alt-dive:      #2EABDA;
    --kh-alt-dive-l:    #9AD6F1;
    /* Heal Ball (rosado cálido — comparte el rojo primario) */
    --kh-alt-heal-d:    #CD4547;
    --kh-alt-heal:      #ED6D78;
    /* Ultra Ball (amarillo + neutros) */
    --kh-alt-ultra:     #EEC24A;
    --kh-alt-ultra-d:   #CDA53E;

    /* Status */
    --kh-red-status: #DC2626;
    --kh-red-glow: rgba(220,38,38,.22);
    --kh-green: #16A34A;
    --kh-green-glow: rgba(22,163,74,.22);
    --kh-purple: #7E22CE;

    /* Gradients */
    --kh-grad-hero: linear-gradient(180deg, #380F10 0%, #651413 100%);
    --kh-grad-red: linear-gradient(135deg, #BE1622 0%, #A31925 100%);
    --kh-grad-card: linear-gradient(180deg, #FFFFFF 0%, #FAFAF9 100%);
    --kh-grad-glow: radial-gradient(circle at 50% 0%, rgba(163,25,37,.08) 0%, transparent 70%);

    /* Radii (rounded, humanist feel per Nunito + brandbook amistosidad) */
    --kh-r-sm: 8px;
    --kh-r-md: 14px;
    --kh-r-lg: 22px;
    --kh-r-xl: 32px;
    --kh-r-full: 999px;

    /* Shadows */
    --kh-shadow-sm: 0 1px 2px rgba(56,15,16,.04);
    --kh-shadow-md: 0 4px 14px rgba(56,15,16,.08);
    --kh-shadow-lg: 0 18px 40px rgba(56,15,16,.12);
    --kh-shadow-glow: 0 6px 18px rgba(163,25,37,.28), 0 12px 32px rgba(190,22,34,.18);
    --kh-shadow-gold: 0 6px 20px rgba(238,194,74,.35);

    /* Transitions */
    --kh-t-fast: 150ms cubic-bezier(0.4,0,0.2,1);
    --kh-t-normal: 250ms cubic-bezier(0.4,0,0.2,1);
    --kh-t-bounce: 500ms cubic-bezier(0.34,1.56,0.64,1);

    /* Fonts */
    --kh-font-display: 'Aveton', system-ui, sans-serif;
    --kh-font-body:    'Nunito', system-ui, sans-serif;
    --kh-font-strong:  'Nunito', system-ui, sans-serif;
    --kh-font-mono:    'JetBrains Mono', ui-monospace, monospace;
    /* Legacy alias */
    --kh-font-jp: 'Aveton', system-ui, sans-serif;

    /* Z */
    --kh-z-nav: 100;
    --kh-z-drawer: 300;
    --kh-z-modal: 500;
    --kh-z-toast: 600;
}

/* =====================================================================
   RESET + BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body, body.kame-body {
    font-family: var(--kh-font-body);
    background: var(--kh-white);
    color: var(--kh-red-black);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    font-synthesis: none; /* Aveton has only Regular — no fake bolds */
}

/* Very subtle Pokémon dot pattern overlay */
body.kame-body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(900px 500px at 85% -5%, rgba(163,25,37,.045), transparent 60%),
        radial-gradient(700px 400px at -10% 30%, rgba(154,214,241,.12), transparent 60%);
}
body.kame-body::after {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: radial-gradient(circle, rgba(56,15,16,.03) 1px, transparent 1.2px);
    background-size: 20px 20px;
    opacity: .55;
}

main, .kame-main { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--kh-red); }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--kh-font-display);
    font-weight: 400; /* Aveton Regular only */
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--kh-red-black);
}
h1 { font-size: clamp(40px, 6vw, 76px); }
h2 { font-size: clamp(32px, 4vw, 52px); }
h3 { font-size: clamp(22px, 2.5vw, 30px); }
h4 { font-size: 18px; }

:focus-visible { outline: 2px solid var(--kh-red); outline-offset: 3px; border-radius: 6px; }

/* =====================================================================
   CONTAINER / LAYOUT HELPERS
   ===================================================================== */
.kh-container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .kh-container { padding: 0 32px; } }

.kh-text-center { text-align: center; }
.kh-text-muted { color: var(--kh-n-700); }
.kh-mt-1 { margin-top: 0.5rem; }
.kh-mt-2 { margin-top: 1rem; }
.kh-mt-3 { margin-top: 1.5rem; }
.kh-mt-4 { margin-top: 2rem; }
.kh-mt-5 { margin-top: 3rem; }
.kh-hide-mobile { }
@media (max-width: 768px) { .kh-hide-mobile { display: none !important; } }
.kh-hide-desktop { display: none; }
@media (max-width: 768px) { .kh-hide-desktop { display: initial; } }

/* Eyebrow / label */
.kh-eyebrow, .kh-section-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(163,25,37,.08);
    color: var(--kh-red);
    border-radius: 999px;
    font-family: var(--kh-font-body);
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.kh-section-eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--kh-red);
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.kh-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: var(--kh-z-nav);
    padding: 14px 0;
    transition: background var(--kh-t-normal), backdrop-filter var(--kh-t-normal),
                border-bottom-color var(--kh-t-normal), padding var(--kh-t-normal);
    /* Brandbook p.18: la marca nunca debe quedar sobre fondos complejos sin
       un respaldo propio. Nav siempre con backing blanco (más fuerte al
       scrollear) para que el imagotipo tenga área de respeto garantizada. */
    background: rgba(255,255,255,.78);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid transparent;
}
.kh-nav.scrolled {
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: saturate(170%) blur(18px);
    backdrop-filter: saturate(170%) blur(18px);
    border-bottom-color: var(--kh-n-200);
    padding: 8px 0;
}

.kh-nav-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    height: 64px;
}

.kh-logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--kh-red-black);
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: -0.015em;
    transition: transform var(--kh-t-normal);
}
.kh-logo:hover { transform: translateY(-1px); color: var(--kh-red-black); }

.kh-logo-mark {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--kh-red);
    display: grid; place-items: center;
    font-family: var(--kh-font-display);
    font-size: 1.1rem; font-weight: 400;
    color: white;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 6px 18px rgba(163,25,37,.28);
    position: relative; overflow: hidden;
}
.kh-logo-mark::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 60%);
}

.kh-logo-name { display: flex; flex-direction: column; line-height: 1; }
.kh-logo-name strong {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: -0.015em;
}
.kh-logo-name span {
    font-size: 10px;
    color: var(--kh-red);
    font-family: var(--kh-font-mono);
    letter-spacing: 0.12em;
    margin-top: 2px;
}

.kh-nav-links {
    display: none; align-items: center; gap: 6px; list-style: none;
}
@media (min-width: 980px) { .kh-nav-links { display: flex; } }

.kh-nav-links a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    color: var(--kh-n-700);
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    transition: all var(--kh-t-fast);
    position: relative;
}
.kh-nav-links a:hover,
.kh-nav-links a.active {
    color: var(--kh-red);
    background: rgba(163,25,37,.06);
}
.kh-nav-links a.active::after {
    content: '';
    position: absolute; left: 14px; right: 14px; bottom: 4px;
    height: 2px; background: var(--kh-red); border-radius: 2px;
}

.kh-nav-actions { display: flex; align-items: center; gap: 8px; }

.kh-icon-btn {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--kh-n-100);
    border: 1.5px solid transparent;
    color: var(--kh-red-black);
    cursor: pointer;
    position: relative;
    transition: all var(--kh-t-fast);
    font-size: 1.15rem;
}
.kh-icon-btn:hover {
    background: white;
    border-color: var(--kh-red);
    color: var(--kh-red);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(163,25,37,.15);
}

.kh-cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--kh-red); color: white;
    font-family: var(--kh-font-mono);
    font-size: 0.68rem; font-weight: 700;
    padding: 2px 6px; border-radius: 999px;
    min-width: 20px; text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(163,25,37,.35);
}

.kh-menu-toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--kh-n-100);
    border: 1.5px solid transparent;
    color: var(--kh-red-black);
    font-size: 1.3rem;
}
@media (min-width: 980px) { .kh-menu-toggle { display: none; } }

/* Mobile drawer */
.kh-mobile-drawer {
    position: fixed; top: 0; right: 0;
    width: 88%; max-width: 360px; height: 100vh;
    background: white;
    border-left: 1px solid var(--kh-n-200);
    z-index: var(--kh-z-drawer);
    padding: 88px 20px 24px;
    transform: translateX(100%);
    transition: transform var(--kh-t-bounce);
    overflow-y: auto;
}
.kh-mobile-drawer.open {
    transform: translateX(0);
    box-shadow: -24px 0 60px rgba(56,15,16,.18);
}
.kh-mobile-drawer a {
    display: block;
    padding: 14px 8px;
    color: var(--kh-red-black);
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid var(--kh-n-100);
    transition: color var(--kh-t-fast);
}
.kh-mobile-drawer a:hover,
.kh-mobile-drawer a.active { color: var(--kh-red); }

.kh-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(56,15,16,.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: calc(var(--kh-z-drawer) - 1);
    opacity: 0; pointer-events: none;
    transition: opacity var(--kh-t-normal);
}
.kh-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.kh-drawer-account-btn { background: var(--kh-red); color: white !important; border-radius: 12px; margin-top: 14px; }
.kh-drawer-account-btn:hover { background: var(--kh-red-bright); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.kh-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    font-family: var(--kh-font-body);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.005em;
    border: 1.5px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--kh-t-normal);
    text-decoration: none;
    position: relative;
    line-height: 1.2;
    white-space: nowrap;
}
.kh-btn:active { transform: scale(0.97); }

.kh-btn-primary {
    background: var(--kh-red);
    color: white;
    box-shadow: 0 6px 16px rgba(163,25,37,.28);
}
.kh-btn-primary:hover {
    background: var(--kh-red-bright);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(190,22,34,.36);
}

.kh-btn-secondary, .kh-btn-ghost {
    background: transparent;
    color: var(--kh-red-black);
    border-color: var(--kh-n-200);
}
.kh-btn-secondary:hover, .kh-btn-ghost:hover {
    border-color: var(--kh-red);
    color: var(--kh-red);
    background: rgba(163,25,37,.04);
}

.kh-btn-dark {
    background: var(--kh-red-black);
    color: white;
}
.kh-btn-dark:hover { background: var(--kh-red-deep); color: white; }

.kh-btn-danger { background: var(--kh-red-status); color: white; }
.kh-btn-danger:hover { background: #B91C1C; box-shadow: 0 6px 18px var(--kh-red-glow); }

.kh-btn-gold {
    background: linear-gradient(135deg, var(--kh-gold), var(--kh-gold-dark));
    color: var(--kh-red-black);
}
.kh-btn-gold:hover { box-shadow: var(--kh-shadow-gold); transform: translateY(-1px); }

.kh-btn-sm { padding: 8px 14px; font-size: 12px; }
.kh-btn-lg { padding: 14px 26px; font-size: 15px; }
.kh-btn-xl { padding: 16px 32px; font-size: 16px; }
.kh-btn-block { width: 100%; display: flex; }

.kh-btn[disabled], .kh-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Pulsing "pokéball charge" effect — for main CTAs */
.kh-btn-charge { position: relative; isolation: isolate; }
.kh-btn-charge::before {
    content: '';
    position: absolute; inset: -3px;
    border-radius: inherit;
    background: var(--kh-grad-red);
    opacity: .35;
    filter: blur(12px);
    animation: kh-pulse 2.2s ease-in-out infinite;
    z-index: -1;
}
@keyframes kh-pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.98); }
    50%      { opacity: 0.55; transform: scale(1.06); }
}

/* =====================================================================
   HERO
   ===================================================================== */
.kh-hero {
    position: relative;
    min-height: 92vh;
    display: flex; align-items: center; justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--kh-grad-hero);
    color: white;
}
.kh-hero-bottom-fade {
    position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
    background: linear-gradient(to bottom, transparent 0%, var(--kh-white) 100%);
    z-index: 3; pointer-events: none;
}
.kh-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center 40%;
    background-repeat: no-repeat;
    opacity: .25; filter: saturate(1.2) brightness(0.7);
}
.kh-hero-video {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 40%;
    opacity: .18; filter: saturate(1.1) brightness(0.7);
}
.kh-hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    background:
        radial-gradient(ellipse at 25% 80%, rgba(163,25,37,.45) 0%, transparent 48%),
        radial-gradient(ellipse at 75% 20%, rgba(245,176,180,.20) 0%, transparent 40%);
}
.kh-hero::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1.5px);
    background-size: 22px 22px; opacity: .5;
}

.kh-hero-content {
    position: relative; z-index: 2;
    text-align: center; max-width: 900px;
    padding: 0 16px;
}

/* Split layout for the new hero (text left, cardstack right) */
.kh-hero-split {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 48px;
    width: 100%;
}
.kh-hero-text { text-align: left; }
.kh-hero-text .kh-hero-stats {
    margin-left: 0; margin-right: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 520px;
}
.kh-hero-visual { display: flex; justify-content: center; }

.kh-hero-tagline {
    font-family: var(--kh-font-body);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #F5B0B4;
    margin: -6px 0 22px;
    opacity: .9;
    animation: kh-fade-up 0.8s ease-out 0.35s both;
}
.kh-hero-tagline span { letter-spacing: 0.2em; font-weight: 500; opacity: .85; }

@media (max-width: 960px) {
    .kh-hero-split { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .kh-hero-text { text-align: center; }
    .kh-hero-text .kh-hero-stats { max-width: 640px; margin: 40px auto 0; }
    .kh-hero-text .kh-hero-cta { justify-content: center; }
    .kh-hero-visual { order: 2; }
}

.kh-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    background: rgba(245,176,180,.18);
    border: 1px solid rgba(245,176,180,.4);
    color: #F5B0B4;
    border-radius: 999px;
    font-family: var(--kh-font-body);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 24px;
    animation: kh-fade-down 0.8s ease-out 0.1s both;
}

.kh-hero-title {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(52px, 9vw, 120px);
    line-height: 0.98;
    margin-bottom: 22px;
    letter-spacing: -0.035em;
    color: white;
    animation: kh-power-up 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
}
.kh-hero-title span { color: #F5B0B4; }

.kh-hero-subtitle {
    font-family: var(--kh-font-body);
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255,255,255,.82);
    margin: 0 auto 36px;
    max-width: 620px;
    line-height: 1.55;
    animation: kh-fade-up 0.8s ease-out 0.4s both;
}

.kh-hero-cta {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    animation: kh-fade-up 0.8s ease-out 0.6s both;
}
.kh-hero-cta .kh-btn-primary { background: white; color: var(--kh-red-black); }
.kh-hero-cta .kh-btn-primary:hover { background: var(--kh-n-100); color: var(--kh-red-black); }
.kh-hero-cta .kh-btn-secondary { border-color: rgba(255,255,255,.3); color: white; }
.kh-hero-cta .kh-btn-secondary:hover { border-color: white; background: rgba(255,255,255,.08); color: white; }

.kh-hero-stats {
    margin-top: 56px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    max-width: 700px; margin-left: auto; margin-right: auto;
    animation: kh-fade-up 0.8s ease-out 0.8s both;
}
.kh-hero-stat { text-align: center; }
.kh-hero-stat-num {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.02em;
    color: white;
    line-height: 1;
}
.kh-hero-stat-label {
    font-family: var(--kh-font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,.65);
    margin-top: 8px;
}

.kh-hero-scroll {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.55);
    font-family: var(--kh-font-mono);
    font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.22em;
    animation: kh-bounce 2s ease-in-out infinite;
    z-index: 3;
}
.kh-hero-scroll::before {
    content: ''; display: block; width: 1px; height: 28px;
    margin: 0 auto 8px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.6));
}

/* =====================================================================
   SECTION
   ===================================================================== */
.kh-section {
    padding: 96px 0;
    position: relative;
}
@media (max-width: 720px) { .kh-section { padding: 64px 0; } }

.kh-section-dark {
    background: var(--kh-red-black);
    color: white;
}
.kh-section-dark h1, .kh-section-dark h2, .kh-section-dark h3 { color: white; }
.kh-section-dark .kh-section-eyebrow { background: rgba(245,176,180,.18); color: #F5B0B4; }
.kh-section-dark .kh-section-eyebrow::before { background: #F5B0B4; }
.kh-section-dark .kh-section-subtitle { color: #D9AEB2; }

.kh-section-cream { background: var(--kh-cream); }

.kh-section-header {
    margin-bottom: 48px; max-width: 820px;
}
.kh-section-header.kh-text-center { margin-left: auto; margin-right: auto; }

.kh-section-title {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(34px, 4.5vw, 56px);
    letter-spacing: -0.02em; line-height: 1.05;
    margin-top: 16px;
    color: inherit;
}
.kh-section-title span { color: var(--kh-red); }
.kh-section-dark .kh-section-title span { color: #F5B0B4; }

.kh-section-subtitle {
    font-size: 17px;
    line-height: 1.55;
    color: var(--kh-n-700);
    margin-top: 18px;
    max-width: 580px;
}
.kh-section-header.kh-text-center .kh-section-subtitle { margin-left: auto; margin-right: auto; }

/* Decorative "pokéball belt" section divider (replaces kame's energy-line) */
.kh-energy-line {
    margin-top: 24px;
    width: 140px; height: 6px; border-radius: 3px;
    background: linear-gradient(90deg, var(--kh-red) 0%, var(--kh-red) 48%, var(--kh-red-black) 48%, var(--kh-red-black) 52%, white 52%, white 100%);
    border: 1px solid var(--kh-n-200);
    position: relative;
}
.kh-section-header.kh-text-center .kh-energy-line { margin-left: auto; margin-right: auto; }
.kh-energy-line::after {
    content: '';
    position: absolute; left: calc(50% - 7px); top: -5px;
    width: 14px; height: 14px; border-radius: 50%;
    background: white; border: 3px solid var(--kh-red-black);
}

/* Section art (background hero images) — kept for compat with existing markup,
   toned down for the light theme */
.kh-section-art {
    position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.kh-section-art img {
    position: absolute; top: 50%; transform: translateY(-50%);
    height: 110%; width: auto; max-width: none;
    opacity: 0.07;
    filter: saturate(0.6) brightness(1.1);
    object-fit: contain;
    right: -4%;
    mask-image: radial-gradient(ellipse 75% 85% at 82% 50%, black 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 85% at 82% 50%, black 0%, black 30%, transparent 75%);
}
.kh-section-art--left img {
    right: auto; left: -4%;
    mask-image: radial-gradient(ellipse 75% 85% at 18% 50%, black 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 85% at 18% 50%, black 0%, black 30%, transparent 75%);
}
@media (max-width: 640px) { .kh-section-art img { opacity: 0.04; } }

/* =====================================================================
   CATEGORY + PRODUCT CARDS
   ===================================================================== */
.kh-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.kh-category-card {
    --cat-color: var(--kh-red);
    display: flex; flex-direction: column; justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: white;
    border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    transition: box-shadow var(--kh-t-normal), transform var(--kh-t-fast), border-color var(--kh-t-normal);
    min-height: 180px;
    cursor: pointer;
    text-decoration: none;
    color: var(--kh-red-black);
    position: relative; overflow: hidden;
}
.kh-category-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--cat-color);
    opacity: .85;
}
.kh-category-card:hover {
    border-color: var(--cat-color);
    box-shadow: var(--kh-shadow-lg);
    transform: translateY(-4px);
    color: var(--kh-red-black);
}
.kh-category-icon {
    font-size: 2rem; line-height: 1;
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--kh-n-100);
    border: 1px solid var(--kh-n-200);
    color: var(--cat-color);
}
.kh-category-name {
    font-family: var(--kh-font-display);
    font-weight: 400; font-size: 22px; letter-spacing: -0.015em;
    margin: 0;
}
.kh-category-desc {
    font-size: 14px; line-height: 1.5; color: var(--kh-n-700); margin: 6px 0 0;
}
.kh-category-count {
    font-family: var(--kh-font-mono); font-size: 12px; color: var(--cat-color);
    font-weight: 700; letter-spacing: 0.02em;
}

.kh-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.kh-product-card {
    background: white;
    border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    overflow: hidden;
    transition: box-shadow var(--kh-t-normal), transform var(--kh-t-fast), border-color var(--kh-t-normal);
    display: flex; flex-direction: column;
    cursor: pointer; text-decoration: none; color: inherit;
    position: relative;
}
.kh-product-card:hover {
    box-shadow: var(--kh-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--kh-red);
    color: inherit;
}
.kh-product-media {
    aspect-ratio: 3/4;
    background:
        repeating-linear-gradient(135deg, rgba(163,25,37,.07) 0 1px, transparent 1px 14px),
        #FBE9EB;
    display: grid; place-items: center;
    color: var(--kh-red-deep);
    font-family: var(--kh-font-mono); font-size: 11px; text-align: center;
    padding: 16px;
    position: relative; overflow: hidden;
}
.kh-product-media img { width: 100%; height: 100%; object-fit: cover; }
.kh-product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kh-product-cat {
    font-family: var(--kh-font-mono); font-size: 11px;
    color: var(--kh-n-500); text-transform: uppercase; letter-spacing: 0.08em;
}
.kh-product-name {
    font-family: var(--kh-font-strong); font-weight: 900;
    font-size: 15px; line-height: 1.25; color: var(--kh-red-black);
    letter-spacing: -0.005em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.kh-product-price {
    font-family: var(--kh-font-display); font-weight: 400;
    font-size: 22px; color: var(--kh-red-black); letter-spacing: -0.02em;
    margin-top: auto;
}
.kh-product-price .kh-muted-price {
    font-size: 13px; color: var(--kh-n-500); text-decoration: line-through; margin-left: 8px; font-family: var(--kh-font-body); font-weight: 500;
}
.kh-product-stock {
    font-size: 11px; color: var(--kh-green); font-weight: 700; letter-spacing: 0.02em;
    text-transform: uppercase;
}
.kh-product-stock.out { color: var(--kh-red-status); }

.kh-product-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
    background: var(--kh-red); color: white;
    box-shadow: 0 4px 10px rgba(163,25,37,.28);
    z-index: 2;
}

/* =====================================================================
   KPI CARDS ("Why us")
   ===================================================================== */
.kh-kpi {
    padding: 28px;
    background: white;
    border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    transition: box-shadow var(--kh-t-normal), transform var(--kh-t-fast), border-color var(--kh-t-normal);
}
.kh-kpi:hover {
    box-shadow: var(--kh-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--kh-red);
}
.kh-kpi-label {
    font-family: var(--kh-font-mono); font-size: 11px;
    color: var(--kh-n-500); text-transform: uppercase; letter-spacing: 0.1em;
}
.kh-kpi-value {
    font-family: var(--kh-font-display); font-weight: 400;
    font-size: 26px; margin-top: 6px; line-height: 1.15; color: var(--kh-red-black);
    letter-spacing: -0.015em;
}
.kh-kpi-sub { font-size: 14px; color: var(--kh-n-700); margin-top: 8px; line-height: 1.55; }

/* =====================================================================
   CART DRAWER
   ===================================================================== */
.kh-cart-drawer {
    position: fixed; top: 0; right: 0;
    width: 88%; max-width: 420px; height: 100vh;
    background: white;
    border-left: 1px solid var(--kh-n-200);
    z-index: var(--kh-z-drawer);
    transform: translateX(100%);
    transition: transform var(--kh-t-bounce);
    display: flex; flex-direction: column;
    box-shadow: -24px 0 60px rgba(56,15,16,0);
}
.kh-cart-drawer.open {
    transform: translateX(0);
    box-shadow: -24px 0 60px rgba(56,15,16,.18);
}
.kh-cart-head {
    padding: 22px 22px 16px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--kh-n-100);
}
.kh-cart-head h3 {
    font-family: var(--kh-font-display); font-weight: 400; font-size: 22px;
    letter-spacing: -0.015em;
}
.kh-cart-head-count { font-family: var(--kh-font-mono); font-size: 13px; color: var(--kh-n-500); font-weight: 500; }
.kh-cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.kh-cart-item {
    display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--kh-n-100);
}
.kh-cart-item-img { width: 64px; height: 64px; border-radius: 10px; background: var(--kh-n-100); object-fit: cover; }
.kh-cart-item-name { font-family: var(--kh-font-strong); font-weight: 900; font-size: 14px; line-height: 1.25; }
.kh-cart-item-price { color: var(--kh-red); font-weight: 800; font-size: 14px; }
.kh-cart-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.kh-cart-qty button {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--kh-n-100); color: var(--kh-red-black);
    font-weight: 800; font-size: 14px;
}
.kh-cart-qty button:hover { background: var(--kh-n-200); }
.kh-cart-foot {
    padding: 18px 22px 24px;
    border-top: 1px solid var(--kh-n-100);
    background: var(--kh-cream);
    display: flex; flex-direction: column; gap: 12px;
}
.kh-cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.kh-cart-total strong { font-family: var(--kh-font-display); font-weight: 400; font-size: 24px; letter-spacing: -0.02em; }
.kh-cart-empty { padding: 40px 22px; text-align: center; color: var(--kh-n-700); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.kh-footer {
    background: var(--kh-red-black);
    color: #E8C9CC;
    padding: 72px 0 40px;
    margin-top: 64px;
    position: relative;
    overflow: hidden;
}
.kh-footer::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 300px at 90% 0%, rgba(245,176,180,.08), transparent 60%),
        radial-gradient(400px 200px at 0% 100%, rgba(163,25,37,.15), transparent 60%);
    pointer-events: none;
}
.kh-footer > * { position: relative; z-index: 1; }
.kh-footer .kh-logo { color: white; }
.kh-footer .kh-logo-name strong { color: white; }
.kh-footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.kh-footer-col h4 {
    font-family: var(--kh-font-strong); font-weight: 900;
    color: white; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 16px;
}
.kh-footer-col a, .kh-footer-col p {
    display: block; font-size: 14px; color: #D9AEB2;
    padding: 6px 0;
    transition: color var(--kh-t-fast);
}
.kh-footer-col a:hover { color: white; }
.kh-footer-about p { margin-top: 18px; line-height: 1.6; max-width: 340px; padding: 0; }
.kh-footer-bottom {
    margin-top: 48px; padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 13px; color: #B5898D;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
@media (max-width: 860px) { .kh-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .kh-footer-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   WHATSAPP FAB
   ===================================================================== */
.kh-whatsapp-fab {
    position: fixed; bottom: 22px; right: 22px;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; color: white;
    display: grid; place-items: center;
    box-shadow: 0 10px 26px rgba(37,211,102,.45);
    z-index: 400;
    transition: transform var(--kh-t-normal), box-shadow var(--kh-t-normal);
    animation: kh-wa-bounce 4s ease-in-out infinite;
}
.kh-whatsapp-fab:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 16px 36px rgba(37,211,102,.55);
    color: white;
}
@keyframes kh-wa-bounce {
    0%, 92%, 100% { transform: translateY(0); }
    95% { transform: translateY(-8px); }
    98% { transform: translateY(-3px); }
}

/* =====================================================================
   TOASTS
   ===================================================================== */
.kh-toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: var(--kh-z-toast);
    display: flex; flex-direction: column; gap: 10px;
    max-width: 360px;
}
.kh-toast {
    padding: 14px 18px;
    background: white;
    border: 1px solid var(--kh-n-200);
    border-left: 4px solid var(--kh-red);
    border-radius: 14px;
    box-shadow: var(--kh-shadow-lg);
    animation: kh-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kh-toast h4 { font-family: var(--kh-font-strong); font-weight: 900; font-size: 14px; color: var(--kh-red-black); margin: 0; }
.kh-toast p { font-size: 13px; color: var(--kh-n-700); margin-top: 4px; }
.kh-toast.success { border-left-color: var(--kh-green); }
.kh-toast.error { border-left-color: var(--kh-red-status); }
.kh-toast.warning { border-left-color: var(--kh-gold-dark); }
@keyframes kh-slide-in { from { opacity: 0; transform: translateX(40px);} to { opacity: 1; transform: translateX(0);} }

/* =====================================================================
   FORMS / INPUTS  (used in login, admin, caja, filters)
   ===================================================================== */
.kh-input, .kh-select, .kh-textarea,
input[type="text"]:not([class]), input[type="email"]:not([class]),
input[type="password"]:not([class]), input[type="number"]:not([class]),
input[type="search"]:not([class]), input[type="tel"]:not([class]),
textarea:not([class]), select:not([class]) {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--kh-font-body); font-size: 14px;
    border-radius: 12px;
    border: 1.5px solid var(--kh-n-200);
    background: white;
    color: var(--kh-red-black);
    outline: none;
    transition: border-color var(--kh-t-fast), box-shadow var(--kh-t-fast);
}
.kh-input::placeholder, input::placeholder, textarea::placeholder { color: var(--kh-n-500); }
.kh-input:focus, .kh-select:focus, .kh-textarea:focus,
input:focus, textarea:focus, select:focus {
    border-color: var(--kh-red);
    box-shadow: 0 0 0 3px rgba(163,25,37,.1);
}
.kh-label {
    display: block;
    font-size: 13px; font-weight: 700; color: var(--kh-red-black);
    margin-bottom: 6px;
}

/* Filter chips */
.kh-chip, .kh-filter-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--kh-font-body); font-weight: 700; font-size: 13px;
    border: 1.5px solid var(--kh-n-200);
    background: white;
    color: var(--kh-red-black);
    cursor: pointer;
    transition: all var(--kh-t-fast);
}
.kh-chip:hover, .kh-filter-chip:hover { border-color: var(--kh-red); color: var(--kh-red); }
.kh-chip.active, .kh-filter-chip.active {
    background: var(--kh-red); color: white; border-color: var(--kh-red);
}
.kh-chip-alt-master { background: rgba(92,68,145,.14); color: var(--kh-alt-master-d); border-color: transparent; }
.kh-chip-alt-dive   { background: rgba(46,171,218,.14); color: var(--kh-alt-dive-d); border-color: transparent; }
.kh-chip-alt-ultra  { background: rgba(238,194,74,.22); color: #8A6A1F; border-color: transparent; }
.kh-chip-alt-love   { background: rgba(210,86,154,.14); color: var(--kh-alt-love-d); border-color: transparent; }
.kh-chip-alt-heal   { background: rgba(237,109,120,.18); color: var(--kh-alt-heal-d); border-color: transparent; }

/* Badges */
.kh-badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
    background: var(--kh-n-100); color: var(--kh-red-black);
}
.kh-badge-red { background: rgba(163,25,37,.08); color: var(--kh-red); }
.kh-badge-green { background: rgba(22,163,74,.14); color: var(--kh-green); }

/* =====================================================================
   ADMIN / CAJA — generic neutral styling
   ===================================================================== */
.kh-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: white; border: 1px solid var(--kh-n-200);
    border-radius: 14px; overflow: hidden;
    font-size: 14px;
}
.kh-table th, .kh-table td { padding: 12px 16px; text-align: left; }
.kh-table th {
    background: var(--kh-cream);
    font-family: var(--kh-font-body); font-weight: 800; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--kh-n-700);
    border-bottom: 1px solid var(--kh-n-200);
}
.kh-table tr + tr td { border-top: 1px solid var(--kh-n-100); }
.kh-table tr:hover td { background: rgba(163,25,37,.03); }

.kh-card, .kh-panel {
    background: white; border: 1px solid var(--kh-n-200); border-radius: var(--kh-r-lg);
    padding: 24px;
    box-shadow: var(--kh-shadow-sm);
}

/* =====================================================================
   REVEAL ANIMATIONS
   ===================================================================== */
.kh-reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.kh-reveal.in { opacity: 1; transform: translateY(0); }
.kh-reveal-stagger > * { opacity: 0; transform: translateY(14px); }
.kh-reveal-stagger.in > * { animation: kh-fade-up .5s ease forwards; }
.kh-reveal-stagger.in > *:nth-child(1) { animation-delay: 0.0s; }
.kh-reveal-stagger.in > *:nth-child(2) { animation-delay: .08s; }
.kh-reveal-stagger.in > *:nth-child(3) { animation-delay: .16s; }
.kh-reveal-stagger.in > *:nth-child(4) { animation-delay: .24s; }
.kh-reveal-stagger.in > *:nth-child(5) { animation-delay: .32s; }
.kh-reveal-stagger.in > *:nth-child(6) { animation-delay: .40s; }
.kh-reveal-stagger.in > *:nth-child(7) { animation-delay: .48s; }

@keyframes kh-power-up {
    0%   { opacity: 0; transform: translateY(40px) scale(0.92); filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes kh-fade-up { from { opacity: 0; transform: translateY(18px);} to { opacity: 1; transform: translateY(0);} }
@keyframes kh-fade-down { from { opacity: 0; transform: translateY(-18px);} to { opacity: 1; transform: translateY(0);} }
@keyframes kh-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: .6;}
    50%      { transform: translateX(-50%) translateY(6px); opacity: 1;}
}

/* =====================================================================
   POKÉBALL ANIMATIONS (Pokémon-themed decorative layer)
   ===================================================================== */

/* Ki particles → pokéball particles (sparkles drifting upward) */
.kh-ki-particles {
    position: absolute; inset: 0; pointer-events: none; z-index: 1;
    overflow: hidden;
}
.kh-ki-particle {
    position: absolute;
    width: 10px; height: 10px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #F5B0B4 55%, #BE1622 100%);
    opacity: 0;
    box-shadow: 0 0 12px rgba(190,22,34,.6);
    animation: kh-particle-rise 5s linear infinite;
}
@keyframes kh-particle-rise {
    0%   { transform: translateY(0) scale(0.6); opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-120vh) scale(1.1); opacity: 0; }
}

/* Floating pokéballs layer — for hero + big sections */
.kh-pokeballs {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.kh-pokeball {
    position: absolute;
    width: 120px; height: 120px;
    background-image: url('/kame/assets/pokeball.svg');
    background-size: contain; background-repeat: no-repeat;
    opacity: .14;
    filter: drop-shadow(0 8px 18px rgba(56,15,16,.28));
    will-change: transform;
    animation: kh-float 14s ease-in-out infinite, kh-spin 22s linear infinite;
}
.kh-pokeball.kh-pb-1 { top: 8%; left: 6%; width: 90px; height: 90px; animation-duration: 12s, 20s; opacity: .18; }
.kh-pokeball.kh-pb-2 { top: 60%; left: 12%; width: 140px; height: 140px; animation-duration: 18s, 30s; animation-direction: reverse; opacity: .12; }
.kh-pokeball.kh-pb-3 { top: 22%; right: 8%; width: 110px; height: 110px; animation-duration: 16s, 26s; opacity: .16; }
.kh-pokeball.kh-pb-4 { bottom: 12%; right: 18%; width: 80px; height: 80px; animation-duration: 14s, 18s; animation-direction: reverse; opacity: .2; }
.kh-pokeball.kh-pb-5 { top: 45%; left: 55%; width: 60px; height: 60px; animation-duration: 10s, 14s; opacity: .22; }

@keyframes kh-float {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(14px, -18px); }
    50%      { transform: translate(-10px, 8px); }
    75%      { transform: translate(16px, 18px); }
}
@keyframes kh-spin { from { rotate: 0deg; } to { rotate: 360deg; } }

/* Rolling pokéball loader */
.kh-pokeball-loader {
    width: 52px; height: 52px;
    background-image: url('/kame/assets/pokeball.svg');
    background-size: contain; background-repeat: no-repeat;
    animation: kh-roll 1.4s linear infinite;
    filter: drop-shadow(0 6px 12px rgba(163,25,37,.25));
}
@keyframes kh-roll {
    0%   { transform: translateX(-40px) rotate(0deg); }
    50%  { transform: translateX(0) rotate(540deg); }
    100% { transform: translateX(40px) rotate(1080deg); }
}

/* Static hero pokéball mark (for the logo region) */
.kh-pokeball-mark {
    width: 42px; height: 42px;
    background-image: url('/kame/assets/pokeball.svg');
    background-size: contain; background-repeat: no-repeat;
    display: inline-block; vertical-align: middle;
    filter: drop-shadow(0 4px 10px rgba(163,25,37,.3));
}
.kh-pokeball-mark.spin { animation: kh-spin 10s linear infinite; }

/* =====================================================================
   PAGE: CATALOG / TIENDA
   ===================================================================== */
.kh-catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
@media (max-width: 900px) { .kh-catalog-layout { grid-template-columns: 1fr; } }
.kh-sidebar {
    background: white; border: 1px solid var(--kh-n-200); border-radius: var(--kh-r-lg);
    padding: 22px; position: sticky; top: 100px;
    align-self: start;
}
.kh-sidebar h4 {
    font-family: var(--kh-font-strong); font-weight: 900; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--kh-n-700);
    margin: 18px 0 10px;
}
.kh-sidebar h4:first-child { margin-top: 0; }
.kh-sidebar-cat {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-radius: 10px;
    font-weight: 600; font-size: 14px;
    cursor: pointer;
    transition: background var(--kh-t-fast);
    color: var(--kh-red-black);
    text-decoration: none;
}
.kh-sidebar-cat:hover { background: var(--kh-n-100); color: var(--kh-red); }
.kh-sidebar-cat.active { background: var(--kh-red); color: white; }
.kh-sidebar-cat .count {
    font-family: var(--kh-font-mono); font-size: 12px; opacity: .7; font-weight: 500;
}

.kh-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 20px;
}

/* =====================================================================
   PAGE: PRODUCT
   ===================================================================== */
.kh-product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .kh-product-page { grid-template-columns: 1fr; } }
.kh-product-hero-img {
    aspect-ratio: 4/5;
    background: var(--kh-n-100);
    border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    overflow: hidden;
}
.kh-product-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================================
   PAGE: TORNEOS
   ===================================================================== */
.kh-tournament-banner {
    position: relative; width: 100%; height: 280px;
    overflow: hidden; border-radius: var(--kh-r-xl);
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--kh-red-black) 0%, var(--kh-red-deep) 50%, var(--kh-red) 100%);
}
.kh-tournament-banner img {
    width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
    filter: brightness(0.55) saturate(1.2);
}
.kh-tournament-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(56,15,16,.75) 0%, transparent 60%);
    pointer-events: none;
}
.kh-tournament-banner-text {
    position: absolute; bottom: 24px; left: 24px; z-index: 2;
    font-family: var(--kh-font-display); font-weight: 400;
    font-size: clamp(24px, 3.5vw, 40px);
    color: white;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.kh-tournament-banner-text span { color: #F5B0B4; }
@media (max-width: 768px) { .kh-tournament-banner { height: 180px; } }

/* =====================================================================
   LOGIN PAGE
   ===================================================================== */
.kh-auth-wrap {
    min-height: 100vh; display: grid; place-items: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, var(--kh-red-black) 0%, var(--kh-red-deep) 100%);
    position: relative; overflow: hidden;
}
.kh-auth-card {
    position: relative; z-index: 2;
    width: 100%; max-width: 440px;
    background: white; border-radius: var(--kh-r-xl);
    padding: 40px 32px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.kh-auth-card h1 {
    font-family: var(--kh-font-display); font-weight: 400;
    font-size: 32px; margin-bottom: 6px; color: var(--kh-red-black);
}
.kh-auth-card p { color: var(--kh-n-700); font-size: 14px; margin-bottom: 22px; }

/* =====================================================================
   RANKING
   ===================================================================== */
.kh-rank-row {
    display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center;
    padding: 14px 18px; background: white; border: 1px solid var(--kh-n-200);
    border-radius: 14px; margin-bottom: 8px;
    transition: border-color var(--kh-t-fast), transform var(--kh-t-fast);
}
.kh-rank-row:hover { border-color: var(--kh-red); transform: translateX(3px); }
.kh-rank-pos {
    font-family: var(--kh-font-display); font-weight: 400;
    font-size: 28px; color: var(--kh-n-500); text-align: center;
    letter-spacing: -0.02em;
}
.kh-rank-row:nth-child(1) .kh-rank-pos,
.kh-rank-row.gold .kh-rank-pos { color: var(--kh-gold); }
.kh-rank-row:nth-child(2) .kh-rank-pos,
.kh-rank-row.silver .kh-rank-pos { color: var(--kh-n-500); }
.kh-rank-row:nth-child(3) .kh-rank-pos,
.kh-rank-row.bronze .kh-rank-pos { color: #BE7F3F; }

/* =====================================================================
   GALLERY
   ===================================================================== */
.kh-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
}
.kh-gallery-tile {
    border-radius: var(--kh-r-lg);
    overflow: hidden; background: var(--kh-n-100);
    position: relative; cursor: pointer;
    transition: transform var(--kh-t-normal);
}
.kh-gallery-tile:hover { transform: scale(1.015); }
.kh-gallery-tile img { width: 100%; height: 100%; object-fit: cover; }
.kh-gallery-tile.span-2 { grid-column: span 2; grid-row: span 2; }
@media (max-width: 720px) {
    .kh-gallery-grid { grid-template-columns: 1fr 1fr; }
    .kh-gallery-tile.span-2 { grid-column: auto; grid-row: auto; }
}

/* =====================================================================
   IMPORTACIONES — info cards
   ===================================================================== */
.kh-step-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.kh-step {
    padding: 24px; background: white; border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    position: relative;
}
.kh-step-num {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--kh-red); color: white;
    display: grid; place-items: center;
    font-family: var(--kh-font-display); font-weight: 400; font-size: 20px;
    letter-spacing: -0.02em;
    box-shadow: 0 6px 16px rgba(163,25,37,.28);
}
.kh-step h3 {
    font-family: var(--kh-font-strong); font-weight: 900; font-size: 18px;
    margin-top: 16px; letter-spacing: -0.005em;
}
.kh-step p { font-size: 14px; color: var(--kh-n-700); margin-top: 8px; line-height: 1.55; }

/* =====================================================================
   UTILITY
   ===================================================================== */
.mono, .kh-mono { font-family: var(--kh-font-mono); }
.muted { color: var(--kh-n-700); }
.small { font-size: 13px; }
hr.kh-divider { border: 0; border-top: 1px solid var(--kh-n-200); margin: 32px 0; }

/* Legacy TCG-specific hacks kept for backward compat */
.tcg-game-tab.tcg-active { background: var(--kh-red); color: white; border-color: var(--kh-red); font-weight: 800; }
.tcg-result-row:hover { background: rgba(163,25,37,.05); }

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================================
   MANIFESTO — the brandbook's core quote (p.2)
   ===================================================================== */
.kh-manifesto {
    position: relative;
    padding: 56px 48px;
    text-align: center;
    border-radius: var(--kh-r-xl);
    background:
        radial-gradient(800px 400px at 50% 0%, rgba(163,25,37,.04), transparent 60%),
        var(--kh-cream);
    border: 1px solid var(--kh-n-200);
}
.kh-manifesto-mark {
    width: 110px; height: 110px;
    margin: 0 auto 24px;
    background-image: url('/kame/assets/cat-in-box.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 10px 22px rgba(163,25,37,.24));
    animation: kh-breathe 6s ease-in-out infinite;
}
.kh-manifesto-quote {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(22px, 2.8vw, 34px);
    line-height: 1.3;
    color: var(--kh-red-black);
    letter-spacing: -0.015em;
    margin: 0 auto;
    max-width: 780px;
}
.kh-manifesto-quote em {
    font-style: italic;
    color: var(--kh-red);
}
.kh-manifesto-open, .kh-manifesto-close {
    font-family: var(--kh-font-display);
    font-size: 1.5em;
    color: var(--kh-red);
    opacity: .7;
}
.kh-manifesto-open { margin-right: 4px; }
.kh-manifesto-close { margin-left: 2px; }
.kh-manifesto-attr {
    margin-top: 28px;
    font-family: var(--kh-font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--kh-n-500);
}
@keyframes kh-breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-6px) scale(1.02); }
}
@media (max-width: 720px) {
    .kh-manifesto { padding: 40px 24px; }
    .kh-manifesto-mark { width: 84px; height: 84px; }
}

/* =====================================================================
   COMPATIBILITY — extra classes used by kame.js renderProductCard()
   and the in-tree pages (reveal on scroll, specific badges, etc.)
   ===================================================================== */

/* Product card: kame.js uses .kh-product-image + -placeholder + -price-old/consult */
.kh-product-card { display: flex; flex-direction: column; }
.kh-product-image {
    position: relative;
    aspect-ratio: 3/4;
    background:
        repeating-linear-gradient(135deg, rgba(163,25,37,.07) 0 1px, transparent 1px 14px),
        #FBE9EB;
    overflow: hidden;
}
.kh-product-image img { width: 100%; height: 100%; object-fit: cover; }
.kh-product-image-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    font-size: 48px;
    color: var(--kh-n-500);
}

.kh-product-price-old {
    font-size: 13px; color: var(--kh-n-500);
    text-decoration: line-through;
    margin-left: 10px; font-family: var(--kh-font-body); font-weight: 500;
}
.kh-product-price-consult {
    font-family: var(--kh-font-body); font-weight: 700; font-size: 15px;
    color: var(--kh-red); letter-spacing: 0;
}
.kh-product-stock.low { color: var(--kh-gold-dark); }

/* Badges used by renderProductCard */
.kh-badge-out      { background: var(--kh-n-200); color: var(--kh-n-700); }
.kh-badge-sale     { background: var(--kh-red); color: white; }
.kh-badge-featured { background: var(--kh-gold); color: var(--kh-red-black); }
.kh-badge-new      { background: var(--kh-green); color: white; }
.kh-badge-out, .kh-badge-sale, .kh-badge-featured, .kh-badge-new {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: .02em;
    box-shadow: 0 4px 10px rgba(56,15,16,.15);
}

/* Reveal observer alias — kame.js toggles .visible, layout.js toggles .in.
   Support both for compatibility. */
.kh-reveal.visible, .kh-reveal-stagger.visible,
.kh-reveal.in, .kh-reveal-stagger.in { opacity: 1; transform: translateY(0); }
.kh-reveal-stagger.visible > *, .kh-reveal-stagger.in > * { animation: kh-fade-up .5s ease forwards; }

/* Form group layout used across pages */
.kh-form-group { margin-bottom: 14px; }
.kh-flex { display: flex; }
.kh-gap-1 { gap: 8px; }
.kh-gap-2 { gap: 12px; }
.kh-gap-3 { gap: 16px; }
.kh-mb-1 { margin-bottom: 8px; }
.kh-mb-2 { margin-bottom: 12px; }
.kh-mb-3 { margin-bottom: 16px; }
.kh-hidden { display: none !important; }

/* Ki-particle "drift" variant supported by kame.js initKiParticles() */
.kh-ki-particle {
    --drift: 0px;
    animation: kh-particle-rise 6s linear infinite;
}
@keyframes kh-particle-rise-drift {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.3; }
    100% { transform: translate(var(--drift), -120vh) scale(1.1); opacity: 0; }
}

/* Global min-height padding for non-hero pages (nav is fixed) */
body.kame-body > main,
body.kame-body > .kame-main {
    min-height: 60vh;
}

/* Login / auth inherit — already styled via kh-kpi + kh-input classes */

/* =====================================================================
   OFFICIAL BRAND ASSETS — logos, cat illustrations, Pokémon-type icons
   All PNGs in /kame/assets/brand/ per brandbook delivery
   ===================================================================== */

/* Logo mark as an <img> (replaces the old .kh-logo-mark div background) */
.kh-logo-mark-img {
    width: 44px; height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(163,25,37,.18));
    transition: transform var(--kh-t-fast);
}
.kh-logo:hover .kh-logo-mark-img { transform: translateY(-1px) rotate(-3deg); }

.kh-logo-name strong { white-space: nowrap; }

/* Footer lockup (outline B&N version — brandbook p.9) */
.kh-footer-lockup {
    height: 72px;
    width: auto;
    max-width: 320px;
    filter: brightness(0) invert(1); /* forces pure white for dark footer */
}

/* Hero: full-color horizontal lockup (logo + wordmark + tagline) */
.kh-hero-lockup {
    display: block;
    margin: 0 auto 24px;
    max-width: min(560px, 80%);
    width: 100%;
    height: auto;
    /* Soft red glow so it reads on the dark red-black hero */
    filter: drop-shadow(0 0 30px rgba(255,255,255,.1)) drop-shadow(0 10px 24px rgba(56,15,16,.5));
    animation: kh-fade-down 0.9s ease-out 0.1s both;
}
.kh-hero-lockup--dark { filter: brightness(0) invert(1) drop-shadow(0 10px 24px rgba(0,0,0,.4)); }

/* Big hero imagotipo (when shown solo instead of the lockup) */
.kh-hero-mark {
    width: 180px; height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.4));
    animation: kh-breathe 6s ease-in-out infinite;
}

/* Manifesto mark — swap to official PNG */
.kh-manifesto-mark {
    background-image: url('/kame/assets/brand/logogato1.png');
    width: 130px; height: 130px;
}

/* =====================================================================
   POKÉMON-TYPE ICONS
   Replace the inline emojis in category cards / services with these
   brandbook-authored icons.
   ===================================================================== */
.pc-icon {
    width: 44px; height: 44px;
    object-fit: contain;
    display: block;
}
.pc-icon-lg { width: 60px; height: 60px; }
.pc-icon-sm { width: 28px; height: 28px; }

/* Category icon container gets a tinted badge; the PNG sits inside */
.kh-category-icon {
    /* override the earlier emoji-sized version with a PNG-ready slot */
    padding: 8px;
}
.kh-category-icon .pc-icon {
    width: 36px; height: 36px;
    filter: drop-shadow(0 2px 4px rgba(56,15,16,.1));
}

/* Type icon circle wrapper (for services, hero, features) */
.pc-type-badge {
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--kh-n-100);
    border: 1.5px solid var(--kh-n-200);
    transition: transform var(--kh-t-fast), background var(--kh-t-fast);
}
.pc-type-badge:hover { transform: translateY(-2px) rotate(-6deg); background: white; }
.pc-type-badge .pc-icon { width: 32px; height: 32px; }

/* =====================================================================
   CAT ILLUSTRATIONS
   ===================================================================== */
/* gatocara.png — minimalist line-art cat face (accent/watermark) */
.pc-cat-face {
    width: 64px; height: 64px;
    object-fit: contain;
    opacity: 0.9;
}

/* gatodespereza.png — full stretching cat (mascot hero) */
.pc-cat-stretch {
    width: 100%;
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 12px 28px rgba(56,15,16,.18));
    animation: kh-cat-stretch 7s ease-in-out infinite;
}
@keyframes kh-cat-stretch {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25%      { transform: rotate(-2deg) translateY(-4px); }
    75%      { transform: rotate(2deg) translateY(2px); }
}

/* caja.png — empty open box (shipping/unboxing cue) */
.pc-box-open {
    width: 120px; height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(56,15,16,.2));
}

/* Watermark positioning for cat-face inside value cards */
.pc-watermark-cat {
    position: absolute;
    bottom: 14px; right: 14px;
    width: 52px; height: 52px;
    opacity: 0.12;
    pointer-events: none;
    filter: grayscale(1);
}
.kh-kpi { position: relative; overflow: hidden; }

/* =====================================================================
   CARD STACK (hero) — official illustrated TCG cards
   Replaces the CSS-drawn 3-card stack with 4 real brand cards
   ===================================================================== */
.pc-cardstack {
    position: relative;
    width: 100%; height: 520px;
    max-width: 520px;
    margin: 0 auto;
}
.pc-cardstack img {
    position: absolute;
    width: 220px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
    transition: transform .6s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}
.pc-cardstack .pc-card-red    { left: 2%;   top: 40px;  transform: rotate(-12deg); z-index: 2; }
.pc-cardstack .pc-card-blue   { left: 25%;  top: 0;     transform: rotate(-3deg);  z-index: 3; }
.pc-cardstack .pc-card-purple { left: 48%;  top: 20px;  transform: rotate(6deg);   z-index: 2; }
.pc-cardstack .pc-card-green  { left: 68%;  top: 80px;  transform: rotate(14deg);  z-index: 1; }

.pc-cardstack:hover .pc-card-red    { transform: rotate(-18deg) translateY(-6px); }
.pc-cardstack:hover .pc-card-blue   { transform: rotate(-5deg)  translateY(-12px); }
.pc-cardstack:hover .pc-card-purple { transform: rotate(9deg)   translateY(-10px); }
.pc-cardstack:hover .pc-card-green  { transform: rotate(20deg)  translateY(-4px); }

/* Each card gently floats even at rest */
.pc-cardstack img { animation: pc-card-float 5s ease-in-out infinite; }
.pc-cardstack .pc-card-red    { animation-delay: 0s;   }
.pc-cardstack .pc-card-blue   { animation-delay: .8s;  }
.pc-cardstack .pc-card-purple { animation-delay: 1.6s; }
.pc-cardstack .pc-card-green  { animation-delay: 2.4s; }
@keyframes pc-card-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -8px; }
}

@media (max-width: 900px) {
    .pc-cardstack { height: 380px; }
    .pc-cardstack img { width: 150px; }
}
@media (max-width: 520px) {
    .pc-cardstack { height: 300px; }
    .pc-cardstack img { width: 110px; }
    .pc-cardstack .pc-card-red    { left: 0%; }
    .pc-cardstack .pc-card-green  { left: 62%; }
}

/* =====================================================================
   POKÉMON-TYPE: tagged service / filter chip with icon on the left
   ===================================================================== */
.pc-chip-type {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 6px;
    background: var(--kh-n-100);
    border-radius: 999px;
    font-size: 12px; font-weight: 800; letter-spacing: .02em;
    color: var(--kh-red-black);
}
.pc-chip-type img { width: 22px; height: 22px; object-fit: contain; }

/* Why Us — split layout with mascot illustration */
.kh-whyus-layout {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 56px;
    align-items: center;
}
.kh-whyus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 28px;
    margin-top: 32px;
}
.kh-whyus-item {
    display: flex; flex-direction: column; gap: 8px;
}
.kh-whyus-item .kh-kpi-value { margin-top: 4px; }
.kh-whyus-mascot {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.kh-mascot-halo {
    position: absolute;
    top: 10%; left: 50%;
    transform: translateX(-50%);
    width: 70%; height: 70%;
    background: radial-gradient(circle at 50% 50%, rgba(245,176,180,.35) 0%, rgba(163,25,37,.1) 40%, transparent 70%);
    filter: blur(18px);
    z-index: 0;
    pointer-events: none;
}
.kh-whyus-mascot .pc-cat-stretch { position: relative; z-index: 1; max-width: 280px; }
.kh-mascot-caption {
    position: relative; z-index: 1;
    text-align: center;
    font-family: var(--kh-font-body);
}
.kh-mascot-caption span {
    display: block;
    font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: #F5B0B4; margin-bottom: 6px;
}
.kh-mascot-caption strong {
    display: block;
    font-family: var(--kh-font-display); font-weight: 400;
    font-size: 18px; letter-spacing: -0.01em;
    color: white; line-height: 1.3;
    max-width: 260px; margin: 0 auto;
}
@media (max-width: 960px) {
    .kh-whyus-layout { grid-template-columns: 1fr; gap: 32px; }
    .kh-whyus-mascot { order: -1; }
    .kh-whyus-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .kh-whyus-grid { grid-template-columns: 1fr; }
}

/* Japanese tagline treatment */
.pc-tagline-jp {
    font-family: var(--kh-font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--kh-n-500);
    margin-top: 4px;
    text-transform: uppercase;
}

/* =====================================================================
   TYPE STRIP — showcase de los 11 iconos del brandbook
   ===================================================================== */
.kh-type-strip-section {
    padding: 56px 0 40px;
    border-top: 1px solid var(--kh-n-100);
    border-bottom: 1px solid var(--kh-n-100);
    background: var(--kh-cream);
}
.kh-type-strip-head {
    text-align: center;
    margin-bottom: 28px;
}
.kh-type-strip-head .pc-tagline-jp {
    display: block;
    color: var(--kh-red); opacity: .8;
    margin-bottom: 10px;
}
.kh-type-strip-title {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(20px, 2.5vw, 28px);
    letter-spacing: -0.015em;
    color: var(--kh-red-black);
    margin: 0;
}
.kh-type-strip-title em {
    font-style: italic;
    color: var(--kh-red);
}
.kh-type-strip {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}
.kh-type-strip-track {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 0;
}
.kh-type-strip-track .pc-type-badge {
    width: 64px; height: 64px;
    background: white;
    border-color: var(--kh-n-200);
    box-shadow: var(--kh-shadow-sm);
    animation: pc-type-pop 3s ease-in-out infinite;
}
.kh-type-strip-track .pc-type-badge:nth-child(odd) { animation-delay: -.5s; }
.kh-type-strip-track .pc-type-badge:nth-child(3n) { animation-delay: -1.2s; }
.kh-type-strip-track .pc-type-badge:nth-child(5n) { animation-delay: -1.8s; }
@keyframes pc-type-pop {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
.kh-type-strip-track .pc-icon { width: 36px; height: 36px; }

/* =====================================================================
   NOTICIAS — card grid para el feed de novedades del landing
   ===================================================================== */
.kh-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 36px;
}
.kh-news-card {
    --news-accent: var(--kh-red);
    display: flex; flex-direction: column;
    background: white;
    border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--kh-t-normal), box-shadow var(--kh-t-normal), transform var(--kh-t-fast);
    position: relative;
}
.kh-news-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--news-accent);
    z-index: 2;
}
.kh-news-card:hover {
    border-color: var(--news-accent);
    box-shadow: var(--kh-shadow-lg);
    transform: translateY(-4px);
}
.kh-news-card:hover .kh-news-media img { transform: scale(1.04) rotate(-2deg); }
.kh-news-card:hover .kh-news-link { color: var(--news-accent); gap: 10px; }

.kh-news-media {
    position: relative;
    aspect-ratio: 16/10;
    background:
        radial-gradient(circle at 70% 30%, rgba(163,25,37,.05), transparent 55%),
        var(--kh-n-100);
    display: grid; place-items: center;
    overflow: hidden;
}
.kh-news-media img {
    width: 72%; height: auto; max-height: 84%;
    object-fit: contain;
    transition: transform var(--kh-t-normal);
    filter: drop-shadow(0 12px 24px rgba(56,15,16,.18));
}
.kh-news-badge {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    padding: 5px 12px; border-radius: 999px;
    background: var(--news-accent); color: white;
    font-family: var(--kh-font-body);
    font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 6px 14px rgba(56,15,16,.18);
}
.kh-news-body {
    padding: 20px 22px 22px;
    display: flex; flex-direction: column; gap: 10px;
    flex: 1;
}
.kh-news-date {
    font-family: var(--kh-font-mono);
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--kh-n-500);
}
.kh-news-title {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--kh-red-black);
    margin: 0;
}
.kh-news-title em {
    font-style: italic; color: var(--news-accent);
}
.kh-news-excerpt {
    font-size: 14px;
    color: var(--kh-n-700);
    line-height: 1.55;
    margin: 0;
}
.kh-news-link {
    margin-top: auto;
    font-family: var(--kh-font-body);
    font-weight: 800; font-size: 13px;
    color: var(--kh-red-black);
    letter-spacing: 0.02em;
    display: inline-flex; align-items: center; gap: 6px;
    transition: color var(--kh-t-fast), gap var(--kh-t-fast);
}

/* =====================================================================
   ARTICLE PAGE (/noticia/:slug) — editorial read-view
   ===================================================================== */
.pc-article {
    --article-accent: var(--kh-red);
    position: relative;
}

.pc-article-hero {
    position: relative;
    min-height: 72vh;
    padding: 120px 0 60px;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(163,25,37,.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(245,176,180,.15) 0%, transparent 55%),
        linear-gradient(180deg, #380F10 0%, #651413 100%);
    color: white;
    overflow: hidden;
    display: flex; align-items: center;
}
.pc-article-hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1.3px);
    background-size: 22px 22px;
    opacity: .4;
}
.pc-pokeballs { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pc-pokeballs .kh-pokeball { opacity: 0.1; }
.pc-article-hero-inner {
    position: relative; z-index: 2;
    max-width: 920px;
}
.pc-back-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--kh-font-body);
    font-weight: 700; font-size: 13px;
    letter-spacing: 0.02em;
    color: #F5B0B4;
    padding: 6px 12px;
    background: rgba(245,176,180,.12);
    border: 1px solid rgba(245,176,180,.25);
    border-radius: 999px;
    transition: all var(--kh-t-fast);
    margin-bottom: 32px;
}
.pc-back-link:hover {
    color: white;
    background: rgba(245,176,180,.22);
    border-color: rgba(245,176,180,.5);
    transform: translateX(-2px);
}
.pc-article-meta {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    margin-bottom: 22px;
}
.pc-article-category {
    display: inline-flex; padding: 5px 14px; border-radius: 999px;
    background: var(--article-accent);
    color: white;
    font-family: var(--kh-font-body);
    font-weight: 800; font-size: 11px;
    letter-spacing: 0.12em; text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(56,15,16,.3);
}
.pc-article-date {
    font-family: var(--kh-font-mono);
    font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(245,176,180,.75);
}
.pc-article-title {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(36px, 6vw, 68px);
    letter-spacing: -0.03em;
    line-height: 1;
    color: white;
    margin: 0 0 24px;
    max-width: 16ch;
    animation: kh-power-up 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s both;
}
.pc-article-excerpt {
    font-size: clamp(17px, 1.8vw, 20px);
    line-height: 1.55;
    color: rgba(255,255,255,.82);
    max-width: 640px;
    margin: 0;
    font-weight: 400;
}
.pc-article-hero-image {
    position: absolute;
    top: 50%; right: -10%;
    transform: translateY(-50%);
    width: 45%; max-width: 540px;
    aspect-ratio: 1;
    z-index: 1;
    display: none; /* enabled on wide viewports */
    pointer-events: none;
}
@media (min-width: 1100px) { .pc-article-hero-image { display: block; } }
.pc-article-hero-image img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,.5));
    border-radius: var(--kh-r-xl);
}
.pc-article-hero-image .pc-article-hero-fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    opacity: 0.18;
}
.pc-article-hero-image .pc-article-hero-fallback img {
    width: 70%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}
.pc-article-fade {
    position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
    background: linear-gradient(to bottom, transparent, white 100%);
    z-index: 3; pointer-events: none;
}

/* Body layout */
.pc-article-body-wrap { background: white; padding: 80px 0; }
.pc-article-body-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 56px;
    align-items: start;
}
@media (max-width: 860px) {
    .pc-article-body-inner { grid-template-columns: 1fr; }
    .pc-article-sidebar { order: -1; }
}

.pc-article-body {
    max-width: 720px;
    font-family: var(--kh-font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--kh-red-black);
}
.pc-article-body > * + * { margin-top: 18px; }
.pc-article-body p { margin: 0; }
.pc-article-body h2 {
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -0.02em;
    margin-top: 44px !important;
    line-height: 1.15;
    color: var(--kh-red-black);
}
.pc-article-body h2::before {
    content: ''; display: inline-block;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--article-accent);
    margin-right: 12px;
    vertical-align: middle;
    transform: translateY(-2px);
}
.pc-article-body h3 {
    font-family: var(--kh-font-strong);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.005em;
    margin-top: 30px !important;
    color: var(--kh-red-black);
}
.pc-article-body a {
    color: var(--article-accent);
    font-weight: 700;
    border-bottom: 1.5px solid rgba(163,25,37,.35);
    transition: border-color .15s ease;
}
.pc-article-body a:hover { border-bottom-color: var(--article-accent); }
.pc-article-body strong { font-weight: 800; color: var(--kh-red-black); }
.pc-article-body em { color: var(--article-accent); font-style: italic; font-weight: 500; }
.pc-article-body code {
    font-family: var(--kh-font-mono); font-size: .9em;
    background: var(--kh-n-100); color: var(--kh-red-deep);
    padding: 2px 6px; border-radius: 6px;
}
.pc-article-body ul {
    padding-left: 22px;
    list-style: none;
}
.pc-article-body ul li {
    position: relative;
    margin-top: 10px;
    padding-left: 10px;
}
.pc-article-body ul li::before {
    content: ''; position: absolute;
    left: -16px; top: 12px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--article-accent);
}
.pc-article-body blockquote {
    margin: 28px 0 !important;
    padding: 20px 24px;
    border-left: 4px solid var(--article-accent);
    background: var(--kh-cream);
    border-radius: 0 14px 14px 0;
    font-family: var(--kh-font-display);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.4;
    color: var(--kh-red-black);
    letter-spacing: -0.005em;
}
.pc-article-body img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--kh-r-lg);
    margin: 28px 0 !important;
    box-shadow: 0 10px 30px rgba(56,15,16,.12);
}

/* Skeleton loader */
.pc-article-skeleton { display: flex; flex-direction: column; gap: 14px; }
.pc-skel {
    background: linear-gradient(90deg, var(--kh-n-100) 0%, var(--kh-n-200) 50%, var(--kh-n-100) 100%);
    background-size: 200% 100%;
    animation: pc-shimmer 1.6s linear infinite;
    border-radius: 8px;
}
.pc-skel-line { height: 18px; }
.pc-skel-80 { width: 80%; } .pc-skel-100 { width: 100%; } .pc-skel-60 { width: 60%; } .pc-skel-90 { width: 92%; }
@keyframes pc-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Sidebar */
.pc-article-sidebar { position: sticky; top: 110px; }
.pc-share-card {
    background: var(--kh-cream);
    border: 1px solid var(--kh-n-200);
    border-radius: var(--kh-r-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.pc-share-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--article-accent);
}
.pc-share-label {
    font-family: var(--kh-font-mono);
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--kh-n-500);
    margin-bottom: 14px;
}
.pc-share-buttons { display: flex; flex-direction: column; gap: 8px; }
.pc-share-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: white;
    border: 1.5px solid var(--kh-n-200);
    border-radius: 10px;
    font-family: var(--kh-font-body);
    font-weight: 700; font-size: 14px;
    color: var(--kh-red-black);
    cursor: pointer;
    transition: all var(--kh-t-fast);
    width: 100%;
}
.pc-share-btn:hover {
    border-color: var(--article-accent);
    color: var(--article-accent);
    transform: translateX(2px);
}
.pc-share-btn svg { flex-shrink: 0; }
.pc-cat-mascot {
    position: absolute;
    bottom: -10px; right: -10px;
    width: 70px; height: 70px;
    opacity: 0.12;
    pointer-events: none;
}
.pc-cat-mascot img { width: 100%; height: auto; }

/* Related section (reuses .kh-news-grid + .kh-news-card) */
.pc-article-related { background: var(--kh-cream); padding-top: 60px; padding-bottom: 60px; }

/* =====================================================================
   NEWS LISTING (/noticias) — uses same news-card grid
   ===================================================================== */
.pc-news-page { padding: 140px 0 80px; min-height: 70vh; }
.pc-news-hero {
    padding: 0;
    margin-bottom: 48px;
}

/* =====================================================================
   ADMIN — NEWS TAB
   ===================================================================== */
.kh-news-admin-table {
    display: flex; flex-direction: column; gap: 14px;
}
.kh-news-admin-row {
    --accent: var(--kh-red);
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 16px;
    background: white;
    border: 1px solid var(--kh-n-200);
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    transition: box-shadow var(--kh-t-fast), transform var(--kh-t-fast);
}
.kh-news-admin-row:hover {
    box-shadow: var(--kh-shadow-md);
    transform: translateX(2px);
}
.kh-news-admin-thumb {
    width: 120px; height: 90px;
    border-radius: 10px;
    background: var(--kh-n-100);
    display: grid; place-items: center;
    overflow: hidden;
}
.kh-news-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kh-news-admin-noimg { font-size: 28px; opacity: 0.4; }
.kh-news-admin-body { min-width: 0; }
.kh-news-admin-meta {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 6px;
}
.kh-news-admin-category {
    display: inline-flex;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(163,25,37,.08);
    color: var(--accent);
    font-family: var(--kh-font-body);
    font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
    text-transform: uppercase;
}
.kh-news-admin-date {
    font-family: var(--kh-font-mono);
    font-size: 11px; letter-spacing: 0.1em;
    color: var(--kh-n-500); text-transform: uppercase;
}
.kh-news-admin-draft {
    padding: 3px 10px; border-radius: 999px;
    background: rgba(238,194,74,.2);
    color: #8A6A1F;
    font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
    text-transform: uppercase;
}
.kh-news-admin-title {
    font-family: var(--kh-font-strong);
    font-weight: 900;
    font-size: 17px;
    line-height: 1.25;
    margin: 2px 0 4px;
    color: var(--kh-red-black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kh-news-admin-excerpt {
    font-size: 13px;
    color: var(--kh-n-700);
    line-height: 1.5;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kh-news-admin-slug {
    font-family: var(--kh-font-mono);
    font-size: 11px;
    color: var(--kh-n-500);
}
.kh-news-admin-actions {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
    align-self: center;
}
@media (max-width: 760px) {
    .kh-news-admin-row { grid-template-columns: 90px 1fr; }
    .kh-news-admin-thumb { width: 90px; height: 70px; }
    .kh-news-admin-actions {
        grid-column: 1 / -1;
        padding-top: 8px;
        border-top: 1px solid var(--kh-n-100);
        justify-content: flex-end;
    }
}

/* Category card with caja.png background illustration (Importaciones) */
.pc-card-caja { position: relative; overflow: hidden; }
.pc-card-caja-bg {
    position: absolute;
    right: -10px; bottom: -14px;
    width: 130px; height: auto;
    opacity: .16;
    pointer-events: none;
    transition: opacity var(--kh-t-normal), transform var(--kh-t-normal);
    filter: drop-shadow(0 8px 16px rgba(56,15,16,.15));
    z-index: 0;
}
.pc-card-caja:hover .pc-card-caja-bg {
    opacity: 0.32;
    transform: scale(1.08) rotate(-4deg);
}
.pc-card-caja > *:not(.pc-card-caja-bg) { position: relative; z-index: 1; }

