/* ═══════════════════════════════════════════════════════
   PAPELERÍA LA ESPERANZA — ULTRA PREMIUM DESIGN SYSTEM
   Dark Luxury · Glassmorphism · Cinematic Transitions
   ═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
    /* Core Palette */
    --obsidian: #0a0a0f;
    --onyx: #111118;
    --slate: #1a1a24;
    --graphite: #252530;
    --steel: #3a3a4a;
    --silver: #8888a0;
    --cloud: #c4c4d4;
    --snow: #f0f0f8;
    --white: #ffffff;

    /* Accent */
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.4);

    /* WhatsApp */
    --wa: #25d366;
    --wa-dark: #1ebe5c;
    --wa-glow: rgba(37, 211, 102, 0.35);

    /* Semantic */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Gradients */
    --grad-hero: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --grad-dark: linear-gradient(180deg, #0a0a0f 0%, #111118 100%);
    --grad-card: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    --grad-wa: linear-gradient(135deg, #25d366 0%, #20c05c 50%, #1aad52 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --shadow-wa: 0 8px 32px var(--wa-glow);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --max-w: 520px;
    --header-h: 64px;
    --nav-h: 52px;

    /* Timing */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background: var(--obsidian);
    color: var(--snow);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.6;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ── MESH BACKGROUND ── */
.mesh-bg {
    position: fixed; inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: meshFloat 20s ease-in-out infinite;
}
.mesh-orb-1 {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -200px; left: -200px;
}
.mesh-orb-2 {
    width: 500px; height: 500px;
    background: #a855f7;
    bottom: -150px; right: -150px;
    animation-delay: -7s;
}
.mesh-orb-3 {
    width: 400px; height: 400px;
    background: #ec4899;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}
.noise-overlay {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ═══════════════════════════════════════════
   INTRO SCREEN — Cinematic Entrance
   ═══════════════════════════════════════════ */
.intro-screen {
    position: fixed; inset: 0;
    z-index: 9999;
    background: var(--obsidian);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.intro-screen.hiding {
    opacity: 0;
    transform: scale(1.05);
}

.intro-grid-lines {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.intro-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.intro-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    color: var(--accent-light);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 40px;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.2s both;
}
.intro-badge-dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.intro-logo-container {
    position: relative;
    margin-bottom: 24px;
}
.intro-logo-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 300px; height: 100px;
    background: var(--accent);
    filter: blur(80px);
    opacity: 0.15;
    transform: translate(-50%, -50%);
}
.intro-logo {
    display: flex; justify-content: center; gap: 2px;
    margin-bottom: 8px;
}
.logo-letter {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    color: var(--white);
    display: inline-block;
    animation: letterReveal 0.6s var(--ease-spring) calc(var(--i) * 0.06s + 0.4s) both;
}
.intro-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 400;
    font-style: italic;
    color: var(--accent-light);
    animation: fadeSlideUp 0.8s var(--ease-out) 1s both;
}

.intro-line {
    width: 60px; height: 2px;
    background: var(--grad-hero);
    margin: 24px auto;
    border-radius: 2px;
    animation: fadeSlideUp 0.8s var(--ease-out) 1.2s both;
}

.intro-desc {
    font-size: 0.85rem;
    color: var(--silver);
    letter-spacing: 0.1em;
    font-weight: 400;
    margin-bottom: 48px;
    animation: fadeSlideUp 0.8s var(--ease-out) 1.4s both;
}

.intro-enter {
    position: relative;
    display: inline-flex; align-items: center;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-full);
    animation: fadeSlideUp 0.8s var(--ease-out) 1.6s both;
    transition: transform 0.3s var(--ease-spring);
}
.intro-enter:hover { transform: scale(1.05); }
.intro-enter:active { transform: scale(0.98); }

.intro-enter-bg {
    position: absolute; inset: 0;
    background: var(--grad-hero);
    transition: opacity 0.3s;
}
.intro-enter-text {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 16px 36px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--white);
}
.intro-enter-text svg {
    transition: transform 0.3s var(--ease-spring);
}
.intro-enter:hover .intro-enter-text svg { transform: translateX(4px); }

.intro-footer {
    position: absolute;
    bottom: 32px;
    display: flex; gap: 24px;
    font-size: 0.7rem;
    color: var(--steel);
    letter-spacing: 0.05em;
    animation: fadeSlideUp 0.8s var(--ease-out) 1.8s both;
}
.intro-footer i { margin-right: 4px; }

@keyframes letterReveal {
    from { opacity: 0; transform: translateY(30px) rotateX(40deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* ═══════════════════════════════════════════
   APP CONTAINER
   ═══════════════════════════════════════════ */
.app-container {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 120px;
    animation: appFadeIn 0.6s var(--ease-out);
}
@keyframes appFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── HEADER ── */
.app-header {
    position: sticky; top: 0;
    z-index: 100;
    padding: 0 16px;
    height: var(--header-h);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: box-shadow 0.3s;
}
.app-header.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.header-content {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.header-brand {
    display: flex; align-items: center; gap: 12px;
}
.header-logo-mark {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-hero);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.05em;
}
.header-brand-text { display: flex; flex-direction: column; }
.header-name {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--white);
}
.header-tagline {
    font-size: 0.6rem;
    color: var(--silver);
    font-weight: 400;
}
.header-cart {
    position: relative;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    color: var(--snow);
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
}
.header-cart:active { transform: scale(0.92); }
.header-cart-count {
    position: absolute; top: -2px; right: -2px;
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 50%;
}

/* ── SECTION NAV ── */
.section-nav {
    position: sticky; top: var(--header-h);
    z-index: 90;
    padding: 10px 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(10, 10, 15, 0.6);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.nav-track {
    display: flex; gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-track::-webkit-scrollbar { display: none; }

.nav-chip {
    flex-shrink: 0;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--silver);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}
.nav-chip i { font-size: 0.8rem; }
.nav-chip.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.nav-chip:not(.active):active { background: rgba(255,255,255,0.08); }

/* ═══════════════════════════════════════════
   HERO — WhatsApp CTA
   ═══════════════════════════════════════════ */
.hero-section {
    padding: 20px 16px 8px;
}
.hero-card {
    position: relative;
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-xl);
    padding: 40px 24px 32px;
    text-align: center;
    overflow: hidden;
}
.hero-card-shine {
    position: absolute; top: 0; left: 0;
    width: 200%; height: 100%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 55%, transparent 60%);
    animation: cardShine 6s ease-in-out infinite;
}
@keyframes cardShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero-icon-container {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
}
.hero-icon {
    font-size: 2.5rem;
    color: var(--wa);
    position: relative; z-index: 2;
}
.hero-icon-ring {
    position: absolute; inset: 0;
    border: 2px solid var(--wa);
    border-radius: 50%;
    opacity: 0.3;
    animation: ringPulse 3s ease-in-out infinite;
}
.hero-icon-ring-2 {
    animation-delay: 1.5s;
}
@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.3); opacity: 0; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--white);
}
.hero-title span {
    background: var(--grad-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 0.85rem;
    color: var(--silver);
    margin-bottom: 28px;
    max-width: 320px;
    margin-left: auto; margin-right: auto;
}

/* WhatsApp Mega Button */
.wa-mega-btn {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    width: 100%;
    padding: 18px 20px;
    background: var(--grad-wa);
    border-radius: var(--radius-lg);
    color: var(--white);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
    box-shadow: var(--shadow-wa);
}
.wa-mega-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px var(--wa-glow); }
.wa-mega-btn:active { transform: scale(0.98); }

.wa-mega-btn-glow {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}
.wa-mega-btn > .fab { font-size: 1.6rem; flex-shrink: 0; position: relative; }
.wa-mega-btn-text {
    flex: 1; text-align: left; position: relative;
}
.wa-mega-btn-text strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.wa-mega-btn-text small {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 400;
}
.wa-arrow {
    font-size: 1rem;
    position: relative;
    animation: arrowBounce 2s ease-in-out infinite;
}
@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.hero-formats {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin-top: 20px;
}
.hero-format-chip {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--silver);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 5px 10px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; gap: 4px;
}
.hero-format-chip i { font-size: 0.6rem; color: var(--accent-light); }

/* ═══════════════════════════════════════════
   CONTENT ZONES
   ═══════════════════════════════════════════ */
.main-zones { padding: 0 16px; }

.content-zone {
    margin-bottom: 32px;
}

.zone-title-bar {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px;
    padding-top: 24px;
}
.zone-title-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-hero);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    color: var(--white);
    flex-shrink: 0;
}
.zone-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}
.zone-subtitle {
    font-size: 0.75rem;
    color: var(--silver);
}

/* ═══════════════════════════════════════════
   CAMERA MODULE
   ═══════════════════════════════════════════ */
.camera-card {
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 24px;
}
.camera-card-header {
    padding: 24px 24px 16px;
    position: relative;
}
.camera-card-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent-light);
    background: rgba(99,102,241,0.12);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}
.camera-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}
.camera-card-header p {
    font-size: 0.8rem;
    color: var(--silver);
}

.camera-body {
    padding: 0 24px 24px;
}

/* Camera Start */
.camera-start {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 0;
}
.camera-open-btn {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 24px 40px;
    background: rgba(99,102,241,0.08);
    border: 2px dashed rgba(99,102,241,0.3);
    border-radius: var(--radius-lg);
    color: var(--accent-light);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
    width: 100%;
}
.camera-open-btn:hover { background: rgba(99,102,241,0.15); border-color: var(--accent); }
.camera-open-btn:active { transform: scale(0.97); }
.camera-open-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-hero);
    border-radius: 50%;
    font-size: 1.3rem;
    color: white;
}

.camera-divider {
    padding: 16px 0;
    color: var(--steel);
    font-size: 0.8rem;
}
.camera-divider span {
    background: var(--onyx);
    padding: 0 12px;
}

.camera-upload-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--cloud);
    font-size: 0.8rem;
    font-weight: 500;
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
}
.camera-upload-btn:hover { background: rgba(255,255,255,0.08); }
.camera-upload-btn i { color: var(--accent-light); }

/* Camera Preview */
.camera-preview {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #000;
}
.camera-preview video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.face-guide {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    pointer-events: none;
}
.face-oval {
    width: 55%; aspect-ratio: 3/4;
    border: 2px dashed rgba(255,255,255,0.4);
    border-radius: 50%;
}
.face-guide-text {
    margin-top: 12px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.cam-capture-btn {
    position: absolute; bottom: 20px;
    left: 50%; transform: translateX(-50%);
    width: 64px; height: 64px;
    border-radius: 50%;
    padding: 0;
}
.capture-outer {
    position: absolute; inset: 0;
    border: 3px solid rgba(255,255,255,0.8);
    border-radius: 50%;
}
.capture-inner {
    position: absolute; inset: 6px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cam-capture-btn:active .capture-inner { transform: scale(0.85); }

.cam-switch-btn {
    position: absolute; top: 16px; right: 16px;
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
}

/* Camera Result */
.camera-result {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
}
.camera-result img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.result-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex; justify-content: center;
}
.retake-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    transition: background 0.2s;
}
.retake-btn:hover { background: rgba(255,255,255,0.25); }

/* Format Selector */
.format-selector {
    padding: 0 24px 24px;
}
.format-selector-header {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 0 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
}
.format-selector-header i { color: var(--accent-light); }
.format-quality-badge {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--wa);
    background: rgba(37,211,102,0.1);
    border: 1px solid rgba(37,211,102,0.2);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.format-card {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}
.format-card:hover { background: rgba(255,255,255,0.06); }
.format-card.selected {
    border-color: var(--accent);
    background: rgba(99,102,241,0.1);
    box-shadow: 0 0 20px var(--accent-glow);
}
.format-card-label {
    position: absolute; top: -6px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--white);
    background: var(--accent);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.format-card-label.premium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}
.format-card-icon {
    font-size: 1.6rem;
    margin: 4px 0 6px;
}
.format-card h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2px;
}
.format-card-size {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--accent-light);
    display: block;
    margin-bottom: 4px;
}
.format-card p {
    font-size: 0.55rem;
    color: var(--silver);
    margin-bottom: 8px;
    line-height: 1.3;
}
.format-card-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--wa);
}
.format-card-price small {
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--silver);
}

/* Photo Quantity */
.photo-quantity {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.photo-quantity label {
    font-size: 0.8rem;
    color: var(--cloud);
    flex: 1;
}
.qty-control {
    display: flex; align-items: center; gap: 12px;
}
.qty-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--cloud);
    font-size: 0.7rem;
    transition: all 0.2s;
}
.qty-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.12); }
.qty-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    min-width: 24px;
    text-align: center;
}
.qty-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wa);
}

/* Photo Send Actions */
.photo-send-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.send-panel-btn, .send-wa-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
}
.send-panel-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--cloud);
}
.send-panel-btn:hover { background: rgba(255,255,255,0.1); }
.send-wa-btn {
    background: var(--grad-wa);
    color: var(--white);
    box-shadow: 0 4px 16px var(--wa-glow);
}
.send-wa-btn:hover { box-shadow: 0 8px 24px var(--wa-glow); transform: translateY(-1px); }

/* ═══════════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════════ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}
.product-card:active { transform: scale(0.97); }
.product-card.in-cart {
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 0 20px rgba(99,102,241,0.1);
}

.product-card-visual {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--graphite);
}
.product-card-visual img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}
.product-card:hover .product-card-visual img { transform: scale(1.05); }

.product-card-tag {
    position: absolute; top: 8px; left: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    color: var(--white);
    background: var(--accent);
}
.product-card-tag.premium { background: linear-gradient(135deg, #f59e0b, #f97316); }
.product-card-tag.eco { background: #10b981; }
.product-card-tag.pop { background: var(--accent); }
.product-card-tag.svc { background: #8b5cf6; }
.product-card-tag.sch { background: #f59e0b; }
.product-card-tag.tech { background: #3b82f6; }
.product-card-tag.new { background: #ef4444; }

.product-card-info {
    padding: 12px;
}
.product-card-info h3 {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 3px;
    line-height: 1.3;
}
.product-card-info p {
    font-size: 0.65rem;
    color: var(--silver);
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-card-bottom {
    display: flex; align-items: center; justify-content: space-between;
}
.product-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--wa);
}

.product-qty-ctrl {
    display: flex; align-items: center; gap: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.pqc-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    color: var(--cloud);
    font-size: 0.65rem;
    transition: all 0.15s;
}
.pqc-btn:active { background: rgba(255,255,255,0.1); }
.pqc-count {
    min-width: 24px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
}

/* ═══════════════════════════════════════════
   CART BAR
   ═══════════════════════════════════════════ */
.cart-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 80;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-spring);
}
.cart-bar.visible {
    transform: translateY(0);
}
.cart-bar-content {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: var(--slate);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.cart-bar-info { display: flex; flex-direction: column; }
.cart-bar-count {
    font-size: 0.7rem;
    color: var(--silver);
    font-weight: 500;
}
.cart-bar-total {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
}
.cart-bar-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    background: var(--grad-hero);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.cart-bar-btn:active { transform: scale(0.95); }
.cart-bar-btn i { font-size: 0.7rem; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.app-footer {
    padding: 40px 16px;
    text-align: center;
}
.footer-content {
    max-width: var(--max-w);
    margin: 0 auto;
}
.footer-brand-section {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-bottom: 20px;
}
.footer-logo {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-hero);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
}
.footer-brand-section > div {
    display: flex; flex-direction: column; text-align: left;
}
.footer-brand-section strong {
    font-size: 0.8rem;
    color: var(--white);
    letter-spacing: 0.05em;
}
.footer-brand-section span {
    font-size: 0.7rem;
    color: var(--silver);
}

.footer-contact {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 20px;
}
.footer-contact span {
    font-size: 0.75rem;
    color: var(--silver);
}
.footer-contact i {
    width: 16px;
    text-align: center;
    color: var(--accent-light);
    margin-right: 4px;
}

.footer-admin-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.7rem;
    color: var(--steel);
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    transition: color 0.2s;
}
.footer-admin-link:hover { color: var(--silver); }

.footer-copy {
    font-size: 0.65rem;
    color: var(--steel);
}

/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal-backdrop {
    position: fixed; inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}
.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-panel {
    width: 100%;
    max-width: var(--max-w);
    max-height: 90vh;
    background: var(--onyx);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-spring);
}
.modal-backdrop.active .modal-panel {
    transform: translateY(0);
}

.modal-drag-handle {
    width: 36px; height: 4px;
    background: var(--steel);
    border-radius: 2px;
    margin: 12px auto 0;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.modal-header h2 {
    font-size: 1rem;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.modal-header h2 i { color: var(--accent-light); }
.modal-close-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    color: var(--silver);
    font-size: 1rem;
    transition: background 0.2s;
}
.modal-close-btn:hover { background: rgba(255,255,255,0.08); }

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--steel) transparent;
}

/* Order Items */
.order-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.order-item-info { flex: 1; }
.order-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white);
}
.order-item-price-unit {
    font-size: 0.7rem;
    color: var(--silver);
}
.order-item-controls {
    display: flex; align-items: center; gap: 8px;
}
.order-qty-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: var(--cloud);
    font-size: 0.6rem;
    transition: all 0.15s;
}
.order-qty-btn.decrease:hover { background: rgba(239,68,68,0.15); color: var(--danger); }
.order-qty-btn.increase:hover { background: rgba(99,102,241,0.15); color: var(--accent-light); }
.order-item-qty {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    min-width: 20px;
    text-align: center;
}
.order-item-subtotal {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wa);
    min-width: 50px;
    text-align: right;
}

.empty-order {
    text-align: center;
    padding: 40px 0;
    color: var(--silver);
}
.empty-order i { font-size: 2rem; margin-bottom: 12px; display: block; opacity: 0.3; }
.empty-order p { font-size: 0.85rem; }

.modal-total-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0;
    margin-top: 8px;
    border-top: 2px solid rgba(255,255,255,0.06);
}
.modal-total-row > span:first-child {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--silver);
}
.modal-total-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
}

.modal-name-field {
    margin-top: 16px;
}
.modal-name-field label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cloud);
    margin-bottom: 8px;
}
.modal-name-field label i { color: var(--accent-light); font-size: 0.7rem; }
.modal-name-field input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-name-field input::placeholder { color: var(--steel); }
.modal-name-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-footer {
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,0.04);
}
.modal-send-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px;
    background: var(--grad-wa);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-wa);
    transition: all 0.3s var(--ease-out);
}
.modal-send-btn:disabled {
    opacity: 0.4;
    box-shadow: none;
    cursor: not-allowed;
}
.modal-send-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px var(--wa-glow);
}
.modal-send-btn:not(:disabled):active { transform: scale(0.98); }
.modal-send-btn i { font-size: 1.2rem; }

/* Success Modal */
.success-panel {
    border-radius: var(--radius-xl);
    text-align: center;
    padding: 48px 32px 36px;
    max-width: 380px;
    margin: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s var(--ease-spring);
}
.modal-backdrop.active .success-panel {
    transform: scale(1) translateY(0);
}

.success-check {
    width: 72px; height: 72px;
    margin: 0 auto 24px;
}
.success-check svg {
    width: 100%; height: 100%;
}
.success-check circle {
    stroke: var(--wa);
    stroke-width: 2;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: successCircle 0.6s var(--ease-out) 0.2s forwards;
}
.success-check path {
    stroke: var(--wa);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: successCheck 0.4s var(--ease-out) 0.6s forwards;
}
@keyframes successCircle { to { stroke-dashoffset: 0; } }
@keyframes successCheck { to { stroke-dashoffset: 0; } }

.success-panel h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}
.success-panel > p {
    font-size: 0.85rem;
    color: var(--silver);
    margin-bottom: 20px;
}
.success-order-num {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}
.success-sub {
    font-size: 0.75rem;
    color: var(--steel);
    margin-bottom: 24px;
}
.success-ok-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: background 0.2s;
}
.success-ok-btn:hover { background: rgba(255,255,255,0.1); }

/* ═══════════════════════════════════════════
   RESPONSIVE — Larger screens
   ═══════════════════════════════════════════ */
@media (min-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) {
    :root { --max-w: 680px; }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .format-options { gap: 14px; }
    .hero-card { padding: 48px 32px 40px; }
    .modal-panel {
        border-radius: var(--radius-xl);
        max-height: 80vh;
        margin-bottom: 40px;
    }
    .success-panel { margin-bottom: 0; }
}
@media (min-width: 1024px) {
    :root { --max-w: 720px; }
}

/* ═══════════════════════════════════════════
   UTILITIES & ANIMATIONS
   ═══════════════════════════════════════════ */
.fade-in {
    animation: fadeSlideUp 0.5s var(--ease-out) both;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 2px; }

/* Selection */
::selection {
    background: rgba(99,102,241,0.3);
    color: var(--white);
}

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